From ff227d2848332f511b1024f4b7d80b12212c2819 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Wed, 14 Feb 2024 19:17:02 +0100 Subject: [PATCH 01/16] delete vulnerabilities --- package-lock.json | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc774200..e144d559 100644 --- a/package-lock.json +++ b/package-lock.json @@ -522,9 +522,9 @@ } }, "node_modules/@types/node": { - "version": "20.11.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", - "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "version": "20.11.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.17.tgz", + "integrity": "sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==", "dependencies": { "undici-types": "~5.26.4" } @@ -1466,10 +1466,17 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", @@ -1525,6 +1532,11 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -2342,15 +2354,15 @@ } }, "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.3.tgz", + "integrity": "sha512-vfuYK48HXCTFD03G/1/zkIls3Ebr2YNa4qU9gHDZdblHLiqhJrJGkY3+0Nx0JpN9qBhJbVObc1CNciT1bIZJxw==", "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, @@ -2367,6 +2379,11 @@ "node": ">= 10" } }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, "node_modules/ssri": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", From c1059a0f0331fa67dfd8698ecc329c8ac9e5bb7a Mon Sep 17 00:00:00 2001 From: bugsounet Date: Wed, 14 Feb 2024 19:21:05 +0100 Subject: [PATCH 02/16] some correct for new minify --- components/long-press-event.js | 2 +- components/screenDisplayer.js | 2 +- components/screenLib.js | 2 +- components/screenTouch.js | 2 +- installer/minify.js | 15 ++++++++++++++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/components/long-press-event.js b/components/long-press-event.js index 281d6310..951a622e 100644 --- a/components/long-press-event.js +++ b/components/long-press-event.js @@ -1,5 +1,5 @@ /*! - * long-press-event - v@version@ + * long-press-event * Pure JavaScript long-press-event * https://github.com/john-doherty/long-press-event * @author John Doherty diff --git a/components/screenDisplayer.js b/components/screenDisplayer.js index ebfb5277..c7f9a58f 100644 --- a/components/screenDisplayer.js +++ b/components/screenDisplayer.js @@ -1,4 +1,4 @@ -/*!****************** +/******************** * Screen displayer * * Bugsounet * *********************/ diff --git a/components/screenLib.js b/components/screenLib.js index 43a57cac..7bb4cb3c 100644 --- a/components/screenLib.js +++ b/components/screenLib.js @@ -1,4 +1,4 @@ -/*!****************** +/******************** * Screen management * * Bugsounet * *********************/ diff --git a/components/screenTouch.js b/components/screenTouch.js index 4f1dc169..6bc6ac98 100644 --- a/components/screenTouch.js +++ b/components/screenTouch.js @@ -1,4 +1,4 @@ -/*!************ +/************** * screenTouch * * Bugsounet * ***************/ diff --git a/installer/minify.js b/installer/minify.js index 2e76f8b0..b6d05f34 100644 --- a/installer/minify.js +++ b/installer/minify.js @@ -10,6 +10,12 @@ var files = [ "../node_helper.js" ] +let project = require("../package.json").name +let revision = require("../package.json").rev +let version = require("../package.json").version +let commentIn = "/**" +let commentOut = "**/" + function searchFiles() { let components = globSync('../components/*.js') files = files.concat(components) @@ -24,6 +30,7 @@ async function minifyFiles() { function minify(file) { let pathResolve = path.resolve(__dirname, file) + let FileName = path.parse(file).base let error = 0 console.log("Process File:", file) return new Promise((resolve,reject) => { @@ -32,7 +39,13 @@ function minify(file) { entryPoints: [pathResolve], allowOverwrite: true, minify: true, - outfile: pathResolve + outfile: pathResolve, + banner: { + js: `${commentIn} ${project}\n * File: ${FileName}\n * Version: ${version}\n * Revision: ${revision}\n${commentOut}` + }, + footer: { + js: `${commentIn} Coded With Heart by bugsounet ${commentOut}` + } }) resolve(true) } catch (e) { From 30d9af525b8830a37d2a9194e7329466be57ae1c Mon Sep 17 00:00:00 2001 From: bugsounet Date: Wed, 14 Feb 2024 19:22:45 +0100 Subject: [PATCH 03/16] missing main js codes --- MMM-Pir.js | 2 +- node_helper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MMM-Pir.js b/MMM-Pir.js index 67235d26..1f4e0a59 100644 --- a/MMM-Pir.js +++ b/MMM-Pir.js @@ -1,4 +1,4 @@ -/*!************** +/**************** * MMM-Pir v1.2 * * Bugsounet * * 02/2024 * diff --git a/node_helper.js b/node_helper.js index 43aa7626..c07a79fc 100644 --- a/node_helper.js +++ b/node_helper.js @@ -1,4 +1,4 @@ -/*!***************************** +/******************************* * node_helper for MMM-Pir v1.2 * * BuGsounet * ********************************/ From 814d3942220711c732557bb454d9d13c88735817 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:29:29 +0100 Subject: [PATCH 04/16] add eslint devDependencies --- package-lock.json | 2611 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 5 + 2 files changed, 2601 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index e144d559..e8b344ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,10 +15,24 @@ "glob": "^10.3.10", "onoff": "^6.0.3" }, + "devDependencies": { + "@stylistic/eslint-plugin": "^1.6.2", + "eslint": "^8.56.0", + "eslint-plugin-import": "^2.29.1" + }, "engines": { "node": ">=18" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@electron/rebuild": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.6.0.tgz", @@ -391,11 +405,144 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -433,6 +580,41 @@ "node": ">= 12.13.0" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@npmcli/fs": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", @@ -478,6 +660,92 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@stylistic/eslint-plugin": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.6.2.tgz", + "integrity": "sha512-EFnVcKOE5HTiMlVwisL9hHjz8a69yBbJRscWF/z+/vl6M4ew8NVrBlY8ea7KdV8QtyCY4Yapmsbg5ZDfhWlEgg==", + "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "1.6.2", + "@stylistic/eslint-plugin-jsx": "1.6.2", + "@stylistic/eslint-plugin-plus": "1.6.2", + "@stylistic/eslint-plugin-ts": "1.6.2", + "@types/eslint": "^8.56.2" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.6.2.tgz", + "integrity": "sha512-ndT6X2KgWGxv8101pdMOxL8pihlYIHcOv3ICd70cgaJ9exwkPn8hJj4YQwslxoAlre1TFHnXd/G1/hYXgDrjIA==", + "dev": true, + "dependencies": { + "@types/eslint": "^8.56.2", + "acorn": "^8.11.3", + "escape-string-regexp": "^4.0.0", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.6.2.tgz", + "integrity": "sha512-hbbouazSJbHD/fshBIOLh9JgtSphKNoTCfHLSNBjAkXLK+GR4i2jhEZZF9P0mtXrNuy2WWInmpq/g0pfWBmSBA==", + "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "^1.6.2", + "@types/eslint": "^8.56.2", + "estraverse": "^5.3.0", + "picomatch": "^4.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-plus": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.6.2.tgz", + "integrity": "sha512-EDMwa6gzKw4bXRqdIAUvZDfIgwotbjJs8o+vYE22chAYtVAnA0Pcq+cPx0Uk35t2gvJWb5OaLDjqA6oy1tD0jg==", + "dev": true, + "dependencies": { + "@types/eslint": "^8.56.2", + "@typescript-eslint/utils": "^6.21.0" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@stylistic/eslint-plugin-ts": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.6.2.tgz", + "integrity": "sha512-FizV58em0OjO/xFHRIy/LJJVqzxCNmYC/xVtKDf8aGDRgZpLo+lkaBKfBrbMkAGzhBKbYj+iLEFI4WEl6aVZGQ==", + "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "1.6.2", + "@types/eslint": "^8.56.2", + "@typescript-eslint/utils": "^6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -508,11 +776,39 @@ "@types/responselike": "^1.0.0" } }, + "node_modules/@types/eslint": { + "version": "8.56.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.2.tgz", + "integrity": "sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "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 + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -537,11 +833,144 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "dev": true + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -576,6 +1005,22 @@ "node": ">=8" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -618,6 +1063,164 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "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, + "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.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "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", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.filter": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz", + "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", + "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.3.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, + "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, + "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, + "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/available-typed-arrays": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", + "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", + "dev": true, + "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", @@ -668,6 +1271,18 @@ "balanced-match": "^1.0.0" } }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -784,12 +1399,40 @@ "node": ">=8" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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, "dependencies": { - "ansi-styles": "^4.1.0", + "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", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { @@ -1010,6 +1653,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -1029,6 +1678,40 @@ "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, + "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, + "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/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -1042,6 +1725,30 @@ "node": ">=8" } }, + "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, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1095,6 +1802,128 @@ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" }, + "node_modules/es-abstract": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", + "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "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.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "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.0", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.1", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "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, + "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, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "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, + "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, + "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.20.0", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.0.tgz", @@ -1140,16 +1969,466 @@ "node": ">=6" } }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "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, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/exponential-backoff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "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==", + "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" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "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, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -1205,6 +2484,42 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "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, + "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, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gauge": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", @@ -1273,6 +2588,25 @@ "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, + "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-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -1287,6 +2621,23 @@ "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==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -1308,6 +2659,80 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "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/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "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", @@ -1337,6 +2762,21 @@ "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/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "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, + "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", @@ -1345,11 +2785,74 @@ "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, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "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, + "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, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -1431,6 +2934,31 @@ } ] }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -1466,6 +2994,20 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "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, + "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", @@ -1478,6 +3020,98 @@ "node": ">= 12" } }, + "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, + "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-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "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, + "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, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "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, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -1486,6 +3120,18 @@ "node": ">=8" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -1499,6 +3145,124 @@ "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.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "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", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "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, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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, + "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.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "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, + "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, + "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, + "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", @@ -1510,6 +3274,24 @@ "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, + "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 + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1532,6 +3314,18 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", @@ -1542,6 +3336,30 @@ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "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, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -1561,11 +3379,45 @@ "json-buffer": "3.0.1" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -1634,6 +3486,40 @@ "node": ">=8" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -1664,6 +3550,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/minipass": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", @@ -1831,6 +3726,12 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -1960,6 +3861,89 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "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, + "engines": { + "node": ">= 0.4" + } + }, + "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, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz", + "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==", + "dev": true, + "dependencies": { + "array.prototype.filter": "^1.0.3", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.0.0" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1994,6 +3978,23 @@ "node": ">=10.0.0" } }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -2043,18 +4044,69 @@ "node": ">=8" } }, - "node_modules/p-map": { + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dependencies": { - "aggregate-error": "^3.0.0" - }, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/path-is-absolute": { @@ -2073,6 +4125,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-scurry": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", @@ -2096,6 +4154,36 @@ "node": "14 || >=16.14" } }, + "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, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz", + "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -2122,6 +4210,35 @@ "once": "^1.3.1" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -2157,6 +4274,24 @@ "node": ">= 6" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "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", @@ -2165,11 +4300,37 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-alpn": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/responselike": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", @@ -2206,6 +4367,16 @@ "node": ">= 4" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -2259,6 +4430,47 @@ "node": "*" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", + "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", @@ -2278,6 +4490,23 @@ } ] }, + "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, + "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", @@ -2314,6 +4543,37 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "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", @@ -2333,6 +4593,24 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", + "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "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", @@ -2344,6 +4622,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -2468,6 +4755,51 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -2502,6 +4834,27 @@ "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, + "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", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2513,6 +4866,18 @@ "node": ">=8" } }, + "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", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/tar": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", @@ -2537,6 +4902,166 @@ "node": ">=8" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", + "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "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==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz", + "integrity": "sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "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, + "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", @@ -2572,6 +5097,15 @@ "node": ">= 10.0.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -2599,6 +5133,41 @@ "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, + "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.14", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", + "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -2804,6 +5373,18 @@ "engines": { "node": ">=8" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index a5118fa2..7308c8a6 100644 --- a/package.json +++ b/package.json @@ -35,5 +35,10 @@ "esbuild": "^0.20.0", "glob": "^10.3.10", "onoff": "^6.0.3" + }, + "devDependencies": { + "eslint": "^8.56.0", + "@stylistic/eslint-plugin": "^1.6.2", + "eslint-plugin-import": "^2.29.1" } } From 85f080d5549b5f350a591563e9af8be16797d47c Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:34:37 +0100 Subject: [PATCH 05/16] add lint --- .eslintrc.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 +++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..aa1ba59a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,64 @@ +module.exports = { + extends: ["eslint:recommended", "plugin:@stylistic/all-extends", "plugin:import/recommended"], + env: { + es2023: true, + node: true + }, + parserOptions: { + sourceType: "module", + ecmaVersion: 2023, + ecmaFeatures: { + globalReturn: true + } + }, + globals: { + config: true, + Log: true, + MM: true, + Module: true, + moment: true, + document: true + }, + rules: { + eqeqeq: "error", + "import/order": "error", + "import/extensions": [ + "error", + "ignorePackages", + { + json: "always" // ignore json require (display EXT version and rev date) + } + ], + "import/newline-after-import": "error", + "no-param-reassign": "error", + "no-prototype-builtins": "off", + "no-throw-literal": "error", + "no-unused-vars": "off", + "no-useless-return": "error", + "object-shorthand": ["error", "methods"], + "prefer-template": "error", + "@stylistic/array-element-newline": ["error", "consistent"], + "@stylistic/arrow-parens": ["error", "always"], + "@stylistic/brace-style": "off", + "@stylistic/comma-dangle": ["error", "never"], + "@stylistic/dot-location": ["error", "property"], + "@stylistic/function-call-argument-newline": ["error", "consistent"], + "@stylistic/function-paren-newline": ["error", "consistent"], + "@stylistic/implicit-arrow-linebreak": ["error", "beside"], + "@stylistic/max-statements-per-line": ["error", { max: 2 }], + "@stylistic/multiline-ternary": ["error", "always-multiline"], + "@stylistic/newline-per-chained-call": ["error", { ignoreChainWithDepth: 4 }], + "@stylistic/no-extra-parens": "off", + "@stylistic/no-tabs": "off", + "@stylistic/object-curly-spacing": ["error", "always"], + "@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }], + "@stylistic/operator-linebreak": ["error", "before"], + "@stylistic/padded-blocks": "off", + "@stylistic/quote-props": ["error", "as-needed"], + "@stylistic/quotes": ["error", "double"], + "@stylistic/indent": ["error", 2], // indent 2 spaces + "@stylistic/semi": ["error", "always"], + "@stylistic/space-before-function-paren": ["error", "always"], + "@stylistic/spaced-comment": "off" + } +}; diff --git a/package.json b/package.json index 7308c8a6..8416c8a0 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,9 @@ "update": "installer/update.sh", "rebuild": "installer/rebuild.sh", "reset": "git reset --hard", - "clean": "rm -rf node_modules package-lock.json" + "clean": "rm -rf node_modules package-lock.json", + "lint": "eslint *.js installer/*.js components/*.js --resolve-plugins-relative-to . --no-eslintrc --config .eslintrc.js", + "lint:fix": "eslint *.js installer/*.js components/*.js --resolve-plugins-relative-to . --no-eslintrc --config .eslintrc.js --fix" }, "keywords": [ "magic mirror", From 6f9c88fe083ee0b6c3f12270c11f9e4796ca46ee Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:39:27 +0100 Subject: [PATCH 06/16] eslint fix (MMM-Pir.js) --- MMM-Pir.js | 325 +++++++++++++++++++++++++++-------------------------- 1 file changed, 166 insertions(+), 159 deletions(-) diff --git a/MMM-Pir.js b/MMM-Pir.js index 1f4e0a59..f37e240e 100644 --- a/MMM-Pir.js +++ b/MMM-Pir.js @@ -4,173 +4,180 @@ * 02/2024 * *****************/ -var _logPIR = (...args) => { /* do nothing */ } +/* global screenDisplayer, screenTouch */ + +var _logPIR = (...args) => { /* do nothing */ }; Module.register("MMM-Pir", { - requiresVersion: "2.23.0", - defaults: { - debug: false, - delay: 2 * 60 * 1000, - mode: 1, - touchMode: 3, - displayCounter: true, - displayBar: true, - displayStyle: "Text", - displayLastPresence: true, - lastPresenceTimeFormat: "LL H:mm", - mode6_gpio: 20, - mode6_clearGpioValue: true, - pir_gpio: 21, - pir_reverseValue: false, - xrandrForceRotation: "normal", - wrandrForceRotation: "normal", - wrandrForceMode: null - }, + requiresVersion: "2.23.0", + defaults: { + debug: false, + delay: 2 * 60 * 1000, + mode: 1, + touchMode: 3, + displayCounter: true, + displayBar: true, + displayStyle: "Text", + displayLastPresence: true, + lastPresenceTimeFormat: "LL H:mm", + mode6_gpio: 20, + mode6_clearGpioValue: true, + pir_gpio: 21, + pir_reverseValue: false, + xrandrForceRotation: "normal", + wrandrForceRotation: "normal", + wrandrForceMode: null + }, + + start () { + if (this.config.debug) _logPIR = (...args) => { console.log("[MMM-Pir]", ...args); }; + this.userPresence = null; + this.lastPresence = null; + this.ready = false; + let Tools = { + sendSocketNotification: (...args) => this.sendSocketNotification(...args), + hidden: () => { return this.hidden; }, + translate: (...args) => this.translate(...args) + }; + let displayConfig = { + displayCounter: this.config.displayCounter, + displayBar: this.config.displayBar, + displayStyle: this.config.displayStyle, + displayLastPresence: this.config.displayLastPresence, + delay: this.config.delay + }; + this.screenDisplay = new screenDisplayer(displayConfig, Tools); + this.screenDisplay.checkStyle(); + this.screenTouch = new screenTouch(this.config.touchMode, Tools); + _logPIR("is now started!"); + }, - start: function () { - if (this.config.debug) _logPIR = (...args) => { console.log("[MMM-Pir]", ...args) } - this.userPresence = null - this.lastPresence = null - this.ready = false - let Tools = { - sendSocketNotification: (...args) => this.sendSocketNotification(...args), - hidden: () => { return this.hidden }, - translate: (...args) => this.translate(...args) - } - let displayConfig = { - displayCounter: this.config.displayCounter, - displayBar: this.config.displayBar, - displayStyle: this.config.displayStyle, - displayLastPresence: this.config.displayLastPresence, - delay: this.config.delay - } - this.screenDisplay = new screenDisplayer(displayConfig, Tools) - this.screenDisplay.checkStyle() - this.screenTouch = new screenTouch(this.config.touchMode, Tools) - _logPIR("is now started!") - }, + socketNotificationReceived (notification, payload) { + switch (notification) { + case "INITIALIZED": + _logPIR("Ready to fight MagicMirror²!"); + this.screenTouch.touch(); + this.ready = true; + break; + case "SCREEN_SHOWING": + this.screenDisplay.screenShowing(); + break; + case "SCREEN_HIDING": + this.screenDisplay.screenHiding(); + break; + case "SCREEN_OUTPUT": + if (this.config.displayStyle === "Text") { + let counter = document.getElementById("MMM-PIR_SCREEN_COUNTER"); + counter.textContent = payload.timer; + } else { + this.screenDisplay.barAnimate(payload.bar); + } + break; + case "SCREEN_PRESENCE": + if (!this.config.displayLastPresence) return; + if (payload) this.lastPresence = moment().format(this.config.lastPresenceTimeFormat); + else this.userPresence = this.lastPresence; + if (this.userPresence) { + let presence = document.getElementById("MMM-PIR_PRESENCE"); + presence.classList.remove("hidden"); + presence.classList.add("bright"); + let userPresence = document.getElementById("MMM-PIR_PRESENCE_DATE"); + userPresence.textContent = this.userPresence; + } + break; + case "SCREEN_POWERSTATUS": + if (payload) this.sendNotification("USER_PRESENCE", true); + else this.sendNotification("USER_PRESENCE", false); + break; + case "WARNING": + this.sendNotification("SHOW_ALERT", { + type: "notification", + title: "MMM-Pir", + message: `Warning: Library not loaded: ${payload.library}`, + timer: 15000 + }); + break; + case "FatalError": + this.sendNotification("SHOW_ALERT", { + title: "MMM-Pir", + message: `

FATAL: ${payload} needed library not loaded !
Try to solve it with 'npm run rebuild' in MMM-Pir Folder

`, + timer: 0 + }); + break; + case "SCREEN_ERROR": + case "PIR_ERROR": + this.sendNotification("SHOW_ALERT", { + type: "notification", + title: "MMM-Pir", + message: `Pir Error detected: ${payload}`, + timer: 15000 + }); + } + }, - socketNotificationReceived: function (notification, payload) { - switch(notification) { - case "INITIALIZED": - _logPIR("Ready to fight MagicMirror²!") - this.screenTouch.touch() - this.ready = true - break - case "SCREEN_SHOWING": - this.screenDisplay.screenShowing() - break - case "SCREEN_HIDING": - this.screenDisplay.screenHiding() - break - case "SCREEN_OUTPUT": - if (this.config.displayStyle == "Text") { - let counter = document.getElementById("MMM-PIR_SCREEN_COUNTER") - counter.textContent = payload.timer - } else { - this.screenDisplay.barAnimate(payload.bar) - } - break - case "SCREEN_PRESENCE": - if (!this.config.displayLastPresence) return - if (payload) this.lastPresence = moment().format(this.config.lastPresenceTimeFormat) - else this.userPresence = this.lastPresence - if (this.userPresence) { - let presence= document.getElementById("MMM-PIR_PRESENCE") - presence.classList.remove("hidden") - presence.classList.add("bright") - let userPresence= document.getElementById("MMM-PIR_PRESENCE_DATE") - userPresence.textContent = this.userPresence - } - break - case "SCREEN_POWERSTATUS": - if (payload) this.sendNotification("USER_PRESENCE", true) - else this.sendNotification("USER_PRESENCE", false) - break - case "WARNING": - this.sendNotification("SHOW_ALERT", { - type: "notification", - title: "MMM-Pir", - message: `Warning: Library not loaded: ${payload.library}`, - timer: 15000 - }) - break - case "FatalError": - this.sendNotification("SHOW_ALERT", { - title: "MMM-Pir", - message: `

FATAL: ${payload} needed library not loaded !
Try to solve it with 'npm run rebuild' in MMM-Pir Folder

`, - timer: 0 - }) - break - case "SCREEN_ERROR": - case "PIR_ERROR": - this.sendNotification("SHOW_ALERT", { - type: "notification", - title: "MMM-Pir", - message: `Pir Error detected: ${payload}`, - timer: 15000 - }) - } - }, + notificationReceived (notification, payload, sender) { + if (notification === "MODULE_DOM_CREATED") { + this.screenDisplay.prepareBar(); + this.sendSocketNotification("INIT", this.config); + } + if (!this.ready) return; + switch (notification) { + case "MMM_PIR-END": - notificationReceived: function (notification, payload, sender) { - if (notification == "MODULE_DOM_CREATED") { - this.screenDisplay.prepareBar() - this.sendSocketNotification("INIT", this.config) - } - if (!this.ready) return - switch(notification) { - case "MMM_PIR-END": - /** only available if not force-locked by touch **/ - this.sendSocketNotification("FORCE_END") - break - case "MMM_PIR-WAKEUP": - /** only available if not force-locked by touch **/ - this.sendSocketNotification("WAKEUP") - break - case "MMM_PIR-LOCK": - /** only available if not force-locked by touch **/ - this.sendSocketNotification("LOCK") - break - case "MMM_PIR-UNLOCK": - /** only available if not force-locked by touch **/ - this.sendSocketNotification("UNLOCK") - break - case "USER_PRESENCE": - /** only available if not force-locked by touch **/ - if (payload) this.sendSocketNotification("WAKEUP") - else this.sendSocketNotification("FORCE_END") - } - }, + /** only available if not force-locked by touch **/ + this.sendSocketNotification("FORCE_END"); + break; + case "MMM_PIR-WAKEUP": - getDom: function () { - return this.screenDisplay.prepare() - }, + /** only available if not force-locked by touch **/ + this.sendSocketNotification("WAKEUP"); + break; + case "MMM_PIR-LOCK": - getStyles: function () { - return [ "MMM-Pir.css" ] - }, + /** only available if not force-locked by touch **/ + this.sendSocketNotification("LOCK"); + break; + case "MMM_PIR-UNLOCK": - getScripts: function () { - return [ - "/modules/MMM-Pir/components/progressbar.js", - "/modules/MMM-Pir/components/screenDisplayer.js", - "/modules/MMM-Pir/components/long-press-event.js", - "/modules/MMM-Pir/components/screenTouch.js" - ] - }, + /** only available if not force-locked by touch **/ + this.sendSocketNotification("UNLOCK"); + break; + case "USER_PRESENCE": - getTranslations: function() { - return { - en: "translations/en.json", - fr: "translations/fr.json", - it: "translations/it.json", - de: "translations/de.json", - es: "translations/es.json", - nl: "translations/nl.json", - pt: "translations/pt.json", - ko: "translations/ko.json", - el: "translations/el.json" - } + /** only available if not force-locked by touch **/ + if (payload) this.sendSocketNotification("WAKEUP"); + else this.sendSocketNotification("FORCE_END"); } + }, + + getDom () { + return this.screenDisplay.prepare(); + }, + + getStyles () { + return ["MMM-Pir.css"]; + }, + + getScripts () { + return [ + "/modules/MMM-Pir/components/progressbar.js", + "/modules/MMM-Pir/components/screenDisplayer.js", + "/modules/MMM-Pir/components/long-press-event.js", + "/modules/MMM-Pir/components/screenTouch.js" + ]; + }, + + getTranslations () { + return { + en: "translations/en.json", + fr: "translations/fr.json", + it: "translations/it.json", + de: "translations/de.json", + es: "translations/es.json", + nl: "translations/nl.json", + pt: "translations/pt.json", + ko: "translations/ko.json", + el: "translations/el.json" + }; + } }); From f1086db09e5ac8e8bb0f1cb4d32196608fedf2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sat, 17 Feb 2024 14:41:02 +0100 Subject: [PATCH 07/16] Create eslint.yml --- .github/workflows/eslint.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/eslint.yml diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 00000000..7af43825 --- /dev/null +++ b/.github/workflows/eslint.yml @@ -0,0 +1,18 @@ +name: "ESLint Testing" + +on: [pull_request] + +jobs: + eslint: + name: Run eslint scanning + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Dependencies + run: npm prune + + - name: Run ESLint + run: npx eslint *.js installer/*.js components/*.js website/tools/*.js website/config/*/*.js components/AssistantSDK/*.js --config .eslintrc.js + continue-on-error: false From 179458a3e5a61a795df400c149a031e605247c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bugsounet=20-=20C=C3=A9dric?= Date: Sat, 17 Feb 2024 14:42:22 +0100 Subject: [PATCH 08/16] Update eslint.yml --- .github/workflows/eslint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 7af43825..2a3117c8 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -14,5 +14,5 @@ jobs: run: npm prune - name: Run ESLint - run: npx eslint *.js installer/*.js components/*.js website/tools/*.js website/config/*/*.js components/AssistantSDK/*.js --config .eslintrc.js + run: npx eslint *.js installer/*.js components/*.js --config .eslintrc.js continue-on-error: false From 2a14b7e695efc71801113638e1f1c7a7905ebe7e Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:45:01 +0100 Subject: [PATCH 09/16] eslint fix (node_helper.js) --- node_helper.js | 134 ++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/node_helper.js b/node_helper.js index c07a79fc..85ce5477 100644 --- a/node_helper.js +++ b/node_helper.js @@ -3,71 +3,71 @@ * BuGsounet * ********************************/ -var log = (...args) => { /* do nothing */ } -const NodeHelper = require('node_helper') +var log = (...args) => { /* do nothing */ }; +const NodeHelper = require("node_helper"); module.exports = NodeHelper.create({ - start: function() { - this.lib = { error: 0 } - this.pir = null - this.screen = null + start () { + this.lib = { error: 0 }; + this.pir = null; + this.screen = null; }, - socketNotificationReceived: function (notification, payload) { - switch(notification) { + socketNotificationReceived (notification, payload) { + switch (notification) { case "INIT": - this.config = payload - this.parse() - break + this.config = payload; + this.parse(); + break; case "WAKEUP": - this.screen.wakeup() - break + this.screen.wakeup(); + break; case "FORCE_END": - this.screen.forceEnd() - break + this.screen.forceEnd(); + break; case "LOCK": - this.screen.lock() - break + this.screen.lock(); + break; case "UNLOCK": - this.screen.unlock() - break + this.screen.unlock(); + break; case "LOCK_FORCE_END": - this.screen.forceLockOFF() - break + this.screen.forceLockOFF(); + break; case "LOCK_FORCE_WAKEUP": - this.screen.forceLockON() - break + this.screen.forceLockON(); + break; } }, - parse: async function() { - if (this.config.debug) log = (...args) => { console.log("[MMM-Pir]", ...args) } - console.log("[MMM-Pir] Version:", require('./package.json').version, "rev:", require('./package.json').rev ) - let bugsounet = await this.libraries() + async parse () { + if (this.config.debug) log = (...args) => { console.log("[MMM-Pir]", ...args); }; + console.log("[MMM-Pir] Version:", require("./package.json").version, "rev:", require("./package.json").rev); + let bugsounet = await this.libraries(); if (bugsounet) { - console.error("[MMM-Pir] [LIBRARY] Warning:", bugsounet, "needed library not loaded !") - console.error("[MMM-Pir] [LIBRARY] Try to solve it with `npm run rebuild` in MMM-Pir directory") - this.sendSocketNotification("FatalError", bugsounet) - return + console.error("[MMM-Pir] [LIBRARY] Warning:", bugsounet, "needed library not loaded !"); + console.error("[MMM-Pir] [LIBRARY] Try to solve it with `npm run rebuild` in MMM-Pir directory"); + this.sendSocketNotification("FatalError", bugsounet); + return; } var callbacks = { - "screen": (noti, params) => { - log("[CALLBACK] Screen:", noti,params || "") - this.sendSocketNotification(noti, params) + screen: (noti, params) => { + log("[CALLBACK] Screen:", noti, params || ""); + this.sendSocketNotification(noti, params); }, - "pir": (noti, params) => { - log("[CALLBACK] Pir:", noti,params || "") - if (noti == "PIR_DETECTED") this.screen.wakeup() - else this.sendSocketNotification(noti, params) + pir: (noti, params) => { + log("[CALLBACK] Pir:", noti, params || ""); + if (noti === "PIR_DETECTED") this.screen.wakeup(); + else this.sendSocketNotification(noti, params); } - } - let pirConfig= { + }; + let pirConfig = { debug: this.config.debug, gpio: this.config.pir_gpio, reverseValue: this.config.pir_reverseValue - } + }; - let screenConfig= { + let screenConfig = { debug: this.config.debug, delay: this.config.delay, mode: this.config.mode, @@ -76,44 +76,44 @@ module.exports = NodeHelper.create({ xrandrForceRotation: this.config.xrandrForceRotation, wrandrForceRotation: this.config.wrandrForceRotation, wrandrForceMode: this.config.wrandrForceMode - } + }; - this.pir = new this.lib.Pir(pirConfig, callbacks.pir) - this.pir.start() - this.screen = new this.lib.Screen(screenConfig, callbacks.screen) - this.screen.activate() - console.log("[MMM-Pir] Started!") - this.sendSocketNotification("INITIALIZED") + this.pir = new this.lib.Pir(pirConfig, callbacks.pir); + this.pir.start(); + this.screen = new this.lib.Screen(screenConfig, callbacks.screen); + this.screen.activate(); + console.log("[MMM-Pir] Started!"); + this.sendSocketNotification("INITIALIZED"); }, /** Load sensible library without black screen **/ - libraries: function() { - let libraries= [ + libraries () { + let libraries = [ // { "library to load" : "store library name" } { "./components/pirLib.js": "Pir" }, { "./components/screenLib.js": "Screen" } - ] - let errors = 0 - return new Promise(resolve => { - libraries.forEach(library => { + ]; + let errors = 0; + return new Promise((resolve) => { + libraries.forEach((library) => { for (const [name, configValues] of Object.entries(library)) { - let libraryToLoad = name - let libraryName = configValues + let libraryToLoad = name; + let libraryName = configValues; try { if (!this.lib[libraryName]) { - this.lib[libraryName] = require(libraryToLoad) - log(`[DATABASE] Loaded: ${libraryToLoad} --> this.lib.${libraryName}`) + this.lib[libraryName] = require(libraryToLoad); + log(`[DATABASE] Loaded: ${libraryToLoad} --> this.lib.${libraryName}`); } } catch (e) { - console.error(`[MMM-Pir] [DATABASE] ${libraryToLoad} Loading error!`, e.message) - this.sendSocketNotification("WARNING" , {library: libraryToLoad }) - errors++ - this.lib.error = errors + console.error(`[MMM-Pir] [DATABASE] ${libraryToLoad} Loading error!`, e.message); + this.sendSocketNotification("WARNING", { library: libraryToLoad }); + errors++; + this.lib.error = errors; } } - }) - if (!errors) console.log("[MMM-Pir] [DATABASE] All libraries loaded!") - resolve(errors) - }) + }); + if (!errors) console.log("[MMM-Pir] [DATABASE] All libraries loaded!"); + resolve(errors); + }); } }); From ab7ed4b508ae5b2756c55adcb3157b0dc22238de Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:47:37 +0100 Subject: [PATCH 10/16] eslint fix (screenTouch.js) --- components/screenTouch.js | 102 ++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/components/screenTouch.js b/components/screenTouch.js index 6bc6ac98..0f616b93 100644 --- a/components/screenTouch.js +++ b/components/screenTouch.js @@ -2,76 +2,82 @@ * screenTouch * * Bugsounet * ***************/ + +/* global window */ + class screenTouch { - constructor(mode,Tools) { - this.mode = mode - this.sendSocketNotification = (...args) => Tools.sendSocketNotification(...args) - this.hidden = () => Tools.hidden() - if (this.mode > 3 || this.mode < 0 || isNaN(this.mode)) this.mode = 3 - this.clickTimer = null - this.clickCount = 0 - console.log("[MMM-Pir] screenTouch Ready") + constructor (mode, Tools) { + this.mode = mode; + this.sendSocketNotification = (...args) => Tools.sendSocketNotification(...args); + this.hidden = () => Tools.hidden(); + if (this.mode > 3 || this.mode < 0 || isNaN(this.mode)) this.mode = 3; + this.clickTimer = null; + this.clickCount = 0; + console.log("[MMM-Pir] screenTouch Ready"); } - touch() { - let TouchScreen = document.getElementById("MMM-PIR") + touch () { + let TouchScreen = document.getElementById("MMM-PIR"); switch (this.mode) { case 1: - /** mode 1 **/ - window.addEventListener('click', () => { - this.clickCount++ + + /** mode 1 **/ + window.addEventListener("click", () => { + this.clickCount++; if (this.clickCount === 1) { this.clickTimer = setTimeout(() => { - this.clickCount = 0 - this.sendSocketNotification("LOCK_FORCE_WAKEUP") - }, 400) + this.clickCount = 0; + this.sendSocketNotification("LOCK_FORCE_WAKEUP"); + }, 400); } else if (this.clickCount === 2) { - clearTimeout(this.clickTimer) - this.clickCount = 0 - this.sendSocketNotification("LOCK_FORCE_END") + clearTimeout(this.clickTimer); + this.clickCount = 0; + this.sendSocketNotification("LOCK_FORCE_END"); } - }, false) - break + }, false); + break; case 2: - /** mode 2 **/ - TouchScreen.addEventListener('click', () => { - if (!this.hidden()) this.sendSocketNotification("LOCK_FORCE_WAKEUP") - }, false) - window.addEventListener('long-press', () => { - if (this.hidden()) this.sendSocketNotification("LOCK_FORCE_WAKEUP") + /** mode 2 **/ + TouchScreen.addEventListener("click", () => { + if (!this.hidden()) this.sendSocketNotification("LOCK_FORCE_WAKEUP"); + }, false); + + window.addEventListener("long-press", () => { + if (this.hidden()) this.sendSocketNotification("LOCK_FORCE_WAKEUP"); else { - this.sendSocketNotification("LOCK_FORCE_END") + this.sendSocketNotification("LOCK_FORCE_END"); } - }, false) - break + }, false); + break; case 3: - /** mode 3 **/ - TouchScreen.addEventListener('click', () => { - this.clickCount++ + + /** mode 3 **/ + TouchScreen.addEventListener("click", () => { + this.clickCount++; if (this.clickCount === 1) { this.clickTimer = setTimeout(() => { - this.clickCount = 0 - this.sendSocketNotification("LOCK_FORCE_WAKEUP") - }, 400) + this.clickCount = 0; + this.sendSocketNotification("LOCK_FORCE_WAKEUP"); + }, 400); } else if (this.clickCount === 2) { - clearTimeout(this.clickTimer) - this.clickCount = 0 - this.sendSocketNotification("LOCK_FORCE_END") + clearTimeout(this.clickTimer); + this.clickCount = 0; + this.sendSocketNotification("LOCK_FORCE_END"); } - }, false) + }, false); - window.addEventListener('click', () => { + window.addEventListener("click", () => { if (this.hidden()) { - clearTimeout(this.clickTimer) - this.clickCount = 0 - this.sendSocketNotification("LOCK_FORCE_WAKEUP") + clearTimeout(this.clickTimer); + this.clickCount = 0; + this.sendSocketNotification("LOCK_FORCE_WAKEUP"); } - }, false) - break + }, false); + break; } - if (!this.mode) console.log("[MMM-Pir] Touch Screen Function disabled.") - else console.log(`[MMM-Pir] Touch Screen Function added. [mode ${this.mode}]`) + if (!this.mode) console.log("[MMM-Pir] Touch Screen Function disabled."); + else console.log(`[MMM-Pir] Touch Screen Function added. [mode ${this.mode}]`); } } From 5f7700deb5caf39471e70c16e63f86c2db79199f Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:54:05 +0100 Subject: [PATCH 11/16] eslint fix (screenLib.js) --- components/screenLib.js | 699 ++++++++++++++++++++-------------------- 1 file changed, 355 insertions(+), 344 deletions(-) diff --git a/components/screenLib.js b/components/screenLib.js index 7bb4cb3c..f6d452c0 100644 --- a/components/screenLib.js +++ b/components/screenLib.js @@ -3,18 +3,19 @@ * Bugsounet * *********************/ -const exec = require('child_process').exec -const process = require('process') -const moment = require('moment') -const path = require('path') -var log = (...args) => { /* do nothing */ } +const exec = require("child_process").exec; +const process = require("process"); +const path = require("path"); +const moment = require("moment"); + +var log = (...args) => { /* do nothing */ }; class SCREEN { - constructor(config, callback) { - this.config = config - this.sendSocketNotification = callback - this.PathScript = path.dirname(require.resolve('../package.json'))+"/scripts" - this.interval = null + constructor (config, callback) { + this.config = config; + this.sendSocketNotification = callback; + this.PathScript = `${path.dirname(require.resolve("../package.json"))}/scripts`; + this.interval = null; this.default = { debug: false, delay: 5 * 60 * 1000, @@ -24,9 +25,9 @@ class SCREEN { xrandrForceRotation: "normal", wrandrForceRotation: "normal", wrandrForceMode: null - } - this.config = Object.assign({}, this.default, this.config) - if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [SCREEN]", ...args) } + }; + this.config = Object.assign({}, this.default, this.config); + if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [SCREEN]", ...args); }; this.screen = { mode: this.config.mode, running: false, @@ -38,501 +39,511 @@ class SCREEN { hdmiPort: null, forceOnStart: true, forceLocked: false - } + }; - this.status = false - this.xrandrRoation = [ "normal", "left", "right", "inverted" ] - this.wrandrRoation = [ "normal", "90", "180", "270", "flipped", "flipped-90", "flipped-180", "flipped-270" ] + this.status = false; + this.xrandrRoation = ["normal", "left", "right", "inverted"]; + this.wrandrRoation = ["normal", "90", "180", "270", "flipped", "flipped-90", "flipped-180", "flipped-270"]; switch (this.config.mode) { case 0: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 0: Disabled") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 0: Disabled"); + break; case 1: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 1: vcgencmd") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 1: vcgencmd"); + break; case 2: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 2: dpms rpi") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 2: dpms rpi"); + break; case 3: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 3: tvservice") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 3: tvservice"); + break; case 4: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 4: HDMI CEC") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 4: HDMI CEC"); + break; case 5: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 5: dpms linux") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 5: dpms linux"); + break; case 6: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 6: Python script (Relay on/off)") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 6: Python script (Relay on/off)"); + break; case 7: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 7: Python script reverse (Relay on/off)") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 7: Python script reverse (Relay on/off)"); + break; case 8: - console.log("[MMM-Pir] [LIB] [SCREEN] Mode 8: ddcutil") - break + console.log("[MMM-Pir] [LIB] [SCREEN] Mode 8: ddcutil"); + break; case 9: - if (this.xrandrRoation.indexOf(this.config.xrandrForceRotation) == -1) { - console.error(`[MMM-Pir] [LIB] [SCREEN] Mode 9: xrandr invalid Rotation --> ${this.config.xrandrForceRotation}, Set to default: normal`) - this.screen.xrandrRotation = "normal" + if (this.xrandrRoation.indexOf(this.config.xrandrForceRotation) === -1) { + console.error(`[MMM-Pir] [LIB] [SCREEN] Mode 9: xrandr invalid Rotation --> ${this.config.xrandrForceRotation}, Set to default: normal`); + this.screen.xrandrRotation = "normal"; } else { - console.log(`[MMM-Pir] [LIB] [SCREEN] Mode 9: xrandr (primary display) -- Rotation: ${this.config.xrandrForceRotation}`) - this.screen.xrandrRotation = this.config.xrandrForceRotation + console.log(`[MMM-Pir] [LIB] [SCREEN] Mode 9: xrandr (primary display) -- Rotation: ${this.config.xrandrForceRotation}`); + this.screen.xrandrRotation = this.config.xrandrForceRotation; } - break + break; case 10: - if (this.wrandrRoation.indexOf(this.config.wrandrForceRotation) == -1) { - console.error(`[MMM-Pir] [LIB] [SCREEN] Mode 10: wlr-randr invalid Rotation --> ${this.config.wrandrForceRotation}, Set to default: normal`) - this.screen.wrandrRotation = "normal" + if (this.wrandrRoation.indexOf(this.config.wrandrForceRotation) === -1) { + console.error(`[MMM-Pir] [LIB] [SCREEN] Mode 10: wlr-randr invalid Rotation --> ${this.config.wrandrForceRotation}, Set to default: normal`); + this.screen.wrandrRotation = "normal"; } else { - console.log(`[MMM-Pir] [LIB] [SCREEN] Mode 10: wlr-randr (primary display) -- Rotation: ${this.config.wrandrForceRotation}`) - this.screen.wrandrRotation = this.config.wrandrForceRotation + console.log(`[MMM-Pir] [LIB] [SCREEN] Mode 10: wlr-randr (primary display) -- Rotation: ${this.config.wrandrForceRotation}`); + this.screen.wrandrRotation = this.config.wrandrForceRotation; } if (this.config.wrandrForceMode) { - console.log(`[MMM-Pir] [LIB] [SCREEN] Mode 10: wlr-randr -- ForceMode: ${this.config.wrandrForceMode}`) - this.screen.wrandrForceMode = this.config.wrandrForceMode + console.log(`[MMM-Pir] [LIB] [SCREEN] Mode 10: wlr-randr -- ForceMode: ${this.config.wrandrForceMode}`); + this.screen.wrandrForceMode = this.config.wrandrForceMode; } - break + break; default: - this.logError(`Unknow Mode (${this.config.mode}) Set to 0 (Disabled)`) - this.sendSocketNotification("ERROR", `[MMM-Pir] Unknow Mode (${this.config.mode}) Set to 0 (Disabled)`) - this.config.mode = 0 - break + this.logError(`Unknow Mode (${this.config.mode}) Set to 0 (Disabled)`); + this.sendSocketNotification("ERROR", `[MMM-Pir] Unknow Mode (${this.config.mode}) Set to 0 (Disabled)`); + this.config.mode = 0; + break; } - this.screenStatus() + this.screenStatus(); } activate () { - process.on('exit', (code) => { - if (this.config.mode) this.setPowerDisplay(true) - console.log('[MMM-Pir] [LIB] [SCREEN] See you soon !') - console.log('[MMM-Pir] [LIB] [SCREEN] @bugsounet') - }) - this.start() + process.on("exit", (code) => { + if (this.config.mode) this.setPowerDisplay(true); + console.log("[MMM-Pir] [LIB] [SCREEN] See you soon !"); + console.log("[MMM-Pir] [LIB] [SCREEN] @bugsounet"); + }); + this.start(); } start (restart) { - if (this.screen.locked || this.screen.running) return - if (!restart) log("Start.") - else log("Restart.") - this.sendSocketNotification("SCREEN_PRESENCE", true) + if (this.screen.locked || this.screen.running) return; + if (!restart) log("Start."); + else log("Restart."); + this.sendSocketNotification("SCREEN_PRESENCE", true); if (!this.screen.power) { - if (this.config.mode) this.wantedPowerDisplay(true) - this.sendSocketNotification("SCREEN_SHOWING") - this.screen.power = true + if (this.config.mode) this.wantedPowerDisplay(true); + this.sendSocketNotification("SCREEN_SHOWING"); + this.screen.power = true; } - clearInterval(this.interval) - this.interval = null - this.counter = this.config.delay - this.interval = setInterval( ()=> { - this.screen.running = true + clearInterval(this.interval); + this.interval = null; + this.counter = this.config.delay; + this.interval = setInterval(() => { + this.screen.running = true; let output = { timer: moment(new Date(this.counter)).format("mm:ss"), bar: this.config.delay - this.counter - } - this.sendSocketNotification("SCREEN_OUTPUT", output) + }; + this.sendSocketNotification("SCREEN_OUTPUT", output); if (this.counter <= 0) { - clearInterval(this.interval) - this.interval = null - this.screen.running = false - this.forceTurnOffScreen() - log("Stops by counter.") + clearInterval(this.interval); + this.interval = null; + this.screen.running = false; + this.forceTurnOffScreen(); + log("Stops by counter."); } - this.counter -= 1000 - }, 1000) + this.counter -= 1000; + }, 1000); } - forceTurnOffScreen() { - if (!this.screen.power) return log("forceTurnOffScreen: already off") - this.sendSocketNotification("SCREEN_HIDING") - this.screen.power = false - if (this.config.mode) this.wantedPowerDisplay(false) - this.sendSocketNotification("SCREEN_PRESENCE", false) + forceTurnOffScreen () { + if (!this.screen.power) return log("forceTurnOffScreen: already off"); + this.sendSocketNotification("SCREEN_HIDING"); + this.screen.power = false; + if (this.config.mode) this.wantedPowerDisplay(false); + this.sendSocketNotification("SCREEN_PRESENCE", false); } stop () { - if (this.screen.locked) return + if (this.screen.locked) return; if (!this.screen.power) { - if (this.config.mode) this.wantedPowerDisplay(true) - this.sendSocketNotification("SCREEN_SHOWING") - this.screen.power = true + if (this.config.mode) this.wantedPowerDisplay(true); + this.sendSocketNotification("SCREEN_SHOWING"); + this.screen.power = true; } - this.sendSocketNotification("SCREEN_PRESENCE", true) - if (!this.screen.running) return - clearInterval(this.interval) - this.interval = null - this.screen.running = false - log("Stops.") + this.sendSocketNotification("SCREEN_PRESENCE", true); + if (!this.screen.running) return; + clearInterval(this.interval); + this.interval = null; + this.screen.running = false; + log("Stops."); } - reset() { - if (this.screen.locked) return - clearInterval(this.interval) - this.interval = null - this.screen.running = false - this.start(true) + reset () { + if (this.screen.locked) return; + clearInterval(this.interval); + this.interval = null; + this.screen.running = false; + this.start(true); } - wakeup() { - if (this.screen.locked) return - this.reset() + wakeup () { + if (this.screen.locked) return; + this.reset(); } - lock() { - if (this.screen.locked) return - this.screen.locked = true - clearInterval(this.interval) - this.interval = null - this.screen.running = false - log("Locked !") + lock () { + if (this.screen.locked) return; + this.screen.locked = true; + clearInterval(this.interval); + this.interval = null; + this.screen.running = false; + log("Locked !"); } - unlock() { - if (this.screen.forceLocked) return log("Unlock: ForceLocked") - this.screen.locked = false - log("Unlocked !") - this.start() + unlock () { + if (this.screen.forceLocked) return log("Unlock: ForceLocked"); + this.screen.locked = false; + log("Unlocked !"); + this.start(); } forceEnd () { - clearInterval(this.interval) - this.interval = null - this.screen.running = false - this.counter = 0 - this.forceTurnOffScreen() + clearInterval(this.interval); + this.interval = null; + this.screen.running = false; + this.counter = 0; + this.forceTurnOffScreen(); } wantedPowerDisplay (wanted) { - var actual = false + var actual = false; switch (this.config.mode) { case 0: - /** disabled **/ - log("Disabled mode") - break + + /** disabled **/ + log("Disabled mode"); + break; case 1: - /** vcgencmd **/ - exec("/usr/bin/vcgencmd display_power", (err, stdout, stderr)=> { + + /** vcgencmd **/ + exec("/usr/bin/vcgencmd display_power", (err, stdout, stderr) => { if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] vcgencmd command error (mode: ${this.config.mode})`) + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] vcgencmd command error (mode: ${this.config.mode})`); } else { - var displaySh = stdout.trim() - actual = Boolean(Number(displaySh.substr(displaySh.length -1))) - this.resultDisplay(actual,wanted) + var displaySh = stdout.trim(); + actual = Boolean(Number(displaySh.substr(displaySh.length - 1))); + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 2: - /** dpms rpi**/ - var actual = false - exec("DISPLAY=:0 xset q | grep Monitor", (err, stdout, stderr)=> { + + /** dpms rpi**/ + actual = false; + exec("DISPLAY=:0 xset q | grep Monitor", (err, stdout, stderr) => { if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] dpms command error (mode: ${this.config.mode})`) + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] dpms command error (mode: ${this.config.mode})`); } else { - let responseSh = stdout.trim() - var displaySh = responseSh.split(" ")[2] - if (displaySh == "On") actual = true - this.resultDisplay(actual,wanted) + let responseSh = stdout.trim(); + var displaySh = responseSh.split(" ")[2]; + if (displaySh === "On") actual = true; + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 3: - /** tvservice **/ - exec("tvservice -s | grep Hz", (err, stdout, stderr)=> { + + /** tvservice **/ + exec("tvservice -s | grep Hz", (err, stdout, stderr) => { if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] tvservice command error (mode: ${this.config.mode})`) + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] tvservice command error (mode: ${this.config.mode})`); } else { - let responseSh = stdout.trim() - if (responseSh) actual = true - this.resultDisplay(actual,wanted) + let responseSh = stdout.trim(); + if (responseSh) actual = true; + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 4: - /** CEC **/ - exec("echo 'pow 0' | cec-client -s -d 1", (err, stdout, stderr)=> { + + /** CEC **/ + exec("echo 'pow 0' | cec-client -s -d 1", (err, stdout, stderr) => { if (err) { - this.logError(err) - this.logError("HDMI CEC Error: " + stdout) - this.sendSocketNotification("ERROR", `[SCREEN] HDMI CEC command error (mode: ${this.config.mode})`) + this.logError(err); + this.logError(`HDMI CEC Error: ${stdout}`); + this.sendSocketNotification("ERROR", `[SCREEN] HDMI CEC command error (mode: ${this.config.mode})`); } 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) + 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 + }); + break; case 5: - /** dmps linux **/ - exec("xset q | grep Monitor", (err, stdout, stderr)=> { + + /** dmps linux **/ + exec("xset q | grep Monitor", (err, stdout, stderr) => { if (err) { - this.logError("[Display Error] " + err) - this.sendSocketNotification("ERROR", `[SCREEN] dpms linux command error (mode: ${this.config.mode})`) + this.logError(`[Display Error] ${err}`); + this.sendSocketNotification("ERROR", `[SCREEN] dpms linux command error (mode: ${this.config.mode})`); } else { - let responseSh = stdout.trim() - var displaySh = responseSh.split(" ")[2] - if (displaySh == "On") actual = true - this.resultDisplay(actual,wanted) + let responseSh = stdout.trim(); + var displaySh = responseSh.split(" ")[2]; + if (displaySh === "On") actual = true; + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 6: - /** python script **/ - exec(`python monitor.py -s -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr)=> { + + /** python script **/ + exec(`python monitor.py -s -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { if (err) { - this.logError("[Display Error] " + err) - this.sendSocketNotification("ERROR", `[SCREEN] python relay script error (mode: ${this.config.mode})`) + this.logError(`[Display Error] ${err}`); + this.sendSocketNotification("ERROR", `[SCREEN] python relay script error (mode: ${this.config.mode})`); } else { - let responsePy = stdout.trim() - log("Response PY -- Check State: " + responsePy) - if (responsePy == 1) actual = true - this.resultDisplay(actual,wanted) + let responsePy = stdout.trim(); + log(`Response PY -- Check State: ${responsePy}`); + if (responsePy === 1) actual = true; + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 7: - /** python script reverse**/ - exec(`python monitor.py -s -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr)=> { + + /** python script reverse**/ + exec(`python monitor.py -s -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { if (err) { - this.logError("[Display Error] " + err) - this.sendSocketNotification("ERROR", `[SCREEN] python relay script error (mode: ${this.config.mode})`) + this.logError(`[Display Error] ${err}`); + this.sendSocketNotification("ERROR", `[SCREEN] python relay script error (mode: ${this.config.mode})`); } else { - let responsePy = stdout.trim() - log(`Response PY -- Check State (reverse): ${responsePy}`) - if (responsePy == 0) actual = true - this.resultDisplay(actual,wanted) + let responsePy = stdout.trim(); + log(`Response PY -- Check State (reverse): ${responsePy}`); + if (responsePy === 0) actual = true; + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 8: - /** ddcutil **/ - exec("ddcutil getvcp d6", (err, stdout, stderr)=> { + + /** ddcutil **/ + exec("ddcutil getvcp d6", (err, stdout, stderr) => { if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] ddcutil command error (mode: ${this.config.mode})`) + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] ddcutil command error (mode: ${this.config.mode})`); } else { - let responseSh = stdout.trim() - var displaySh = responseSh.split("(sl=")[1] - if (displaySh == "0x01)") actual = true - this.resultDisplay(actual,wanted) + let responseSh = stdout.trim(); + var displaySh = responseSh.split("(sl=")[1]; + if (displaySh === "0x01)") actual = true; + this.resultDisplay(actual, wanted); } - }) - break + }); + break; case 9: - /** xrandr on primary display **/ + + /** xrandr on primary display **/ exec("xrandr | grep 'connected primary'", - (err, stdout, stderr)=> { - if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] xrandr command error (mode: ${this.config.mode})`) - } - 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 9] Monitor on ${this.screen.hdmiPort} is ${power}`) - this.resultDisplay(actual,wanted) - } + (err, stdout, stderr) => { + if (err) { + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] xrandr command error (mode: ${this.config.mode})`); } - ) - break + 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 9] Monitor on ${this.screen.hdmiPort} is ${power}`); + this.resultDisplay(actual, wanted); + } + }); + break; case 10: - /** wl-randr on primary display **/ + + /** wl-randr on primary display **/ exec("WAYLAND_DISPLAY=wayland-1 wlr-randr | grep 'Enabled'", - (err, stdout, stderr)=> { - if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] wlr-randr command error (mode: ${this.config.mode})`) - } else { - let responseSh = stdout.trim() - if (responseSh.split(" ")[1] == "yes") actual = true - exec("WAYLAND_DISPLAY=wayland-1 wlr-randr", - (err, stdout, stderr) => { - if (err) { - this.logError(err) - this.sendSocketNotification("ERROR", `[SCREEN] wlr-randr scan screen command error (mode: ${this.config.mode})`) - } else { - let wResponse = stdout.trim() - this.screen.hdmiPort = wResponse.split(" ")[0] - log(`[MODE 10] Monitor on ${this.screen.hdmiPort} is ${actual}`) - this.resultDisplay(actual,wanted) - } - }) - } + (err, stdout, stderr) => { + if (err) { + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] wlr-randr command error (mode: ${this.config.mode})`); + } else { + let responseSh = stdout.trim(); + if (responseSh.split(" ")[1] === "yes") actual = true; + exec("WAYLAND_DISPLAY=wayland-1 wlr-randr", + (err, stdout, stderr) => { + if (err) { + this.logError(err); + this.sendSocketNotification("ERROR", `[SCREEN] wlr-randr scan screen command error (mode: ${this.config.mode})`); + } else { + let wResponse = stdout.trim(); + this.screen.hdmiPort = wResponse.split(" ")[0]; + log(`[MODE 10] Monitor on ${this.screen.hdmiPort} is ${actual}`); + this.resultDisplay(actual, wanted); + } + }); } - ) - break + }); + break; } } - resultDisplay (actual,wanted) { + resultDisplay (actual, wanted) { if (this.screen.forceOnStart) { - log("Display: Force On Start") - this.setPowerDisplay(true) - this.screen.forceOnStart = false + log("Display: Force On Start"); + this.setPowerDisplay(true); + this.screen.forceOnStart = false; } else { - log("Display -- Actual: " + actual + " - Wanted: " + wanted) - this.screen.power = actual - if (actual && !wanted) this.setPowerDisplay(false) - if (!actual && wanted) this.setPowerDisplay(true) + log(`Display -- Actual: ${actual} - Wanted: ${wanted}`); + this.screen.power = actual; + if (actual && !wanted) this.setPowerDisplay(false); + if (!actual && wanted) this.setPowerDisplay(true); } } setPowerDisplay (set) { - log("Display " + (set ? "ON." : "OFF.")) - this.screen.power = set + log(`Display ${set ? "ON." : "OFF."}`); + this.screen.power = set; // and finally apply rules ! switch (this.config.mode) { case 1: - if (set) exec("/usr/bin/vcgencmd display_power 1") - else exec("/usr/bin/vcgencmd display_power 0") - break + if (set) exec("/usr/bin/vcgencmd display_power 1"); + else exec("/usr/bin/vcgencmd display_power 0"); + break; case 2: - if (set) exec("DISPLAY=:0 xset dpms force on") - else exec("DISPLAY=:0 xset dpms force off") - break + if (set) exec("DISPLAY=:0 xset dpms force on"); + else exec("DISPLAY=:0 xset dpms force off"); + break; case 3: - if (set) exec("tvservice -p && sudo chvt 6 && sudo chvt 7") - else exec("tvservice -o") - break + if (set) exec("tvservice -p && sudo chvt 6 && sudo chvt 7"); + else exec("tvservice -o"); + break; case 4: - if (set) exec("echo 'on 0' | cec-client -s") - else exec("echo 'standby 0' | cec-client -s") - break + if (set) exec("echo 'on 0' | cec-client -s"); + else exec("echo 'standby 0' | cec-client -s"); + break; case 5: - if (set) exec("xset dpms force on") - else exec("xset dpms force off") - break + if (set) exec("xset dpms force on"); + else exec("xset dpms force off"); + break; case 6: - if (set) - exec(`python monitor.py -r=1 -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr)=> { - if (err) logError(err) - else log("Relay is " + stdout.trim()) - }) + if (set) exec(`python monitor.py -r=1 -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { + if (err) this.logError(err); + else log(`Relay is ${stdout.trim()}`); + }); else if (this.config.clearGpioValue) { - exec(`python monitor.py -r=0 -c -g=${this.config.gpio}`, {cwd: this.PathScript},(err, stdout, stderr)=> { - if (err) logError(err) + exec(`python monitor.py -r=0 -c -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { + if (err) this.logError(err); else { - log("Relay is " + stdout.trim()) + log(`Relay is ${stdout.trim()}`); } - }) + }); } else { - exec(`python monitor.py -r=0 -g=${this.config.gpio}`, {cwd: this.PathScript},(err, stdout, stderr)=> { - if (err) logError(err) + exec(`python monitor.py -r=0 -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { + if (err) this.logError(err); else { - log("Relay is " + stdout.trim()) + log(`Relay is ${stdout.trim()}`); } - }) + }); } - break + break; case 7: if (set) { if (this.config.clearGpioValue) { - exec(`python monitor.py -r=0 -c -g=${this.config.gpio}`, {cwd: this.PathScript},(err, stdout, stderr)=> { - if (err) logError(err) + exec(`python monitor.py -r=0 -c -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { + if (err) this.logError(err); else { - log("Relay is " + stdout.trim()) + log(`Relay is ${stdout.trim()}`); } - }) + }); } else { - exec(`python monitor.py -r=0 -g=${this.config.gpio}`, {cwd: this.PathScript},(err, stdout, stderr)=> { - if (err) logError(err) + exec(`python monitor.py -r=0 -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { + if (err) this.logError(err); else { - log("Relay is " + stdout.trim()) + log(`Relay is ${stdout.trim()}`); } - }) + }); } } else { - exec(`python monitor.py -r=1 -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr)=> { - if (err) logError(err) - else log("Relay is " + stdout.trim()) - }) + exec(`python monitor.py -r=1 -g=${this.config.gpio}`, { cwd: this.PathScript }, (err, stdout, stderr) => { + if (err) this.logError(err); + else log(`Relay is ${stdout.trim()}`); + }); } - break + break; case 8: - if (set) exec("ddcutil setvcp d6 1") - else exec("ddcutil setvcp d6 4") - break + if (set) exec("ddcutil setvcp d6 1"); + else exec("ddcutil setvcp d6 4"); + break; case 9: - if (set) exec(`xrandr --output ${this.screen.hdmiPort} --auto --rotate ${this.screen.xrandrRotation}`) - else exec(`xrandr --output ${this.screen.hdmiPort} --off`) - break + if (set) exec(`xrandr --output ${this.screen.hdmiPort} --auto --rotate ${this.screen.xrandrRotation}`); + else exec(`xrandr --output ${this.screen.hdmiPort} --off`); + break; case 10: if (set) { let wrandrOptions = [ - "--output", this.screen.hdmiPort, + "--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=wayland-1 wlr-randr ${wrandrOptions}`) + "--transform", + this.screen.wrandrRotation + ]; + if (this.screen.wrandrForceMode) wrandrOptions.push("--mode", this.screen.wrandrForceMode); + wrandrOptions = wrandrOptions.join(" "); + exec(`WAYLAND_DISPLAY=wayland-1 wlr-randr ${wrandrOptions}`); } - else exec(`WAYLAND_DISPLAY=wayland-1 wlr-randr --output ${this.screen.hdmiPort} --off`) - break + else exec(`WAYLAND_DISPLAY=wayland-1 wlr-randr --output ${this.screen.hdmiPort} --off`); + break; } } - state() { - this.sendSocketNotification("SCREEN_STATE", this.screen) + state () { + this.sendSocketNotification("SCREEN_STATE", this.screen); } - logError(err) { - console.error("[MMM-Pir] [LIB] [SCREEN] " + err) - this.sendSocketNotification("SCREEN_ERROR", err.message) + logError (err) { + console.error(`[MMM-Pir] [LIB] [SCREEN] ${err}`); + this.sendSocketNotification("SCREEN_ERROR", err.message); } /** Force Lock ON/OFF display **/ - forceLockOFF() { - if (!this.screen.power) return log("[Force OFF] Display Already OFF") - this.sendForceLockState(true) - this.screen.locked = true - clearInterval(this.interval) - this.interval = null - if (this.screen.running) this.counter = 0 - this.screen.running = false - this.forceTurnOffScreen() - log("[Force OFF] Turn OFF Display") + forceLockOFF () { + if (!this.screen.power) return log("[Force OFF] Display Already OFF"); + this.sendForceLockState(true); + this.screen.locked = true; + clearInterval(this.interval); + this.interval = null; + if (this.screen.running) this.counter = 0; + this.screen.running = false; + this.forceTurnOffScreen(); + log("[Force OFF] Turn OFF Display"); } - forceLockON() { - if (this.screen.locked && !this.screen.forceLocked) return log("[Force ON] Display is Locked!") - this.sendForceLockState(false) - this.screen.locked = false - this.wakeup() - log("[Force ON] Turn ON Display") + forceLockON () { + if (this.screen.locked && !this.screen.forceLocked) return log("[Force ON] Display is Locked!"); + this.sendForceLockState(false); + this.screen.locked = false; + this.wakeup(); + log("[Force ON] Turn ON Display"); } - sendForceLockState(state) { - this.screen.forceLocked = state + sendForceLockState (state) { + this.screen.forceLocked = state; } - screenStatus() { + screenStatus () { setInterval(() => { - let status = this.screen.power + let status = this.screen.power; if (status !== this.status) { - this.sendSocketNotification("SCREEN_POWERSTATUS", status) - log("[POWER] Display from", this.status, "--->", status) + this.sendSocketNotification("SCREEN_POWERSTATUS", status); + log("[POWER] Display from", this.status, "--->", status); } - this.status = status - }, 1000) + this.status = status; + }, 1000); } } -module.exports = SCREEN +module.exports = SCREEN; From 5934f39f68ada1caf49091b03b81f7a417c44925 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 14:57:45 +0100 Subject: [PATCH 12/16] eslint fix (screenDisplayer.js) --- components/screenDisplayer.js | 175 ++++++++++++++++++---------------- 1 file changed, 91 insertions(+), 84 deletions(-) diff --git a/components/screenDisplayer.js b/components/screenDisplayer.js index c7f9a58f..7ac8b7d1 100644 --- a/components/screenDisplayer.js +++ b/components/screenDisplayer.js @@ -2,135 +2,142 @@ * Screen displayer * * Bugsounet * *********************/ + +/* global ProgressBar, _logPIR */ + class screenDisplayer { - constructor(config, Tools) { - this.config = config - this.translate = (...args) => Tools.translate(...args) - this.bar = null - this.init = null - console.log("[MMM-Pir] screenDisplayer Ready") + constructor (config, Tools) { + this.config = config; + this.translate = (...args) => Tools.translate(...args); + this.bar = null; + this.init = null; + console.log("[MMM-Pir] screenDisplayer Ready"); } - prepare() { - var dom = document.createElement("div") - dom.id = "MMM-PIR" + prepare () { + var dom = document.createElement("div"); + dom.id = "MMM-PIR"; if (this.config.displayCounter || this.config.displayBar) { + /** Screen TimeOut Text **/ - var screen = document.createElement("div") - screen.id = "MMM-PIR_SCREEN" - if (this.config.displayStyle != "Text" || !this.config.displayCounter) screen.className = "hidden" - var screenText = document.createElement("div") - screenText.id = "MMM-PIR_SCREEN_TEXT" - screenText.textContent = this.translate("ScreenTurnOff") - screenText.classList.add("bright") - screen.appendChild(screenText) - var screenCounter = document.createElement("div") - screenCounter.id = "MMM-PIR_SCREEN_COUNTER" - screenCounter.classList.add("bright") - screenCounter.textContent = "--:--" - screen.appendChild(screenCounter) + var screen = document.createElement("div"); + screen.id = "MMM-PIR_SCREEN"; + if (this.config.displayStyle !== "Text" || !this.config.displayCounter) screen.className = "hidden"; + var screenText = document.createElement("div"); + screenText.id = "MMM-PIR_SCREEN_TEXT"; + screenText.textContent = this.translate("ScreenTurnOff"); + screenText.classList.add("bright"); + screen.appendChild(screenText); + var screenCounter = document.createElement("div"); + screenCounter.id = "MMM-PIR_SCREEN_COUNTER"; + screenCounter.classList.add("bright"); + screenCounter.textContent = "--:--"; + screen.appendChild(screenCounter); /** Screen TimeOut Bar **/ - var bar = document.createElement("div") - bar.id = "MMM-PIR_BAR" - if ((this.config.displayStyle == "Text") || !this.config.displayBar) bar.className = "hidden" - var screenBar = document.createElement("div") - screenBar.id = "MMM-PIR_SCREEN_BAR" - screenBar.classList.add(this.config.displayStyle) - bar.appendChild(screenBar) - dom.appendChild(screen) - dom.appendChild(bar) + var bar = document.createElement("div"); + bar.id = "MMM-PIR_BAR"; + if ((this.config.displayStyle === "Text") || !this.config.displayBar) bar.className = "hidden"; + var screenBar = document.createElement("div"); + screenBar.id = "MMM-PIR_SCREEN_BAR"; + screenBar.classList.add(this.config.displayStyle); + bar.appendChild(screenBar); + dom.appendChild(screen); + dom.appendChild(bar); } if (this.config.displayLastPresence) { + /** Last user Presence **/ - var presence = document.createElement("div") - presence.id = "MMM-PIR_PRESENCE" - presence.className = "hidden" - var presenceText = document.createElement("div") - presenceText.id = "MMM-PIR_PRESENCE_TEXT" - presenceText.textContent = this.translate("ScreenLastPresence") - presence.appendChild(presenceText) - var presenceDate = document.createElement("div") - presenceDate.id = "MMM-PIR_PRESENCE_DATE" - presenceDate.classList.add("presence") - presenceDate.textContent = "Loading ..." - presence.appendChild(presenceDate) - dom.appendChild(presence) + var presence = document.createElement("div"); + presence.id = "MMM-PIR_PRESENCE"; + presence.className = "hidden"; + var presenceText = document.createElement("div"); + presenceText.id = "MMM-PIR_PRESENCE_TEXT"; + presenceText.textContent = this.translate("ScreenLastPresence"); + presence.appendChild(presenceText); + var presenceDate = document.createElement("div"); + presenceDate.id = "MMM-PIR_PRESENCE_DATE"; + presenceDate.classList.add("presence"); + presenceDate.textContent = "Loading ..."; + presence.appendChild(presenceDate); + dom.appendChild(presence); } - return dom + return dom; } - prepareBar() { + prepareBar () { + /** Prepare TimeOut Bar **/ - if ((this.config.displayStyle == "Text") || (!this.config.displayBar)) return - this.bar = new ProgressBar[this.config.displayStyle](document.getElementById('MMM-PIR_SCREEN_BAR'), { - strokeWidth: this.config.displayStyle == "Line" ? 2 : 5, - trailColor: '#1B1B1B', + if ((this.config.displayStyle === "Text") || (!this.config.displayBar)) return; + this.bar = new ProgressBar[this.config.displayStyle](document.getElementById("MMM-PIR_SCREEN_BAR"), { + strokeWidth: this.config.displayStyle === "Line" ? 2 : 5, + trailColor: "#1B1B1B", trailWidth: 1, - easing: 'linear', + easing: "linear", duration: 900, - from: {color: '#FF0000'}, - to: {color: '#00FF00'}, + from: { color: "#FF0000" }, + to: { color: "#00FF00" }, svgStyle: { - display: 'block', - width: '100%', - 'margin-bottom': '5px' + display: "block", + width: "100%", + "margin-bottom": "5px" }, text: { style: { - position: 'absolute', - left: '50%', + position: "absolute", + left: "50%", top: "50%", padding: 0, margin: 0, transform: { - prefix: true, - value: 'translate(-50%, -50%)' + prefix: true, + value: "translate(-50%, -50%)" } } } - }) + }); } - barAnimate(payload) { - let value = (100 - ((payload * 100) / this.config.delay))/100 - let timeOut = moment(new Date(this.config.delay-payload)).format("m:ss") + barAnimate (payload) { + let value = (100 - ((payload * 100) / this.config.delay)) / 100; + let timeOut = moment(new Date(this.config.delay - payload)).format("m:ss"); this.bar.animate(value, { step: (state, bar) => { - bar.path.setAttribute('stroke', state.color) - bar.setText(this.config.displayCounter ? timeOut : "") - bar.text.style.color = state.color + bar.path.setAttribute("stroke", state.color); + bar.setText(this.config.displayCounter ? timeOut : ""); + bar.text.style.color = state.color; } - }) + }); } - screenShowing() { - MM.getModules().enumerate((module)=> { - module.show(200, () => {}, {lockString: "MMM-PIR_LOCK"}) - }) - if (!this.init) return this.init = true - _logPIR("Show All modules.") + screenShowing () { + MM.getModules().enumerate((module) => { + module.show(200, () => {}, { lockString: "MMM-PIR_LOCK" }); + }); + if (!this.init) return this.init = true; + _logPIR("Show All modules."); } - screenHiding() { - MM.getModules().enumerate((module)=> { - module.hide(200, () => {}, {lockString: "MMM-PIR_LOCK"}) - }) - _logPIR("Hide All modules.") + screenHiding () { + MM.getModules().enumerate((module) => { + module.hide(200, () => {}, { lockString: "MMM-PIR_LOCK" }); + }); + _logPIR("Hide All modules."); } checkStyle () { + /** Crash prevent on Time Out Style Displaying **/ /** --> Set to "Text" if not found */ - let Style = [ "Text", "Line", "SemiCircle", "Circle" ] + let Style = ["Text", "Line", "SemiCircle", "Circle"]; let found = Style.find((style) => { - return style == this.config.displayStyle - }) + return style === this.config.displayStyle; + }); if (!found) { - console.error(`[MMM-Pir] displayStyle Error ! [${this.config.displayStyle}]`) - this.config.displayStyle = "Text" + console.error(`[MMM-Pir] displayStyle Error ! [${this.config.displayStyle}]`); + this.config.displayStyle = "Text"; } } } From 632881f1b572a9beed59901dc37afaf3323688d2 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 15:12:18 +0100 Subject: [PATCH 13/16] add .eslintignore --- .eslintignore | 2 ++ package.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..b1a93cb0 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +components/progressbar.js +components/long-press-event.js diff --git a/package.json b/package.json index 8416c8a0..995a54b8 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "rebuild": "installer/rebuild.sh", "reset": "git reset --hard", "clean": "rm -rf node_modules package-lock.json", - "lint": "eslint *.js installer/*.js components/*.js --resolve-plugins-relative-to . --no-eslintrc --config .eslintrc.js", - "lint:fix": "eslint *.js installer/*.js components/*.js --resolve-plugins-relative-to . --no-eslintrc --config .eslintrc.js --fix" + "lint": "eslint *.js installer/*.js components/*.js --resolve-plugins-relative-to . --no-eslintrc --config .eslintrc.js --ignore-path .eslintignore", + "lint:fix": "eslint *.js installer/*.js components/*.js --resolve-plugins-relative-to . --no-eslintrc --config .eslintrc.js --ignore-path .eslintignore --fix" }, "keywords": [ "magic mirror", From ab99ed8fadaaaee980677bbe3da7b3acd6e3184b Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 15:14:45 +0100 Subject: [PATCH 14/16] fix eslint(pirLib.js) --- components/pirLib.js | 70 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/components/pirLib.js b/components/pirLib.js index 1820b8be..684cbe22 100644 --- a/components/pirLib.js +++ b/components/pirLib.js @@ -1,59 +1,59 @@ /** PIR library **/ /** bugsounet **/ -var log = (...args) => { /* do nothing */ } -const Gpio = require("onoff").Gpio +var log = (...args) => { /* do nothing */ }; +const Gpio = require("onoff").Gpio; class PIR { - constructor(config, callback) { - this.config = config - this.callback = callback + constructor (config, callback) { + this.config = config; + this.callback = callback; this.default = { debug: false, gpio: 21, reverseValue: false - } - this.config = Object.assign({}, this.default, this.config) - if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [PIR]", ...args) } - this.pir = null - this.running = false + }; + this.config = Object.assign({}, this.default, this.config); + if (this.config.debug) log = (...args) => { console.log("[MMM-Pir] [LIB] [PIR]", ...args); }; + this.pir = null; + this.running = false; } start () { - if (this.running) return - if (this.config.gpio === 0) return console.log("[MMM-Pir] [LIB] [PIR] Disabled.") - log("Start") + if (this.running) return; + if (this.config.gpio === 0) return console.log("[MMM-Pir] [LIB] [PIR] Disabled."); + log("Start"); try { - this.pir = new Gpio(this.config.gpio, 'in', 'both') - this.callback("PIR_STARTED") - console.log("[MMM-Pir] [LIB] [PIR] Started!") + this.pir = new Gpio(this.config.gpio, "in", "both"); + this.callback("PIR_STARTED"); + console.log("[MMM-Pir] [LIB] [PIR] Started!"); } catch (err) { - console.error("[MMM-Pir] [LIB] [PIR] " + err) - this.running = false - return this.callback("PIR_ERROR", err.message) + console.error(`[MMM-Pir] [LIB] [PIR] ${err}`); + this.running = false; + return this.callback("PIR_ERROR", err.message); } - this.running = true - this.pir.watch((err, value)=> { + this.running = true; + this.pir.watch((err, value) => { if (err) { - console.error("[MMM-Pir] [LIB] [PIR] " + err) - return this.callback("PIR_ERROR", err.message) + console.error(`[MMM-Pir] [LIB] [PIR] ${err}`); + return this.callback("PIR_ERROR", err.message); } - log("Sensor read value: " + value) - if ((value == 1 && !this.config.reverseValue) || (value == 0 && this.config.reverseValue)) { - this.callback("PIR_DETECTED") - log("Detected presence (value: " + value + ")") + log(`Sensor read value: ${value}`); + if ((value === 1 && !this.config.reverseValue) || (value === 0 && this.config.reverseValue)) { + this.callback("PIR_DETECTED"); + log(`Detected presence (value: ${value})`); } - }) + }); } stop () { - if (!this.running || (this.config.gpio === 0)) return - this.pir.unexport() - this.pir = null - this.running = false - this.callback("PIR_STOP") - log("Stop") + if (!this.running || (this.config.gpio === 0)) return; + this.pir.unexport(); + this.pir = null; + this.running = false; + this.callback("PIR_STOP"); + log("Stop"); } } -module.exports = PIR +module.exports = PIR; From 1fe7a3440f5178bc77f5902170e42b532253861d Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 15:15:17 +0100 Subject: [PATCH 15/16] eslint fix (minify.js) --- installer/minify.js | 63 +++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/installer/minify.js b/installer/minify.js index b6d05f34..a569009b 100644 --- a/installer/minify.js +++ b/installer/minify.js @@ -1,39 +1,40 @@ /** Code minifier **/ /** @busgounet **/ -const { globSync } = require('glob') -const path = require('path') -const esbuild = require("esbuild") +const path = require("path"); +const { globSync } = require("glob"); +const esbuild = require("esbuild"); var files = [ - "../" + require("../package.json").main, + `../${require("../package.json").main}`, "../node_helper.js" -] - -let project = require("../package.json").name -let revision = require("../package.json").rev -let version = require("../package.json").version -let commentIn = "/**" -let commentOut = "**/" - -function searchFiles() { - let components = globSync('../components/*.js') - files = files.concat(components) - console.log("Found: " + files.length + " files to minify\n") +]; + +let project = require("../package.json").name; +let revision = require("../package.json").rev; +let version = require("../package.json").version; + +let commentIn = "/**"; +let commentOut = "**/"; + +function searchFiles () { + let components = globSync("../components/*.js"); + files = files.concat(components); + console.log(`Found: ${files.length} files to minify\n`); } // minify files array -async function minifyFiles() { - searchFiles() - await Promise.all(files.map(file => { return minify(file) })).catch(() => process.exit(255)) +async function minifyFiles () { + searchFiles(); + await Promise.all(files.map((file) => { return minify(file); })).catch(() => process.exit(255)); } -function minify(file) { - let pathResolve = path.resolve(__dirname, file) - let FileName = path.parse(file).base - let error = 0 - console.log("Process File:", file) - return new Promise((resolve,reject) => { +function minify (file) { + let pathResolve = path.resolve(__dirname, file); + let FileName = path.parse(file).base; + let error = 0; + console.log("Process File:", file); + return new Promise((resolve, reject) => { try { esbuild.buildSync({ entryPoints: [pathResolve], @@ -41,17 +42,17 @@ function minify(file) { minify: true, outfile: pathResolve, banner: { - js: `${commentIn} ${project}\n * File: ${FileName}\n * Version: ${version}\n * Revision: ${revision}\n${commentOut}` + js: `${commentIn} ${project}\n * File: ${FileName}\n * Version: ${version}\n * Revision: ${revision}\n${commentOut}` }, footer: { js: `${commentIn} Coded With Heart by bugsounet ${commentOut}` } - }) - resolve(true) + }); + resolve(true); } catch (e) { - reject() + reject(); } - }) + }); } -minifyFiles() +minifyFiles(); From 548db4395a33e760694462ead5d52aa9461a2a86 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Sat, 17 Feb 2024 15:20:31 +0100 Subject: [PATCH 16/16] add new keyword --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 995a54b8..fe909fbe 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "keywords": [ "magic mirror", "module", - "screen" + "screen", + "motion detection" ], "engines": { "node": ">=18"