From 21ff1b0bb56332d80815bd0c8cea3a511c67f01c Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 12:11:31 -0500 Subject: [PATCH 01/12] DNS route --- nodejs/models/host.js | 2 +- nodejs/views/dns.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nodejs/models/host.js b/nodejs/models/host.js index c9a7f4a..e0b3453 100755 --- a/nodejs/models/host.js +++ b/nodejs/models/host.js @@ -76,7 +76,7 @@ class Host extends Table{ }catch(error){ console.error('bust cache error', error) - throw error; + // throw error; } } diff --git a/nodejs/views/dns.ejs b/nodejs/views/dns.ejs index 2e16856..12b915a 100644 --- a/nodejs/views/dns.ejs +++ b/nodejs/views/dns.ejs @@ -66,7 +66,7 @@ $(document).ready(async function(){ // Set the jq Templates $.scope.providerField.put = function(){}; - $.scope.DnsProvider.push(...(await app.api.get('/dns?detail=true')).results); + $.scope.DnsProvider.push(...(await app.api.get('dns?detail=true')).results); // Populate providerGet(); From b522e5064afd1736793db46761e5d8984b9e8107 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 12:16:38 -0500 Subject: [PATCH 02/12] Package updates --- nodejs/package-lock.json | 608 +++++++++++++++++++-------------------- nodejs/package.json | 2 +- 2 files changed, 291 insertions(+), 319 deletions(-) diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index 5d8fba6..9e28265 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -13,7 +13,7 @@ "@popperjs/core": "^2.11.8", "@simpleworkjs/conf": "^1.0.0", "acme-client": "^5.4.0", - "axios": "^1.13.2", + "axios": "^1.13.5", "bcrypt": "^6.0.0", "bootstrap": "^5.3.8", "ejs": "^3.1.10", @@ -39,101 +39,101 @@ } }, "node_modules/@fortawesome/fontawesome-free": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.1.0.tgz", - "integrity": "sha512-+WxNld5ZCJHvPQCr/GnzCTVREyStrAJjisUPtUxG5ngDA8TMlPnKp6dddlTpai4+1GNmltAeuk1hJEkBohwZYA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.2.0.tgz", + "integrity": "sha512-3DguDv/oUE+7vjMeTSOjCSG+KeawgVQOHrKRnvUuqYh1mfArrh7s+s8hXW3e4RerBA1+Wh+hBqf8sJNpqNrBWg==", "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", "engines": { "node": ">=6" } }, "node_modules/@peculiar/asn1-cms": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.0.tgz", - "integrity": "sha512-2uZqP+ggSncESeUF/9Su8rWqGclEfEiz1SyU02WX5fUONFfkjzS2Z/F1Li0ofSmf4JqYXIOdCAZqIXAIBAT1OA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.1.tgz", + "integrity": "sha512-vdG4fBF6Lkirkcl53q6eOdn3XYKt+kJTG59edgRZORlg/3atWWEReRCx5rYE1ZzTTX6vLK5zDMjHh7vbrcXGtw==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", - "@peculiar/asn1-x509-attr": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "@peculiar/asn1-x509-attr": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/asn1-csr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.6.0.tgz", - "integrity": "sha512-BeWIu5VpTIhfRysfEp73SGbwjjoLL/JWXhJ/9mo4vXnz3tRGm+NGm3KNcRzQ9VMVqwYS2RHlolz21svzRXIHPQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.6.1.tgz", + "integrity": "sha512-WRWnKfIocHyzFYQTka8O/tXCiBquAPSrRjXbOkHbO4qdmS6loffCEGs+rby6WxxGdJCuunnhS2duHURhjyio6w==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/asn1-ecc": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.6.0.tgz", - "integrity": "sha512-FF3LMGq6SfAOwUG2sKpPXblibn6XnEIKa+SryvUl5Pik+WR9rmRA3OCiwz8R3lVXnYnyRkSZsSLdml8H3UiOcw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.6.1.tgz", + "integrity": "sha512-+Vqw8WFxrtDIN5ehUdvlN2m73exS2JVG0UAyfVB31gIfor3zWEAQPD+K9ydCxaj3MLen9k0JhKpu9LqviuCE1g==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/asn1-pfx": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.6.0.tgz", - "integrity": "sha512-rtUvtf+tyKGgokHHmZzeUojRZJYPxoD/jaN1+VAB4kKR7tXrnDCA/RAWXAIhMJJC+7W27IIRGe9djvxKgsldCQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.6.1.tgz", + "integrity": "sha512-nB5jVQy3MAAWvq0KY0R2JUZG8bO/bTLpnwyOzXyEh/e54ynGTatAR+csOnXkkVD9AFZ2uL8Z7EV918+qB1qDvw==", "license": "MIT", "dependencies": { - "@peculiar/asn1-cms": "^2.6.0", - "@peculiar/asn1-pkcs8": "^2.6.0", - "@peculiar/asn1-rsa": "^2.6.0", + "@peculiar/asn1-cms": "^2.6.1", + "@peculiar/asn1-pkcs8": "^2.6.1", + "@peculiar/asn1-rsa": "^2.6.1", "@peculiar/asn1-schema": "^2.6.0", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/asn1-pkcs8": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.6.0.tgz", - "integrity": "sha512-KyQ4D8G/NrS7Fw3XCJrngxmjwO/3htnA0lL9gDICvEQ+GJ+EPFqldcJQTwPIdvx98Tua+WjkdKHSC0/Km7T+lA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.6.1.tgz", + "integrity": "sha512-JB5iQ9Izn5yGMw3ZG4Nw3Xn/hb/G38GYF3lf7WmJb8JZUydhVGEjK/ZlFSWhnlB7K/4oqEs8HnfFIKklhR58Tw==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/asn1-pkcs9": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.6.0.tgz", - "integrity": "sha512-b78OQ6OciW0aqZxdzliXGYHASeCvvw5caqidbpQRYW2mBtXIX2WhofNXTEe7NyxTb0P6J62kAAWLwn0HuMF1Fw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.6.1.tgz", + "integrity": "sha512-5EV8nZoMSxeWmcxWmmcolg22ojZRgJg+Y9MX2fnE2bGRo5KQLqV5IL9kdSQDZxlHz95tHvIq9F//bvL1OeNILw==", "license": "MIT", "dependencies": { - "@peculiar/asn1-cms": "^2.6.0", - "@peculiar/asn1-pfx": "^2.6.0", - "@peculiar/asn1-pkcs8": "^2.6.0", + "@peculiar/asn1-cms": "^2.6.1", + "@peculiar/asn1-pfx": "^2.6.1", + "@peculiar/asn1-pkcs8": "^2.6.1", "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", - "@peculiar/asn1-x509-attr": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "@peculiar/asn1-x509-attr": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/asn1-rsa": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.6.0.tgz", - "integrity": "sha512-Nu4C19tsrTsCp9fDrH+sdcOKoVfdfoQQ7S3VqjJU6vedR7tY3RLkQ5oguOIB3zFW33USDUuYZnPEQYySlgha4w==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.6.1.tgz", + "integrity": "sha512-1nVMEh46SElUt5CB3RUTV4EG/z7iYc7EoaDY5ECwganibQPkZ/Y2eMsTKB/LeyrUJ+W/tKoD9WUqIy8vB+CEdA==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } @@ -150,9 +150,9 @@ } }, "node_modules/@peculiar/asn1-x509": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.6.0.tgz", - "integrity": "sha512-uzYbPEpoQiBoTq0/+jZtpM6Gq6zADBx+JNFP3yqRgziWBxQ/Dt/HcuvRfm9zJTPdRcBqPNdaRHTVwpyiq6iNMA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.6.1.tgz", + "integrity": "sha512-O9jT5F1A2+t3r7C4VT7LYGXqkGLK7Kj1xFpz7U0isPrubwU5PbDoyYtx6MiGst29yq7pXN5vZbQFKRCP+lLZlA==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", @@ -162,21 +162,21 @@ } }, "node_modules/@peculiar/asn1-x509-attr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.6.0.tgz", - "integrity": "sha512-MuIAXFX3/dc8gmoZBkwJWxUWOSvG4MMDntXhrOZpJVMkYX+MYc/rUAU2uJOved9iJEoiUx7//3D8oG83a78UJA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.6.1.tgz", + "integrity": "sha512-tlW6cxoHwgcQghnJwv3YS+9OO1737zgPogZ+CgWRUK4roEwIPzRH4JEiG770xe5HX2ATfCpmX60gurfWIF9dcQ==", "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.6.0", - "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", "asn1js": "^3.0.6", "tslib": "^2.8.1" } }, "node_modules/@peculiar/x509": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.14.2.tgz", - "integrity": "sha512-r2w1Hg6pODDs0zfAKHkSS5HLkOLSeburtcgwvlLLWWCixw+MmW3U6kD5ddyvc2Y2YdbGuVwCF2S2ASoU1cFAag==", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.14.3.tgz", + "integrity": "sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==", "license": "MIT", "dependencies": { "@peculiar/asn1-cms": "^2.6.0", @@ -192,7 +192,7 @@ "tsyringe": "^4.10.0" }, "engines": { - "node": ">=22.0.0" + "node": ">=20.0.0" } }, "node_modules/@popperjs/core": { @@ -206,63 +206,71 @@ } }, "node_modules/@redis/bloom": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-5.10.0.tgz", - "integrity": "sha512-doIF37ob+l47n0rkpRNgU8n4iacBlKM9xLiP1LtTZTvz8TloJB8qx/MgvhMhKdYG+CvCY2aPBnN2706izFn/4A==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-5.11.0.tgz", + "integrity": "sha512-KYiVilAhAFN3057afUb/tfYJpsEyTkQB+tQcn5gVVA7DgcNOAj8lLxe4j8ov8BF6I9C1Fe/kwlbuAICcTMX8Lw==", "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { - "@redis/client": "^5.10.0" + "@redis/client": "^5.11.0" } }, "node_modules/@redis/client": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.10.0.tgz", - "integrity": "sha512-JXmM4XCoso6C75Mr3lhKA3eNxSzkYi3nCzxDIKY+YOszYsJjuKbFgVtguVPbLMOttN4iu2fXoc2BGhdnYhIOxA==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.11.0.tgz", + "integrity": "sha512-GHoprlNQD51Xq2Ztd94HHV94MdFZQ3CVrpA04Fz8MVoHM0B7SlbmPEVIjwTbcv58z8QyjnrOuikS0rWF03k5dQ==", "license": "MIT", "dependencies": { "cluster-key-slot": "1.1.2" }, "engines": { "node": ">= 18" + }, + "peerDependencies": { + "@node-rs/xxhash": "^1.1.0" + }, + "peerDependenciesMeta": { + "@node-rs/xxhash": { + "optional": true + } } }, "node_modules/@redis/json": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@redis/json/-/json-5.10.0.tgz", - "integrity": "sha512-B2G8XlOmTPUuZtD44EMGbtoepQG34RCDXLZbjrtON1Djet0t5Ri7/YPXvL9aomXqP8lLTreaprtyLKF4tmXEEA==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-5.11.0.tgz", + "integrity": "sha512-1iAy9kAtcD0quB21RbPTbUqqy+T2Uu2JxucwE+B4A+VaDbIRvpZR6DMqV8Iqaws2YxJYB3GC5JVNzPYio2ErUg==", "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { - "@redis/client": "^5.10.0" + "@redis/client": "^5.11.0" } }, "node_modules/@redis/search": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@redis/search/-/search-5.10.0.tgz", - "integrity": "sha512-3SVcPswoSfp2HnmWbAGUzlbUPn7fOohVu2weUQ0S+EMiQi8jwjL+aN2p6V3TI65eNfVsJ8vyPvqWklm6H6esmg==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-5.11.0.tgz", + "integrity": "sha512-g1l7f3Rnyk/xI99oGHIgWHSKFl45Re5YTIcO8j/JE8olz389yUFyz2+A6nqVy/Zi031VgPDWscbbgOk8hlhZ3g==", "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { - "@redis/client": "^5.10.0" + "@redis/client": "^5.11.0" } }, "node_modules/@redis/time-series": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-5.10.0.tgz", - "integrity": "sha512-cPkpddXH5kc/SdRhF0YG0qtjL+noqFT0AcHbQ6axhsPsO7iqPi1cjxgdkE9TNeKiBUUdCaU1DbqkR/LzbzPBhg==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-5.11.0.tgz", + "integrity": "sha512-TWFeOcU4xkj0DkndnOyhtxvX1KWD+78UHT3XX3x3XRBUGWeQrKo3jqzDsZwxbggUgf9yLJr/akFHXru66X5UQA==", "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { - "@redis/client": "^5.10.0" + "@redis/client": "^5.11.0" } }, "node_modules/@simpleworkjs/conf": { @@ -293,19 +301,22 @@ } }, "node_modules/@types/node": { - "version": "14.14.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.45.tgz", - "integrity": "sha512-DssMqTV9UnnoxDWu959sDLZzfvqCF0qDNRjaWeYSui9xkFe61kKo4l1TWNTQONpuXEm+gLMRvdlzvNHBamzmEw==", - "license": "MIT" - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "version": "25.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.0.tgz", + "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==", "license": "MIT", "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "undici-types": "~7.18.0" + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" }, "engines": { "node": ">= 0.6" @@ -368,21 +379,24 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", - "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/base64id": { "version": "2.0.0", @@ -421,9 +435,9 @@ } }, "node_modules/body-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", - "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", @@ -432,7 +446,7 @@ "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", - "qs": "^6.14.0", + "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" }, @@ -464,12 +478,15 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz", + "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" } }, "node_modules/braces": { @@ -569,13 +586,6 @@ "node": ">= 0.8" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, "node_modules/content-disposition": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", @@ -617,9 +627,9 @@ } }, "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", "license": "MIT", "dependencies": { "object-assign": "^4", @@ -627,6 +637,10 @@ }, "engines": { "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/debug": { @@ -737,6 +751,49 @@ "node": ">=10.0.0" } }, + "node_modules/engine.io/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/engine.io/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/engine.io/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/engine.io/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -840,53 +897,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/express/node_modules/accepts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "license": "MIT", - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express/node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -894,12 +904,15 @@ "license": "MIT" }, "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.5.tgz", + "integrity": "sha512-ct/ckWBV/9Dg3MlvCXsLcSUyoWwv9mCKqlhLNB2DAuXR/NZolSXlQqP5dyy6guWlPXBhodZyZ5lGPQcbQDxrEQ==", "license": "Apache-2.0", "dependencies": { - "minimatch": "^5.0.1" + "minimatch": "^10.2.1" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/fill-range": { @@ -972,6 +985,27 @@ "node": ">= 6" } }, + "node_modules/form-data/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/form-data/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -1155,9 +1189,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", - "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -1281,13 +1315,12 @@ "license": "MIT" }, "node_modules/ldapts": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/ldapts/-/ldapts-8.1.2.tgz", - "integrity": "sha512-QQAYM0fVzBcNzdo1VssKj9+v+BpjuyUqpgVjIUn1rWLdDj5cx60TtYoUWR5Ch9IMct1+jY92ES3G5fOoQaN34Q==", + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/ldapts/-/ldapts-8.1.6.tgz", + "integrity": "sha512-sofxzGEPRBvubSrdmly0mmUwjXHPfTbO51KLAUzuO4sHWwy+r0G6FwaLWWDwTPRpjJFkMdLId5BeRUHksUH4yA==", "license": "MIT", "dependencies": { - "strict-event-emitter-types": "2.0.0", - "whatwg-url": "15.1.0" + "strict-event-emitter-types": "2.0.0" }, "engines": { "node": ">=20" @@ -1330,36 +1363,43 @@ } }, "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { - "mime-db": "1.52.0" + "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.3.tgz", + "integrity": "sha512-Rwi3pnapEqirPSbWbrZaa6N3nmqq4Xer/2XooiOKyV3q12ML06f7MOuc5DVH8ONZIFhwIYQ3yzPH4nt7iWHaTg==", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.2" }, "engines": { - "node": ">=10" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/model-redis": { @@ -1472,9 +1512,9 @@ } }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -1510,16 +1550,16 @@ } }, "node_modules/nodemon": { - "version": "3.1.11", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.11.tgz", - "integrity": "sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==", + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.14.tgz", + "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==", "dev": true, "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", + "minimatch": "^10.2.1", "pstree.remy": "^1.1.8", "semver": "^7.5.3", "simple-update-notifier": "^2.0.0", @@ -1538,30 +1578,6 @@ "url": "https://opencollective.com/nodemon" } }, - "node_modules/nodemon/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/nodemon/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, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -1684,15 +1700,6 @@ "dev": true, "license": "MIT" }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/pvtsutils": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", @@ -1712,9 +1719,9 @@ } }, "node_modules/qs": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", - "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -1764,16 +1771,16 @@ } }, "node_modules/redis": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-5.10.0.tgz", - "integrity": "sha512-0/Y+7IEiTgVGPrLFKy8oAEArSyEJkU0zvgV5xyi9NzNQ+SLZmyFbUsWIbgPcd4UdUh00opXGKlXJwMmsis5Byw==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-5.11.0.tgz", + "integrity": "sha512-YwXjATVDT+AuxcyfOwZn046aml9jMlQPvU1VXIlLDVAExe0u93aTfPYSeRgG4p9Q/Jlkj+LXJ1XEoFV+j2JKcQ==", "license": "MIT", "dependencies": { - "@redis/bloom": "5.10.0", - "@redis/client": "5.10.0", - "@redis/json": "5.10.0", - "@redis/search": "5.10.0", - "@redis/time-series": "5.10.0" + "@redis/bloom": "5.11.0", + "@redis/client": "5.11.0", + "@redis/json": "5.11.0", + "@redis/search": "5.11.0", + "@redis/time-series": "5.11.0" }, "engines": { "node": ">= 18" @@ -1808,9 +1815,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -1846,31 +1853,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/send/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/send/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, "node_modules/serve-static": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", @@ -2022,6 +2004,49 @@ "node": ">=10.0.0" } }, + "node_modules/socket.io/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/socket.io/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/socket.io/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/socket.io/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/statuses": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", @@ -2088,18 +2113,6 @@ "nodetouch": "bin/nodetouch.js" } }, - "node_modules/tr46": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", - "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "engines": { - "node": ">=20" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -2138,31 +2151,6 @@ "node": ">= 0.6" } }, - "node_modules/type-is/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", @@ -2170,6 +2158,12 @@ "dev": true, "license": "MIT" }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "license": "MIT" + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -2188,28 +2182,6 @@ "node": ">= 0.8" } }, - "node_modules/webidl-conversions": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.0.tgz", - "integrity": "sha512-n4W4YFyz5JzOfQeA8oN7dUYpR+MBP3PIUsn2jLjWXwK5ASUzt0Jc/A5sAUZoCYFJRGF0FBKJ+1JjN43rNdsQzA==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=20" - } - }, - "node_modules/whatwg-url": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-15.1.0.tgz", - "integrity": "sha512-2ytDk0kiEj/yu90JOAp44PVPUkO9+jVhyf+SybKlRHSDlvOOZhdPIrr7xTH64l4WixO2cP+wQIcgujkGBPPz6g==", - "license": "MIT", - "dependencies": { - "tr46": "^6.0.0", - "webidl-conversions": "^8.0.0" - }, - "engines": { - "node": ">=20" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/nodejs/package.json b/nodejs/package.json index 0a9046f..f7b0d5f 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -24,7 +24,7 @@ "@popperjs/core": "^2.11.8", "@simpleworkjs/conf": "^1.0.0", "acme-client": "^5.4.0", - "axios": "^1.13.2", + "axios": "^1.13.5", "bcrypt": "^6.0.0", "bootstrap": "^5.3.8", "ejs": "^3.1.10", From 0a63e05028f66900eb4b5a1eb8a923eb723459ef Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 12:35:21 -0500 Subject: [PATCH 03/12] Import path fix --- nodejs/models/dns_provider.js | 2 +- nodejs/models/host.js | 4 ++ nodejs/models/index.js | 5 +- nodejs/models/user_redis.js | 2 +- nodejs/routes/render.js | 4 +- nodejs/services/host_scheduler.js | 4 +- nodejs/utils/object_validate.js | 112 ------------------------------ nodejs/utils/redis_model.js | 10 --- 8 files changed, 14 insertions(+), 129 deletions(-) delete mode 100644 nodejs/utils/object_validate.js delete mode 100644 nodejs/utils/redis_model.js diff --git a/nodejs/models/dns_provider.js b/nodejs/models/dns_provider.js index 7617d85..1a6e1ae 100644 --- a/nodejs/models/dns_provider.js +++ b/nodejs/models/dns_provider.js @@ -3,7 +3,7 @@ const crypto = require("crypto"); const conf = require('@simpleworkjs/conf'); -const Table = require('../utils/redis_model'); +const Table = require('.'); const ModelPs = require('../utils/model_pubsub'); const tldExtract = require('tld-extract').parse_host; diff --git a/nodejs/models/host.js b/nodejs/models/host.js index e0b3453..07205e3 100755 --- a/nodejs/models/host.js +++ b/nodejs/models/host.js @@ -230,20 +230,24 @@ class Host extends Table{ async checkWildcardForRenew(){ try{ + console.log(`Checking ${this.host}`); if(this.is_wildcard && Date.now() > this.wildcard_expires - (30 * 24 * 60 * 60 * 1000)){ this.createWildcardCert(); } }catch(error){ + console.error('checkWildcardForRenew instance', this.host, error) throw error; } } static async checkWildcardForRenew(){ try{ + console.log('checkWildcardForRenew here', this) for(let host of await this.listDetail()){ host.createWildcardCert(); } }catch(error){ + console.error('checkWildcardForRenew', error) throw error; } } diff --git a/nodejs/models/index.js b/nodejs/models/index.js index c330589..5bd173b 100644 --- a/nodejs/models/index.js +++ b/nodejs/models/index.js @@ -1,6 +1,9 @@ 'use strict'; +const conf = require('@simpleworkjs/conf'); +const {setUpTable} = require('model-redis'); + +const Table = setUpTable(conf.redis); -const Table = require('../utils/redis_model'); module.exports = Table; require('./dns_provider'); diff --git a/nodejs/models/user_redis.js b/nodejs/models/user_redis.js index e94a1d0..c70de74 100644 --- a/nodejs/models/user_redis.js +++ b/nodejs/models/user_redis.js @@ -1,6 +1,6 @@ 'use strict'; -const Table = require('../utils/redis_model'); +const Table = require('.'); const bcrypt = require('bcrypt'); const saltRounds = 10; diff --git a/nodejs/routes/render.js b/nodejs/routes/render.js index 72bc7a8..86bacb8 100644 --- a/nodejs/routes/render.js +++ b/nodejs/routes/render.js @@ -25,8 +25,8 @@ frontEndModules.forEach(dep => { // local folder. router.use('/static', express.static(path.join(__dirname, '../public'))) -router.get('/', async function(req, res, next) { - res.render('hosts', {...values}); +router.get('/', (req, res) => { + res.redirect(301, '/hosts'); }); router.get('/hosts', async function(req, res, next) { diff --git a/nodejs/services/host_scheduler.js b/nodejs/services/host_scheduler.js index e556fdd..4272972 100644 --- a/nodejs/services/host_scheduler.js +++ b/nodejs/services/host_scheduler.js @@ -20,11 +20,11 @@ const {Host} = require('../models/host'); // Initial wildcard cert check 30 seconds after app starts // Delay allows the system to fully initialize before checking certs -setTimeout(Host.checkWildcardForRenew, 30000); +setTimeout(Host.checkWildcardForRenew.bind(Host), 30000); // Check wildcard certs once every 24 hours // Ensures certificates are renewed well before expiration -setInterval(Host.checkWildcardForRenew, 86400000); +setInterval(Host.checkWildcardForRenew.bind(Host), 86400000); console.log('Host scheduler service initialized'); console.log('- Wildcard cert check: 30s after start, then every 24h'); diff --git a/nodejs/utils/object_validate.js b/nodejs/utils/object_validate.js deleted file mode 100644 index f206df9..0000000 --- a/nodejs/utils/object_validate.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict'; - -const process_type = { - number: function(key, value){ - if(key.min && value < key.min) return `is to small, min ${key.min}.` - if(key.max && value > key.max) return `is to large, max ${key.max}.` - }, - string: function(key, value){ - if(key.min && value.length < key.min) return `is too short, min ${key.min}.` - if(key.max && value.length > key.max) return `is too short, max ${key.max}.` - }, -} - -function returnOrCall(value){ - return typeof(value) === 'function' ? value() : value; -} - -function processKeys(map, data, partial){ - let errors = []; - let out = {}; - - for(let key of Object.keys(map)){ - - // Do not require "isRequired" fields for partial validation, useful for - // updates. - if(!map[key].always && partial && !data.hasOwnProperty(key)) continue; - - // Make sure required keys are present - if(!partial && map[key].isRequired && !data.hasOwnProperty(key)){ - errors.push({key, message:`${key} is required.`}); - continue; - } - - // Remove undefined keys unless they have a default option or are a - // relation - if(data[key] === undefined){ - if(!map[key].default){ - if(map[key].model && !map[key].type) continue; - continue; - } - } - - // Check the type of the key - if(data.hasOwnProperty(key) && map[key].type && typeof(data[key]) !== map[key].type){ - errors.push({key, message:`${key} is not ${map[key].type} type.`}); - continue; - } - - // Add the key to the process object to be returned and set any default - // if the key is blank - out[key] = data.hasOwnProperty(key) && data[key] !== undefined ? data[key] : returnOrCall(map[key].default); - - // Check for type specific validations, ie: string length - if(data.hasOwnProperty(key) && process_type[map[key].type]){ - let typeError = process_type[map[key].type](map[key], data[key]); - if(typeError){ - errors.push({key, message:`${key} ${typeError}`}); - - continue; - } - } - } - - // Check for errors, throw validation error if any - if(errors.length !== 0){ - throw ObjectValidateError(errors); - return {__errors__: errors}; - } - - return out; -} - -function parseFromString(map, data){ - // Use the key maps data type to return string values to native - let types = { - boolean: function(value){ return value === 'false' ? false : true }, - number: Number, - string: String, - object: JSON.parse - }; - - for(let key of Object.keys(data)){ - if(map[key] && map[key].type && data[key]){ - data[key] = types[map[key].type](data[key]); - } - } - - return data; -} - -function parseToString(data){ - let types = { - object: JSON.stringify - } - - return (types[typeof(data)] || String)(data); -} - -function ObjectValidateError(keys, message){ - let error = new Error('ObjectValidateError') - error.name = "ObjectValidateError" - error.message = message || `Invalid Keys: ${message}` - error.keys = (keys || {}); - error.status = 422; - - return error -} - -ObjectValidateError.prototype = Error.prototype; - - -module.exports = {processKeys, parseFromString, ObjectValidateError, parseToString}; \ No newline at end of file diff --git a/nodejs/utils/redis_model.js b/nodejs/utils/redis_model.js deleted file mode 100644 index e93724d..0000000 --- a/nodejs/utils/redis_model.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -const {setUpTable} = require('model-redis'); -const conf = require('@simpleworkjs/conf'); - -const Table = setUpTable({ - prefix: conf.redis.prefix -}); - -module.exports = Table; From 74b8f1113e0971565149cce92048564cd04b80d9 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 13:49:46 -0500 Subject: [PATCH 04/12] Prokbun API fix --- nodejs/models/dns_provider.js | 12 ++++++++---- nodejs/models/dns_provider/porkbun.js | 16 +++++++++++----- nodejs/services/host_scheduler.js | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/nodejs/models/dns_provider.js b/nodejs/models/dns_provider.js index 1a6e1ae..105bdf8 100644 --- a/nodejs/models/dns_provider.js +++ b/nodejs/models/dns_provider.js @@ -182,17 +182,21 @@ if(require.main === module){(async function(){try{ // console.log(await DnsProvider.findall()); - let provider = await DnsProvider.get('e8443e03ac503c7b'); + let provider = await DnsProvider.get('84c6613b9464fbe1'); - console.log(await provider.listDomains()) + // console.log(await provider.listDomains()) let domain = await Domain.get('holycore.quest') // pork // let domain = await Domain.get('rm-rf.stream') // DO // let domain = await Domain.get('test.wtf') // CF - // console.log(await domain.createRecord({type: 'TXT', name: 'apitewefweefwsewft222', data:'hiiiiiii'})) + console.log(await domain.createRecord({ + type: 'TXT', + name: 'apitewefweefwsewft222', + data: 'sdddddddad' + })); - let txtRecords = await domain.getRecords({type: 'TXT'}); + let txtRecords = await domain.getRecords(); console.log(txtRecords.map(i=>`${i.name}: ${i.data}`)) // console.log(await domain.deleteRecords({type: 'TXT'})) diff --git a/nodejs/models/dns_provider/porkbun.js b/nodejs/models/dns_provider/porkbun.js index 64347d8..0fe86c6 100644 --- a/nodejs/models/dns_provider/porkbun.js +++ b/nodejs/models/dns_provider/porkbun.js @@ -93,13 +93,19 @@ class PorkBun extends DnsApi{ }); } - async createRecord(domain, options, force){ - if(force){ - await this.deleteRecords(domain, options) - } - + async createRecord(domain, options, force = true){ try{ + // Throw errors for missing keys, do this first. options = this.__parseOptions(options, ['type', 'name', 'data']); + + // Delete the current records + if(force){ + let forceOptions = new Map(Object.entries(options)); + forceOptions.delete('data'); + forceOptions.delete('content'); + await this.deleteRecords(domain, Object.fromEntries(forceOptions)); + } + let res = await this.post(`/dns/create/${domain}`, options); return res.data.result; diff --git a/nodejs/services/host_scheduler.js b/nodejs/services/host_scheduler.js index 4272972..50e6768 100644 --- a/nodejs/services/host_scheduler.js +++ b/nodejs/services/host_scheduler.js @@ -20,7 +20,7 @@ const {Host} = require('../models/host'); // Initial wildcard cert check 30 seconds after app starts // Delay allows the system to fully initialize before checking certs -setTimeout(Host.checkWildcardForRenew.bind(Host), 30000); +// setTimeout(Host.checkWildcardForRenew.bind(Host), 30000); // Check wildcard certs once every 24 hours // Ensures certificates are renewed well before expiration From 585aa14c0b85ad4c2c4158c86817867b413aa107 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 19:17:25 -0500 Subject: [PATCH 05/12] services --- nodejs/conf/base.js | 11 ++++++- nodejs/conf/development.js | 23 ++++++++++++++ nodejs/models/host.js | 20 ++++++++++-- nodejs/services/host_scheduler.js | 53 +++++++++++++++++-------------- nodejs/utils/model_pubsub.js | 8 ++--- 5 files changed, 85 insertions(+), 30 deletions(-) create mode 100644 nodejs/conf/development.js diff --git a/nodejs/conf/base.js b/nodejs/conf/base.js index 2fb7363..a04d514 100644 --- a/nodejs/conf/base.js +++ b/nodejs/conf/base.js @@ -14,5 +14,14 @@ module.exports = { socketFile: '/var/run/proxy_lookup.socket', redis: { prefix: 'proxy_' - } + }, + + + service:{ + hostScheduler:{ + enabled: true, + initial: 30000, + interval: 86400000, + } + }, }; diff --git a/nodejs/conf/development.js b/nodejs/conf/development.js new file mode 100644 index 0000000..024cde1 --- /dev/null +++ b/nodejs/conf/development.js @@ -0,0 +1,23 @@ +'use strict'; +// Using https://github.com/simpleworkjs/conf to handle configuration + +module.exports = { + userModel: 'redis', // pam, redis, ldap + ldap: { + url: 'ldap://192.168.1.55:389', + bindDN: 'cn=ldapclient service,ou=people,dc=theta42,dc=com', + bindPassword: '__IN SRECREST FILE__', + searchBase: 'ou=people,dc=theta42,dc=com', + userFilter: '(objectClass=inetOrgPerson)', + userNameAttribute: 'uid' + }, + socketFile: '/var/run/proxy_lookup.socket', + redis: { + prefix: 'proxy_' + }, + service:{ + hostScheduler:{ + enabled: false, + } + }, +}; diff --git a/nodejs/models/host.js b/nodejs/models/host.js index 07205e3..87d24ab 100755 --- a/nodejs/models/host.js +++ b/nodejs/models/host.js @@ -82,8 +82,15 @@ class Host extends Table{ static async create(data, ...args){ try{ + + console.log('host create data', data.challengeType, data.challengeType === 'DNS-01-wildcard') + // Validate requested host is valid host and domain - if(data.challengeType === 'DNS-01-wildcard') await this.validateWildcardCreate(data, args); + if(data.challengeType === 'DNS-01-wildcard'){ + data.is_wildcard = true; + data.wildcard_status = "Starting" + await this.validateWildcardCreate(data, args); + } // Validate requested host has a valid wildcard parent if(data.challengeType === 'wildcardChild'){ @@ -96,24 +103,31 @@ class Host extends Table{ } } + console.log('Host create here 102') + // Create the new host entry let out = await super.create(data, ...args); + console.log('Host create here 106') // Update the lookup table to reflect new host await this.buildLookUpObj(); + console.log('Host create here 111') // Fire the request for the wild card cert // This is "back ground" job, await is intentionally missing - if(out.challengeType === 'DNS-01-wildcard') out.createWildcardCert(); + if(data.challengeType === 'DNS-01-wildcard') out.createWildcardCert(); + console.log('Host create here 111') return out; } catch(error){ + console.log(error) throw error; } } static async validateWildcardCreate(data, ...args){ + console.log('validateWildcardCreate here') try{ if(!data.host.startsWith('*.')) throw new Error('not wild card'); await Domain.get(data.host); @@ -125,9 +139,11 @@ class Host extends Table{ } async createWildcardCert(){ + console.log('createWildcardCert here') if(!this.host.startsWith('*.')) throw new Error('not wild card'); try{ + console.log('createWildcardCert here in try') let host = this; await host.update({ diff --git a/nodejs/services/host_scheduler.js b/nodejs/services/host_scheduler.js index 50e6768..465f658 100644 --- a/nodejs/services/host_scheduler.js +++ b/nodejs/services/host_scheduler.js @@ -1,32 +1,39 @@ 'use strict'; +const conf = require('@simpleworkjs/conf'); const {Host} = require('../models/host'); -/** - * Host Scheduler Service - * - * Manages scheduled tasks for host-related operations: - * - Wildcard SSL certificate renewal checks - * - * Schedule: - * - Initial check: 30 seconds after application starts - * - Recurring checks: Every 24 hours (86400000ms) - * - * The checkWildcardForRenew method: - * - Iterates through all hosts in the system - * - Checks if wildcard certificates are expiring within 30 days - * - Automatically renews certificates that are approaching expiration - */ -// Initial wildcard cert check 30 seconds after app starts -// Delay allows the system to fully initialize before checking certs -// setTimeout(Host.checkWildcardForRenew.bind(Host), 30000); +function hostSchedulerService(){ + /** + * Host Scheduler Service + * + * Manages scheduled tasks for host-related operations: + * - Wildcard SSL certificate renewal checks + * + * Schedule: + * - Initial check: 30 seconds after application starts + * - Recurring checks: Every 24 hours (86400000ms) + * + * The checkWildcardForRenew method: + * - Iterates through all hosts in the system + * - Checks if wildcard certificates are expiring within 30 days + * - Automatically renews certificates that are approaching expiration + */ -// Check wildcard certs once every 24 hours -// Ensures certificates are renewed well before expiration -setInterval(Host.checkWildcardForRenew.bind(Host), 86400000); + // Initial wildcard cert check 30 seconds after app starts + // Delay allows the system to fully initialize before checking certs + setTimeout(Host.checkWildcardForRenew.bind(Host), conf.service.hostScheduler.initial); + + // Check wildcard certs once every 24 hours + // Ensures certificates are renewed well before expiration + setInterval(Host.checkWildcardForRenew.bind(Host), conf.service.hostScheduler.interval); + + console.log('Host scheduler service initialized'); + console.log('- Wildcard cert check: 30s after start, then every 24h'); +} + +if(conf.service.hostScheduler.enabled !== false) hostSchedulerService(); -console.log('Host scheduler service initialized'); -console.log('- Wildcard cert check: 30s after start, then every 24h'); module.exports = {}; diff --git a/nodejs/utils/model_pubsub.js b/nodejs/utils/model_pubsub.js index f2ba5d1..e935ab8 100644 --- a/nodejs/utils/model_pubsub.js +++ b/nodejs/utils/model_pubsub.js @@ -38,16 +38,16 @@ function ModelPs(model){ publish(propKey, res, ...args); }).catch(function(error){ - // console.error("Error PS", model.name, propKey, error) - console.log('toDo, publish errors...'); + console.error("Error async PS", model.name, propKey, error) + // console.log('toDo, publish errors...'); }); }else{ publish(propKey, res, ...args); } return res; }catch(error){ - // console.error("Error PS", model.name, propKey, error) - console.log("toDo, publish errors..."); + console.error("Error PS", model.name, propKey, error) + // console.log("toDo, publish errors..."); } } } else { From 427e9411e715d496bb9805f5a68aed04fcd75059 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 19:30:54 -0500 Subject: [PATCH 06/12] Better model pub/sub errors --- nodejs/utils/model_pubsub.js | 104 +++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 34 deletions(-) diff --git a/nodejs/utils/model_pubsub.js b/nodejs/utils/model_pubsub.js index e935ab8..bd41039 100644 --- a/nodejs/utils/model_pubsub.js +++ b/nodejs/utils/model_pubsub.js @@ -1,55 +1,91 @@ 'use strict'; + +/** + * PubSub controller dependency to handle message broadcasting + */ const ps = require('../controller/pubsub'); - -function ModelPs(model){ - const Model = model.constructor.name === 'Function' ? model : model.constructor +/** + * Wraps a model in a Proxy to automatically publish events on specific method calls. + * @param {Object|Function} model - The data model or instance to be proxied. + * @returns {Proxy} - The proxied model. + */ +function ModelPs(model) { + // Ensure we have a reference to the class constructor regardless of whether an instance or class was passed + const Model = model.constructor.name === 'Function' ? model : model.constructor; - function getIndex(req, res){ - if(model[Model._key]) return model[Model._key]; - if(req && req[Model._key]) return req[Model._key]; - if(res && res[Model._key]) return res[Model._key]; + /** + * Extracts the unique identifier (primary key) from the model or request/response objects. + */ + function getIndex(req, res) { + if (model[Model._key]) return model[Model._key]; + if (req && req[Model._key]) return req[Model._key]; + if (res && res[Model._key]) return res[Model._key]; } - function publish(prop, res, req){ - try{ - if(!['add', 'create', 'update', 'remove'].includes(prop)) return; + /** + * Formats and broadcasts the message via PubSub. + * Topic format: model:ClassName:Action:ID + */ + function publish(prop, res, req) { + try { + // Only trigger for specific mutation keywords + if (!['add', 'create', 'update', 'remove'].includes(prop)) return; ps.publish(`model:${Model.name}:${prop}:${getIndex(res, req)}`, res); - }catch(error){ - console.log('ModelPs.publish ERROR', error) + } catch (error) { + console.log('ModelPs.publish ERROR', error); + } + } + + /** + * Standardized error logger that ignores common/non-critical HTTP errors + */ + function handleError(error, model, propKey) { + if (![401, 404, 429].includes(error.status)) { + console.error("Error PS", model.name, propKey, error); } } return new Proxy(model, { + /** + * Intercepts 'new' keyword calls to ensure instances are also proxied. + */ construct(target, args, newTarget) { - return ModelPs(Reflect.construct(target, args, newTarget)) + return ModelPs(Reflect.construct(target, args, newTarget)); }, - get(target, propKey, receiver) { - if(propKey == 'constructor') return target.constructor; - const targetValue = Reflect.get(target, propKey, receiver); - if (typeof targetValue === 'function') { - return function(...args){ - try{ - // let res = targetValue.apply(this, args); // (A) - var res = Reflect.apply(targetValue, this, args); - if(targetValue.constructor.name === 'AsyncFunction'){ - res.then(function(res){ - publish(propKey, res, ...args); - }).catch(function(error){ - console.error("Error async PS", model.name, propKey, error) - // console.log('toDo, publish errors...'); - }); - }else{ + /** + * Intercepts property/method access. + */ + get(target, propKey, receiver) { + // Ensure constructor access remains direct + if (propKey == 'constructor') return target.constructor; + + const targetValue = Reflect.get(target, propKey, receiver); + + // If the property accessed is a function, wrap it to inject the PubSub logic + if (typeof targetValue === 'function') { + return function(...args) { + try { + // Execute the original method + var res = Reflect.apply(targetValue, this, args); + + // Handle Asynchronous results (Promises) + if (targetValue.constructor.name === 'AsyncFunction') { + res.then(function(res) { + publish(propKey, res, ...args); + }).catch((error) => handleError(error, model, propKey)); + + } else { + // Handle Synchronous results publish(propKey, res, ...args); } return res; - }catch(error){ - console.error("Error PS", model.name, propKey, error) - // console.log("toDo, publish errors..."); + } catch (error) { + handleError(error, model, propKey); } - } + }; } else { return targetValue; } @@ -57,4 +93,4 @@ function ModelPs(model){ }); } -module.exports = ModelPs; +module.exports = ModelPs; \ No newline at end of file From 1bacc17a126c9fdc82ab5043a541e1f4938968a8 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 25 Feb 2026 19:45:09 -0500 Subject: [PATCH 07/12] Fixed host put on frontend --- nodejs/models/host.js | 2 -- nodejs/views/hosts.ejs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/nodejs/models/host.js b/nodejs/models/host.js index 87d24ab..e3f4c01 100755 --- a/nodejs/models/host.js +++ b/nodejs/models/host.js @@ -246,7 +246,6 @@ class Host extends Table{ async checkWildcardForRenew(){ try{ - console.log(`Checking ${this.host}`); if(this.is_wildcard && Date.now() > this.wildcard_expires - (30 * 24 * 60 * 60 * 1000)){ this.createWildcardCert(); } @@ -258,7 +257,6 @@ class Host extends Table{ static async checkWildcardForRenew(){ try{ - console.log('checkWildcardForRenew here', this) for(let host of await this.listDetail()){ host.createWildcardCert(); } diff --git a/nodejs/views/hosts.ejs b/nodejs/views/hosts.ejs index c1d8771..85c4675 100755 --- a/nodejs/views/hosts.ejs +++ b/nodejs/views/hosts.ejs @@ -274,7 +274,7 @@
-
+ {{{ form }}}
+
+ +
+ +
+
+ +
+
+