From 2915726c096eeb078d6da9ebad7263cd2ea58935 Mon Sep 17 00:00:00 2001 From: Simone D'Amario Date: Sat, 4 Jan 2025 21:30:35 +0100 Subject: [PATCH 01/47] setPowerRetries in ddcutil config allows for retries of power-on on startup --- README.md | 5 +- src/components/screenLib.js | 727 +++++++++++++++++++----------------- 2 files changed, 394 insertions(+), 338 deletions(-) diff --git a/README.md b/README.md index de97108..a9b9366 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,8 @@ To display the module insert it in the config.js file. ddcutil: { powerOnCode: "01", powerOffCode: "04", - skipSetVcpCheck: false + skipSetVcpCheck: false, + setPowerRetries: 0 } }, Pir: { @@ -118,7 +119,7 @@ To display the module insert it in the config.js file. | wrandrForceMode | **-mode 3 only-** Force screen resolution mode | String | null | | waylandDisplayName | **-mode 3 or mode 7 only-** Wayland display name (generaly `wayland-0` or `wayland-1`) | String | wayland-0 | | relayGPIOPin | **-mode 8 only-** GPIO pin of the relay | Number | 1 | - | ddcutil | **-mode 5 only-** Adjust feature codes of setvcp command for power on (**powerOnCode**) and off (**powerOffCode**), and to skip check after setvcp commands (**skipSetVcpCheck**) | Object | {powerOnCode: "01", powerOffCode: "04", skipSetVcpCheck: false} + | ddcutil | **-mode 5 only-** Adjust feature codes of setvcp command for power on (**powerOnCode**) and off (**powerOffCode**), to skip check after setvcp commands (**skipSetVcpCheck**) and to retry the screen powerOn on startup (**setPowerRetries**) | Object | {powerOnCode: "01", powerOffCode: "04", skipSetVcpCheck: false, setPowerRetries : 0} * Available style: - `style: 0` - Don't display Count-up bar in screen diff --git a/src/components/screenLib.js b/src/components/screenLib.js index 0fdf2cc..71ed797 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -30,7 +30,8 @@ class SCREEN { ddcutil: { powerOnCode: "01", powerOffCode: "04", - skipSetVcpCheck: false + skipSetVcpCheck: false, + setPowerRetries: 0 } }; this.config = lodash.defaultsDeep(this.config, this.default, {}); @@ -165,7 +166,7 @@ class SCREEN { this.start(); } - start (restart) { + async start (restart) { if (this.screen.locked || this.screen.running) return; if (!restart) log("Start."); else log("Restart."); @@ -174,7 +175,18 @@ class SCREEN { this.sendSocketNotification("SCREEN_PRESENCE", true); if (!this.screen.power) { this.governor("WORKING"); - if (this.config.mode) this.wantedPowerDisplay(true); + if (this.config.mode) { + if (this.config.mode === 5 && this.config.ddcutil.setPowerRetries > 0) { + let retries = 0; + let success = await this.wantedPowerDisplay(true); + while (retries < this.config.ddcutil.setPowerRetries && !success) { + console.info("[MMM-Pir] [LIB] [SCREEN] Retrying set power"); + await new Promise((resolve) => setTimeout(resolve, 2000)); + success = await this.wantedPowerDisplay(true); + retries++; + } + } else this.wantedPowerDisplay(true); + } this.sendSocketNotification("SCREEN_SHOWING"); this.screen.power = true; } @@ -282,375 +294,418 @@ class SCREEN { this.forceTurnOffScreen(); } - wantedPowerDisplay (wanted) { + async wantedPowerDisplay (wanted) { var actual = false; - switch (this.config.mode) { - case 0: - // disabled - log("Disabled mode"); - break; - case 1: - // dpms rpi - actual = false; - exec("DISPLAY=:0 xset q | grep Monitor", (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "dpms command error (mode: 1)"); - } - else { - let responseSh = stdout.trim(); - var displaySh = responseSh.split(" ")[2]; - if (displaySh === "On") actual = true; - this.resultDisplay(actual, wanted); - } - }); - break; - case 2: - // xrandr on primary display - exec("xrandr | grep 'connected primary'", - (err, stdout) => { + return new Promise((resolve) => { + switch (this.config.mode) { + case 0: + // disabled + log("Disabled mode"); + resolve(true); + break; + case 1: + // dpms rpi + actual = false; + exec("DISPLAY=:0 xset q | grep Monitor", async (err, stdout) => { if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] xrandr: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "xrandr command error (mode: 2)"); + console.error(`[MMM-Pir] [LIB] [SCREEN] ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "dpms command error (mode: 1)"); + resolve(false); } else { let responseSh = stdout.trim(); - var power = "on"; - this.screen.hdmiPort = responseSh.split(" ")[0]; - if (responseSh.split(" ")[3] === "(normal") power = "off"; - if (power === "on") actual = true; - log(`[MODE 2] Monitor on ${this.screen.hdmiPort} is ${power}`); - this.resultDisplay(actual, wanted); + var displaySh = responseSh.split(" ")[2]; + if (displaySh === "On") actual = true; + resolve(await this.resultDisplay(actual, wanted)); } }); - break; - case 3: - // wlr-randr - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr | grep 'Enabled'`, - (err, stdout) => { + break; + case 2: + // xrandr on primary display + exec("xrandr | grep 'connected primary'", + async (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] xrandr: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "xrandr command error (mode: 2)"); + resolve(false); + } + else { + let responseSh = stdout.trim(); + var power = "on"; + this.screen.hdmiPort = responseSh.split(" ")[0]; + if (responseSh.split(" ")[3] === "(normal") power = "off"; + if (power === "on") actual = true; + log(`[MODE 2] Monitor on ${this.screen.hdmiPort} is ${power}`); + resolve(await this.resultDisplay(actual, wanted)); + } + }); + break; + case 3: + // wlr-randr + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr | grep 'Enabled'`, + (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] wlr-randr: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlr-randr command error (mode: 3)"); + resolve(false); + } else { + let responseSh = stdout.trim(); + if (responseSh.split(" ")[1] === "yes") actual = true; + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr`, + async (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] wlr-randr: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlr-randr scan screen command error (mode: 3)"); + resolve(false); + } else { + let wResponse = stdout.trim(); + this.screen.hdmiPort = wResponse.split(" ")[0]; + log(`[MODE 3] Monitor on ${this.screen.hdmiPort} is ${actual}`); + resolve(await this.resultDisplay(actual, wanted)); + } + }); + } + }); + break; + case 4: + // CEC + exec("echo 'pow 0' | cec-client -s -d 1", async (err, stdout) => { if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] wlr-randr: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlr-randr command error (mode: 3)"); + console.error(`[MMM-Pir] [LIB] [SCREEN] ${err}`); + console.error(`[MMM-Pir] [LIB] [SCREEN] HDMI CEC Error: ${stdout}`); + this.sendSocketNotification("SCREEN_ERROR", "HDMI CEC command error (mode: 4)"); + resolve(false); } else { let responseSh = stdout.trim(); - if (responseSh.split(" ")[1] === "yes") actual = true; - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr`, - (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] wlr-randr: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlr-randr scan screen command error (mode: 3)"); - } else { - let wResponse = stdout.trim(); - this.screen.hdmiPort = wResponse.split(" ")[0]; - log(`[MODE 3] Monitor on ${this.screen.hdmiPort} is ${actual}`); - this.resultDisplay(actual, wanted); - } - }); + var displaySh = responseSh.split("\n")[1].split(" ")[2]; + if (displaySh === "on") actual = true; + if (displaySh === "unknown") log("HDMI CEC unknow state"); + resolve(await this.resultDisplay(actual, wanted)); } }); - break; - case 4: - // CEC - exec("echo 'pow 0' | cec-client -s -d 1", (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ${err}`); - console.error(`[MMM-Pir] [LIB] [SCREEN] HDMI CEC Error: ${stdout}`); - this.sendSocketNotification("SCREEN_ERROR", "HDMI CEC command error (mode: 4)"); - } else { - let responseSh = stdout.trim(); - var displaySh = responseSh.split("\n")[1].split(" ")[2]; - if (displaySh === "on") actual = true; - if (displaySh === "unknown") log("HDMI CEC unknow state"); - this.resultDisplay(actual, wanted); - } - }); - break; - case 5: - // ddcutil - exec("ddcutil getvcp d6", (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode: 5)"); - } - else { - let responseSh = stdout.trim(); - var displaySh = responseSh.split("(sl=")[1]; - if (displaySh === "0x01)") actual = true; - this.resultDisplay(actual, wanted); - } - }); - break; - case 6: - // dmps linux - exec("xset q | grep Monitor", (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] [Display Error] dpms linux: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "dpms linux command error (mode: 6)"); - } - else { - let responseSh = stdout.trim(); - var displaySh = responseSh.split(" ")[2]; - if (displaySh === "On") actual = true; - this.resultDisplay(actual, wanted); - } - }); - break; - case 7: - // labwc - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlopm --json`, - (err, stdout) => { + break; + case 5: + // ddcutil + exec("ddcutil getvcp d6", async (err, stdout) => { if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlopm command error (mode: 7)"); - } else { + console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode: 5)"); + resolve(false); + } + else { let responseSh = stdout.trim(); - try { - let responseJson = JSON.parse(responseSh); - let responseOutput = responseJson[0]; - if (responseOutput.error) { - console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm report arror: ${responseOutput.error}`); - this.sendSocketNotification("SCREEN_ERROR", "scan screen command report error (mode: 7)"); - } else { - this.screen.hdmiPort = responseOutput.output; - if (responseOutput["power-mode"] === "on") actual = true; - log(`[MODE 7] Monitor on ${this.screen.hdmiPort} from ${this.screen.waylandDisplayName} is ${actual}`); - this.resultDisplay(actual, wanted); + var displaySh = responseSh.split("(sl=")[1]; + if (displaySh === "0x01)") actual = true; + resolve(await this.resultDisplay(actual, wanted)); + } + }); + break; + case 6: + // dmps linux + exec("xset q | grep Monitor", async (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] [Display Error] dpms linux: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "dpms linux command error (mode: 6)"); + resolve(false); + } + else { + let responseSh = stdout.trim(); + var displaySh = responseSh.split(" ")[2]; + if (displaySh === "On") actual = true; + resolve(await this.resultDisplay(actual, wanted)); + } + }); + break; + case 7: + // labwc + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlopm --json`, + async (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlopm command error (mode: 7)"); + resolve(false); + } else { + let responseSh = stdout.trim(); + try { + let responseJson = JSON.parse(responseSh); + let responseOutput = responseJson[0]; + if (responseOutput.error) { + console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm report arror: ${responseOutput.error}`); + this.sendSocketNotification("SCREEN_ERROR", "scan screen command report error (mode: 7)"); + resolve(false); + } else { + this.screen.hdmiPort = responseOutput.output; + if (responseOutput["power-mode"] === "on") actual = true; + log(`[MODE 7] Monitor on ${this.screen.hdmiPort} from ${this.screen.waylandDisplayName} is ${actual}`); + resolve(await this.resultDisplay(actual, wanted)); + } + } catch (error) { + console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm: ${error}`); + console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm response: ${responseSh}`); + this.sendSocketNotification("SCREEN_ERROR", "scan screen command error (mode: 7)"); + resolve(false); } - } catch (error) { - console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm: ${error}`); - console.error(`[MMM-Pir] [LIB] [SCREEN] wlopm response: ${responseSh}`); - this.sendSocketNotification("SCREEN_ERROR", "scan screen command error (mode: 7)"); } + }); + break; + case 8: + // pinctrl + exec(`pinctrl lev ${this.config.relayGPIOPin}`, async (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] pinctrl get: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "pinctrl linux command error (mode: 8)"); + resolve(false); } - }); - break; - case 8: - // pinctrl - exec(`pinctrl lev ${this.config.relayGPIOPin}`, (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] pinctrl get: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "pinctrl linux command error (mode: 8)"); - } - else { - let responseSh = stdout.trim(); - if (responseSh === "1") { - actual = true; - } else { - actual = false; + else { + let responseSh = stdout.trim(); + if (responseSh === "1") { + actual = true; + } else { + actual = false; + } + resolve(await this.resultDisplay(actual, wanted)); } - this.resultDisplay(actual, wanted); - } - }); - break; - } + }); + break; + } + }); } - resultDisplay (actual, wanted) { + async resultDisplay (actual, wanted) { if (this.screen.forceOnStart) { log("Display: Force On Start"); - this.setPowerDisplay(true); - this.screen.forceOnStart = false; + let isOn = await this.setPowerDisplay(true); + if (isOn) this.screen.forceOnStart = false; + return isOn; } else { log(`Display -- Actual: ${actual} - Wanted: ${wanted}`); this.screen.power = actual; - if (actual && !wanted) this.setPowerDisplay(false); - if (!actual && wanted) this.setPowerDisplay(true); + if (actual && !wanted) return await this.setPowerDisplay(false); + else if (!actual && wanted) return await this.setPowerDisplay(true); + else return true; } } + /** + * + * @param {*} set + * @returns a promise that always resolves a boolean, being true iff the power setting as successfully completed + */ async setPowerDisplay (set) { log(`Display ${set ? "ON." : "OFF."}`); this.screen.power = set; // and finally apply rules ! this.SendScreenPowerState(); if (this.screen.awaitBeforeTurnOff && !set) await this.sleep(this.screen.awaitBeforeTurnOffTime); - switch (this.config.mode) { - case 1: - if (set) { - exec("DISPLAY=:0 xset dpms force on", (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 1, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "dpms command error (mode 1 power ON) "); - } - }); - } else { - exec("DISPLAY=:0 xset dpms force off", (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 1, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "dpms command error (mode 1 power OFF)"); - } - }); - } - break; - case 2: - if (set) { - exec(`xrandr --output ${this.screen.hdmiPort} --auto --rotate ${this.screen.xrandrRotation}`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 2, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "xrandr command error (mode 2 power ON)"); - } - }); - } else { - exec(`xrandr --output ${this.screen.hdmiPort} --off`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 2, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "xrandr command error (mode 2 power OFF)"); - } - }); - } - break; - case 3: - if (set) { - let wrandrOptions = [ - "--output", - this.screen.hdmiPort, - "--on", - "--transform", - this.screen.wrandrRotation - ]; - if (this.screen.wrandrForceMode) wrandrOptions.push("--mode", this.screen.wrandrForceMode); - wrandrOptions = wrandrOptions.join(" "); - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr ${wrandrOptions}`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 3, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlr-randr command error (mode 3 power ON)"); - } - }); - } - else { - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr --output ${this.screen.hdmiPort} --off`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 3, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlr-randr command error (mode 3 power OFF)"); - } - }); - } - break; - case 4: - if (set) { - exec("echo 'on 0' | cec-client -s", (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 4, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "HDMI CEC command error (mode 4 power ON)"); - } - }); - } else { - exec("echo 'standby 0' | cec-client -s", (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 4, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "HDMI CEC command error (mode 4 power OFF)"); - } - }); - } - break; - case 5: - if (set) { - exec(`ddcutil setvcp d6 ${this.config.ddcutil.powerOnCode} --noverify`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power ON)"); - } else if (!this.config.ddcutil.skipSetVcpCheck) { - // 5 second delay - setTimeout(() => { - exec("ddcutil getvcp d6", (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power ON check)"); - } - else { - let responseSh = stdout.trim(); - var displaySh = responseSh.split("(sl=")[1]; - if (displaySh !== `0x${this.config.ddcutil.powerOnCode})`) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${responseSh}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power ON verify)"); + return new Promise((resolve) => { + switch (this.config.mode) { + case 1: + if (set) { + exec("DISPLAY=:0 xset dpms force on", (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 1, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "dpms command error (mode 1 power ON) "); + resolve(false); + } else resolve(true); + }); + } else { + exec("DISPLAY=:0 xset dpms force off", (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 1, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "dpms command error (mode 1 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + case 2: + if (set) { + exec(`xrandr --output ${this.screen.hdmiPort} --auto --rotate ${this.screen.xrandrRotation}`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 2, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "xrandr command error (mode 2 power ON)"); + resolve(false); + } else resolve(true); + }); + } else { + exec(`xrandr --output ${this.screen.hdmiPort} --off`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 2, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "xrandr command error (mode 2 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + case 3: + if (set) { + let wrandrOptions = [ + "--output", + this.screen.hdmiPort, + "--on", + "--transform", + this.screen.wrandrRotation + ]; + if (this.screen.wrandrForceMode) wrandrOptions.push("--mode", this.screen.wrandrForceMode); + wrandrOptions = wrandrOptions.join(" "); + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr ${wrandrOptions}`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 3, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlr-randr command error (mode 3 power ON)"); + resolve(false); + } else resolve(true); + }); + } + else { + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlr-randr --output ${this.screen.hdmiPort} --off`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 3, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlr-randr command error (mode 3 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + case 4: + if (set) { + exec("echo 'on 0' | cec-client -s", (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 4, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "HDMI CEC command error (mode 4 power ON)"); + resolve(false); + } else resolve(true); + }); + } else { + exec("echo 'standby 0' | cec-client -s", (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 4, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "HDMI CEC command error (mode 4 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + case 5: + if (set) { + exec(`ddcutil setvcp d6 ${this.config.ddcutil.powerOnCode} --noverify`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power ON)"); + resolve(false); + } else if (!this.config.ddcutil.skipSetVcpCheck) { + // 5 second delay + setTimeout(() => { + exec("ddcutil getvcp d6", (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power ON check)"); + resolve(false); } - } - }); - }, 5000); - } - }); - } else { - exec(`ddcutil setvcp d6 ${this.config.ddcutil.powerOffCode} --noverify`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power OFF)"); - } else if (!this.config.ddcutil.skipSetVcpCheck) { - // 1 second delay - setTimeout(() => { - exec("ddcutil getvcp d6", (err, stdout) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power OFF check)"); - } - else { - let responseSh = stdout.trim(); - var displaySh = responseSh.split("(sl=")[1]; - if (displaySh !== `0x${this.config.ddcutil.powerOffCode})`) { - console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${responseSh}`); - this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power OFF verify)"); + else { + let responseSh = stdout.trim(); + var displaySh = responseSh.split("(sl=")[1]; + if (displaySh !== `0x${this.config.ddcutil.powerOnCode})`) { + console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${responseSh}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power ON verify)"); + resolve(false); + } else resolve(true); } - } - }); - }, 1000); - } - }); - } - break; - case 6: - if (set) { - exec("xset dpms force on", (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "dpms linux command error (mode 6 power ON)"); - } - }); - } else { - exec("xset dpms force off", (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "dpms linux command error (mode 6 power OFF)"); - } - }); - } - break; - case 7: - if (set) { - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlopm --on ${this.screen.hdmiPort}`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 7, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlopm command error (mode 3 power ON)"); - } - }); - } else { - exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlopm --off ${this.screen.hdmiPort}`, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 7, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "wlopm command error (mode 3 power OFF)"); - } - }); - } - break; - case 8: - if (set) { - let cmd = `pinctrl set ${this.config.relayGPIOPin} op dh`; - exec(cmd, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 8, power ON: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "pinctrl linux command error (mode 8 power ON)"); - } - }); - } - else { - let cmd = `pinctrl set ${this.config.relayGPIOPin} op dl`; - exec(cmd, (err) => { - if (err) { - console.error(`[MMM-Pir] [LIB] [SCREEN] mode 8, power OFF: ${err}`); - this.sendSocketNotification("SCREEN_ERROR", "pinctrl linux command error (mode 8 power OFF)"); - } - }); - } - break; - } + }); + }, 5000); + } else resolve(true); + }); + } else { + exec(`ddcutil setvcp d6 ${this.config.ddcutil.powerOffCode} --noverify`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power OFF)"); + resolve(false); + } else if (!this.config.ddcutil.skipSetVcpCheck) { + // 1 second delay + setTimeout(() => { + exec("ddcutil getvcp d6", (err, stdout) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power OFF check)"); + resolve(false); + } + else { + let responseSh = stdout.trim(); + var displaySh = responseSh.split("(sl=")[1]; + if (displaySh !== `0x${this.config.ddcutil.powerOffCode})`) { + console.error(`[MMM-Pir] [LIB] [SCREEN] ddcutil Error ${responseSh}`); + this.sendSocketNotification("SCREEN_ERROR", "ddcutil command error (mode 5 power OFF verify)"); + resolve(false); + } else resolve(true); + } + }); + }, 1000); + } else resolve(true); + }); + } + break; + case 6: + if (set) { + exec("xset dpms force on", (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "dpms linux command error (mode 6 power ON)"); + resolve(false); + } else resolve(true); + }); + } else { + exec("xset dpms force off", (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 5, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "dpms linux command error (mode 6 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + case 7: + if (set) { + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlopm --on ${this.screen.hdmiPort}`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 7, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlopm command error (mode 3 power ON)"); + resolve(false); + } else resolve(true); + }); + } else { + exec(`WAYLAND_DISPLAY=${this.screen.waylandDisplayName} wlopm --off ${this.screen.hdmiPort}`, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 7, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "wlopm command error (mode 3 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + case 8: + if (set) { + let cmd = `pinctrl set ${this.config.relayGPIOPin} op dh`; + exec(cmd, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 8, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "pinctrl linux command error (mode 8 power ON)"); + resolve(false); + } else resolve(true); + }); + } + else { + let cmd = `pinctrl set ${this.config.relayGPIOPin} op dl`; + exec(cmd, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 8, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "pinctrl linux command error (mode 8 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; + } + }); } state () { From 66f062fded63e6133260e599a5b4d39532ae95a8 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 5 Jan 2025 15:31:49 +0100 Subject: [PATCH 02/47] delete "out of module" part --- installer/postinstall.sh | 200 --------------------------------------- installer/preinstall.sh | 5 - 2 files changed, 205 deletions(-) diff --git a/installer/postinstall.sh b/installer/postinstall.sh index 4a65f2e..f97323e 100755 --- a/installer/postinstall.sh +++ b/installer/postinstall.sh @@ -57,206 +57,6 @@ fi # Go back to module root cd .. -# Disable Screensaver -### Part of script of @sdetweil magicmirror_script ### -### All credit is to Sam ### - -# find out if some screen saver running - -# get just the running processes and args -# just want the program name (1st token) -# find the 1st with 'saver' in it (should only be one) -# parse with path char, get the last field ( the actual pgm name) - -screen_saver_running=$(ps -A -o args | awk '{print $1}' | grep -m1 [s]aver | awk -F\/ '{print $NF}'); - -Installer_info "Try to Disable screen saver..." - -# if we found something -if [ "$screen_saver_running." != "." ]; then - # some screensaver running - case "$screen_saver_running" in - mate-screensaver) echo 'Found: mate screen saver' - gsettings set org.mate.screensaver lock-enabled false 2>/dev/null - gsettings set org.mate.screensaver idle-activation-enabled false 2>/dev/null - gsettings set org.mate.screensaver lock_delay 0 2>/dev/null - echo " $screen_saver_running disabled" - DISPLAY=:0 mate-screensaver >/dev/null 2>&1 & - ((change++)) - ;; - gnome-screensaver) echo 'Found: gnome screen saver' - gnome_screensaver-command -d >/dev/null 2>&1 - echo " $screen_saver_running disabled" - ((change++)) - ;; - xscreensaver) echo 'Found: xscreensaver running' - xsetting=$(grep -m1 'mode:' ~/.xscreensaver ) - if [ $(echo $xsetting | awk '{print $2}') != 'off' ]; then - sed -i "s/$xsetting/mode: off/" "$HOME/.xscreensaver" - echo " xscreensaver set to off" - ((change++)) - else - echo " xscreensaver already disabled" - fi - ;; - gsd-screensaver | gsd-screensaver-proxy) echo "Found: gsd-screensaver" - setting=$(gsettings get org.gnome.desktop.screensaver lock-enabled 2>/dev/null) - setting1=$(gsettings get org.gnome.desktop.session idle-delay 2>/dev/null) - if [ "$setting. $setting1." != '. .' ]; then - if [ "$setting $setting1" != 'false uint32 0' ]; then - echo "disable screensaver via gsettings was $setting and $setting1" - gsettings set org.gnome.desktop.screensaver lock-enabled false - gsettings set org.gnome.desktop.screensaver idle-activation-enabled false - gsettings set org.gnome.desktop.session idle-delay 0 - ((change++)) - else - echo "gsettings screen saver already disabled" - fi - fi - ;; - *) echo "some other screensaver $screen_saver_running" found - echo "please configure it manually" - ;; - esac -fi -if [ $(which gsettings | wc -l) == 1 ]; then - setting=$(gsettings get org.gnome.desktop.screensaver lock-enabled 2>/dev/null) - setting1=$(gsettings get org.gnome.desktop.session idle-delay 2>/dev/null) - echo "Found: screen saver in gsettings" - if [ "$setting. $setting1." != '. .' ]; then - if [ "$setting $setting1" != 'false uint32 0' ]; then - echo "disable screensaver via gsettings was $setting and $setting1" - gsettings set org.gnome.desktop.screensaver lock-enabled false - gsettings set org.gnome.desktop.screensaver idle-activation-enabled false - gsettings set org.gnome.desktop.session idle-delay 0 - ((change++)) - else - echo "gsettings screen saver already disabled" - fi - fi -fi -if [ -e "/etc/lightdm/lightdm.conf" ]; then - # if screen saver NOT already disabled? - echo "Found: screen saver in lightdm" - if [ $(grep 'xserver-command=X -s 0 -dpms' /etc/lightdm/lightdm.conf | wc -l) != 0 ]; then - echo "screensaver via lightdm already disabled but need to be updated" - sudo sed -i -r "s/^(xserver-command.*)$/xserver-command=X -s 0/" /etc/lightdm/lightdm.conf - ((change++)) - else - if [ $(grep 'xserver-command=X -s 0' /etc/lightdm/lightdm.conf | wc -l) == 0 ]; then - echo "disable screensaver via lightdm.conf" - sudo sed -i '/^\[Seat:/a xserver-command=X -s 0' /etc/lightdm/lightdm.conf - ((change++)) - else - echo "screensaver via lightdm already disabled" - fi - fi -fi -if [ -d "/etc/xdg/lxsession/LXDE-pi" ]; then - currently_set_old=$(grep -m1 '\-dpms' /etc/xdg/lxsession/LXDE-pi/autostart) - currently_set=$(grep -m1 '\xset s off' /etc/xdg/lxsession/LXDE-pi/autostart) - echo "Found: screen saver in lxsession" - if [ "$currently_set_old." != "." ]; then - echo "lxsession screen saver already disabled but need to updated" - sudo sed -i "/^@xset -dpms/d" /etc/xdg/lxsession/LXDE-pi/autostart - export DISPLAY=:0; xset s noblank;xset s off - ((change++)) - else - if [ "$currently_set." == "." ]; then - echo "disable screensaver via lxsession" - # turn it off for the future - sudo su -c "echo -e '@xset s noblank\n@xset s off' >> /etc/xdg/lxsession/LXDE-pi/autostart" - # turn it off now - export DISPLAY=:0; xset s noblank;xset s off - ((change++)) - else - echo "lxsession screen saver already disabled" - fi - fi -fi - -if [ -e "$HOME/.config/wayfire.ini" ]; then - echo "Found: wayfire.ini" - INI_PATH=$HOME/.config - WAYFIRE_CONFIG=$INI_PATH/wayfire.ini - IDLE='\[idle\]' - DPMS=dpms_timeout - IDLE_LINE=0 - DPMS_LINE=0 - DPMS_SETTING=0 - # get the line count - lc=$(wc -l <$WAYFIRE_CONFIG) - # find the idle line and its line number - IDLE_STRING=$(grep -n $IDLE $WAYFIRE_CONFIG) - # find the dpms line and its line number - DPMS_STRING=$(grep -n $DPMS $WAYFIRE_CONFIG) - # if we found the idle line - if [ "$IDLE_STRING." != "." ]; then - # extract line number - IDLE_LINE=$(echo $IDLE_STRING | awk -F: '{print $1}') - fi - # if we found the dpms line - if [ "$DPMS_STRING." != "." ]; then - # extract line number - DPMS_LINE=$(echo $DPMS_STRING | awk -F: '{print $1}') - # extract its value (after = sign) - DPMS_VALUE=$(echo $DPMS_STRING | awk -F= '{print $2}') - # set the value to write out - DPMS_OUT=$DPMS_SETTING - fi - - if [ $IDLE_LINE -ne 0 -a $DPMS_LINE -ne 0 -a $DPMS_LINE -gt $IDLE_LINE ]; then - # both found - # if we found the DPMS_VALUE != 0 - if [ $DPMS_VALUE -ne 0 ]; then - sed -i "s/$DPMS=.*/$DPMS=$DPMS_OUT/g" $WAYFIRE_CONFIG - ((change++)) - else - echo "wayfire screen saver already disabled" - fi - # if both NOT found - elif [ $IDLE_LINE -eq 0 -a $DPMS_LINE -eq 0 ]; then - # add the two lines - echo $IDLE | tr -d '\\' >> $WAYFIRE_CONFIG - echo $DPMS=$DPMS_SETTING >> $WAYFIRE_CONFIG - ((change++)) - # if we found the idle line, (but not dpms) - elif [ $IDLE_LINE -ne 0 ]; then - # IDLE was found - if [ $DPMS_LINE -eq 0 ]; then - # DPMS not found - # insert DPMS after idle - sed -i /$IDLE/a\ $DPMS=$DPMS_SETTING $WAYFIRE_CONFIG - ((change++)) - fi - else - # DPMS IS found , idle not found? weird - # insert idle before DPMS?? is this a problem? - # lets add both to the end, removing the old one first - # remove the dpms line, wherever it is - grep -v $DPMS $WAYFIRE_CONFIG>$INI_PATH/wayfire.ini.tmp - # add the idle line - echo $IDLE | tr -d '\\' >>$INI_PATH/wayfire.ini.tmp - #add the dpms line - echo $DPMS=$DPMS_SETTING >>$INI_PATH/wayfire.ini.tmp - # copy the current wayfire.ini to save place - cp $WAYFIRE_CONFIG $WAYFIRE_CONFIG.old - # coppy the work ini to the correct file - cp $INI_PATH/wayfire.ini.tmp $WAYFIRE_CONFIG - # remove the work file - rm $INI_PATH/wayfire.ini.tmp - ((change++)) - fi -fi - -if [[ "$change" -gt 0 ]]; then - echo - Installer_warning "[WARN] There is some change for disable screen saver" - Installer_warning "[WARN] Please, don't forget to reboot your OS for apply the new configuration!" -fi -Installer_success "Done" -echo - if [[ $rebuild == 1 ]]; then Installer_info "Rebuild MagicMirror..." electron-rebuild 1>/dev/null || { diff --git a/installer/preinstall.sh b/installer/preinstall.sh index 67470ec..73ff7fd 100755 --- a/installer/preinstall.sh +++ b/installer/preinstall.sh @@ -52,9 +52,4 @@ Installer_chk "$(pwd)/" "$Installer_module" Installer_chk "$(pwd)/../../" "MagicMirror" echo -# apply @sdetweil fix -Installer_info "Installing @sdetweil sandbox fix..." -bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixsandbox)" -echo - Installer_info "③ ➤ Install npm dependencies" \ No newline at end of file From 6cd5da3c2d93aa03c229e82c23bb61beae46a3f3 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 5 Jan 2025 15:32:45 +0100 Subject: [PATCH 03/47] version --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 330d5f2..a59ad0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "MMM-Pir", - "version": "2.4.4", + "version": "2.4.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "MMM-Pir", - "version": "2.4.4", + "version": "2.4.5", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 7ca3294..de195b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MMM-Pir", - "version": "2.4.4", + "version": "2.4.5", "description": "Screen manager", "keywords": [ "magic mirror", @@ -61,5 +61,5 @@ "engines": { "node": ">=20.9.0 <21 || >=22" }, - "rev": "250102" + "rev": "250105" } From e5025cf2119e5ec14f7e4e9a145033e0b863f74a Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 5 Jan 2025 15:39:40 +0100 Subject: [PATCH 04/47] add screenSaver.sh (must be not documented) --- installer/screenSaver.sh | 203 +++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 204 insertions(+) create mode 100755 installer/screenSaver.sh diff --git a/installer/screenSaver.sh b/installer/screenSaver.sh new file mode 100755 index 0000000..d9d4009 --- /dev/null +++ b/installer/screenSaver.sh @@ -0,0 +1,203 @@ +#!/bin/bash + +source installer/utils.sh + +# Disable Screensaver +### Part of script of @sdetweil magicmirror_script ### +### All credit is to Sam ### + +# find out if some screen saver running + +# get just the running processes and args +# just want the program name (1st token) +# find the 1st with 'saver' in it (should only be one) +# parse with path char, get the last field ( the actual pgm name) + +screen_saver_running=$(ps -A -o args | awk '{print $1}' | grep -m1 [s]aver | awk -F\/ '{print $NF}'); + +Installer_info "Try to Disable screen saver..." + +# if we found something +if [ "$screen_saver_running." != "." ]; then + # some screensaver running + case "$screen_saver_running" in + mate-screensaver) echo 'Found: mate screen saver' + gsettings set org.mate.screensaver lock-enabled false 2>/dev/null + gsettings set org.mate.screensaver idle-activation-enabled false 2>/dev/null + gsettings set org.mate.screensaver lock_delay 0 2>/dev/null + echo " $screen_saver_running disabled" + DISPLAY=:0 mate-screensaver >/dev/null 2>&1 & + ((change++)) + ;; + gnome-screensaver) echo 'Found: gnome screen saver' + gnome_screensaver-command -d >/dev/null 2>&1 + echo " $screen_saver_running disabled" + ((change++)) + ;; + xscreensaver) echo 'Found: xscreensaver running' + xsetting=$(grep -m1 'mode:' ~/.xscreensaver ) + if [ $(echo $xsetting | awk '{print $2}') != 'off' ]; then + sed -i "s/$xsetting/mode: off/" "$HOME/.xscreensaver" + echo " xscreensaver set to off" + ((change++)) + else + echo " xscreensaver already disabled" + fi + ;; + gsd-screensaver | gsd-screensaver-proxy) echo "Found: gsd-screensaver" + setting=$(gsettings get org.gnome.desktop.screensaver lock-enabled 2>/dev/null) + setting1=$(gsettings get org.gnome.desktop.session idle-delay 2>/dev/null) + if [ "$setting. $setting1." != '. .' ]; then + if [ "$setting $setting1" != 'false uint32 0' ]; then + echo "disable screensaver via gsettings was $setting and $setting1" + gsettings set org.gnome.desktop.screensaver lock-enabled false + gsettings set org.gnome.desktop.screensaver idle-activation-enabled false + gsettings set org.gnome.desktop.session idle-delay 0 + ((change++)) + else + echo "gsettings screen saver already disabled" + fi + fi + ;; + *) echo "some other screensaver $screen_saver_running" found + echo "please configure it manually" + ;; + esac +fi +if [ $(which gsettings | wc -l) == 1 ]; then + setting=$(gsettings get org.gnome.desktop.screensaver lock-enabled 2>/dev/null) + setting1=$(gsettings get org.gnome.desktop.session idle-delay 2>/dev/null) + echo "Found: screen saver in gsettings" + if [ "$setting. $setting1." != '. .' ]; then + if [ "$setting $setting1" != 'false uint32 0' ]; then + echo "disable screensaver via gsettings was $setting and $setting1" + gsettings set org.gnome.desktop.screensaver lock-enabled false + gsettings set org.gnome.desktop.screensaver idle-activation-enabled false + gsettings set org.gnome.desktop.session idle-delay 0 + ((change++)) + else + echo "gsettings screen saver already disabled" + fi + fi +fi +if [ -e "/etc/lightdm/lightdm.conf" ]; then + # if screen saver NOT already disabled? + echo "Found: screen saver in lightdm" + if [ $(grep 'xserver-command=X -s 0 -dpms' /etc/lightdm/lightdm.conf | wc -l) != 0 ]; then + echo "screensaver via lightdm already disabled but need to be updated" + sudo sed -i -r "s/^(xserver-command.*)$/xserver-command=X -s 0/" /etc/lightdm/lightdm.conf + ((change++)) + else + if [ $(grep 'xserver-command=X -s 0' /etc/lightdm/lightdm.conf | wc -l) == 0 ]; then + echo "disable screensaver via lightdm.conf" + sudo sed -i '/^\[Seat:/a xserver-command=X -s 0' /etc/lightdm/lightdm.conf + ((change++)) + else + echo "screensaver via lightdm already disabled" + fi + fi +fi +if [ -d "/etc/xdg/lxsession/LXDE-pi" ]; then + currently_set_old=$(grep -m1 '\-dpms' /etc/xdg/lxsession/LXDE-pi/autostart) + currently_set=$(grep -m1 '\xset s off' /etc/xdg/lxsession/LXDE-pi/autostart) + echo "Found: screen saver in lxsession" + if [ "$currently_set_old." != "." ]; then + echo "lxsession screen saver already disabled but need to updated" + sudo sed -i "/^@xset -dpms/d" /etc/xdg/lxsession/LXDE-pi/autostart + export DISPLAY=:0; xset s noblank;xset s off + ((change++)) + else + if [ "$currently_set." == "." ]; then + echo "disable screensaver via lxsession" + # turn it off for the future + sudo su -c "echo -e '@xset s noblank\n@xset s off' >> /etc/xdg/lxsession/LXDE-pi/autostart" + # turn it off now + export DISPLAY=:0; xset s noblank;xset s off + ((change++)) + else + echo "lxsession screen saver already disabled" + fi + fi +fi + +if [ -e "$HOME/.config/wayfire.ini" ]; then + echo "Found: wayfire.ini" + INI_PATH=$HOME/.config + WAYFIRE_CONFIG=$INI_PATH/wayfire.ini + IDLE='\[idle\]' + DPMS=dpms_timeout + IDLE_LINE=0 + DPMS_LINE=0 + DPMS_SETTING=0 + # get the line count + lc=$(wc -l <$WAYFIRE_CONFIG) + # find the idle line and its line number + IDLE_STRING=$(grep -n $IDLE $WAYFIRE_CONFIG) + # find the dpms line and its line number + DPMS_STRING=$(grep -n $DPMS $WAYFIRE_CONFIG) + # if we found the idle line + if [ "$IDLE_STRING." != "." ]; then + # extract line number + IDLE_LINE=$(echo $IDLE_STRING | awk -F: '{print $1}') + fi + # if we found the dpms line + if [ "$DPMS_STRING." != "." ]; then + # extract line number + DPMS_LINE=$(echo $DPMS_STRING | awk -F: '{print $1}') + # extract its value (after = sign) + DPMS_VALUE=$(echo $DPMS_STRING | awk -F= '{print $2}') + # set the value to write out + DPMS_OUT=$DPMS_SETTING + fi + + if [ $IDLE_LINE -ne 0 -a $DPMS_LINE -ne 0 -a $DPMS_LINE -gt $IDLE_LINE ]; then + # both found + # if we found the DPMS_VALUE != 0 + if [ $DPMS_VALUE -ne 0 ]; then + sed -i "s/$DPMS=.*/$DPMS=$DPMS_OUT/g" $WAYFIRE_CONFIG + ((change++)) + else + echo "wayfire screen saver already disabled" + fi + # if both NOT found + elif [ $IDLE_LINE -eq 0 -a $DPMS_LINE -eq 0 ]; then + # add the two lines + echo $IDLE | tr -d '\\' >> $WAYFIRE_CONFIG + echo $DPMS=$DPMS_SETTING >> $WAYFIRE_CONFIG + ((change++)) + # if we found the idle line, (but not dpms) + elif [ $IDLE_LINE -ne 0 ]; then + # IDLE was found + if [ $DPMS_LINE -eq 0 ]; then + # DPMS not found + # insert DPMS after idle + sed -i /$IDLE/a\ $DPMS=$DPMS_SETTING $WAYFIRE_CONFIG + ((change++)) + fi + else + # DPMS IS found , idle not found? weird + # insert idle before DPMS?? is this a problem? + # lets add both to the end, removing the old one first + # remove the dpms line, wherever it is + grep -v $DPMS $WAYFIRE_CONFIG>$INI_PATH/wayfire.ini.tmp + # add the idle line + echo $IDLE | tr -d '\\' >>$INI_PATH/wayfire.ini.tmp + #add the dpms line + echo $DPMS=$DPMS_SETTING >>$INI_PATH/wayfire.ini.tmp + # copy the current wayfire.ini to save place + cp $WAYFIRE_CONFIG $WAYFIRE_CONFIG.old + # coppy the work ini to the correct file + cp $INI_PATH/wayfire.ini.tmp $WAYFIRE_CONFIG + # remove the work file + rm $INI_PATH/wayfire.ini.tmp + ((change++)) + fi +fi + +if [[ "$change" -gt 0 ]]; then + echo + Installer_warning "[WARN] There is some change for disable screen saver" + Installer_warning "[WARN] Please, don't forget to reboot your OS for apply the new configuration!" +fi +Installer_success "Done" +echo diff --git a/package.json b/package.json index de195b2..fcc1e5f 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "pinctrl": "installer/pinctrl.sh", "rebuild": "installer/rebuild.sh", "reset": "rm -f *.js && rm -rf components/*.js && git reset --hard", + "screenSaver": "installer/screenSaver.sh", "presetup": "npm run dependencies && installer/preinstall.sh", "setup": "npm prune", "postsetup": "installer/postinstall.sh -m -r", From 97524439b790afed5595bf294fc803ce4cb95d2d Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 5 Jan 2025 17:00:40 +0100 Subject: [PATCH 05/47] add Pir.chip config --- README.md | 4 +++- src/components/pirLib.js | 10 +++++++--- src/node_helper.js | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a9b9366..53bf53d 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ To display the module insert it in the config.js file. }, Pir: { mode: 0, - gpio: 21 + gpio: 21, + chip: "auto" }, Motion: { deviceId: 0, @@ -152,6 +153,7 @@ For some displays, the `getvcp` commands cause the display to turn-on. In these | ------- | --- | --- | --- | | mode | Detection mode (see bellow) | Number | 0 | | gpio | BCM-number of the sensor pin. | Number | 21 | + | chip | **-mode 0 Only-** Define your GPIO Chip label (`auto` for automatic chip search) | String | "auto" | * Available mode: - `mode: 0` - use node-libgpiod library diff --git a/src/components/pirLib.js b/src/components/pirLib.js index 7602fab..868f1af 100644 --- a/src/components/pirLib.js +++ b/src/components/pirLib.js @@ -10,7 +10,8 @@ class PIR { this.default = { debug: false, gpio: 21, - mode: 0 + mode: 0, + chip: "auto" }; this.config = Object.assign({}, this.default, this.config); if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [PIR]", ...args); }; @@ -130,9 +131,12 @@ class PIR { this.pirChip = new Chip(number); const label = this.pirChip.getChipLabel(); log(`[GPIOD] Check chip ${number}: ${label}`); - if (label.includes("pinctrl-")) { + const isAuto = this.config.chip === "auto" && label.includes("pinctrl-"); + const isManual = this.config.chip !== "auto" && label.includes(this.config.chip); + + if (isAuto || isManual) { // found chip - console.log(`[MMM-Pir] [LIB] [PIR] [GPIOD] Found chip ${number}: ${label}`); + console.log(`[MMM-Pir] [LIB] [PIR] [GPIOD] - ${isAuto ? "Auto" : "Manual"} - Found chip ${number}: ${label}`); this.pirChipNumber = number; return false; } diff --git a/src/node_helper.js b/src/node_helper.js index 35a7a10..e0eaca9 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -101,7 +101,8 @@ module.exports = NodeHelper.create({ let pirConfig = { debug: this.config.debug, gpio: this.config.Pir.gpio, - mode: this.config.Pir.mode + mode: this.config.Pir.mode, + chip: this.config.Pir.chip }; let screenConfig = { From c7e2ad9bcc482016b21a12c2f6ce3852c397f4e7 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 5 Jan 2025 17:07:49 +0100 Subject: [PATCH 06/47] add back compatibility --- src/node_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_helper.js b/src/node_helper.js index e0eaca9..a73d40c 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -102,7 +102,7 @@ module.exports = NodeHelper.create({ debug: this.config.debug, gpio: this.config.Pir.gpio, mode: this.config.Pir.mode, - chip: this.config.Pir.chip + chip: this.config.Pir.chip || "auto" }; let screenConfig = { From 93a82d48feceae4df3a81a80b2fe52a18553a1da Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 6 Jan 2025 00:01:39 +0100 Subject: [PATCH 07/47] add missing config part --- src/MMM-Pir.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index c10745d..fe08166 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -28,11 +28,18 @@ Module.register("MMM-Pir", { wrandrForceRotation: "normal", wrandrForceMode: null, waylandDisplayName: "wayland-0", - relayGPIOPin: 0 + relayGPIOPin: 0, + ddcutil: { + powerOnCode: "01", + powerOffCode: "04", + skipSetVcpCheck: false, + setPowerRetries: 0 + } }, Pir: { mode: 0, - gpio: 21 + gpio: 21, + config: "auto" }, Motion: { deviceId: 0, From 170b13c3cc70ff2dd497f4741c17dc00eb0c9872 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 6 Jan 2025 00:13:39 +0100 Subject: [PATCH 08/47] Fix: Display.animate control Pir animate --- src/node_helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_helper.js b/src/node_helper.js index a73d40c..e04861e 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -73,7 +73,7 @@ module.exports = NodeHelper.create({ log("[CALLBACK] Pir:", noti, params || ""); if (noti === "PIR_DETECTED") { this.screen.wakeup(); - this.sendSocketNotification("PIR_DETECTED-ANIMATE"); + if (this.config.Display.animate) this.sendSocketNotification("PIR_DETECTED-ANIMATE"); } else { this.sendSocketNotification(noti, params); } @@ -102,7 +102,7 @@ module.exports = NodeHelper.create({ debug: this.config.debug, gpio: this.config.Pir.gpio, mode: this.config.Pir.mode, - chip: this.config.Pir.chip || "auto" + chip: this.config.Pir.chip }; let screenConfig = { From 7981d77767970d73ef4cb6dc69be6b966aae2472 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 6 Jan 2025 16:51:58 +0100 Subject: [PATCH 09/47] add Pir.animate // Motion.animate // Change: PIR_DETECTED-ANIMATE -> PIR_ANIMATE --- README.md | 4 ++++ package.json | 2 +- src/MMM-Pir.js | 6 ++++-- src/node_helper.js | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 53bf53d..2dbd207 100644 --- a/README.md +++ b/README.md @@ -65,11 +65,13 @@ To display the module insert it in the config.js file. } }, Pir: { + animate: true, mode: 0, gpio: 21, chip: "auto" }, Motion: { + animate: true, deviceId: 0, captureIntervalTime: 1000, scoreThreshold: 100 @@ -151,6 +153,7 @@ For some displays, the `getvcp` commands cause the display to turn-on. In these #### Pir Sensor Configuration | Option | Description | Type | Default | | ------- | --- | --- | --- | + | animate | Animate MMM-Pir module on detect | Boolean | true | | mode | Detection mode (see bellow) | Number | 0 | | gpio | BCM-number of the sensor pin. | Number | 21 | | chip | **-mode 0 Only-** Define your GPIO Chip label (`auto` for automatic chip search) | String | "auto" | @@ -167,6 +170,7 @@ This Feature allows to control your screen with a webcam as a motion detector. | Option | Description | Type | Default | | ------- | --- | --- | --- | + | animate | Animate MMM-Pir module on detect | Boolean | true | | captureIntervalTime | Time in ms between capturing images for detection | Number | 1000 | | scoreThreshold | Threshold minimum for an image to be considered significant | Number | 100 | | deviceId | Disable, enable auto detection or Specify which camera to use in case multiple exist in the system. | Number or String | 0 | diff --git a/package.json b/package.json index fcc1e5f..fafc7a3 100644 --- a/package.json +++ b/package.json @@ -62,5 +62,5 @@ "engines": { "node": ">=20.9.0 <21 || >=22" }, - "rev": "250105" + "rev": "250106" } diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index fe08166..42555b8 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -37,11 +37,13 @@ Module.register("MMM-Pir", { } }, Pir: { + animate: true, mode: 0, gpio: 21, config: "auto" }, Motion: { + animate: true, deviceId: 0, captureIntervalTime: 1000, scoreThreshold: 100 @@ -76,7 +78,7 @@ Module.register("MMM-Pir", { show: (...args) => this.show(...args), wakeup: () => { this.sendSocketNotification("WAKEUP"); - this.screenDisplay.animateModule(); + if (this.config.Motion.animate) this.screenDisplay.animateModule(); } }; @@ -144,7 +146,7 @@ Module.register("MMM-Pir", { timer: 15000 }); break; - case "PIR_DETECTED-ANIMATE": + case "PIR_ANIMATE": this.screenDisplay.animateModule(); break; case "GOVERNOR_ERROR": diff --git a/src/node_helper.js b/src/node_helper.js index e04861e..86f42fb 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -73,7 +73,7 @@ module.exports = NodeHelper.create({ log("[CALLBACK] Pir:", noti, params || ""); if (noti === "PIR_DETECTED") { this.screen.wakeup(); - if (this.config.Display.animate) this.sendSocketNotification("PIR_DETECTED-ANIMATE"); + if (this.config.Pir.animate) this.sendSocketNotification("PIR_ANIMATE"); } else { this.sendSocketNotification(noti, params); } From ee13006232cd1d1e0c102410cc92a4516b5085eb Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Mon, 6 Jan 2025 19:39:13 +0100 Subject: [PATCH 10/47] Broadcast user presence --- README.md | 1 + src/MMM-Pir.js | 3 +++ src/components/motionLib.js | 1 + src/node_helper.js | 1 + 4 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 2dbd207..1599007 100644 --- a/README.md +++ b/README.md @@ -374,6 +374,7 @@ You can disable sound by using `0` in your configuration * `MMM_PIR-SCREEN_POWERSTATUS` with payload `true` when your screen turn on. * `MMM_PIR-SCREEN_POWERSTATUS` with payload `false` when your screen turn off. + * `MMM_PIR-USER_PRESENCE` with payload `true` when motion is detected. - This module receive: diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index 42555b8..f33f166 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -146,6 +146,9 @@ Module.register("MMM-Pir", { timer: 15000 }); break; + case "PIR_DETECTED": + this.sendNotification("MMM_PIR-USER_PRESENCE", true); + break; case "PIR_ANIMATE": this.screenDisplay.animateModule(); break; diff --git a/src/components/motionLib.js b/src/components/motionLib.js index e21c4e4..a8cb7d2 100644 --- a/src/components/motionLib.js +++ b/src/components/motionLib.js @@ -56,6 +56,7 @@ class motionLib { if (hasMotion) { _logPIR(`[MOTION] Motion detected, score ${score}`); this.wakeup(); + this.sendNotification("MMM_PIR-USER_PRESENCE", true); } } }); diff --git a/src/node_helper.js b/src/node_helper.js index 86f42fb..f0735fb 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -73,6 +73,7 @@ module.exports = NodeHelper.create({ log("[CALLBACK] Pir:", noti, params || ""); if (noti === "PIR_DETECTED") { this.screen.wakeup(); + this.sendSocketNotification("PIR_DETECTED"); if (this.config.Pir.animate) this.sendSocketNotification("PIR_ANIMATE"); } else { this.sendSocketNotification(noti, params); From bf8ad58ba403e63f6b1a4d3598156cdbffd6c4bf Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 6 Jan 2025 23:50:37 +0100 Subject: [PATCH 11/47] fix: mistake value on Pir config (config -> chip) --- src/MMM-Pir.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index 42555b8..a4488e5 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -40,7 +40,7 @@ Module.register("MMM-Pir", { animate: true, mode: 0, gpio: 21, - config: "auto" + chip: "auto" }, Motion: { animate: true, From c9c1ccd06f77245656def122d3c88fb90d26f543 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 7 Jan 2025 00:24:44 +0100 Subject: [PATCH 12/47] add markdownlint test --- .github/workflows/markdown.yml | 24 + .markdownlint-cli2.mjs | 9 + package-lock.json | 942 ++++++++++++++++++++++++++++++++- package.json | 4 +- 4 files changed, 977 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/markdown.yml create mode 100644 .markdownlint-cli2.mjs diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml new file mode 100644 index 0000000..f51a6b5 --- /dev/null +++ b/.github/workflows/markdown.yml @@ -0,0 +1,24 @@ +name: "Markdown Testing" + +on: [pull_request] + +jobs: + eslint: + name: Run ReadMe Markdown scanning + runs-on: ubuntu-latest + steps: + - name: "Use Node.js v20.x (latest)" + uses: actions/setup-node@v4 + with: + node-version: "20.x" + check-latest: true + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Dependencies + run: npm prune + + - name: Run markdownlint-cli2 + run: npm run test:markdown + continue-on-error: false diff --git a/.markdownlint-cli2.mjs b/.markdownlint-cli2.mjs new file mode 100644 index 0000000..e9b3095 --- /dev/null +++ b/.markdownlint-cli2.mjs @@ -0,0 +1,9 @@ +const options = { + "config": { + "MD013": { + "line_length": 130 + } + } +}; + +export default options; diff --git a/package-lock.json b/package-lock.json index a59ad0e..d71e7eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,8 @@ "@stylistic/eslint-plugin": "^2.12.1", "eslint": "^9.17.0", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-package-json": "^0.19.0" + "eslint-plugin-package-json": "^0.19.0", + "markdownlint-cli2": "^0.17.1" }, "engines": { "node": ">=20.9.0 <21 || >=22" @@ -769,6 +770,19 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@stylistic/eslint-plugin": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.12.1.tgz", @@ -830,6 +844,16 @@ "@types/responselike": "^1.0.0" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -856,6 +880,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/katex": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", + "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -864,6 +895,13 @@ "@types/node": "*" } }, + "node_modules/@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.14.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.7.tgz", @@ -880,6 +918,13 @@ "@types/node": "*" } }, + "node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, "node_modules/@typescript-eslint/scope-manager": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", @@ -1472,6 +1517,39 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -1592,6 +1670,16 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1693,6 +1781,20 @@ } } }, + "node_modules/decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -1779,6 +1881,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -1807,6 +1919,20 @@ "node": ">=8" } }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -1837,6 +1963,19 @@ "once": "^1.4.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -2715,6 +2854,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -3012,6 +3172,32 @@ "node": ">= 12" } }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", @@ -3120,6 +3306,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3149,6 +3346,17 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -3416,6 +3624,13 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -3427,6 +3642,23 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/katex": { + "version": "0.16.19", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.19.tgz", + "integrity": "sha512-3IA6DYVhxhBabjSLTNO9S4+OliA3Qvb8pBQXMfC4WxXJgLwZgnfDl0BmB4z6nBMdznBsZ+CGM8DrGZ5hcguDZg==", + "dev": true, + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -3448,6 +3680,16 @@ "node": ">= 0.8.0" } }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3555,6 +3797,92 @@ "node": ">=8" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdownlint": { + "version": "0.37.3", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.37.3.tgz", + "integrity": "sha512-eoQqH0291YCCjd+Pe1PUQ9AmWthlVmS0XWgcionkZ8q34ceZyRI+pYvsWksXJJL8OBkWCPwp1h/pnXxrPFC4oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "markdown-it": "14.1.0", + "micromark": "4.0.1", + "micromark-core-commonmark": "2.0.2", + "micromark-extension-directive": "3.0.2", + "micromark-extension-gfm-autolink-literal": "2.1.0", + "micromark-extension-gfm-footnote": "2.1.0", + "micromark-extension-gfm-table": "2.1.0", + "micromark-extension-math": "3.1.0", + "micromark-util-types": "2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" + } + }, + "node_modules/markdownlint-cli2": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.17.1.tgz", + "integrity": "sha512-n1Im9lhKJJE12/u2N0GWBwPqeb0HGdylN8XpSFg9hbj35+QalY9Vi6mxwUQdG6wlSrrIq9ZDQ0Q85AQG9V2WOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "globby": "14.0.2", + "js-yaml": "4.1.0", + "jsonc-parser": "3.3.1", + "markdownlint": "0.37.3", + "markdownlint-cli2-formatter-default": "0.0.5", + "micromatch": "4.0.8" + }, + "bin": { + "markdownlint-cli2": "markdownlint-cli2-bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" + } + }, + "node_modules/markdownlint-cli2-formatter-default": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/markdownlint-cli2-formatter-default/-/markdownlint-cli2-formatter-default-0.0.5.tgz", + "integrity": "sha512-4XKTwQ5m1+Txo2kuQ3Jgpo/KmnG+X90dWt4acufg6HVGadTUG5hzHF/wssp9b5MBYOMCnZ9RMPaU//uHsszF8Q==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/DavidAnson" + }, + "peerDependencies": { + "markdownlint-cli2": ">=0.0.4" + } + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true, + "license": "MIT" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3564,6 +3892,542 @@ "node": ">= 8" } }, + "node_modules/micromark": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.1.tgz", + "integrity": "sha512-eBPdkcoCNvYcxQOAKAlceo5SNdzZWfF+FcSupREAzdAh9rRmE239CEQAiTwIgblwnoM8zzj35sZ5ZwvSEOF6Kw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.2.tgz", + "integrity": "sha512-FKjQKbxd1cibWMM1P9N+H8TwlgGgSkWZMmfuVucLCHaYqeSvJ0hFeHsIa65pA2nYbes0f8LDHPMrd9X7Ujxg9w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-directive": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/micromark-extension-directive/-/micromark-extension-directive-3.0.2.tgz", + "integrity": "sha512-wjcXHgk+PPdmvR58Le9d7zQYWy+vKEU9Se44p2CrCDPiLr2FMyiT4Fyb5UFKFC66wGB3kPlgD7q3TnoqPS7SZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "parse-entities": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", + "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz", + "integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-math": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-3.1.0.tgz", + "integrity": "sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/katex": "^0.16.0", + "devlop": "^1.0.0", + "katex": "^0.16.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.3.tgz", + "integrity": "sha512-VXJJuNxYWSoYL6AJ6OQECCFGhIU2GGHMw8tahogePBrjkG8aCCas3ibkp7RnVOSTClg2is05/R7maAhF1XyQMg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.1.tgz", + "integrity": "sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -4112,6 +4976,26 @@ "node": ">=6" } }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4144,6 +5028,19 @@ "dev": true, "license": "MIT" }, + "node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/picomatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", @@ -4229,6 +5126,16 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/python-shell": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/python-shell/-/python-shell-5.0.0.tgz", @@ -4623,6 +5530,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -5030,6 +5950,13 @@ "node": ">=14.17" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -5051,6 +5978,19 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unique-filename": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", diff --git a/package.json b/package.json index fafc7a3..5b06d96 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "setup": "npm prune", "postsetup": "installer/postinstall.sh -m -r", "test": "npm run lint", + "test:markdown": "markdownlint-cli2 *.md", "test:minify": "cd installer && node minify.js", "update": "installer/update.sh" }, @@ -57,7 +58,8 @@ "@stylistic/eslint-plugin": "^2.12.1", "eslint": "^9.17.0", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-package-json": "^0.19.0" + "eslint-plugin-package-json": "^0.19.0", + "markdownlint-cli2": "^0.17.1" }, "engines": { "node": ">=20.9.0 <21 || >=22" From a76aa2036a4b1cf353601c82cd6e67b21b58b479 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 7 Jan 2025 00:27:18 +0100 Subject: [PATCH 13/47] update markdown workflow --- .github/workflows/markdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml index f51a6b5..49bf6de 100644 --- a/.github/workflows/markdown.yml +++ b/.github/workflows/markdown.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Install Dependencies - run: npm prune + run: npm run dependencies && npm prune - name: Run markdownlint-cli2 run: npm run test:markdown From 93593432c7f160d0d96b7244a18ea789d6cba650 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 7 Jan 2025 00:35:12 +0100 Subject: [PATCH 14/47] add css test --- .github/workflows/css.yml | 24 + .stylelintrc.json | 12 + package-lock.json | 1046 +++++++++++++++++++++++++++++++++++-- package.json | 6 +- 4 files changed, 1042 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/css.yml create mode 100644 .stylelintrc.json diff --git a/.github/workflows/css.yml b/.github/workflows/css.yml new file mode 100644 index 0000000..99a9b8f --- /dev/null +++ b/.github/workflows/css.yml @@ -0,0 +1,24 @@ +name: "CSS Testing" + +on: [pull_request] + +jobs: + eslint: + name: Run stylelint css scanning + runs-on: ubuntu-latest + steps: + - name: "Use Node.js v20.x (latest)" + uses: actions/setup-node@v4 + with: + node-version: "20.x" + check-latest: true + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Dependencies + run: npm run dependencies && npm prune + + - name: Run stylelint + run: npm run test:css + continue-on-error: false diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..8ba7410 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,12 @@ +{ + "extends": ["stylelint-config-standard"], + "plugins": ["stylelint-prettier"], + "rules": { + "prettier/prettier": true, + "selector-id-pattern": null, + "custom-property-pattern": null, + "selector-class-pattern": null, + "keyframes-name-pattern": null, + "no-descending-specificity": null + } +} diff --git a/package-lock.json b/package-lock.json index d71e7eb..b6de4c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,10 @@ "eslint": "^9.17.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-package-json": "^0.19.0", - "markdownlint-cli2": "^0.17.1" + "markdownlint-cli2": "^0.17.1", + "stylelint": "^16.12.0", + "stylelint-config-standard": "^36.0.1", + "stylelint-prettier": "^5.0.2" }, "engines": { "node": ">=20.9.0 <21 || >=22" @@ -49,6 +52,132 @@ "dev": true, "license": "ISC" }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", + "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", + "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.2.tgz", + "integrity": "sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/@dual-bundle/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/@electron/node-gyp": { "version": "10.2.0-electron.1", "resolved": "git+ssh://git@github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2", @@ -1196,6 +1325,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/array.prototype.findlastindex": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", @@ -1278,6 +1417,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1601,24 +1750,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -1670,6 +1801,13 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "dev": true, + "license": "MIT" + }, "node_modules/commander": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", @@ -1686,6 +1824,33 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/cron-parser": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", @@ -1711,6 +1876,43 @@ "node": ">= 8" } }, + "node_modules/css-functions-list": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.3.tgz", + "integrity": "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12 || >=16" + } + }, + "node_modules/css-tree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", + "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.12.2", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -1766,11 +1968,12 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1933,6 +2136,29 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob/node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -1946,6 +2172,12 @@ "node": ">=0.10.0" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", @@ -1989,6 +2221,16 @@ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-abstract": { "version": "1.23.3", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", @@ -2497,6 +2739,13 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -2537,6 +2786,33 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.5.tgz", + "integrity": "sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -2825,6 +3101,47 @@ "node": ">=10.13.0" } }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/globals": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", @@ -2875,6 +3192,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", + "dev": true, + "license": "MIT" + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -3003,6 +3327,19 @@ "node": ">= 0.4" } }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -3145,6 +3482,13 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", @@ -3215,6 +3559,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -3421,6 +3772,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -3538,6 +3899,13 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3560,7 +3928,14 @@ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, - "node_modules/json-schema-traverse": { + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "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==", @@ -3667,6 +4042,23 @@ "json-buffer": "3.0.1" } }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/known-css-properties": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", + "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==", + "dev": true, + "license": "MIT" + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3680,6 +4072,13 @@ "node": ">= 0.8.0" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, "node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", @@ -3715,6 +4114,13 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "license": "MIT" + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -3876,6 +4282,24 @@ "markdownlint-cli2": ">=0.0.4" } }, + "node_modules/mathml-tag-names": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", + "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdn-data": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", + "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", @@ -3883,6 +4307,19 @@ "dev": true, "license": "MIT" }, + "node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4651,15 +5088,35 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/nan": { "version": "2.22.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==" }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4733,6 +5190,16 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -4996,6 +5463,25 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -5041,6 +5527,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/picomatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", @@ -5064,6 +5557,90 @@ "node": ">= 0.4" } }, + "node_modules/postcss": { + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-resolve-nested-selector": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", + "dev": true, + "license": "MIT" + }, + "node_modules/postcss-safe-parser": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", + "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5073,6 +5650,36 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/proc-log": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", @@ -5226,6 +5833,16 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -5530,6 +6147,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/slash": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", @@ -5543,6 +6173,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -5628,6 +6276,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", @@ -5663,6 +6321,20 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -5748,6 +6420,230 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stylelint": { + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.12.0.tgz", + "integrity": "sha512-F8zZ3L/rBpuoBZRvI4JVT20ZanPLXfQLzMOZg1tzPflRVh9mKpOZ8qcSIhh1my3FjAjZWG4T2POwGnmn6a6hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/media-query-list-parser": "^4.0.2", + "@csstools/selector-specificity": "^5.0.0", + "@dual-bundle/import-meta-resolve": "^4.1.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^9.0.0", + "css-functions-list": "^3.2.3", + "css-tree": "^3.0.1", + "debug": "^4.3.7", + "fast-glob": "^3.3.2", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^9.1.0", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^6.0.2", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.35.0", + "mathml-tag-names": "^2.1.3", + "meow": "^13.2.0", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.49", + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-safe-parser": "^7.0.1", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "supports-hyperlinks": "^3.1.0", + "svg-tags": "^1.0.0", + "table": "^6.9.0", + "write-file-atomic": "^5.0.1" + }, + "bin": { + "stylelint": "bin/stylelint.mjs" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/stylelint-config-recommended": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", + "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "stylelint": "^16.1.0" + } + }, + "node_modules/stylelint-config-standard": { + "version": "36.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", + "integrity": "sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], + "license": "MIT", + "dependencies": { + "stylelint-config-recommended": "^14.0.1" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "stylelint": "^16.1.0" + } + }, + "node_modules/stylelint-prettier": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/stylelint-prettier/-/stylelint-prettier-5.0.2.tgz", + "integrity": "sha512-qJ+BN+1T2ZcKz9WIrv0x+eFGHzSUnXfXd5gL///T6XoJvr3D8/ztzz2fhtmXef7Vb8P33zBXmLTTveByr0nwBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "prettier": ">=3.0.0", + "stylelint": ">=16.0.0" + } + }, + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true, + "license": "MIT" + }, + "node_modules/stylelint/node_modules/file-entry-cache": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", + "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/stylelint/node_modules/flat-cache": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", + "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.3.1", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/stylelint/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/globby/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/stylelint/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/stylelint/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/stylelint/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5759,6 +6655,23 @@ "node": ">=8" } }, + "node_modules/supports-hyperlinks": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz", + "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -5772,6 +6685,53 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", + "dev": true + }, + "node_modules/table": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", @@ -6118,6 +7078,20 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6156,24 +7130,6 @@ "node": ">=12" } }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 5b06d96..0e5f19b 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "setup": "npm prune", "postsetup": "installer/postinstall.sh -m -r", "test": "npm run lint", + "test:css": "stylelint *.css", "test:markdown": "markdownlint-cli2 *.md", "test:minify": "cd installer && node minify.js", "update": "installer/update.sh" @@ -59,7 +60,10 @@ "eslint": "^9.17.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-package-json": "^0.19.0", - "markdownlint-cli2": "^0.17.1" + "markdownlint-cli2": "^0.17.1", + "stylelint": "^16.12.0", + "stylelint-config-standard": "^36.0.1", + "stylelint-prettier": "^5.0.2" }, "engines": { "node": ">=20.9.0 <21 || >=22" From 712f4472c83e418e5aaed926f5c759fee88b4dba Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 7 Jan 2025 00:37:35 +0100 Subject: [PATCH 15/47] fix: css test --- MMM-Pir.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMM-Pir.css b/MMM-Pir.css index 3e4076b..cfc41a1 100644 --- a/MMM-Pir.css +++ b/MMM-Pir.css @@ -73,4 +73,4 @@ #MMM-PIR_AVAILABILITY_TEXT { margin-right: 10px; -} \ No newline at end of file +} From 0ee90c258205229ed28a7f4c17f39aee77e9f512 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 7 Jan 2025 00:47:03 +0100 Subject: [PATCH 16/47] Fix: Readme --- .markdownlint-cli2.mjs | 2 +- README.md | 209 +++++++++++++++++++++++------------------ 2 files changed, 121 insertions(+), 90 deletions(-) diff --git a/.markdownlint-cli2.mjs b/.markdownlint-cli2.mjs index e9b3095..addeb57 100644 --- a/.markdownlint-cli2.mjs +++ b/.markdownlint-cli2.mjs @@ -1,7 +1,7 @@ const options = { "config": { "MD013": { - "line_length": 130 + "line_length": 350 } } }; diff --git a/README.md b/README.md index 2dbd207..08e6df0 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,26 @@ # MMM-Pir -After a configured time without any user interaction the display will turn off and hide all modules for economy mode.
+After a configured time without any user interaction the display will turn off and hide all modules for economy mode. + It will wake up with a Pir sensor, Touch screen or crontab ## Screenshot -![](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot.png) - -![](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot2.png) +![screenshot1](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot.png) -![](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot3.png) +![screenshot2](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot2.png) -![](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot4.png) +![screenshot3](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot3.png) +![screenshot4](https://raw.githubusercontent.com/bugsounet/MMM-Pir/dev/screenshot/screenshot4.png) ## Installation -**Minimal MagicMirror² version requirement: v2.28.0**
-**Minimal node version requirement: v20.9.0** +* **Minimal MagicMirror² version requirement: v2.28.0** +* **Minimal node version requirement: v20.18.1** Clone the module into your MagicMirror module folder and execute `npm run setup` in the module's directory. + ```sh cd ~/MagicMirror/modules git clone https://github.com/bugsounet/MMM-Pir @@ -30,6 +31,7 @@ npm run setup This module will verify if all screen saver is disabled and disable it if needed ## Configuration + To display the module insert it in the config.js file. ### Personalized configuration @@ -97,13 +99,17 @@ To display the module insert it in the config.js file. ``` ### Detailed Configuration + #### Root Configuration + | Option | Description | Type | Default | | ------- | --- | --- | --- | | debug | enable or not debug mode | Boolean | false | ------ + #### Display Configuration + | Option | Description | Type | Default | | ------- | --- | --- | --- | | timeout | Time before the mirror turns off the display if no user activity is detected. (in ms) | Number | 120000 | @@ -122,35 +128,39 @@ To display the module insert it in the config.js file. | wrandrForceMode | **-mode 3 only-** Force screen resolution mode | String | null | | waylandDisplayName | **-mode 3 or mode 7 only-** Wayland display name (generaly `wayland-0` or `wayland-1`) | String | wayland-0 | | relayGPIOPin | **-mode 8 only-** GPIO pin of the relay | Number | 1 | - | ddcutil | **-mode 5 only-** Adjust feature codes of setvcp command for power on (**powerOnCode**) and off (**powerOffCode**), to skip check after setvcp commands (**skipSetVcpCheck**) and to retry the screen powerOn on startup (**setPowerRetries**) | Object | {powerOnCode: "01", powerOffCode: "04", skipSetVcpCheck: false, setPowerRetries : 0} - - * Available style: - - `style: 0` - Don't display Count-up bar in screen - - `style: 1` - Display count-up in text mode - - `style: 2` - Display count-up with `Line` style - - `style: 3` - Display count-up with `SemiCircle` style - - `style: 4` - Display count-up with `Circle` style - - * Available mode: - - `mode: 0` - disabled mode - - `mode: 1` - use dpms (For raspbian 11 or raspbian 12 with x11 compositor) - - `mode: 2` - use xrandr (For raspbian 11 or raspbian 12 with x11 compositor) - - `mode: 3` - use wlr-randr (For raspbian 12 with wayfire compositor) - - `mode: 4` - use HDMI CEC - - `mode: 5` - use ddcutil - - `mode: 6` - use dpms (linux version for debian, ubuntu, ...) - - `mode: 7` - use labwc (For raspbian 12 with labwc compositor) - - `mode: 8` - use pinctrl for switching a relay - -Note:
-It's possible that `pinctrl` tool is not installed by default on your system (raspbian 11)
-You can install it by using this command in your `MMM-Pir` folder: `npm run pinctrl`
- -Note for ddcutil:
-For some displays, the `getvcp` commands cause the display to turn-on. In these cases it could be useful to set the display config value of `ddcutil.skipSetVcpCheck` to `true`.
+ | ddcutil | **-mode 5 only-** Adjust feature codes of setvcp command for power on (**powerOnCode**) and off (**powerOffCode**), to skip check after setvcp commands (**skipSetVcpCheck**) and to retry the screen powerOn on startup (**setPowerRetries**) | Object | {powerOnCode: "01", powerOffCode: "04", skipSetVcpCheck: false, setPowerRetries : 0} | + +* Available style: + * `style: 0` - Don't display Count-up bar in screen + * `style: 1` - Display count-up in text mode + * `style: 2` - Display count-up with `Line` style + * `style: 3` - Display count-up with `SemiCircle` style + * `style: 4` - Display count-up with `Circle` style + +* Available mode: + * `mode: 0` - disabled mode + * `mode: 1` - use dpms (For raspbian 11 or raspbian 12 with x11 compositor) + * `mode: 2` - use xrandr (For raspbian 11 or raspbian 12 with x11 compositor) + * `mode: 3` - use wlr-randr (For raspbian 12 with wayfire compositor) + * `mode: 4` - use HDMI CEC + * `mode: 5` - use ddcutil + * `mode: 6` - use dpms (linux version for debian, ubuntu, ...) + * `mode: 7` - use labwc (For raspbian 12 with labwc compositor) + * `mode: 8` - use pinctrl for switching a relay + +Notes: + +* It's possible that `pinctrl` tool is not installed by default on your system (raspbian 11) +* You can install it by using this command in your `MMM-Pir` folder: `npm run pinctrl` + +Note for ddcutil: + +For some displays, the `getvcp` commands cause the display to turn-on. In these cases it could be useful to set the display config value of `ddcutil.skipSetVcpCheck` to `true`. ------ + #### Pir Sensor Configuration + | Option | Description | Type | Default | | ------- | --- | --- | --- | | animate | Animate MMM-Pir module on detect | Boolean | true | @@ -159,13 +169,15 @@ For some displays, the `getvcp` commands cause the display to turn-on. In these | chip | **-mode 0 Only-** Define your GPIO Chip label (`auto` for automatic chip search) | String | "auto" | * Available mode: - - `mode: 0` - use node-libgpiod library - - `mode: 1` - use python script with gpiozero library + * `mode: 0` - use node-libgpiod library + * `mode: 1` - use python script with gpiozero library ⚠ You can disable PIR Sensor detection by using `gpio: 0` ------ + #### Motion Configuration + This Feature allows to control your screen with a webcam as a motion detector. | Option | Description | Type | Default | @@ -176,16 +188,20 @@ This Feature allows to control your screen with a webcam as a motion detector. | deviceId | Disable, enable auto detection or Specify which camera to use in case multiple exist in the system. | Number or String | 0 | Notes: `deviceId` value setting: - * Disable Motion: `deviceId: 0,` (You don't have any webcam) - * Enable device auto-detection: `deviceId: 1,` -In 99% of time auto-detection works but in case you have SooOOoo many webcam, open the developer console (`npm start dev`) and try:
+* Disable Motion: `deviceId: 0,` (You don't have any webcam) +* Enable device auto-detection: `deviceId: 1,` + +In 99% of time auto-detection works but in case you have SooOOoo many webcam, open the developer console (`npm start dev`) and try: + `await navigator.mediaDevices.enumerateDevices()` to get all devices and copy and past the `deviceId` of your needed device -sample:
-`deviceId: "27d8c2a4b894149a2caae146d8f4bea9cd74c528453a5859ab18c2c764d7d2411",` + +sample: `deviceId: "27d8c2a4b894149a2caae146d8f4bea9cd74c528453a5859ab18c2c764d7d2411",` ------ + #### Cron Configuration + This is the rule to turn your screen on and off based on a set time event | Option | Description | Type | Default | @@ -195,21 +211,22 @@ This is the rule to turn your screen on and off based on a set time event | OFF | cron time to turn OFF Screen | Array | [] | * Available mode: - - `mode: 0` - Disable Cron using. - - `mode: 1` - Wake up / turn OFF automaticaly by CRON and use countdown - * `MMM-Pir` timer will be used before turn off screen - * Allow to use sensor/touch/camera when CRON `ON` is activated - * When screen is OFF by cron, you can't wakeup it. - * When screen is OFF by timer, you can wakeup it (by sensor, touch, camera) - - `mode: 2` - Your screen will be fully managed by cron - * `MMM-Pir` timer will be not displayed and not used - * You can't use touch mode, pir sensor or camera for wake up or turn off screen - - `mode: 3` - Wake up / turn OFF automaticaly by CRON and allow wake up - * `MMM-Pir` timer will be used before turn off screen - * Allow to use sensor/touch/camera when CRON `ON` is activated - * When screen is OFF by cron or timer, you can wakeup it (by sensor, touch, camera) + * `mode: 0` - Disable Cron using. + * `mode: 1` - Wake up / turn OFF automaticaly by CRON and use countdown + * `MMM-Pir` timer will be used before turn off screen + * Allow to use sensor/touch/camera when CRON `ON` is activated + * When screen is OFF by cron, you can't wakeup it. + * When screen is OFF by timer, you can wakeup it (by sensor, touch, camera) + * `mode: 2` - Your screen will be fully managed by cron + * `MMM-Pir` timer will be not displayed and not used + * You can't use touch mode, pir sensor or camera for wake up or turn off screen + * `mode: 3` - Wake up / turn OFF automaticaly by CRON and allow wake up + * `MMM-Pir` timer will be used before turn off screen + * Allow to use sensor/touch/camera when CRON `ON` is activated + * When screen is OFF by cron or timer, you can wakeup it (by sensor, touch, camera) `CRON` event (`ON`/`OFF`) have an object format: + ```js { dayOfWeek: , @@ -220,15 +237,17 @@ This is the rule to turn your screen on and off based on a set time event `dayOfWeek` is an array of number This number define the day: - - `0`: Sunday - - `1`: Monday - - `2`: Tuesday - - `3`: Wednesday - - `4`: Thursday - - `5`: Friday - - `6`: Saturday + +* `0`: Sunday +* `1`: Monday +* `2`: Tuesday +* `3`: Wednesday +* `4`: Thursday +* `5`: Friday +* `6`: Saturday ##### Sample + sample if you want to create an event from Monday to Thursday at 07h45: ```js @@ -250,6 +269,7 @@ sample if you want to create an event every Friday at 08h00 ``` sample if you want to create an event from Monday to Friday at 17h00 + ```js { dayOfWeek: [1,2,3,4,5], @@ -264,8 +284,9 @@ Let's create ON and OFF now I want to apply this rules: ---> Screen is ON: - * from Monday to Thursday at 07h45 - * every Friday at 08h00 + +* from Monday to Thursday at 07h45 +* every Friday at 08h00 So, `ON` rules will be: @@ -285,7 +306,8 @@ ON: [ ``` ---> Screen is OFF - * from Monday to Friday at 17h00 + +* from Monday to Friday at 17h00 So, `OFF` rules will be: @@ -303,30 +325,33 @@ Let's apply your own rules ! Don't be stupid! Don't create an ON event equal to OFF event ------ + #### Touch Configuration + | Option | Description | Type | Default | | ------- | --- | --- | --- | | mode | Selected mode for enable/disable the screen with touch (see below) | Number | 3 | * Available mode: - - `touchMode: 0` - - Touch mode is disabled - - `touchMode: 1` - - One click on the screen will restart the timer (or Wake up the screen if needed) - - Double Click on the screen will shutdown the screen - - `touchMode: 2` - - One Click on the MMM-Pir area will restart the timer - - Long Click on the screen will shutdown or wake up the screen (toogle) - - `touchMode: 3` - - One Click on the MMM-Pir area will restart the timer - - Doucle Click on the MMM-Pir area will shutdown the screen - - One Click on the screen will wake up if shutdown + * `touchMode: 0` + * Touch mode is disabled + * `touchMode: 1` + * One click on the screen will restart the timer (or Wake up the screen if needed) + * Double Click on the screen will shutdown the screen + * `touchMode: 2` + * One Click on the MMM-Pir area will restart the timer + * Long Click on the screen will shutdown or wake up the screen (toogle) + * `touchMode: 3` + * One Click on the MMM-Pir area will restart the timer + * Doucle Click on the MMM-Pir area will shutdown the screen + * One Click on the screen will wake up if shutdown * Notes: - - If you lock your screen with TouchScreen, PIR sensor will be disabled - - You need to unlock your screen with touchscreen to reactivate the PIR sensor + * If you lock your screen with TouchScreen, PIR sensor will be disabled + * You need to unlock your screen with touchscreen to reactivate the PIR sensor ------ + #### Governor Configuration CPU governor enables the operating system to scale the CPU frequency up or down in order to save power or improve performance. @@ -341,19 +366,19 @@ This configuration allows to change it dynamicaly | working | Governor number mode when your screen is turned on | Number | 2 | * Available `sleeping` and `working` mode: - - `0`: Disable any governor mode change - - `1`: Apply `conservative` governor mode - - `2`: Apply `ondemand` governor mode - - `3`: Apply `userspace` governor mode - - `4`: Apply `powersave` governor mode - - `5`: Apply `performance` governor mode - + * `0`: Disable any governor mode change + * `1`: Apply `conservative` governor mode + * `2`: Apply `ondemand` governor mode + * `3`: Apply `userspace` governor mode + * `4`: Apply `powersave` governor mode + * `5`: Apply `performance` governor mode If you want a maximum of CPU power, `performance` is the best choice ! If you want an economy mode of CPU power, `powersave` is the best choice ! ------ + #### Sounds Configuration Sounds configuration will play audio file when your screen turn on or off. @@ -362,20 +387,21 @@ Sounds configuration will play audio file when your screen turn on or off. | ------- | --- | --- | --- | | on | File to play when screen turn on | String or 0 | open.mp3 | | off | File to play when screen turn off | String or 0 | close.mp3 | - + You can personalize your sound, just past your file into `sounds` folder and report filename (with extension) in your configuration You can disable sound by using `0` in your configuration ------ + ## Developer Notes -- This module broadcasts: +* This module broadcasts: * `MMM_PIR-SCREEN_POWERSTATUS` with payload `true` when your screen turn on. * `MMM_PIR-SCREEN_POWERSTATUS` with payload `false` when your screen turn off. -- This module receive: +* This module receive: * `MMM_PIR-END` notification to force the end of the count down. * `MMM_PIR-WAKEUP` notification to wake up the screen and reset count down. @@ -387,6 +413,7 @@ You can disable sound by using `0` in your configuration ### Manual update In a terminal try this command: + ```sh cd ~/MagicMirror/modules/MMM-Pir npm run update @@ -394,7 +421,8 @@ npm run update ### Automatic Update from [updatenotification](https://develop.docs.magicmirror.builders/modules/updatenotification.html) default module -Since MagicMirror² v2.27.x, we are able to Update automaticaly any modules from `updatenotification`.
+Since MagicMirror² v2.27.x, we are able to Update automaticaly any modules from `updatenotification`. + Let's add `MMM-Pir` rule ```js @@ -412,8 +440,11 @@ Let's add `MMM-Pir` rule } }, ``` + ## Reinstall + For reinstall this module or when an update of MagicMirror² is available, you can use this command: + ```sh cd ~/MagicMirror/modules/MMM-Pir npm run rebuild From ec40496b87bb348cd0ccf33c01f81bb7347e090d Mon Sep 17 00:00:00 2001 From: Simone D'Amario Date: Thu, 9 Jan 2025 21:13:23 +0100 Subject: [PATCH 17/47] modules are hidden in ecoMode:true when forceTurnOffScreen --- README.md | 2 ++ src/MMM-Pir.js | 1 + src/components/screenLib.js | 3 ++- src/node_helper.js | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de97108..8038333 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ To display the module insert it in the config.js file. colorFrom: "#FF0000", colorTo: "#00FF00", mode: 1, + ecoMode : true, counter: true, lastPresence: true, lastPresenceTimeFormat: "LL H:mm", @@ -108,6 +109,7 @@ To display the module insert it in the config.js file. | colorFrom | Color of the start of the color gradient (default: Red in HEXA) | String | #FF0000 | | colorTo | Color of the start of the color gradient (default: Green in HEXA) | String | #00FF00 | | mode | mode for turn on/off your screen (see bellow) | Number | 1 | + | ecoMode | Should the MagicMirror hide all module after timeout ? | Boolean | true | | counter | Should display Count-down in screen ? | Boolean | true | | lastPresence | Display the date of the last user presence | Boolean | true | | lastPresenceTimeFormat | Change the date format (moment.js format) of the last presence | String | LL H:mm | diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index c10745d..bd1d7ae 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -18,6 +18,7 @@ Module.register("MMM-Pir", { colorTo: "#00FF00", timeout: 2 * 60 * 1000, mode: 1, + ecoMode: true, counter: true, style: 1, lastPresence: true, diff --git a/src/components/screenLib.js b/src/components/screenLib.js index 0fdf2cc..71919d5 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -20,6 +20,7 @@ class SCREEN { debug: false, timeout: 5 * 60 * 1000, mode: 1, + ecoMode: true, relayGPIOPin: 0, availability: true, autoDimmer: false, @@ -219,7 +220,7 @@ class SCREEN { forceTurnOffScreen () { if (!this.screen.power) return log("forceTurnOffScreen: already off"); - this.sendSocketNotification("SCREEN_HIDING"); + if (this.config.ecoMode) this.sendSocketNotification("SCREEN_HIDING"); this.screen.power = false; if (this.config.mode) this.wantedPowerDisplay(false); this.screen.dimmer = 0; diff --git a/src/node_helper.js b/src/node_helper.js index 35a7a10..d4ab331 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -108,6 +108,7 @@ module.exports = NodeHelper.create({ debug: this.config.debug, timeout: this.config.Display.timeout, mode: this.config.Display.mode, + ecoMode: this.config.Display.ecoMode, relayGPIOPin: this.config.Display.relayGPIOPin, autoDimmer: this.config.Display.autoDimmer, xrandrForceRotation: this.config.Display.xrandrForceRotation, From f9cd2bd4faf183940b62cbcca1191e9ecdb64f4b Mon Sep 17 00:00:00 2001 From: bugsounet Date: Fri, 10 Jan 2025 13:45:22 +0100 Subject: [PATCH 18/47] add eslint-plugin-depend checking --- eslint.config.mjs | 11 ++++++--- package-lock.json | 58 +++++++++++++++++++++++++++++++++-------------- package.json | 1 + 3 files changed, 50 insertions(+), 20 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index fbb0642..0e5305a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,10 +1,12 @@ import globals from "globals"; import eslintPluginStylistic from "@stylistic/eslint-plugin"; +import eslintPluginDepend from "eslint-plugin-depend"; import eslintPluginImport from "eslint-plugin-import"; import eslintPluginJs from "@eslint/js"; import eslintPluginPackageJson from "eslint-plugin-package-json/configs/recommended"; const config = [ + eslintPluginDepend.configs["flat/recommended"], eslintPluginImport.flatConfigs.recommended, eslintPluginJs.configs.recommended, { @@ -83,7 +85,8 @@ const config = [ "one-var": "off", "prefer-destructuring": "off", "prefer-template": "error", - "sort-keys": "off" + "sort-keys": "off", + "depend/ban-dependencies": ["error", {"allowed": ["moment"]}] } }, { @@ -103,7 +106,8 @@ const config = [ "@stylistic/indent": ["error", 2], "@stylistic/array-element-newline": "off", "@stylistic/function-call-argument-newline": "off", - "import/no-unresolved": "off" + "import/no-unresolved": "off", + "depend/ban-dependencies": ["error", {"allowed": ["eslint-plugin-import"]}] } }, { @@ -111,7 +115,8 @@ const config = [ ...eslintPluginPackageJson, "rules": { ...eslintPluginPackageJson.rules, - "package-json/valid-name": "off" + "package-json/valid-name": "off", + "depend/ban-dependencies": ["error", {"allowed": ["eslint-plugin-import"]}] } }, { diff --git a/package-lock.json b/package-lock.json index b6de4c1..0eef514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "devDependencies": { "@stylistic/eslint-plugin": "^2.12.1", "eslint": "^9.17.0", + "eslint-plugin-depend": "^0.12.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", @@ -2539,6 +2540,18 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-plugin-depend": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-depend/-/eslint-plugin-depend-0.12.0.tgz", + "integrity": "sha512-bS5ESnC3eXDJPNv0RKkzRbLO45hRRLR/dleAUdbysXChWz1bAxa4MRh14EtDREn7fZieueqz4L7TfQQbzvdYHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fd-package-json": "^1.2.0", + "module-replacements": "^2.1.0", + "semver": "^7.6.3" + } + }, "node_modules/eslint-plugin-import": { "version": "2.31.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", @@ -2822,6 +2835,16 @@ "reusify": "^1.0.4" } }, + "node_modules/fd-package-json": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fd-package-json/-/fd-package-json-1.2.0.tgz", + "integrity": "sha512-45LSPmWf+gC5tdCQMNH4s9Sr00bIkiD9aN7dc5hqkrEw1geRYyDQS1v1oMHAW3ysfxfndqGsrDREHHjNNbKUfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "walk-up-path": "^3.0.1" + } + }, "node_modules/fdir": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", @@ -5087,6 +5110,13 @@ "node": ">=10" } }, + "node_modules/module-replacements": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/module-replacements/-/module-replacements-2.6.0.tgz", + "integrity": "sha512-LL+VhVXMIie3aO/uqPPAGaP7fhJb6yr98FW5IcSSJv+0gmJvS2c/L3C8WIaAA/HPyVhabKFKBKcfeLLi7WnRvg==", + "dev": true, + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6042,12 +6072,10 @@ "optional": true }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -6055,17 +6083,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -7014,6 +7031,13 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/walk-up-path": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", + "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", + "dev": true, + "license": "ISC" + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index 0e5f19b..35c8d2e 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "devDependencies": { "@stylistic/eslint-plugin": "^2.12.1", "eslint": "^9.17.0", + "eslint-plugin-depend": "^0.12.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", From 1f93b0c37f0c9cae081a7680274eb2eabf4c0c0f Mon Sep 17 00:00:00 2001 From: bugsounet Date: Fri, 10 Jan 2025 13:55:46 +0100 Subject: [PATCH 19/47] remove lodash --- package-lock.json | 6 ------ package.json | 1 - src/components/screenLib.js | 4 ++-- src/components/utils.js | 26 ++++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 src/components/utils.js diff --git a/package-lock.json b/package-lock.json index 0eef514..db7df96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "cron-parser": "^4.9.0", "esbuild": "^0.24.2", "fdir": "^6.4.2", - "lodash": "^4.17.21", "long-press-event": "^2.5.0", "nan": "^2.22.0", "node-cron": "^3.0.3", @@ -4127,11 +4126,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", diff --git a/package.json b/package.json index 35c8d2e..62bfb14 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "cron-parser": "^4.9.0", "esbuild": "^0.24.2", "fdir": "^6.4.2", - "lodash": "^4.17.21", "long-press-event": "^2.5.0", "nan": "^2.22.0", "node-cron": "^3.0.3", diff --git a/src/components/screenLib.js b/src/components/screenLib.js index 1b40983..da5096d 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -6,7 +6,7 @@ const exec = require("child_process").exec; const process = require("process"); const moment = require("moment"); -const lodash = require("lodash"); +const Utils = require("./utils"); var log = () => { /* do nothing */ }; @@ -35,7 +35,7 @@ class SCREEN { setPowerRetries: 0 } }; - this.config = lodash.defaultsDeep(this.config, this.default, {}); + this.config = Utils.configMerge({}, this.default, this.config); if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [SCREEN]", ...args); }; this.screen = { mode: this.config.mode, diff --git a/src/components/utils.js b/src/components/utils.js new file mode 100644 index 0000000..f5d43a0 --- /dev/null +++ b/src/components/utils.js @@ -0,0 +1,26 @@ +module.exports = { + // configMerge in deep for node_helper + // This tool is already coded in the MM² core but only for module core + configMerge (result) { + var stack = Array.prototype.slice.call(arguments, 1); + var item; + var key; + while (stack.length) { + item = stack.shift(); + for (key in item) { + if (item.hasOwnProperty(key)) { + if (typeof result[key] === "object" && result[key] && Object.prototype.toString.call(result[key]) !== "[object Array]") { + if (typeof item[key] === "object" && item[key] !== null) { + result[key] = this.configMerge({}, result[key], item[key]); + } else { + result[key] = item[key]; + } + } else { + result[key] = item[key]; + } + } + } + } + return result; + } +}; From ade926b6336f2b0bca3aec2cdb947258127ba591 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Fri, 10 Jan 2025 14:16:13 +0100 Subject: [PATCH 20/47] move eslint-plugin-import to eslint-plugin-import-x --- eslint.config.mjs | 22 +- package-lock.json | 1488 ++++----------------------------------------- package.json | 2 +- 3 files changed, 142 insertions(+), 1370 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0e5305a..9067e32 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,13 +1,13 @@ import globals from "globals"; import eslintPluginStylistic from "@stylistic/eslint-plugin"; import eslintPluginDepend from "eslint-plugin-depend"; -import eslintPluginImport from "eslint-plugin-import"; +import eslintPluginImportX from "eslint-plugin-import-x"; import eslintPluginJs from "@eslint/js"; import eslintPluginPackageJson from "eslint-plugin-package-json/configs/recommended"; const config = [ eslintPluginDepend.configs["flat/recommended"], - eslintPluginImport.flatConfigs.recommended, + eslintPluginImportX.flatConfigs.recommended, eslintPluginJs.configs.recommended, { "files": ["**/*.js"], @@ -57,15 +57,9 @@ const config = [ "@stylistic/spaced-comment": "off", "eqeqeq": "error", "id-length": "off", - "import/order": "error", - "import/extensions": [ - "error", - { - "json": "always" // ignore json require (display EXT version and rev date) - } - ], - "import/newline-after-import": "error", - "import/no-unresolved": "error", + "import-x/order": "error", + "import-x/newline-after-import": "error", + "import-x/no-unresolved": "error", "init-declarations": "off", "max-lines-per-function": ["warn", 400], "max-statements": "off", @@ -106,8 +100,7 @@ const config = [ "@stylistic/indent": ["error", 2], "@stylistic/array-element-newline": "off", "@stylistic/function-call-argument-newline": "off", - "import/no-unresolved": "off", - "depend/ban-dependencies": ["error", {"allowed": ["eslint-plugin-import"]}] + "import-x/no-unresolved": "off" } }, { @@ -115,8 +108,7 @@ const config = [ ...eslintPluginPackageJson, "rules": { ...eslintPluginPackageJson.rules, - "package-json/valid-name": "off", - "depend/ban-dependencies": ["error", {"allowed": ["eslint-plugin-import"]}] + "package-json/valid-name": "off" } }, { diff --git a/package-lock.json b/package-lock.json index db7df96..c73d886 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "@stylistic/eslint-plugin": "^2.12.1", "eslint": "^9.17.0", "eslint-plugin-depend": "^0.12.0", - "eslint-plugin-import": "^2.31.0", + "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", "stylelint": "^16.12.0", @@ -881,13 +881,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -983,6 +976,13 @@ "@types/ms": "*" } }, + "node_modules/@types/doctrine": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/@types/doctrine/-/doctrine-0.0.9.tgz", + "integrity": "sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -1002,13 +1002,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/katex": { "version": "0.16.7", "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", @@ -1287,44 +1280,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -1335,88 +1290,6 @@ "node": ">=8" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -1427,22 +1300,6 @@ "node": ">=8" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1622,26 +1479,6 @@ "node": ">=8" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1913,60 +1750,6 @@ "node": ">=4" } }, - "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", @@ -2048,42 +1831,6 @@ "node": ">=10" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -2159,19 +1906,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2195,6 +1929,20 @@ "once": "^1.4.0" } }, + "node_modules/enhanced-resolve": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", + "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -2231,146 +1979,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/esbuild": { "version": "0.24.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", @@ -2511,34 +2119,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/eslint-plugin-depend": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/eslint-plugin-depend/-/eslint-plugin-depend-0.12.0.tgz", @@ -2551,58 +2131,61 @@ "semver": "^7.6.3" } }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "node_modules/eslint-plugin-import-x": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.6.1.tgz", + "integrity": "sha512-wluSUifMIb7UfwWXqx7Yx0lE/SGCcGXECLx/9bCmbY2nneLwvAZ4vkd1IXDjPKFvdcdUgr1BaRnaRpx3k2+Pfw==", "dev": true, "license": "MIT", "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", + "@types/doctrine": "^0.0.9", + "@typescript-eslint/scope-manager": "^8.1.0", + "@typescript-eslint/utils": "^8.1.0", + "debug": "^4.3.4", + "doctrine": "^3.0.0", + "enhanced-resolve": "^5.17.1", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", + "get-tsconfig": "^4.7.3", "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" + "minimatch": "^9.0.3", + "semver": "^7.6.3", + "stable-hash": "^0.0.4", + "tslib": "^2.6.3" }, "engines": { - "node": ">=4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + "eslint": "^8.57.0 || ^9.0.0" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-plugin-import-x/node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "ms": "^2.1.1" + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/eslint-plugin-import-x/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/eslint-plugin-package-json": { @@ -2925,16 +2508,6 @@ "dev": true, "license": "ISC" }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.3" - } - }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -2999,35 +2572,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3036,26 +2580,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-stdin": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", @@ -3083,22 +2607,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" + "resolve-pkg-maps": "^1.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, "node_modules/git-hooks-list": { @@ -3176,23 +2695,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/globby": { "version": "14.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", @@ -3221,19 +2723,6 @@ "dev": true, "license": "MIT" }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/got": { "version": "11.8.6", "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", @@ -3263,77 +2752,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" } }, "node_modules/hasown": { @@ -3511,21 +2935,6 @@ "dev": true, "license": "ISC" }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -3564,23 +2973,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3588,49 +2980,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-core-module": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", @@ -3647,38 +2996,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-decimal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", @@ -3743,19 +3060,6 @@ "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3765,22 +3069,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -3804,87 +3092,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -3896,26 +3103,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3969,19 +3156,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/jsonc-eslint-parser": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz", @@ -4945,16 +4119,6 @@ "concat-map": "0.0.1" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass-collect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", @@ -5178,155 +4342,61 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.3.tgz", "integrity": "sha512-dOal67//nohNgYWb+nWmg5dkFdIwDm8EpeGYMekPMrngV3637lqnX0lbUcCtgibHTz6SEz7DAIjKvKDFYCnO1A==", - "license": "ISC", - "dependencies": { - "uuid": "8.3.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/node-libgpiod": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/node-libgpiod/-/node-libgpiod-0.4.6.tgz", - "integrity": "sha512-M34h6BM+R0zQSTE+qKG1mTV7zd0nVbQleRpGvjHY2VRdbkAmvZbyJGpVXdVj1MgzOpp2cqA3U4zGk+dRRzG0lQ==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.3.0", - "nan": "^2.11.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", + "license": "ISC", + "dependencies": { + "uuid": "8.3.2" + }, "engines": { - "node": ">= 0.4" + "node": ">=6.0.0" } }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, + "node_modules/node-libgpiod": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/node-libgpiod/-/node-libgpiod-0.4.6.tgz", + "integrity": "sha512-M34h6BM+R0zQSTE+qKG1mTV7zd0nVbQleRpGvjHY2VRdbkAmvZbyJGpVXdVj1MgzOpp2cqA3U4zGk+dRRzG0lQ==", + "hasInstallScript": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "bindings": "^1.3.0", + "nan": "^2.11.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=18" } }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", + "node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" + "abbrev": "^1.0.0" }, - "engines": { - "node": ">= 0.4" + "bin": { + "nopt": "bin/nopt.js" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=0.10.0" } }, - "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/once": { @@ -5571,16 +4641,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/postcss": { "version": "8.4.49", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", @@ -5830,25 +4890,6 @@ "node": ">= 6" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", - "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5899,6 +4940,16 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/responselike": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", @@ -6003,25 +5054,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6041,24 +5073,6 @@ } ] }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6077,40 +5091,6 @@ "node": ">=10" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6139,25 +5119,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -6324,6 +5285,13 @@ "node": ">=8" } }, + "node_modules/stable-hash": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", + "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", + "dev": true, + "license": "MIT" + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -6346,58 +5314,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -6409,16 +5325,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -6743,6 +5649,16 @@ "dev": true, "license": "MIT" }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", @@ -6805,18 +5721,12 @@ "typescript": ">=4.2.0" } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", @@ -6830,83 +5740,6 @@ "node": ">= 0.8.0" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/typescript": { "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", @@ -6928,22 +5761,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -7054,43 +5871,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 62bfb14..53782b9 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@stylistic/eslint-plugin": "^2.12.1", "eslint": "^9.17.0", "eslint-plugin-depend": "^0.12.0", - "eslint-plugin-import": "^2.31.0", + "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", "stylelint": "^16.12.0", From 0ab98830dd6aeab66b26b8d3e552c636c42d1848 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Fri, 10 Jan 2025 14:40:20 +0100 Subject: [PATCH 21/47] move moment to dayjs --- eslint.config.mjs | 3 +-- package-lock.json | 7 +++++++ package.json | 1 + src/components/screenLib.js | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9067e32..755cb23 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -79,8 +79,7 @@ const config = [ "one-var": "off", "prefer-destructuring": "off", "prefer-template": "error", - "sort-keys": "off", - "depend/ban-dependencies": ["error", {"allowed": ["moment"]}] + "sort-keys": "off" } }, { diff --git a/package-lock.json b/package-lock.json index c73d886..60d328a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "dependencies": { "@electron/rebuild": "^3.7.1", "cron-parser": "^4.9.0", + "dayjs": "^1.11.13", "esbuild": "^0.24.2", "fdir": "^6.4.2", "long-press-event": "^2.5.0", @@ -1750,6 +1751,12 @@ "node": ">=4" } }, + "node_modules/dayjs": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "license": "MIT" + }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", diff --git a/package.json b/package.json index 53782b9..49de379 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "dependencies": { "@electron/rebuild": "^3.7.1", "cron-parser": "^4.9.0", + "dayjs": "^1.11.13", "esbuild": "^0.24.2", "fdir": "^6.4.2", "long-press-event": "^2.5.0", diff --git a/src/components/screenLib.js b/src/components/screenLib.js index da5096d..443e01f 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -5,7 +5,7 @@ const exec = require("child_process").exec; const process = require("process"); -const moment = require("moment"); +const dayjs = require("dayjs"); const Utils = require("./utils"); var log = () => { /* do nothing */ }; @@ -214,7 +214,7 @@ class SCREEN { this.screen.output.dimmer = 1 - ((this.screen.dimmerFrom - this.counter) / this.screen.dimmerFrom); } - this.screen.output.timer = moment(new Date(this.counter)).format("mm:ss"); + this.screen.output.timer = dayjs(new Date(this.counter)).format("mm:ss"); this.screen.output.bar = (this.counter / this.config.timeout).toFixed(3); this.sendSocketNotification("SCREEN_OUTPUT", this.screen.output); From 9f5d5d022177ada552103b02a59af3c115849fee Mon Sep 17 00:00:00 2001 From: bugsounet Date: Fri, 10 Jan 2025 15:52:34 +0100 Subject: [PATCH 22/47] fix: Stopping module helper --- src/components/screenLib.js | 12 ++++-------- src/node_helper.js | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/components/screenLib.js b/src/components/screenLib.js index 443e01f..d0dd54b 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -159,14 +159,6 @@ class SCREEN { this.screenStatus(); } - activate () { - process.on("exit", () => { - if (this.config.mode) this.setPowerDisplay(true); - this.governor("WORKING"); - }); - this.start(); - } - async start (restart) { if (this.screen.locked || this.screen.running) return; if (!restart) log("Start."); @@ -822,6 +814,10 @@ class SCREEN { this.status = status; }, 1000); } + + close () { + if (this.config.mode) this.setPowerDisplay(true); + } } module.exports = SCREEN; diff --git a/src/node_helper.js b/src/node_helper.js index 0dab8c8..3b729e4 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -12,10 +12,25 @@ const LibGovernor = require("./components/governorLib"); module.exports = NodeHelper.create({ start () { + this.stopped = false; this.pir = null; this.screen = null; this.cron = null; this.governor = null; + process.on("exit", () => { + if (!this.stopped) this.stop; + }); + }, + + stop () { + this.stopped = true; + console.log("Stopping module helper: MMM-Pir..."); + console.log("[MMM-Pir] Stopping Governor"); + this.governor.working(); + console.log("[MMM-Pir] Stopping Screen"); + this.screen.close(); + console.log("[MMM-Pir] Stopping Pir"); + this.pir.stop(); }, socketNotificationReceived (notification, payload) { @@ -149,7 +164,7 @@ module.exports = NodeHelper.create({ this.governor.start(); this.screen = new LibScreen(screenConfig, callbacks.screen); - this.screen.activate(); + this.screen.start(); this.cron = new LibCron(cronConfig, callbacks.cron); this.cron.start(); From d0ecf9cc171c7ab295c1d214b710909dbc50c958 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 18:28:27 +0000 Subject: [PATCH 23/47] Bump eslint from 9.17.0 to 9.18.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.17.0...v9.18.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 36 ++++++++++++++++++++---------------- package.json | 2 +- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60d328a..21f45bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@stylistic/eslint-plugin": "^2.12.1", - "eslint": "^9.17.0", + "eslint": "^9.18.0", "eslint-plugin-depend": "^0.12.0", "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-package-json": "^0.19.0", @@ -674,10 +674,13 @@ } }, "node_modules/@eslint/core": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", - "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz", + "integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==", "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -706,9 +709,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.18.0.tgz", + "integrity": "sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -724,11 +727,12 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", - "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz", + "integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==", "dev": true, "dependencies": { + "@eslint/core": "^0.10.0", "levn": "^0.4.1" }, "engines": { @@ -2046,18 +2050,18 @@ } }, "node_modules/eslint": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", - "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.18.0.tgz", + "integrity": "sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", + "@eslint/core": "^0.10.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.17.0", - "@eslint/plugin-kit": "^0.2.3", + "@eslint/js": "9.18.0", + "@eslint/plugin-kit": "^0.2.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.1", diff --git a/package.json b/package.json index 49de379..6608656 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@stylistic/eslint-plugin": "^2.12.1", - "eslint": "^9.17.0", + "eslint": "^9.18.0", "eslint-plugin-depend": "^0.12.0", "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-package-json": "^0.19.0", From 2592b3c60d3b4c226405edda542da48cef7e2580 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 11 Jan 2025 20:18:37 +0100 Subject: [PATCH 24/47] move `MMM_PIR-USER_PRESENCE` from motionLib to module core --- src/MMM-Pir.js | 1 + src/components/motionLib.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index 527e130..6879d41 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -80,6 +80,7 @@ Module.register("MMM-Pir", { wakeup: () => { this.sendSocketNotification("WAKEUP"); if (this.config.Motion.animate) this.screenDisplay.animateModule(); + this.sendNotification("MMM_PIR-USER_PRESENCE", true); } }; diff --git a/src/components/motionLib.js b/src/components/motionLib.js index a8cb7d2..e21c4e4 100644 --- a/src/components/motionLib.js +++ b/src/components/motionLib.js @@ -56,7 +56,6 @@ class motionLib { if (hasMotion) { _logPIR(`[MOTION] Motion detected, score ${score}`); this.wakeup(); - this.sendNotification("MMM_PIR-USER_PRESENCE", true); } } }); From 129c8bcf8f8f08863ed0cf1efe6c753ec11dc35c Mon Sep 17 00:00:00 2001 From: Simone D'Amario Date: Sun, 12 Jan 2025 09:53:07 +0100 Subject: [PATCH 25/47] add triggerMode --- README.md | 8 +++++++- src/MMM-Pir.js | 3 ++- src/components/pirLib.js | 11 +++++++---- src/node_helper.js | 3 ++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index de97108..5d3e3a4 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,8 @@ To display the module insert it in the config.js file. }, Pir: { mode: 0, - gpio: 21 + gpio: 21, + triggerMode : "LH" }, Motion: { deviceId: 0, @@ -151,11 +152,16 @@ For some displays, the `getvcp` commands cause the display to turn-on. In these | ------- | --- | --- | --- | | mode | Detection mode (see bellow) | Number | 0 | | gpio | BCM-number of the sensor pin. | Number | 21 | + | triggerMode | Triggering mode (see below) | String | "LH" | * Available mode: - `mode: 0` - use node-libgpiod library - `mode: 1` - use python script with gpiozero library +* Available triggering modes: + - `triggerMode: 'LH'` - motion signal is triggered when sensor goes from LOW (0, no-motion) to HIGH (1, motion) + - `triggerMode: 'H'` - motion signal is triggered whenever the sensor sends a HIGH (1, motion) message + ⚠ You can disable PIR Sensor detection by using `gpio: 0` ------ diff --git a/src/MMM-Pir.js b/src/MMM-Pir.js index c10745d..82b1263 100644 --- a/src/MMM-Pir.js +++ b/src/MMM-Pir.js @@ -32,7 +32,8 @@ Module.register("MMM-Pir", { }, Pir: { mode: 0, - gpio: 21 + gpio: 21, + triggerMode: "LH" }, Motion: { deviceId: 0, diff --git a/src/components/pirLib.js b/src/components/pirLib.js index 7602fab..8b373a9 100644 --- a/src/components/pirLib.js +++ b/src/components/pirLib.js @@ -10,7 +10,8 @@ class PIR { this.default = { debug: false, gpio: 21, - mode: 0 + mode: 0, + triggerMode: "LH" }; this.config = Object.assign({}, this.default, this.config); if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [PIR]", ...args); }; @@ -85,8 +86,10 @@ class PIR { if (this.pirReadyToDetect) { log("Motion Detected"); this.callback("PIR_DETECTED"); - this.pirReadyToDetect = false; - log("Debug: Set motion detect ready to:", this.pirReadyToDetect); + if (this.config.triggerMode === "LH") { + this.pirReadyToDetect = false; + log("Debug: Set motion detect ready to:", this.pirReadyToDetect); + } } break; case "NoMotion": @@ -172,7 +175,7 @@ class PIR { if (this.running) { try { var value = line.getValue(); - if (value !== this.oldstate) { + if (value !== this.oldstate || this.config.triggerMode === "H") { this.oldstate = value; log(`Sensor read value: ${value}`); if (value === 1) { diff --git a/src/node_helper.js b/src/node_helper.js index 35a7a10..356583e 100644 --- a/src/node_helper.js +++ b/src/node_helper.js @@ -101,7 +101,8 @@ module.exports = NodeHelper.create({ let pirConfig = { debug: this.config.debug, gpio: this.config.Pir.gpio, - mode: this.config.Pir.mode + mode: this.config.Pir.mode, + triggerMode: this.config.Pir.triggerMode }; let screenConfig = { From 5ee120d4ed6a79931163c8d94ca7590209c7a455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sun, 12 Jan 2025 11:28:13 +0100 Subject: [PATCH 26/47] Fix Readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index def546a..538dbf0 100644 --- a/README.md +++ b/README.md @@ -177,8 +177,8 @@ For some displays, the `getvcp` commands cause the display to turn-on. In these * `mode: 1` - use python script with gpiozero library * Available triggering modes: - - `triggerMode: 'LH'` - motion signal is triggered when sensor goes from LOW (0, no-motion) to HIGH (1, motion) - - `triggerMode: 'H'` - motion signal is triggered whenever the sensor sends a HIGH (1, motion) message + * `triggerMode: 'LH'` - motion signal is triggered when sensor goes from LOW (0, no-motion) to HIGH (1, motion) + * `triggerMode: 'H'` - motion signal is triggered whenever the sensor sends a HIGH (1, motion) message ⚠ You can disable PIR Sensor detection by using `gpio: 0` From 545ac77f5a46b7b4a5221c3ab55b3be693f454a2 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 12 Jan 2025 12:34:46 +0100 Subject: [PATCH 27/47] add check triggerMode on start --- src/components/pirLib.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/pirLib.js b/src/components/pirLib.js index ae57bfe..72082cc 100644 --- a/src/components/pirLib.js +++ b/src/components/pirLib.js @@ -28,6 +28,19 @@ class PIR { start () { if (this.running) return; if (this.config.gpio === 0) return console.log("[MMM-Pir] [LIB] [PIR] Disabled."); + switch (this.config.triggerMode) { + case "LH": + console.log("[MMM-Pir] [LIB] [PIR] triggerMode LH Selected: Read LOW (0, no-motion) to HIGH (1, motion)"); + break; + case "H": + console.log("[MMM-Pir] [LIB] [PIR] triggerMode H Selected: Read HIGH (1, motion)"); + break; + default: + console.warn(`[MMM-Pir] [LIB] [PIR] triggerMode: ${this.config.mode} is not a valid value`); + console.warn("[MMM-Pir] [LIB] [PIR] set triggerMode LH"); + this.config.triggerMode = "LH"; + break; + } switch (this.config.mode) { case 0: console.log("[MMM-Pir] [LIB] [PIR] Mode 0 Selected (gpiod library)"); From 0db6bca6e432ca4090a52c08a4018d065219811b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sun, 12 Jan 2025 14:21:01 +0100 Subject: [PATCH 28/47] Update minify.js (check win32) --- installer/minify.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/installer/minify.js b/installer/minify.js index 02206eb..509ce91 100644 --- a/installer/minify.js +++ b/installer/minify.js @@ -8,6 +8,7 @@ const { fdir } = require("fdir"); const esbuild = require("esbuild"); var files = []; +var isWin = process.platform === "win32"; let project = require("../package.json").name; let revision = require("../package.json").rev; @@ -44,8 +45,14 @@ async function minifyFiles () { * @returns {boolean} resolved with true */ function minify (file) { - let FileName = file.replace("../src/", "../"); - let MyFileName = `${project}/${FileName.replace("../", "")}`; + var FileName, MyFileName + if (isWin) { + FileName = file.replace("..\\src\\", "..\\"); + MyFileName = `${project}\\${FileName.replace("..\\", "")}`; + } else { + FileName = file.replace("../src/", "../"); + MyFileName = `${project}/${FileName.replace("../", "")}`; + } let pathInResolve = path.resolve(__dirname, file); let pathOutResolve = path.resolve(__dirname, FileName); console.log("Process File:", MyFileName); From b5fe8e92c25bf1ed7b1cd04da9ea8041928175f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sun, 12 Jan 2025 15:49:31 +0100 Subject: [PATCH 29/47] Create windows.cmd (windows installer) --- installer/windows.cmd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 installer/windows.cmd diff --git a/installer/windows.cmd b/installer/windows.cmd new file mode 100644 index 0000000..4a4b3ec --- /dev/null +++ b/installer/windows.cmd @@ -0,0 +1,20 @@ +@echo off + +call :node +call :deps +call :src +exit /b + +:node +echo Remove node-libgpiod library (not compatible) +call npm remove node-libgpiod +exit /b + +:deps +echo Install Dependencies +call npm prune +exit /b + +:src +call cd installer && node minify +exit /b From 4dae05a3191b0192b587478c2c8758ce8fb7b8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sun, 12 Jan 2025 15:54:49 +0100 Subject: [PATCH 30/47] Update package.json (rename dependencies to deps -- windows) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6608656..a006870 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "main": "MMM-Pir.js", "scripts": { "clean": "rm -rf node_modules package-lock.json", - "dependencies": "installer/dependencies.sh -d 'unclutter ddcutil cec-utils python3 python-is-python3 python3-gpiozero gpiod libgpiod2 libgpiod-dev'", + "deps": "installer/dependencies.sh -d 'unclutter ddcutil cec-utils python3 python-is-python3 python3-gpiozero gpiod libgpiod2 libgpiod-dev'", "dev": "cd installer && node dev.js", "dev:src": "cd installer && node src.js", "preinstall": "echo ⚠ npm install will be deprecated on next release!.", @@ -33,7 +33,7 @@ "rebuild": "installer/rebuild.sh", "reset": "rm -f *.js && rm -rf components/*.js && git reset --hard", "screenSaver": "installer/screenSaver.sh", - "presetup": "npm run dependencies && installer/preinstall.sh", + "presetup": "npm run deps && installer/preinstall.sh", "setup": "npm prune", "postsetup": "installer/postinstall.sh -m -r", "test": "npm run lint", From 12e8ea2f61a7d9728a3230b6388a80334e29489b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sun, 12 Jan 2025 15:58:43 +0100 Subject: [PATCH 31/47] Update package.json (add setup:windows) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a006870..322e38e 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "presetup": "npm run deps && installer/preinstall.sh", "setup": "npm prune", "postsetup": "installer/postinstall.sh -m -r", + "setup:windows": "call installer/windows.cmd", "test": "npm run lint", "test:css": "stylelint *.css", "test:markdown": "markdownlint-cli2 *.md", From 863b7ad320a34f608b2f9c589999a638a58839d0 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 12 Jan 2025 16:20:52 +0100 Subject: [PATCH 32/47] Fix: workflows --- .github/workflows/css.yml | 2 +- .github/workflows/esbuild.yml | 2 +- .github/workflows/eslint.yml | 2 +- .github/workflows/markdown.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/css.yml b/.github/workflows/css.yml index 99a9b8f..f185c4a 100644 --- a/.github/workflows/css.yml +++ b/.github/workflows/css.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Install Dependencies - run: npm run dependencies && npm prune + run: npm run deps && npm prune - name: Run stylelint run: npm run test:css diff --git a/.github/workflows/esbuild.yml b/.github/workflows/esbuild.yml index 6481b2a..6f65acd 100644 --- a/.github/workflows/esbuild.yml +++ b/.github/workflows/esbuild.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Install Dependencies - run: npm run dependencies && npm prune + run: npm run deps && npm prune - name: Run ESBuild run: npm run test:minify diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 10ca80d..a300b2e 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Install Dependencies - run: npm run dependencies && npm prune + run: npm run deps && npm prune - name: Run ESLint run: npm run test diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml index 49bf6de..b140806 100644 --- a/.github/workflows/markdown.yml +++ b/.github/workflows/markdown.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Install Dependencies - run: npm run dependencies && npm prune + run: npm run deps && npm prune - name: Run markdownlint-cli2 run: npm run test:markdown From af3247f135541c35f2d4ebac4dd442103dfeccb5 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 12 Jan 2025 16:22:40 +0100 Subject: [PATCH 33/47] fix: minify --- installer/minify.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/minify.js b/installer/minify.js index 509ce91..d477fd2 100644 --- a/installer/minify.js +++ b/installer/minify.js @@ -45,10 +45,10 @@ async function minifyFiles () { * @returns {boolean} resolved with true */ function minify (file) { - var FileName, MyFileName + var FileName, MyFileName; if (isWin) { - FileName = file.replace("..\\src\\", "..\\"); - MyFileName = `${project}\\${FileName.replace("..\\", "")}`; + FileName = file.replace("..\\src\\", "..\\"); + MyFileName = `${project}\\${FileName.replace("..\\", "")}`; } else { FileName = file.replace("../src/", "../"); MyFileName = `${project}/${FileName.replace("../", "")}`; From 72e0b2876df98f7fff3ab8847a2bc12502189933 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sun, 12 Jan 2025 16:34:51 +0100 Subject: [PATCH 34/47] Fix: windows checking for dev and src --- installer/dev.js | 13 ++++++++++--- installer/src.js | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/installer/dev.js b/installer/dev.js index 201fd14..0defd33 100644 --- a/installer/dev.js +++ b/installer/dev.js @@ -8,6 +8,7 @@ const { copyFileSync } = require("node:fs"); const { fdir } = require("fdir"); var files = []; +var isWin = process.platform === "win32"; let project = require("../package.json").name; @@ -41,11 +42,17 @@ async function installFiles () { * @returns {boolean} resolved with true */ function install (file) { - let FileName = file.replace("../src/", "../"); - let GAFileName = `${project}/${FileName.replace("../", "")}`; + var FileName, MyFileName; + if (isWin) { + FileName = file.replace("..\\src\\", "..\\"); + MyFileName = `${project}\\${FileName.replace("..\\", "")}`; + } else { + FileName = file.replace("../src/", "../"); + MyFileName = `${project}/${FileName.replace("../", "")}`; + } let pathInResolve = path.resolve(__dirname, file); let pathOutResolve = path.resolve(__dirname, FileName); - console.log("Process File:", GAFileName); + console.log("Process File:", MyFileName); return new Promise((resolve, reject) => { try { copyFileSync(pathInResolve, pathOutResolve); diff --git a/installer/src.js b/installer/src.js index 65581ee..84a81a4 100644 --- a/installer/src.js +++ b/installer/src.js @@ -8,6 +8,7 @@ const { copyFileSync } = require("node:fs"); const { fdir } = require("fdir"); var files = []; +var isWin = process.platform === "win32"; let project = require("../package.json").name; @@ -41,11 +42,17 @@ async function installFiles () { * @returns {boolean} resolved with true */ function install (file) { - let FileName = file.replace("../src/", "../"); - let GAFileName = `${project}/${FileName.replace("../", "")}`; + var FileName, MyFileName; + if (isWin) { + FileName = file.replace("..\\src\\", "..\\"); + MyFileName = `${project}\\${FileName.replace("..\\", "")}`; + } else { + FileName = file.replace("../src/", "../"); + MyFileName = `${project}/${FileName.replace("../", "")}`; + } let pathInResolve = path.resolve(__dirname, file); let pathOutResolve = path.resolve(__dirname, FileName); - console.log("Process File:", GAFileName); + console.log("Process File:", MyFileName); return new Promise((resolve, reject) => { try { copyFileSync(pathOutResolve, pathInResolve); From dcc4af0cf84aec720cb720bbc8a9319f2a410552 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:35:51 +0000 Subject: [PATCH 35/47] Bump @stylistic/eslint-plugin from 2.12.1 to 2.13.0 Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.12.1 to 2.13.0. - [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases) - [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v2.13.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21f45bf..1eb6496 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "python-shell": "^5.0.0" }, "devDependencies": { - "@stylistic/eslint-plugin": "^2.12.1", + "@stylistic/eslint-plugin": "^2.13.0", "eslint": "^9.18.0", "eslint-plugin-depend": "^0.12.0", "eslint-plugin-import-x": "^4.6.1", @@ -911,9 +911,9 @@ } }, "node_modules/@stylistic/eslint-plugin": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.12.1.tgz", - "integrity": "sha512-fubZKIHSPuo07FgRTn6S4Nl0uXPRPYVNpyZzIDGfp7Fny6JjNus6kReLD7NI380JXi4HtUTSOZ34LBuNPO1XLQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.13.0.tgz", + "integrity": "sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^8.13.0", diff --git a/package.json b/package.json index 6608656..3e32b0b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "python-shell": "^5.0.0" }, "devDependencies": { - "@stylistic/eslint-plugin": "^2.12.1", + "@stylistic/eslint-plugin": "^2.13.0", "eslint": "^9.18.0", "eslint-plugin-depend": "^0.12.0", "eslint-plugin-import-x": "^4.6.1", From 1a1732c34b712d7e522ea4ccb1abfc2f7e1a80c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:42:58 +0000 Subject: [PATCH 36/47] Bump stylelint from 16.12.0 to 16.13.1 Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.12.0 to 16.13.1. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.12.0...16.13.1) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 126 ++++++++++++++++++++++++++++++++-------------- package.json | 2 +- 2 files changed, 88 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1eb6496..04c0911 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", - "stylelint": "^16.12.0", + "stylelint": "^16.13.1", "stylelint-config-standard": "^36.0.1", "stylelint-prettier": "^5.0.2" }, @@ -805,6 +805,39 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@keyv/serialize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.0.2.tgz", + "integrity": "sha512-+E/LyaAeuABniD/RvUezWVXKpeuvwLEA9//nE9952zBaOdBd2mQ3pPoM8cUe2X6IcMByfuSLzmYqnYshG60+HQ==", + "dev": true, + "dependencies": { + "buffer": "^6.0.3" + } + }, + "node_modules/@keyv/serialize/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "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" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/@malept/cross-spawn-promise": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz", @@ -1459,6 +1492,16 @@ "node": ">=8" } }, + "node_modules/cacheable": { + "version": "1.8.7", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.8.7.tgz", + "integrity": "sha512-AbfG7dAuYNjYxFUtL1lAqmlWdxczCJ47w7cFjhGcnGnUdwSo6VgmSojfoW3tUI12HUkgTJ5kqj78yyq6TsFtlg==", + "dev": true, + "dependencies": { + "hookified": "^1.6.0", + "keyv": "^5.2.3" + } + }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -1484,6 +1527,15 @@ "node": ">=8" } }, + "node_modules/cacheable/node_modules/keyv": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.2.3.tgz", + "integrity": "sha512-AGKecUfzrowabUv0bH1RIR5Vf7w+l4S3xtQAypKaUpTdIR1EbrAcTxHCrpo9Q+IWeUlFE2palRtgIQcgm+PQJw==", + "dev": true, + "dependencies": { + "@keyv/serialize": "^1.0.2" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2353,16 +2405,16 @@ "license": "Apache-2.0" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -2513,11 +2565,10 @@ } }, "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" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "dev": true }, "node_modules/fs-extra": { "version": "10.1.0", @@ -2784,6 +2835,12 @@ "node": ">= 0.4" } }, + "node_modules/hookified": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.6.0.tgz", + "integrity": "sha512-se7cpwTA+iA/eY548Bu03JJqBiEZAqU2jnyKdj5B5qurtBg64CZGHTgqCv4Yh7NWu6FGI09W61MCq+NoPj9GXA==", + "dev": true + }, "node_modules/html-tags": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", @@ -5349,9 +5406,9 @@ } }, "node_modules/stylelint": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.12.0.tgz", - "integrity": "sha512-F8zZ3L/rBpuoBZRvI4JVT20ZanPLXfQLzMOZg1tzPflRVh9mKpOZ8qcSIhh1my3FjAjZWG4T2POwGnmn6a6hbg==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.13.1.tgz", + "integrity": "sha512-691JjSIIcP6f9QJFz0J0/AMG3lupE9RqYAgYCON3wiqp5nQiKqDYIsz321GeTOYNznoRPNh0Mf6VjzP1eBVz/Q==", "dev": true, "funding": [ { @@ -5363,7 +5420,6 @@ "url": "https://github.com/sponsors/stylelint" } ], - "license": "MIT", "dependencies": { "@csstools/css-parser-algorithms": "^3.0.4", "@csstools/css-tokenizer": "^3.0.3", @@ -5374,16 +5430,16 @@ "colord": "^2.9.3", "cosmiconfig": "^9.0.0", "css-functions-list": "^3.2.3", - "css-tree": "^3.0.1", + "css-tree": "^3.1.0", "debug": "^4.3.7", - "fast-glob": "^3.3.2", + "fast-glob": "^3.3.3", "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^9.1.0", + "file-entry-cache": "^10.0.5", "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", - "ignore": "^6.0.2", + "ignore": "^7.0.1", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", "known-css-properties": "^0.35.0", @@ -5485,30 +5541,23 @@ "license": "MIT" }, "node_modules/stylelint/node_modules/file-entry-cache": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", - "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.0.5.tgz", + "integrity": "sha512-umpQsJrBNsdMDgreSryMEXvJh66XeLtZUwA8Gj7rHGearGufUFv6rB/bcXRFsiGWw/VeSUgUofF4Rf2UKEOrTA==", "dev": true, - "license": "MIT", "dependencies": { - "flat-cache": "^5.0.0" - }, - "engines": { - "node": ">=18" + "flat-cache": "^6.1.5" } }, "node_modules/stylelint/node_modules/flat-cache": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", - "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.5.tgz", + "integrity": "sha512-QR+2kN38f8nMfiIQ1LHYjuDEmZNZVjxuxY+HufbS3BW0EX01Q5OnH7iduOYRutmgiXb797HAKcXUeXrvRjjgSQ==", "dev": true, - "license": "MIT", "dependencies": { - "flatted": "^3.3.1", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=18" + "cacheable": "^1.8.7", + "flatted": "^3.3.2", + "hookified": "^1.6.0" } }, "node_modules/stylelint/node_modules/globby": { @@ -5543,11 +5592,10 @@ } }, "node_modules/stylelint/node_modules/ignore": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", - "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.1.tgz", + "integrity": "sha512-D1gVletsbVOoiXF963rgZnfobGAbq7Lb+dz3fcBmlOmZg6hHkpbycLqL8PLNB8f4GVv6dOVYwhPL/r7hwiH0Fw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } diff --git a/package.json b/package.json index 3e32b0b..d361d39 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "eslint-plugin-import-x": "^4.6.1", "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", - "stylelint": "^16.12.0", + "stylelint": "^16.13.1", "stylelint-config-standard": "^36.0.1", "stylelint-prettier": "^5.0.2" }, From 14c682406ce4fa1c56e81de7ff4c1cf9156944ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:46:14 +0000 Subject: [PATCH 37/47] Bump stylelint-config-standard from 36.0.1 to 37.0.0 Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 36.0.1 to 37.0.0. - [Release notes](https://github.com/stylelint/stylelint-config-standard/releases) - [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.1...37.0.0) --- updated-dependencies: - dependency-name: stylelint-config-standard dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 22 ++++++++++------------ package.json | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04c0911..8fdd2c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", "stylelint": "^16.13.1", - "stylelint-config-standard": "^36.0.1", + "stylelint-config-standard": "^37.0.0", "stylelint-prettier": "^5.0.2" }, "engines": { @@ -5468,9 +5468,9 @@ } }, "node_modules/stylelint-config-recommended": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", - "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-15.0.0.tgz", + "integrity": "sha512-9LejMFsat7L+NXttdHdTq94byn25TD+82bzGRiV1Pgasl99pWnwipXS5DguTpp3nP1XjvLXVnEJIuYBfsRjRkA==", "dev": true, "funding": [ { @@ -5482,18 +5482,17 @@ "url": "https://github.com/sponsors/stylelint" } ], - "license": "MIT", "engines": { "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.1.0" + "stylelint": "^16.13.0" } }, "node_modules/stylelint-config-standard": { - "version": "36.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", - "integrity": "sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==", + "version": "37.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-37.0.0.tgz", + "integrity": "sha512-+6eBlbSTrOn/il2RlV0zYGQwRTkr+WtzuVSs1reaWGObxnxLpbcspCUYajVQHonVfxVw2U+h42azGhrBvcg8OA==", "dev": true, "funding": [ { @@ -5505,15 +5504,14 @@ "url": "https://github.com/sponsors/stylelint" } ], - "license": "MIT", "dependencies": { - "stylelint-config-recommended": "^14.0.1" + "stylelint-config-recommended": "^15.0.0" }, "engines": { "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.1.0" + "stylelint": "^16.13.0" } }, "node_modules/stylelint-prettier": { diff --git a/package.json b/package.json index d361d39..275ca4e 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "eslint-plugin-package-json": "^0.19.0", "markdownlint-cli2": "^0.17.1", "stylelint": "^16.13.1", - "stylelint-config-standard": "^36.0.1", + "stylelint-config-standard": "^37.0.0", "stylelint-prettier": "^5.0.2" }, "engines": { From 9678585bafbd9a4c84d0d8c5028beebf8995bff1 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 13 Jan 2025 21:09:50 +0100 Subject: [PATCH 38/47] create mode 9 (windows) --- src/components/screenLib.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/components/screenLib.js b/src/components/screenLib.js index d0dd54b..fd6a4e2 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -9,6 +9,7 @@ const dayjs = require("dayjs"); const Utils = require("./utils"); var log = () => { /* do nothing */ }; +const isWin = process.platform === "win32"; class SCREEN { constructor (config, callback) { @@ -135,6 +136,15 @@ class SCREEN { case 8: console.log("[MMM-Pir] [LIB] [SCREEN] Mode 8: relais"); break; + case 9: + if (isWin) { + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 9: Windows (test)"); + } else { + console.error("[MMM-Pir] [LIB] [SCREEN] Mode 9 is reserved for windows OS -- Set to 0 (Disabled)"); + this.sendSocketNotification("SCREEN_ERROR", "Mode 9 is reserved for windows OS -- Set to 0 (Disabled)"); + this.config.mode = 0; + } + break; default: console.error(`[MMM-Pir] [LIB] [SCREEN] Unknow Mode (${this.config.mode}) Set to 0 (Disabled)`); this.sendSocketNotification("SCREEN_ERROR", `Unknow Mode (${this.config.mode}) Set to 0 (Disabled)`); @@ -460,6 +470,11 @@ class SCREEN { } }); break; + case 9: + console.log("Windows Testing (by pass check)"); + // by pass check: need to find a command to find monitor state + resolve(async () => { await this.resultDisplay(this.screen.power, wanted); }); + break; } }); } @@ -697,6 +712,28 @@ class SCREEN { }); } break; + case 9: + if (set) { + let cmd = "powershell (Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)"; + exec(cmd, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 9, power ON: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "windows command command error (mode 9 power ON)"); + resolve(false); + } else resolve(true); + }); + } + else { + let cmd = "powershell (Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,-1)"; + exec(cmd, (err) => { + if (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] mode 9, power OFF: ${err}`); + this.sendSocketNotification("SCREEN_ERROR", "windows command error (mode 9 power OFF)"); + resolve(false); + } else resolve(true); + }); + } + break; } }); } From 65a9fd4b21a2e71dcb403b280f5f167eeec80844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Mon, 13 Jan 2025 22:33:19 +0100 Subject: [PATCH 39/47] Update screenLib.js (Windows Test) --- src/components/screenLib.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/screenLib.js b/src/components/screenLib.js index fd6a4e2..febaa96 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -299,7 +299,7 @@ class SCREEN { async wantedPowerDisplay (wanted) { var actual = false; - return new Promise((resolve) => { + return new Promise(async (resolve) => { switch (this.config.mode) { case 0: // disabled @@ -471,9 +471,11 @@ class SCREEN { }); break; case 9: - console.log("Windows Testing (by pass check)"); + console.log("[MMM-Pir] [LIB] [SCREEN] [Win Test] by pass check"); // by pass check: need to find a command to find monitor state - resolve(async () => { await this.resultDisplay(this.screen.power, wanted); }); + log("[Win Test] Actual:", this.status) + log("[Win Test] Wanted:", wanted) + resolve(await this.resultDisplay(this.status, wanted)); break; } }); @@ -714,8 +716,9 @@ class SCREEN { break; case 9: if (set) { - let cmd = "powershell (Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)"; - exec(cmd, (err) => { + log("[Win Test] Screen On") + let ps = "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,-1)" + exec(ps, {'shell':'powershell.exe'}, (err, stdout, stderr) => { if (err) { console.error(`[MMM-Pir] [LIB] [SCREEN] mode 9, power ON: ${err}`); this.sendSocketNotification("SCREEN_ERROR", "windows command command error (mode 9 power ON)"); @@ -724,8 +727,9 @@ class SCREEN { }); } else { - let cmd = "powershell (Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,-1)"; - exec(cmd, (err) => { + log("[Win Test] Screen Off") + let ps = "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)" + exec(ps, {'shell':'powershell.exe'}, (err, stdout, stderr) => { if (err) { console.error(`[MMM-Pir] [LIB] [SCREEN] mode 9, power OFF: ${err}`); this.sendSocketNotification("SCREEN_ERROR", "windows command error (mode 9 power OFF)"); From 5c41b1e48397225e12928d11779719183a12eea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Mon, 13 Jan 2025 22:42:13 +0100 Subject: [PATCH 40/47] Fix: lint screenLib --- src/components/screenLib.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/screenLib.js b/src/components/screenLib.js index febaa96..890f084 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -299,7 +299,7 @@ class SCREEN { async wantedPowerDisplay (wanted) { var actual = false; - return new Promise(async (resolve) => { + return new Promise((resolve) => { switch (this.config.mode) { case 0: // disabled @@ -473,9 +473,9 @@ class SCREEN { case 9: console.log("[MMM-Pir] [LIB] [SCREEN] [Win Test] by pass check"); // by pass check: need to find a command to find monitor state - log("[Win Test] Actual:", this.status) - log("[Win Test] Wanted:", wanted) - resolve(await this.resultDisplay(this.status, wanted)); + log("[Win Test] Actual:", this.status); + log("[Win Test] Wanted:", wanted); + resolve(this.resultDisplay(this.status, wanted)); break; } }); @@ -716,9 +716,9 @@ class SCREEN { break; case 9: if (set) { - log("[Win Test] Screen On") - let ps = "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,-1)" - exec(ps, {'shell':'powershell.exe'}, (err, stdout, stderr) => { + log("[Win Test] Screen On"); + let ps = "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,-1)"; + exec(ps, { shell: "powershell.exe" }, (err) => { if (err) { console.error(`[MMM-Pir] [LIB] [SCREEN] mode 9, power ON: ${err}`); this.sendSocketNotification("SCREEN_ERROR", "windows command command error (mode 9 power ON)"); @@ -727,9 +727,9 @@ class SCREEN { }); } else { - log("[Win Test] Screen Off") - let ps = "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)" - exec(ps, {'shell':'powershell.exe'}, (err, stdout, stderr) => { + log("[Win Test] Screen Off"); + let ps = "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)"; + exec(ps, { shell: "powershell.exe" }, (err) => { if (err) { console.error(`[MMM-Pir] [LIB] [SCREEN] mode 9, power OFF: ${err}`); this.sendSocketNotification("SCREEN_ERROR", "windows command error (mode 9 power OFF)"); From 885038761c592aace588693c60479238f98d079d Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 13 Jan 2025 23:10:11 +0100 Subject: [PATCH 41/47] disable: pirLib and governor for windows user --- src/components/governorLib.js | 18 +++++++++++++++++- src/components/pirLib.js | 5 +++++ src/components/screenLib.js | 7 +++---- src/components/utils.js | 3 +++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/components/governorLib.js b/src/components/governorLib.js index 1e4fb18..716f5e8 100644 --- a/src/components/governorLib.js +++ b/src/components/governorLib.js @@ -2,6 +2,7 @@ /** bugsounet **/ const exec = require("child_process").exec; +const Utils = require("./utils"); var log = () => { /* do nothing */ }; @@ -16,6 +17,13 @@ class GOVERNOR { }; this.config = Object.assign(this.default, this.config); if (this.config.debug === true) log = (...args) => { console.log("[MMM-Pir] [LIB] [GOVERNOR]", ...args); }; + if (Utils.isWin()) { + if (this.config.sleeping || this.config.working) { + this.config.sleeping = 0; + this.config.working = 0; + console.log("[MMM-Pir] [LIB] [GOVERNOR] [Windows] Governor library Disabled"); + } + } this.MyGovernor = ["Disabled", "conservative", "ondemand", "userspace", "powersave", "performance"]; this.Governor = { actived: false, @@ -23,7 +31,15 @@ class GOVERNOR { actual: "", error: null }; - console.log("[MMM-Pir] [LIB] [GOVERNOR] Governor library initialized..."); + if (Utils.isWin()) { + console.log("[MMM-Pir] [LIB] [GOVERNOR] [Windows] Governor library Disabled"); + if (this.config.sleeping || this.config.working) { + this.config.sleeping = 0; + this.config.working = 0; + } + } else { + console.log("[MMM-Pir] [LIB] [GOVERNOR] Governor library initialized..."); + } } start () { diff --git a/src/components/pirLib.js b/src/components/pirLib.js index 72082cc..45964f2 100644 --- a/src/components/pirLib.js +++ b/src/components/pirLib.js @@ -2,6 +2,7 @@ /** bugsounet **/ var log = () => { /* do nothing */ }; +const Utils = require("./utils"); class PIR { constructor (config, callback) { @@ -23,6 +24,10 @@ class PIR { this.pirChipNumber = -1; this.pirInterval = null; this.pirReadyToDetect = false; + if (Utils.isWin()) { + console.log("[MMM-Pir] [LIB] [PIR] [Windows] Pir library Disabled."); + if (this.config.gpio) this.config.gpio = 0; + } } start () { diff --git a/src/components/screenLib.js b/src/components/screenLib.js index 890f084..7e61a4c 100644 --- a/src/components/screenLib.js +++ b/src/components/screenLib.js @@ -9,7 +9,6 @@ const dayjs = require("dayjs"); const Utils = require("./utils"); var log = () => { /* do nothing */ }; -const isWin = process.platform === "win32"; class SCREEN { constructor (config, callback) { @@ -137,11 +136,11 @@ class SCREEN { console.log("[MMM-Pir] [LIB] [SCREEN] Mode 8: relais"); break; case 9: - if (isWin) { + if (Utils.isWin()) { console.log("[MMM-Pir] [LIB] [SCREEN] Mode 9: Windows (test)"); } else { - console.error("[MMM-Pir] [LIB] [SCREEN] Mode 9 is reserved for windows OS -- Set to 0 (Disabled)"); - this.sendSocketNotification("SCREEN_ERROR", "Mode 9 is reserved for windows OS -- Set to 0 (Disabled)"); + console.error("[MMM-Pir] [LIB] [SCREEN] Mode 9 is reserved for windows OS -- Set mode to 0 (Disabled)"); + this.sendSocketNotification("SCREEN_ERROR", "Mode 9 is reserved for windows OS -- Set mode to 0 (Disabled)"); this.config.mode = 0; } break; diff --git a/src/components/utils.js b/src/components/utils.js index f5d43a0..2fc0f3d 100644 --- a/src/components/utils.js +++ b/src/components/utils.js @@ -22,5 +22,8 @@ module.exports = { } } return result; + }, + isWin () { + return process.platform === "win32"; } }; From 4a77bf5eaa93fcd9903166b10d859fb94790f683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Tue, 14 Jan 2025 17:29:51 +0100 Subject: [PATCH 42/47] Create update.cmd (windows updater) --- installer/update.cmd | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 installer/update.cmd diff --git a/installer/update.cmd b/installer/update.cmd new file mode 100644 index 0000000..5853b05 --- /dev/null +++ b/installer/update.cmd @@ -0,0 +1,38 @@ +@echo off + +call :welcome +call :clean +call :pull +call :install +exit /b + +:welcome +echo. +echo Welcome to MMM-Pir updater +echo ---- +echo. +exit /b + +:clean +echo. +echo Cleaning MMM-Pir Core +echo ---- +echo. +call npm run reset:windows +exit /b + +:pull +echo. +echo Update MMM-Pir core +echo ---- +echo. +call git pull +exit /b + +:install +echo. +echo Setup MMM-Pir +echo ---- +echo. +call npm run setup:windows +exit /b From 8dad55883a82c1c854c73998bc203932073c03ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Tue, 14 Jan 2025 17:32:27 +0100 Subject: [PATCH 43/47] Update windows.cmd --- installer/windows.cmd | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/installer/windows.cmd b/installer/windows.cmd index 4a4b3ec..538b6b0 100644 --- a/installer/windows.cmd +++ b/installer/windows.cmd @@ -1,20 +1,39 @@ @echo off +call :welcome call :node call :deps call :src exit /b +:welcome +echo. +echo Welcome to MMM-Pir installer +echo ---- +echo. +exit /b + :node +echo. echo Remove node-libgpiod library (not compatible) +echo ---- +echo. call npm remove node-libgpiod exit /b -:deps +:deps +echo. echo Install Dependencies +echo ---- +echo. call npm prune exit /b :src +echo. +echo Install src files +echo ---- +echo. call cd installer && node minify +echo. exit /b From e098a44173fe328be3917e64b564a8f99d155ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Tue, 14 Jan 2025 17:34:04 +0100 Subject: [PATCH 44/47] Update package.json (windows scripts) --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c9bab3..47c4660 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "pinctrl": "installer/pinctrl.sh", "rebuild": "installer/rebuild.sh", "reset": "rm -f *.js && rm -rf components/*.js && git reset --hard", + "reset:windows": "del *.js && cd components && del *.js && git reset --hard", "screenSaver": "installer/screenSaver.sh", "presetup": "npm run deps && installer/preinstall.sh", "setup": "npm prune", @@ -41,7 +42,8 @@ "test:css": "stylelint *.css", "test:markdown": "markdownlint-cli2 *.md", "test:minify": "cd installer && node minify.js", - "update": "installer/update.sh" + "update": "installer/update.sh", + "update:windows": "call installer/update.cmd" }, "dependencies": { "@electron/rebuild": "^3.7.1", @@ -70,5 +72,5 @@ "engines": { "node": ">=20.9.0 <21 || >=22" }, - "rev": "250106" + "rev": "250114" } From f27bc472a2842a6a82c8c3f057f031af81130166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Tue, 14 Jan 2025 17:46:53 +0100 Subject: [PATCH 45/47] Create windowsMaster.yml --- .github/workflows/windowsMaster.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/windowsMaster.yml diff --git a/.github/workflows/windowsMaster.yml b/.github/workflows/windowsMaster.yml new file mode 100644 index 0000000..c080d50 --- /dev/null +++ b/.github/workflows/windowsMaster.yml @@ -0,0 +1,35 @@ +name: "[windows] MagicMirror² (master) and MMM-Pir build Testing" + +on: [pull_request] + +jobs: + build: + name: Test install MMM-Pir + runs-on: windows-latest + strategy: + matrix: + node-version: [ 20.x ] + steps: + - name: "Use Node.js ${{ matrix.node-version }}" + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + check-latest: true + + - name: Checkout MagicMirror² + uses: actions/checkout@v4 + with: + repository: MagicMirrorOrg/MagicMirror + + - name: Install MagicMirror² + run: npm install + + - name: Checkout MMM-Pir + uses: actions/checkout@v4 + with: + path: MagicMirror/modules/MMM-Pir + + - name: Install MMM-Pir + run: npm run setup:windows + working-directory: MagicMirror/modules/MMM-Pir + continue-on-error: false From fee996579f9d968b1b6dbc40ac15c977cc61a870 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 14 Jan 2025 22:38:37 +0100 Subject: [PATCH 46/47] update Readme --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 538dbf0..7d1c3be 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,9 @@ cd MMM-Pir npm run setup ``` -This module will verify if all screen saver is disabled and disable it if needed +`MMM-Pir` is now available for Windows environment! + +For install use `npm run setup:windows` command instead of `npm run setup` ## Configuration @@ -150,6 +152,7 @@ To display the module insert it in the config.js file. * `mode: 6` - use dpms (linux version for debian, ubuntu, ...) * `mode: 7` - use labwc (For raspbian 12 with labwc compositor) * `mode: 8` - use pinctrl for switching a relay + * `mode: 9` - use windows powershell commands (windows 10, 11) Notes: @@ -164,6 +167,8 @@ For some displays, the `getvcp` commands cause the display to turn-on. In these #### Pir Sensor Configuration +⚠ **Pir Sensor is not available under windows environement** + | Option | Description | Type | Default | | ------- | --- | --- | --- | | animate | Animate MMM-Pir module on detect | Boolean | true | @@ -362,6 +367,8 @@ Don't be stupid! Don't create an ON event equal to OFF event #### Governor Configuration +⚠ **Governor is not available under windows environement** + CPU governor enables the operating system to scale the CPU frequency up or down in order to save power or improve performance. On each boot of your RPI, your governor is set automaticaly to `ondemand`. @@ -385,6 +392,8 @@ If you want a maximum of CPU power, `performance` is the best choice ! If you want an economy mode of CPU power, `powersave` is the best choice ! +⚠ Governor is not available under windows environement + ------ #### Sounds Configuration @@ -428,6 +437,8 @@ cd ~/MagicMirror/modules/MMM-Pir npm run update ``` +For windows user: You have to use `npm run update:windows` command instead of `npm run update` + ### Automatic Update from [updatenotification](https://develop.docs.magicmirror.builders/modules/updatenotification.html) default module Since MagicMirror² v2.27.x, we are able to Update automaticaly any modules from `updatenotification`. From fb780270be0927804325d6d9989aa60ca4a2b048 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Tue, 14 Jan 2025 22:45:50 +0100 Subject: [PATCH 47/47] deny npm install --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 47c4660..1eeb9a9 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,8 @@ "deps": "installer/dependencies.sh -d 'unclutter ddcutil cec-utils python3 python-is-python3 python3-gpiozero gpiod libgpiod2 libgpiod-dev'", "dev": "cd installer && node dev.js", "dev:src": "cd installer && node src.js", - "preinstall": "echo ⚠ npm install will be deprecated on next release!.", - "install": "npm run setup", - "postinstall": "echo ⚠ On next release, Please use: npm run setup", + "preinstall": "echo ⚠ Please use: npm run setup && exit 1", + "install": "exit 1", "lint": "eslint . --config eslint.config.mjs", "lint:fix": "eslint . --config eslint.config.mjs --fix", "pinctrl": "installer/pinctrl.sh",