From b46b2141752b3710b3967417891de29482783366 Mon Sep 17 00:00:00 2001 From: Tristan <39345534+MichelBaie@users.noreply.github.com> Date: Fri, 27 Aug 2021 11:12:22 +0200 Subject: [PATCH 1/4] Traduction pour le language France (FR Translation) --- src/languages/fr.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/languages/fr.js diff --git a/src/languages/fr.js b/src/languages/fr.js new file mode 100644 index 00000000..174dc708 --- /dev/null +++ b/src/languages/fr.js @@ -0,0 +1,16 @@ +export default { + languageName: "Français", + checkEverySecond: "Vérification toutes les {0} secondes.", + "Avg.": "Moy. ", + retriesDescription: "Nombre de tentatives avant que le service soit déclaré comme inaccessible.", + ignoreTLSError: "Ignorer les erreurs SSL/TLS pour ce site", + upsideDownModeDescription: "Inverser le en ligne / hors ligne (Si le service est hors ligne il sera marqué comme en ligne).", + maxRedirectDescription: "Nombre maximal de redirections à suivre si besoin. 0 Pour désactiver cette option.", + acceptedStatusCodesDescription: "Séléctionnez les codes http correspondant à une réponse positive.", + passwordNotMatchMsg: "Le second mot de passe ne correspond pas !", + notificationDescription: "Merci de bien vouloir associer un check à cette notification pour la faire fonctionner.", + keywordDescription: "Rechercher un mot clé dans la réponse HTML ou JSON. Sensible aux caractères.", + pauseDashboardHome: "Pause", + deleteMonitorMsg: "Êtes-vous sûr de vouloir supprimer ce check ?", + deleteNotificationMsg: "Êtes-vous sûr de vouloir supprimer cette notification de tout vos check ?", +} From bb799163e8241c6f0f77639c4d4859638d234037 Mon Sep 17 00:00:00 2001 From: Tristan <39345534+MichelBaie@users.noreply.github.com> Date: Mon, 30 Aug 2021 11:11:22 +0200 Subject: [PATCH 2/4] French Translation (from zh-HK.js) --- src/languages/fr.js | 118 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 104 insertions(+), 14 deletions(-) diff --git a/src/languages/fr.js b/src/languages/fr.js index 174dc708..ee409e51 100644 --- a/src/languages/fr.js +++ b/src/languages/fr.js @@ -1,16 +1,106 @@ export default { - languageName: "Français", - checkEverySecond: "Vérification toutes les {0} secondes.", - "Avg.": "Moy. ", - retriesDescription: "Nombre de tentatives avant que le service soit déclaré comme inaccessible.", - ignoreTLSError: "Ignorer les erreurs SSL/TLS pour ce site", - upsideDownModeDescription: "Inverser le en ligne / hors ligne (Si le service est hors ligne il sera marqué comme en ligne).", - maxRedirectDescription: "Nombre maximal de redirections à suivre si besoin. 0 Pour désactiver cette option.", - acceptedStatusCodesDescription: "Séléctionnez les codes http correspondant à une réponse positive.", - passwordNotMatchMsg: "Le second mot de passe ne correspond pas !", - notificationDescription: "Merci de bien vouloir associer un check à cette notification pour la faire fonctionner.", - keywordDescription: "Rechercher un mot clé dans la réponse HTML ou JSON. Sensible aux caractères.", - pauseDashboardHome: "Pause", - deleteMonitorMsg: "Êtes-vous sûr de vouloir supprimer ce check ?", - deleteNotificationMsg: "Êtes-vous sûr de vouloir supprimer cette notification de tout vos check ?", + languageName: "Français (France)", + Settings: "Paramètres", + Dashboard: "Dashboard", + "New Update": "Mise à jour disponible", + Language: "Langue", + Appearance: "Apparence", + Theme: "Thème", + General: "Général", + Version: "Version", + "Check Update On GitHub": "Consulter les mises à jour sur Github", + List: "Lister", + Add: "Ajouter", + "Add New Monitor": "Ajouter un nouveau check", + "Quick Stats": "Résumé", + Up: "En ligne", + Down: "Hors ligne", + Pending: "Dans la file d'attente", + Unknown: "Inconnu", + Pause: "En Pause", + pauseDashboardHome: "Éléments mis en pause", + Name: "Nom", + Status: "État", + DateTime: "Heure", + Message: "Messages", + "No important events": "Pas d'évènements important", + Resume: "Reprendre", + Edit: "Modifier", + Delete: "Supprimer", + Current: "Actuellement", + Uptime: "Uptime", + "Cert Exp.": "Cert Exp.", + days: "Jours", + day: "Jour", + "-day": "Demi-Journée", + hour: "Heure", + "-hour": "Demi-Heure", + checkEverySecond: "Vérifier toutes les {0} secondes", + "Avg.": "Moy.", + Response: "Réponse", + Ping: "Ping", + "Monitor Type": "Type de Monitoring", + Keyword: "Mot-clé", + "Friendly Name": "Nom d'affichage", + URL: "URL", + Hostname: "Nom d'hôte", + Port: "Port", + "Heartbeat Interval": "Intervale de vérifications", + Retries: "Essais", + retriesDescription: "Nombre d'essais avant que le service soit déclaré hors-ligne.", + Advanced: "Avancé", + ignoreTLSError: "Ignorer les erreurs liées au certificat SSL/TLS", + "Upside Down Mode": "Mode inversé", + upsideDownModeDescription: "Si le service est en ligne il sera alors noté hors-ligne et vice-versa.", + "Max. Redirects": "Redirections", + maxRedirectDescription: "Nombre maximal de redirections avant que le service soit noté hors-ligne.", + "Accepted Status Codes": "Codes HTTP", + acceptedStatusCodesDescription: "Si les codes HTTP reçus sont ceux séléctionnés, alors le serveur sera noté en ligne.", + Save: "Sauvegarder", + Notifications: "Notifications", + "Not available, please setup.": "Créez des notifications depuis les paramètres.", + "Setup Notification": "Créer une notification", + Light: "Clair", + Dark: "Sombre", + Auto: "Automatique", + "Theme - Heartbeat Bar": "Voir les services monitorés", + Normal: "Général", + Bottom: "Au dessus", + None: "Neutre", + Timezone: "Fuseau Horaire", + "Search Engine Visibility": "SEO", + "Allow indexing": "Autoriser l'indexation par des moteurs de recherche", + "Discourage search engines from indexing site": "Empêche les moteurs de recherche d'indexer votre site", + "Change Password": "Changer le mot de passe", + "Current Password": "Mot de passe actuel", + "New Password": "Nouveau mot de passe", + "Repeat New Password": "Répéter votre nouveau mot de passe", + passwordNotMatchMsg: "Les mots de passe ne correspondent pas", + "Update Password": "Mettre à jour le mot de passe", + "Disable Auth": "Désactiver l'authentification intégrée", + "Enable Auth": "Activer l'authentification", + Logout: "Se déconnecter", + notificationDescription: "Une fois ajoutée, vous devez l'activer manuellement dans les paramètres de vos hosts.", + Leave: "Quitter", + "I understand, please disable": "Je comprends, je l'ai désactivé", + Confirm: "Confirmer", + Yes: "Oui", + No: "Non", + Username: "Nom d'utilisateur", + Password: "Mot de passe", + "Remember me": "Se souvenir de moi", + Login: "Se connecter", + "No Monitors, please": "Pas de monitor, veuillez ", + "add one": "en ajouter un.", + "Notification Type": "Type de notification", + "Email": "Email", + "Test": "Tester", + keywordDescription: "Le mot clé sera cherché dans la réponse HTML/JSON reçue du site internet.", + "Certificate Info": "Des informations sur le certificat SSL", + deleteMonitorMsg: "Êtes-vous sûr de vouloir supprimer ce monitor ?", + deleteNotificationMsg: "Êtes-vous sûr de vouloir supprimer ce type de notifications ? Une fois désactivée, les services qui l'utilisent ne pourront plus envoyer de notifications.", + "Resolver Server": "Serveur DNS utilisé", + "Resource Record Type": "Type d'enregistrement DNS recherché", + resoverserverDescription: "Le DNS de cloudflare est utilisé par défaut, mais vous pouvez le changer si vous le souhaitez.", + rrtypeDescription: "Veuillez séléctionner un type d'enregistrement DNS", } From 8c5d1945be03d3a1b1f5270fe75577102264884c Mon Sep 17 00:00:00 2001 From: LouisLam Date: Mon, 30 Aug 2021 19:46:10 +0800 Subject: [PATCH 3/4] add fr to the list --- src/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.js b/src/main.js index 7fa6267c..cdf37998 100644 --- a/src/main.js +++ b/src/main.js @@ -26,6 +26,7 @@ import { appName } from "./util.ts"; import en from "./languages/en"; import zhHK from "./languages/zh-HK"; import deDE from "./languages/de-DE"; +import fr from "./languages/fr"; const routes = [ { @@ -92,6 +93,7 @@ const languageList = { en, "zh-HK": zhHK, "de-DE": deDE, + "fr": fr, }; const i18n = createI18n({ From 0d65918a6a215e5d7ccee760ba85209ddc37776e Mon Sep 17 00:00:00 2001 From: LouisLam Date: Tue, 31 Aug 2021 19:56:44 +0800 Subject: [PATCH 4/4] change bcrypt to bcryptjs, use my own prebuilt better-sqlite3, supports more prebuilt --- dockerfile | 9 -- package-lock.json | 350 ++++++---------------------------------- package.json | 8 +- server/password-hash.js | 2 +- 4 files changed, 55 insertions(+), 314 deletions(-) diff --git a/dockerfile b/dockerfile index ae182175..cad5eb65 100644 --- a/dockerfile +++ b/dockerfile @@ -2,15 +2,6 @@ FROM node:14-alpine3.12 AS release WORKDIR /app -# split the sqlite install here, so that it can caches the prebuilt -RUN apk add --no-cache --virtual .build-deps make g++ python3 python3-dev && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - npm install better-sqlite3@7.4.3 bcrypt@5.0.1 && \ - apk del .build-deps && \ - rm -f /usr/bin/python - -# Touching above code may causes sqlite3 re-compile again, painful slow. - # Install apprise RUN apk add --no-cache python3 py3-cryptography py3-pip py3-six py3-yaml py3-click py3-markdown py3-requests py3-requests-oauthlib RUN pip3 --no-cache-dir install apprise && \ diff --git a/package-lock.json b/package-lock.json index cc1feebc..a0a584f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,11 @@ "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/vue-fontawesome": "^3.0.0-4", + "@louislam/better-sqlite3-with-prebuilds": "^7.4.3", "@popperjs/core": "^2.9.3", "args-parser": "^1.3.0", "axios": "^0.21.1", - "bcrypt": "^5.0.1", - "better-sqlite3": "^7.4.3", + "bcryptjs": "^2.4.3", "bootstrap": "^5.1.0", "chart.js": "^3.5.0", "chartjs-adapter-dayjs": "^1.0.0", @@ -33,7 +33,7 @@ "password-hash": "^1.2.2", "prom-client": "^13.2.0", "prometheus-api-metrics": "^3.2.0", - "redbean-node": "0.1.1", + "redbean-node": "0.1.2", "socket.io": "^4.1.3", "socket.io-client": "^4.1.3", "tcp-ping": "^0.1.1", @@ -878,6 +878,18 @@ "node": ">= 10" } }, + "node_modules/@louislam/better-sqlite3-with-prebuilds": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@louislam/better-sqlite3-with-prebuilds/-/better-sqlite3-with-prebuilds-7.4.3.tgz", + "integrity": "sha512-v9FFkq47dOtrWBuChce4jPQ+gHzCL7NYkWhk5Z7OvbUmcJ+/v4O6NwI4hA4Ei0XLceVYnAhGK/Vr6Zd8nTnyAw==", + "hasInstallScript": true, + "dependencies": { + "@types/integer": "latest", + "bindings": "^1.5.0", + "prebuild-install": "^6.0.1", + "tar": "^6.1.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1052,6 +1064,11 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.1.tgz", "integrity": "sha512-e+2rjEwK6KDaNOm5Aa9wNGgyS9oSZU/4pfSMMPYNOfjvFI0WVXm29+ITRFr6aKDvvKo7uU1jV68MW4ScsfDi7Q==" }, + "node_modules/@types/integer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/integer/-/integer-4.0.1.tgz", + "integrity": "sha512-QQojPymFcV1hrvWXA1h0pP9RmFBFNuWikZcUEjjVsS19IyKO+jqOX24lp2ZHF4A21EmkosJhJDX7CLG67F2s7A==" + }, "node_modules/@types/jquery": { "version": "3.5.6", "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.6.tgz", @@ -1281,11 +1298,6 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.2.tgz", "integrity": "sha512-dvYb318tk9uOzHtSaT3WII/HscQSIRzoCZ5GyxEb3JlkEXASpAUAQwKnvSe2CudnF8XHFRTB7VITWSnWNLZUtA==" }, - "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/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -1319,17 +1331,6 @@ "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", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1624,106 +1625,10 @@ "node": ">= 0.8" } }, - "node_modules/bcrypt": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.1.tgz", - "integrity": "sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==", - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^3.1.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/bcrypt/node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz", - "integrity": "sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==", - "dependencies": { - "detect-libc": "^1.0.3", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.1", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "rimraf": "^3.0.2", - "semver": "^7.3.4", - "tar": "^6.1.0" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/bcrypt/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/bcrypt/node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bcrypt/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/bcrypt/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/bcrypt/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/better-sqlite3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.3.tgz", - "integrity": "sha512-07bKjClZg/f4KMVRkzWtoIvazVPcF1gsvVKVIXlxwleC2DxuIhnra3KCMlUT1rFeRYXXckot2a46UciF2d9KLw==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.5.0", - "prebuild-install": "^6.0.1", - "tar": "^6.1.0" - } + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" }, "node_modules/big.js": { "version": "5.2.2", @@ -3640,18 +3545,6 @@ "node": ">=4.0.0" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -4294,28 +4187,6 @@ "sourcemap-codec": "^1.4.4" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/map-obj": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", @@ -4667,19 +4538,6 @@ "semver": "^5.4.1" } }, - "node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" - }, - "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", - "engines": { - "node": "4.x || >=6.0.0" - } - }, "node_modules/node-releases": { "version": "1.1.73", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", @@ -5766,9 +5624,9 @@ } }, "node_modules/redbean-node": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/redbean-node/-/redbean-node-0.1.1.tgz", - "integrity": "sha512-WKwJrJOR5T3RwvBWrcN3u7O3TLqGRq2IFZAvlC2Sdx8DGjxUtvC2uc83+9TxeSHBOR0eX6NvikVJIsevEcNpMA==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/redbean-node/-/redbean-node-0.1.2.tgz", + "integrity": "sha512-DcAeu0hXSkpp942pVidU4heMvWeZU970j+lbC/SF7H0fLLeLRfN9SRMzo9VnCJyhe5rcC4kaR7xP4KoJm7KBdQ==", "dependencies": { "@types/node": "^14.17.7", "await-lock": "^2.1.0", @@ -5776,14 +5634,6 @@ "glob": "^7.1.7", "knex": "^0.95.9", "lodash": "^4.17.21" - }, - "peerDependencies": { - "better-sqlite3": "^7.4.3" - }, - "peerDependenciesMeta": { - "better-sqlite3": { - "optional": true - } } }, "node_modules/redbean-node/node_modules/@types/node": { @@ -8195,6 +8045,17 @@ "@intlify/shared": "9.1.7" } }, + "@louislam/better-sqlite3-with-prebuilds": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@louislam/better-sqlite3-with-prebuilds/-/better-sqlite3-with-prebuilds-7.4.3.tgz", + "integrity": "sha512-v9FFkq47dOtrWBuChce4jPQ+gHzCL7NYkWhk5Z7OvbUmcJ+/v4O6NwI4hA4Ei0XLceVYnAhGK/Vr6Zd8nTnyAw==", + "requires": { + "@types/integer": "latest", + "bindings": "^1.5.0", + "prebuild-install": "^6.0.1", + "tar": "^6.1.0" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -8348,6 +8209,11 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.1.tgz", "integrity": "sha512-e+2rjEwK6KDaNOm5Aa9wNGgyS9oSZU/4pfSMMPYNOfjvFI0WVXm29+ITRFr6aKDvvKo7uU1jV68MW4ScsfDi7Q==" }, + "@types/integer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/integer/-/integer-4.0.1.tgz", + "integrity": "sha512-QQojPymFcV1hrvWXA1h0pP9RmFBFNuWikZcUEjjVsS19IyKO+jqOX24lp2ZHF4A21EmkosJhJDX7CLG67F2s7A==" + }, "@types/jquery": { "version": "3.5.6", "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.6.tgz", @@ -8566,11 +8432,6 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.2.tgz", "integrity": "sha512-dvYb318tk9uOzHtSaT3WII/HscQSIRzoCZ5GyxEb3JlkEXASpAUAQwKnvSe2CudnF8XHFRTB7VITWSnWNLZUtA==" }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -8593,14 +8454,6 @@ "dev": true, "requires": {} }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { - "debug": "4" - } - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -8821,79 +8674,10 @@ "safe-buffer": "5.1.2" } }, - "bcrypt": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.1.tgz", - "integrity": "sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==", - "requires": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^3.1.0" - }, - "dependencies": { - "@mapbox/node-pre-gyp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz", - "integrity": "sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==", - "requires": { - "detect-libc": "^1.0.3", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.1", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "rimraf": "^3.0.2", - "semver": "^7.3.4", - "tar": "^6.1.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "requires": { - "abbrev": "1" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } - }, - "better-sqlite3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.3.tgz", - "integrity": "sha512-07bKjClZg/f4KMVRkzWtoIvazVPcF1gsvVKVIXlxwleC2DxuIhnra3KCMlUT1rFeRYXXckot2a46UciF2d9KLw==", - "requires": { - "bindings": "^1.5.0", - "prebuild-install": "^6.0.1", - "tar": "^6.1.0" - } + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" }, "big.js": { "version": "5.2.2", @@ -10385,15 +10169,6 @@ "debug": "^4.3.1" } }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -10874,21 +10649,6 @@ "sourcemap-codec": "^1.4.4" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "map-obj": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", @@ -11144,16 +10904,6 @@ "semver": "^5.4.1" } }, - "node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" - }, - "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" - }, "node-releases": { "version": "1.1.73", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", @@ -11975,9 +11725,9 @@ } }, "redbean-node": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/redbean-node/-/redbean-node-0.1.1.tgz", - "integrity": "sha512-WKwJrJOR5T3RwvBWrcN3u7O3TLqGRq2IFZAvlC2Sdx8DGjxUtvC2uc83+9TxeSHBOR0eX6NvikVJIsevEcNpMA==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/redbean-node/-/redbean-node-0.1.2.tgz", + "integrity": "sha512-DcAeu0hXSkpp942pVidU4heMvWeZU970j+lbC/SF7H0fLLeLRfN9SRMzo9VnCJyhe5rcC4kaR7xP4KoJm7KBdQ==", "requires": { "@types/node": "^14.17.7", "await-lock": "^2.1.0", diff --git a/package.json b/package.json index 2d20c409..de167ecc 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "build-docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.3.2 --target release . --push", "build-docker-nightly": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", "build-docker-nightly-amd64": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", - "setup": "git checkout 1.3.2 && npm install && npm run build", + "setup": "git checkout 1.3.2 && npm install && npm run build && npm prune", "update-version": "node extra/update-version.js", "mark-as-nightly": "node extra/mark-as-nightly.js", "reset-password": "node extra/reset-password.js", @@ -39,11 +39,11 @@ "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/vue-fontawesome": "^3.0.0-4", + "@louislam/better-sqlite3-with-prebuilds": "^7.4.3", "@popperjs/core": "^2.9.3", "args-parser": "^1.3.0", "axios": "^0.21.1", - "bcrypt": "^5.0.1", - "better-sqlite3": "^7.4.3", + "bcryptjs": "^2.4.3", "bootstrap": "^5.1.0", "chart.js": "^3.5.0", "chartjs-adapter-dayjs": "^1.0.0", @@ -59,7 +59,7 @@ "password-hash": "^1.2.2", "prom-client": "^13.2.0", "prometheus-api-metrics": "^3.2.0", - "redbean-node": "0.1.1", + "redbean-node": "0.1.2", "socket.io": "^4.1.3", "socket.io-client": "^4.1.3", "tcp-ping": "^0.1.1", diff --git a/server/password-hash.js b/server/password-hash.js index 52e26b95..91e5e1ad 100644 --- a/server/password-hash.js +++ b/server/password-hash.js @@ -1,5 +1,5 @@ const passwordHashOld = require("password-hash"); -const bcrypt = require("bcrypt"); +const bcrypt = require("bcryptjs"); const saltRounds = 10; exports.generate = function (password) {