From e8cf82cfaec26bcea00945209414a58f2f497477 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sat, 4 Nov 2023 22:17:18 +0000 Subject: [PATCH 001/110] validate node version before ui install/update --- .../node-update-required-modal.component.html | 23 +++++++++++++++---- ui/src/i18n/bg.json | 1 + ui/src/i18n/ca.json | 1 + ui/src/i18n/cs.json | 1 + ui/src/i18n/de.json | 1 + ui/src/i18n/en.json | 1 + ui/src/i18n/es.json | 1 + ui/src/i18n/fr.json | 1 + ui/src/i18n/he.json | 1 + ui/src/i18n/hu.json | 1 + ui/src/i18n/id.json | 1 + ui/src/i18n/it.json | 1 + ui/src/i18n/ja.json | 1 + ui/src/i18n/ko.json | 1 + ui/src/i18n/mk.json | 1 + ui/src/i18n/nl.json | 1 + ui/src/i18n/no.json | 1 + ui/src/i18n/pl.json | 1 + ui/src/i18n/pt-BR.json | 1 + ui/src/i18n/pt.json | 1 + ui/src/i18n/ru.json | 1 + ui/src/i18n/sl.json | 1 + ui/src/i18n/sv.json | 1 + ui/src/i18n/th.json | 3 ++- ui/src/i18n/tr.json | 1 + ui/src/i18n/uk.json | 1 + ui/src/i18n/zh-CN.json | 5 ++-- ui/src/i18n/zh-TW.json | 1 + 28 files changed, 49 insertions(+), 7 deletions(-) diff --git a/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.html b/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.html index f44f7f7fc..6a380b257 100644 --- a/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.html +++ b/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.html @@ -9,7 +9,7 @@ \ No newline at end of file + diff --git a/ui/src/i18n/bg.json b/ui/src/i18n/bg.json index b1c984acd..70f10182b 100644 --- a/ui/src/i18n/bg.json +++ b/ui/src/i18n/bg.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "The {{ pluginName }} plugin recommends running on Node.js v{{ minVersion }} or later. You are currently running Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Version", "plugins.node_update.update_anyway": "Update Anyway", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge.", "plugins.placeholder_search_plugin": "Търсете добавки, които да инсталирате…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Account Linked", diff --git a/ui/src/i18n/ca.json b/ui/src/i18n/ca.json index 06629da5c..593b70a35 100644 --- a/ui/src/i18n/ca.json +++ b/ui/src/i18n/ca.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "El plugin {{pluginName}} recomana executar-se en Node.js v{{ minVersion }} o superior. Actualment estàs executant Node.js v{{installedVersion}}.", "plugins.node_update.title": "Versió de Node.js", "plugins.node_update.update_anyway": "Actualitzar de totes maneres", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Si us plau actualitza Node.js abans d'actualitzar Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Si us plau actualitza Node.js abans d'actualitzar Homebridge.", "plugins.placeholder_search_plugin": "Cercar plugins per instal·lar…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Compte vinculada", diff --git a/ui/src/i18n/cs.json b/ui/src/i18n/cs.json index 7889eb041..a1b706586 100644 --- a/ui/src/i18n/cs.json +++ b/ui/src/i18n/cs.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Plugin {{ pluginName }} vyžaduje pro běh Node.js ve verzi {{ minVersion }} nebo vyšší. Vaše aktuálně běžící verze Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js verze", "plugins.node_update.update_anyway": "Přesto aktualizovat", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Před aktualizací Homebridge UI aktualizujte Node.js.", "plugins.node_update_homebridge_upgrade_and_try_again": "Před aktualizací Homebridge aktualizujte Node.js.", "plugins.placeholder_search_plugin": "Vyhledejte pluginy k instalaci…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Účet propojen", diff --git a/ui/src/i18n/de.json b/ui/src/i18n/de.json index f49c961ab..31abc368a 100644 --- a/ui/src/i18n/de.json +++ b/ui/src/i18n/de.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Das {{ pluginName }}-Plugin empfiehlt Node.js v{{ minVersion }} oder neuer. Du nutzt derzeit Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Version", "plugins.node_update.update_anyway": "Dennoch updaten", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Bitte update Node.js, bevor du Homebridge UI updatest.", "plugins.node_update_homebridge_upgrade_and_try_again": "Bitte update Node.js, bevor du Homebridge updatest.", "plugins.placeholder_search_plugin": "Suche nach installierbaren Plugins …", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Konto verbunden", diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json index 41f6f3fa9..f30416521 100644 --- a/ui/src/i18n/en.json +++ b/ui/src/i18n/en.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "The {{ pluginName }} plugin recommends running on Node.js v{{ minVersion }} or later. You are currently running Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Version", "plugins.node_update.update_anyway": "Update Anyway", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge.", "plugins.placeholder_search_plugin": "Search for plugins to install…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Account Linked", diff --git a/ui/src/i18n/es.json b/ui/src/i18n/es.json index 3f7d1872b..9f1116cd1 100644 --- a/ui/src/i18n/es.json +++ b/ui/src/i18n/es.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "El plugin {{ pluginName }} recomienda ejecutarse en Node.js v{{ minVersion }} o superior. Actualmente estás ejecutando Node.js {{ installedVersion }}.", "plugins.node_update.title": "Versión de Node.js", "plugins.node_update.update_anyway": "No Importa, Actualizar", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Por favor actualiza Node.js antes de actualizar Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Por favor actualiza Node.js antes de actualizar Homebridge.", "plugins.placeholder_search_plugin": "Buscar plugins para instalar…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Cuenta Vinculada", diff --git a/ui/src/i18n/fr.json b/ui/src/i18n/fr.json index ebdf43990..929f24fdc 100644 --- a/ui/src/i18n/fr.json +++ b/ui/src/i18n/fr.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Le plugin {{ pluginName }} recommande l'utilisation de Node.js v{{ minVersion }} ou ultérieur. La version actuellement installée est Node.js {{ installedVersion }}.", "plugins.node_update.title": "Version de Node.js", "plugins.node_update.update_anyway": "Forcer la mise à jour", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Mettez à niveau Node.js avant de mettre à jour Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Mettez à niveau Node.js avant de mettre à jour Homebridge.", "plugins.placeholder_search_plugin": "Rechercher des plugins à installer…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Compte associé", diff --git a/ui/src/i18n/he.json b/ui/src/i18n/he.json index ed767ca34..773416f5f 100644 --- a/ui/src/i18n/he.json +++ b/ui/src/i18n/he.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "The {{ pluginName }} plugin recommends running on Node.js v{{ minVersion }} or later. You are currently running Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js גרסאת", "plugins.node_update.update_anyway": "עדכן בכל זאת", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "אנא עדכן את גרסאת הNode.js לפני שדרוג ההומברידג'", "plugins.placeholder_search_plugin": "חפש תוספים להתקנה…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "חשבון קושר", diff --git a/ui/src/i18n/hu.json b/ui/src/i18n/hu.json index 27783cffe..87e9c8e39 100644 --- a/ui/src/i18n/hu.json +++ b/ui/src/i18n/hu.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "The {{ pluginName }} plugin recommends running on Node.js v{{ minVersion }} or later. You are currently running Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Version", "plugins.node_update.update_anyway": "Update Anyway", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge.", "plugins.placeholder_search_plugin": "Pluginek keresése…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Account Linked", diff --git a/ui/src/i18n/id.json b/ui/src/i18n/id.json index 740ab12f5..cf70b47aa 100644 --- a/ui/src/i18n/id.json +++ b/ui/src/i18n/id.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Plugin {{ pluginName }} merekomendasikan Node.js v{{ minVersion }} atau lebih baru. Saat ini anda menjalankan Node.js {{ installedVersion }}.", "plugins.node_update.title": "Versi Node.js", "plugins.node_update.update_anyway": "Tetap Perbarui", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Harap tingkatkan Node.js sebelum memperbaharui Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Harap tingkatkan Node.js sebelum memperbaharui Homebridge.", "plugins.placeholder_search_plugin": "Cari plugin untuk dipasang…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Akun Terhubung", diff --git a/ui/src/i18n/it.json b/ui/src/i18n/it.json index b7af63e1e..499e2a387 100644 --- a/ui/src/i18n/it.json +++ b/ui/src/i18n/it.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Il plugin {{ pluginName }} raccomanda l'esecuzione su Node.js v{{ minVersion }} o successivo. Stai attualmente eseguendo Node.js {{ installedVersion }}.", "plugins.node_update.title": "Versione di Node.js", "plugins.node_update.update_anyway": "Aggiorna comunque", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Per piacere aggiornare Node.js prima di aggiornare Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Per piacere aggiornare Node.js prima di aggiornare Homebridge.", "plugins.placeholder_search_plugin": "Cerca plugin da installare…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Account collegato", diff --git a/ui/src/i18n/ja.json b/ui/src/i18n/ja.json index 2b8307abc..a17af2bdd 100644 --- a/ui/src/i18n/ja.json +++ b/ui/src/i18n/ja.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "プラグイン {{ pluginName }} Node.js v{{ minVersion }} 以降での稼働を推奨しています。現在、Node.js {{ installedVersion }} を実行しています。", "plugins.node_update.title": "Node.js バージョン", "plugins.node_update.update_anyway": "強制的に更新", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Homebridge UIを更新する前にNode.jsを更新してください。", "plugins.node_update_homebridge_upgrade_and_try_again": "Homebridgeを更新する前にNode.jsを更新してください。", "plugins.placeholder_search_plugin": "インストールするプラグインを検索…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "アカウント連携済み", diff --git a/ui/src/i18n/ko.json b/ui/src/i18n/ko.json index 53db6bdf1..f553fac8a 100644 --- a/ui/src/i18n/ko.json +++ b/ui/src/i18n/ko.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} 플러그인은 Node.js v{{ minVersion }} 이상 버전에서 실행이 권장됩니다. 현재 실행 중인 Node.js 버전은 {{ installedVersion }} 입니다.", "plugins.node_update.title": "Node.js 버전", "plugins.node_update.update_anyway": "무시하고 업데이트", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Homebridge UI를 업데이트하기 전에 Node.js를 업그레이드 해주세요.", "plugins.node_update_homebridge_upgrade_and_try_again": "Homebridge를 업데이트하기 전에 Node.js를 업그레이드 해주세요.", "plugins.placeholder_search_plugin": "설치할 플러그인 검색…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "계정 연결됨", diff --git a/ui/src/i18n/mk.json b/ui/src/i18n/mk.json index 9ac7a51f0..e97f53b9c 100644 --- a/ui/src/i18n/mk.json +++ b/ui/src/i18n/mk.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Плагинот {{ pluginName }} препорачува да се извршува на Node.js v{{ minVersion }} или понов. Моментално имате Node.js {{ installedVersion }}.", "plugins.node_update.title": "Верзија на Node.js", "plugins.node_update.update_anyway": "Сепак ажурирај", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Ве молиме аурирајте го Node.js пред да го ажурирате Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Ве молиме аурирајте го Node.js пред да го ажурирате Homebridge.", "plugins.placeholder_search_plugin": "Барајте плагини достапни за инсталација…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Поврзана корисничка сметка", diff --git a/ui/src/i18n/nl.json b/ui/src/i18n/nl.json index 6ffd224ed..1b486db4e 100644 --- a/ui/src/i18n/nl.json +++ b/ui/src/i18n/nl.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "De {{ pluginName }} plugin adviseert het gebruik van Node.js v{{ minVersion }} of nieuwer. Je draait momenteel Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Versie", "plugins.node_update.update_anyway": "Update Alsnog", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Update Node.js voordat je Homebridge UI update.", "plugins.node_update_homebridge_upgrade_and_try_again": "Update Node.js voordat je Homebridge update.", "plugins.placeholder_search_plugin": "Zoeken naar plug-ins om te installeren…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Account Gekoppeld", diff --git a/ui/src/i18n/no.json b/ui/src/i18n/no.json index 17daf48e6..bcfe933a3 100644 --- a/ui/src/i18n/no.json +++ b/ui/src/i18n/no.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "The {{ pluginName }} plugin recommends running on Node.js v{{ minVersion }} or later. You are currently running Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Version", "plugins.node_update.update_anyway": "Update Anyway", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Please upgrade Node.js before updating Homebridge.", "plugins.placeholder_search_plugin": "Søk etter plugins å installere…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Konto tilknyttet", diff --git a/ui/src/i18n/pl.json b/ui/src/i18n/pl.json index 0449c8810..80ca47411 100644 --- a/ui/src/i18n/pl.json +++ b/ui/src/i18n/pl.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Wtyczka {{ pluginName }} powinna być instalowana używając Node.js w wersji {{ minVersion }} lub nowszej. Aktualnie używasz Node.js w wersji {{ installedVersion }}.", "plugins.node_update.title": "Wersja Node.js", "plugins.node_update.update_anyway": "Zaktualizuj mimo to", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Zaktualizuj Node.js przed aktualizacją Homebridge UI i spróbuj ponownie.", "plugins.node_update_homebridge_upgrade_and_try_again": "Zaktualizuj Node.js przed aktualizacją Homebridge i spróbuj ponownie.", "plugins.placeholder_search_plugin": "Wyszukaj dostępne wtyczki…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Konto podłączone", diff --git a/ui/src/i18n/pt-BR.json b/ui/src/i18n/pt-BR.json index 7abadb40e..65a389131 100644 --- a/ui/src/i18n/pt-BR.json +++ b/ui/src/i18n/pt-BR.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "É recomendado executar o plugin {{ pluginName }} na versão do Node.js v{{ minVersion }} ou posterior. Você está utilizando o Node.js {{ installedVersion }}.", "plugins.node_update.title": "Versão do Node.js", "plugins.node_update.update_anyway": "Forçar Atualização", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Por favor atualize o Node.js antes de atualizar o Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Por favor atualize o Node.js antes de atualizar o Homebridge.", "plugins.placeholder_search_plugin": "Procurar plugins para instalação…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Conta Vinculada", diff --git a/ui/src/i18n/pt.json b/ui/src/i18n/pt.json index 841bdb5e6..afbce3e74 100644 --- a/ui/src/i18n/pt.json +++ b/ui/src/i18n/pt.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "É recomendado executar o plugin {{ pluginName }} na versão do Node.js v{{ minVersion }} ou posterior. Neste momento encontra-se na versão Node.js {{ installedVersion }}.", "plugins.node_update.title": "Versão Node.js", "plugins.node_update.update_anyway": "Forçar Atualização", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Por favor atualize o Node.js antes de atualizar o Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Por favor atualize o Node.js antes de atualizar o Homebridge.", "plugins.placeholder_search_plugin": "Procurar plugins para instalação…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Conta Vinculada", diff --git a/ui/src/i18n/ru.json b/ui/src/i18n/ru.json index ac0c075c7..5e53fefe6 100644 --- a/ui/src/i18n/ru.json +++ b/ui/src/i18n/ru.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Плагин {{ pluginName }} рекомендуется запускать используя Node.js v{{ minVersion }} или новее. В настоящее время Вы используете Node.js {{ installedVersion }}.", "plugins.node_update.title": "Версия Node.js", "plugins.node_update.update_anyway": "Обновить в любом случае", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Пожалуйста, обновите Node.js перед обновлением Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Пожалуйста, обновите Node.js перед обновлением Homebridge.", "plugins.placeholder_search_plugin": "Поиск плагинов для установки…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Аккаунт привязан", diff --git a/ui/src/i18n/sl.json b/ui/src/i18n/sl.json index 716c5d396..89345ab4d 100644 --- a/ui/src/i18n/sl.json +++ b/ui/src/i18n/sl.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} vtičnik zahteva Node.js v{{ minVersion }} ali novejši. Trenutno se izvaja Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Verzija", "plugins.node_update.update_anyway": "Posodobite vseeno", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Pred posodobitvijo Homebridga UI nadgradite Node.js.", "plugins.node_update_homebridge_upgrade_and_try_again": "Pred posodobitvijo Homebridga nadgradite Node.js.", "plugins.placeholder_search_plugin": "Poiščite vtičnike za namestitev …", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Račun povezan", diff --git a/ui/src/i18n/sv.json b/ui/src/i18n/sv.json index 989ffdbcf..cad7a33a2 100644 --- a/ui/src/i18n/sv.json +++ b/ui/src/i18n/sv.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} plugin rekomenderas att köras med Node.js v{{ minVersion }} eller senare. Du kör just nu Node.js {{ installedVersion }}.", "plugins.node_update.title": "Node.js Version", "plugins.node_update.update_anyway": "Uppdatera ändå", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Uppgradera Node.js innan du uppdaterar Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Uppgradera Node.js innan du uppdaterar Homebridge.", "plugins.placeholder_search_plugin": "Sök efter plugins att installera…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Konto länkad", diff --git a/ui/src/i18n/th.json b/ui/src/i18n/th.json index 1b5a23415..7b7de6249 100644 --- a/ui/src/i18n/th.json +++ b/ui/src/i18n/th.json @@ -200,7 +200,8 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} ปลั๊กอินแนะนำให้ทำงานบน Node.js รุ่น{{ minVersion }} หรือใหม่กว่า. โดยที่คุณกำลังใช้ Node.js {{ installedVersion }}.", "plugins.node_update.title": "รุ่นของ Node.js", "plugins.node_update.update_anyway": "อัปเดตต่อไป", - "plugins.node_update_homebridge_upgrade_and_try_again": "โปรดอัปเกรด Node.js ก่อนอัปเดต Homebridge", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "โปรดอัปเกรด Node.js ก่อนอัปเดต Homebridge UI.", + "plugins.node_update_homebridge_upgrade_and_try_again": "โปรดอัปเกรด Node.js ก่อนอัปเดต Homebridge.", "plugins.placeholder_search_plugin": "ค้นหาปลั๊กอินที่จะติดตั้ง…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "เชื่อมโยงบัญชีแล้ว", "plugins.settings.custom.homebridge-gsh.label_link_account": "เชื่อมโยงบัญชี", diff --git a/ui/src/i18n/tr.json b/ui/src/i18n/tr.json index 8b1387f30..01b4460d0 100644 --- a/ui/src/i18n/tr.json +++ b/ui/src/i18n/tr.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} eklentisi Node.js v{{ minVersion }} veya daha üst sürümünü çalıştırmanızı tavsiye ediyor. Mevutta Node.js v{{ installedVersion }} çalıştırıyorsunuz.", "plugins.node_update.title": "Node.js Sürümü", "plugins.node_update.update_anyway": "Yine de Güncelle", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Lütfen Homebridge UI'i güncellemeden önce Node.js sürümünü yükseltin.", "plugins.node_update_homebridge_upgrade_and_try_again": "Lütfen Homebridge'i güncellemeden önce Node.js sürümünü yükseltin.", "plugins.placeholder_search_plugin": "Yüklemek için eklentiler arayın…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Hesap Bağlandı", diff --git a/ui/src/i18n/uk.json b/ui/src/i18n/uk.json index 0d8f74313..5412c174b 100644 --- a/ui/src/i18n/uk.json +++ b/ui/src/i18n/uk.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "Плагін {{ pluginName }} рекомендовано запускати використовуючи Node.js v{{ minVersion }} або новіше. На даний час Ви використовуєте Node.js {{ installedVersion }}.", "plugins.node_update.title": "Версія Node.js", "plugins.node_update.update_anyway": "Оновити в будь-якому випадку", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Будь ласка, оновіть Node.js перед оновленням Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Будь ласка, оновіть Node.js перед оновленням Homebridge.", "plugins.placeholder_search_plugin": "Пошук плагінів для встановлення…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "Аккаунт прив'язаний", diff --git a/ui/src/i18n/zh-CN.json b/ui/src/i18n/zh-CN.json index 41642dbc3..d7d26b657 100644 --- a/ui/src/i18n/zh-CN.json +++ b/ui/src/i18n/zh-CN.json @@ -200,12 +200,13 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} 插件推荐使用 Node.js {{ minVersion }} 或者更新版本。 您现在的 Node.js 版本是 {{ installedVersion }}。", "plugins.node_update.title": "Node.js 版本", "plugins.node_update.update_anyway": "继续升级", - "plugins.node_update_homebridge_upgrade_and_try_again": "请在升级 Homebridge 前先升级 Node.js", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "请在升级 Homebridge UI 前先升级 Node.js。", + "plugins.node_update_homebridge_upgrade_and_try_again": "请在升级 Homebridge 前先升级 Node.js。", "plugins.placeholder_search_plugin": "搜索插件…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "已绑定", "plugins.settings.custom.homebridge-gsh.label_link_account": "绑定账号", "plugins.settings.custom.homebridge-gsh.label_unlink_account": "解绑账号", - "plugins.settings.custom.homebridge-gsh.message_about": "Homebridge 谷歌智能家庭 插件将允许您通过支持谷歌家庭的智能音箱或者手机上的谷歌家庭软件上操作 Homebridge ", + "plugins.settings.custom.homebridge-gsh.message_about": "Homebridge 谷歌智能家庭 插件将允许您通过支持谷歌家庭的智能音箱或者手机上的谷歌家庭软件上操作 Homebridge。", "plugins.settings.custom.homebridge-gsh.message_account_link_required": "若要使用该功能您需要使用您的谷歌账号或者 GitHub 账号登陆; 请确保您在设备间登陆的为同一账号。", "plugins.settings.custom.homebridge-gsh.message_homebridge_restart_required": "Homebridge 需要重启以生效", "plugins.settings.label_open_config_editor": "打开配置编辑器", diff --git a/ui/src/i18n/zh-TW.json b/ui/src/i18n/zh-TW.json index cd7d68a13..282931828 100644 --- a/ui/src/i18n/zh-TW.json +++ b/ui/src/i18n/zh-TW.json @@ -200,6 +200,7 @@ "plugins.node_update.node_version_too_low": "{{ pluginName }} Plugin 建議以 Node.js v{{ minVersion }} 或更新版本執行。目前所使用的 Node.js 版本為 {{ installedVersion }}。", "plugins.node_update.title": "Node.js 版本", "plugins.node_update.update_anyway": "依舊更新", + "plugins.node_update_homebridge_ui_upgrade_and_try_again": "於更新 Homebridge UI 前、請先更新 Node.js。", "plugins.node_update_homebridge_upgrade_and_try_again": "於更新 Homebridge 前、請先更新 Node.js。", "plugins.placeholder_search_plugin": "搜尋 Plugin 並且安裝…", "plugins.settings.custom.homebridge-gsh.label_account_linked": "帳號已連結", From 9f21c7c9f53b4e75c06b87e614b9f022bfc43321 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sat, 4 Nov 2023 22:43:11 +0000 Subject: [PATCH 002/110] update deps --- package-lock.json | 68 +++++++++++++++++++++++------------------------ package.json | 14 +++++----- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea17967f4..8c7acd98b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,14 +25,14 @@ "@fastify/swagger": "8.12.0", "@homebridge/node-pty-prebuilt-multiarch": "0.11.8", "@nestjs/axios": "3.0.1", - "@nestjs/common": "10.2.7", - "@nestjs/core": "10.2.7", + "@nestjs/common": "10.2.8", + "@nestjs/core": "10.2.8", "@nestjs/jwt": "10.1.1", "@nestjs/passport": "10.0.2", - "@nestjs/platform-fastify": "10.2.7", - "@nestjs/platform-socket.io": "10.2.7", + "@nestjs/platform-fastify": "10.2.8", + "@nestjs/platform-socket.io": "10.2.8", "@nestjs/swagger": "7.1.14", - "@nestjs/websockets": "10.2.7", + "@nestjs/websockets": "10.2.8", "@oznu/hap-client": "1.9.0", "axios": "1.6.0", "class-transformer": "0.5.1", @@ -40,7 +40,7 @@ "commander": "7.2.0", "dayjs": "1.11.10", "emoji-js": "3.7.0", - "fastify": "4.23.2", + "fastify": "4.24.3", "fs-extra": "10.1.0", "node-cache": "5.1.2", "node-schedule": "2.1.1", @@ -1874,9 +1874,9 @@ } }, "node_modules/@nestjs/common": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.2.7.tgz", - "integrity": "sha512-cUtCRXiUstDmh4bSBhVbq4cI439Gngp4LgLGLBmd5dqFQodfXKnSD441ldYfFiLz4rbUsnoMJz/8ZjuIEI+B7A==", + "version": "10.2.8", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.2.8.tgz", + "integrity": "sha512-rmpwcdvq2IWMmsUVP8rsdKub6uDWk7dwCYo0aif50JTwcvcxzaP3iKVFKoSgvp0RKYu8h15+/AEOfaInmPpl0Q==", "dependencies": { "iterare": "1.2.1", "tslib": "2.6.2", @@ -1902,9 +1902,9 @@ } }, "node_modules/@nestjs/core": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.2.7.tgz", - "integrity": "sha512-5GSu53QUUcwX17sNmlJPa1I0wIeAZOKbedyVuQx0ZAwWVa9g0wJBbsNP+R4EJ+j5Dkdzt/8xkiZvnKt8RFRR8g==", + "version": "10.2.8", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.2.8.tgz", + "integrity": "sha512-9+MZ2s8ixfY9Bl/M9ofChiyYymcwdK9ZWNH4GDMF7Am7XRAQ1oqde6MYGG05rhQwiVXuTwaYLlXciJKfsrg5qg==", "hasInstallScript": true, "dependencies": { "@nuxtjs/opencollective": "0.3.2", @@ -1979,14 +1979,14 @@ } }, "node_modules/@nestjs/platform-fastify": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-10.2.7.tgz", - "integrity": "sha512-m/OADHxB7yY6TyADLmXJ3BCadG110g/O0nLj2LQDNRiNLiYrgpV3D/cGOcMqlQOG30GZ7BKl8Cq8CsKVtMhzZA==", + "version": "10.2.8", + "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-10.2.8.tgz", + "integrity": "sha512-ZeqIHeGLD7YgJ22K9AkyjcFv/yH/LH+HmujukBq/yDLFlJuurKCgbDPfL0PHq0RRMZu5CeB0dhs8+qihw96yjA==", "dependencies": { "@fastify/cors": "8.4.0", "@fastify/formbody": "7.4.0", "@fastify/middie": "8.3.0", - "fastify": "4.23.2", + "fastify": "4.24.3", "light-my-request": "5.11.0", "path-to-regexp": "3.2.0", "tslib": "2.6.2" @@ -2011,9 +2011,9 @@ } }, "node_modules/@nestjs/platform-socket.io": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.2.7.tgz", - "integrity": "sha512-P+xDyjz6FwST01elqZDFTxo250ALozGTnx01yvc5t30F6kJFIqeziuHzdrqTLfsEWpZLrjNIs4pi0UpAovawmw==", + "version": "10.2.8", + "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.2.8.tgz", + "integrity": "sha512-P/Olw9alAaKD7Q1vS/ol7K81x1l7Bmi+AXthBNUPGMmG/W8kxO1krerW4rEhtF3BKJ0qJIa5bhDlb80p4lZcNA==", "dependencies": { "socket.io": "4.7.2", "tslib": "2.6.2" @@ -2087,9 +2087,9 @@ } }, "node_modules/@nestjs/websockets": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.2.7.tgz", - "integrity": "sha512-NKJMubkwpUBsudbiyjuLZDT/W68K+fS/pe3vG5Ur8QoPn+fkI9SFCiQw27Cv4K0qVX2eGJ41yNmVfu61zGa4CQ==", + "version": "10.2.8", + "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.2.8.tgz", + "integrity": "sha512-oZN1VJFApN7d2eftr65a36QrV0IJNGba4znqyjFnyGvtDWTDcQwzDcnEfvJBTTYhOSBNS7KDfVhne0ythkl6tg==", "dependencies": { "iterare": "1.2.1", "object-hash": "3.0.0", @@ -5644,26 +5644,26 @@ } }, "node_modules/fastify": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.23.2.tgz", - "integrity": "sha512-WFSxsHES115svC7NrerNqZwwM0UOxbC/P6toT9LRHgAAFvG7o2AN5W+H4ihCtOGuYXjZf4z+2jXC89rVEoPWOA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.24.3.tgz", + "integrity": "sha512-6HHJ+R2x2LS3y1PqxnwEIjOTZxFl+8h4kSC/TuDPXtA+v2JnV9yEtOsNSKK1RMD7sIR2y1ZsA4BEFaid/cK5pg==", "dependencies": { "@fastify/ajv-compiler": "^3.5.0", - "@fastify/error": "^3.2.0", + "@fastify/error": "^3.4.0", "@fastify/fast-json-stringify-compiler": "^4.3.0", "abstract-logging": "^2.0.1", "avvio": "^8.2.1", - "fast-content-type-parse": "^1.0.0", - "fast-json-stringify": "^5.7.0", - "find-my-way": "^7.6.0", - "light-my-request": "^5.9.1", - "pino": "^8.12.0", + "fast-content-type-parse": "^1.1.0", + "fast-json-stringify": "^5.8.0", + "find-my-way": "^7.7.0", + "light-my-request": "^5.11.0", + "pino": "^8.16.0", "process-warning": "^2.2.0", "proxy-addr": "^2.0.7", "rfdc": "^1.3.0", - "secure-json-parse": "^2.5.0", - "semver": "^7.5.0", - "toad-cache": "^3.2.0" + "secure-json-parse": "^2.7.0", + "semver": "^7.5.4", + "toad-cache": "^3.3.0" } }, "node_modules/fastify-plugin": { diff --git a/package.json b/package.json index f9ef9ce07..e99adf0fb 100644 --- a/package.json +++ b/package.json @@ -58,14 +58,14 @@ "@fastify/swagger": "8.12.0", "@homebridge/node-pty-prebuilt-multiarch": "0.11.8", "@nestjs/axios": "3.0.1", - "@nestjs/common": "10.2.7", - "@nestjs/core": "10.2.7", + "@nestjs/common": "10.2.8", + "@nestjs/core": "10.2.8", "@nestjs/jwt": "10.1.1", "@nestjs/passport": "10.0.2", - "@nestjs/platform-fastify": "10.2.7", - "@nestjs/platform-socket.io": "10.2.7", + "@nestjs/platform-fastify": "10.2.8", + "@nestjs/platform-socket.io": "10.2.8", "@nestjs/swagger": "7.1.14", - "@nestjs/websockets": "10.2.7", + "@nestjs/websockets": "10.2.8", "@oznu/hap-client": "1.9.0", "axios": "1.6.0", "class-transformer": "0.5.1", @@ -73,7 +73,7 @@ "commander": "7.2.0", "dayjs": "1.11.10", "emoji-js": "3.7.0", - "fastify": "4.23.2", + "fastify": "4.24.3", "fs-extra": "10.1.0", "node-cache": "5.1.2", "node-schedule": "2.1.1", @@ -153,4 +153,4 @@ "smart home", "hb-service" ] -} \ No newline at end of file +} From 82384c4cb7e91ce853531dc46cfe07fdb6b423bb Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sun, 5 Nov 2023 00:23:22 +0000 Subject: [PATCH 003/110] more lint rules --- .eslintrc.js | 26 +- package-lock.json | 471 ++++++++++++++++++ package.json | 8 +- src/app.module.ts | 22 +- src/bin/hb-service.ts | 20 +- src/bin/platforms/darwin.ts | 8 +- src/bin/platforms/freebsd.ts | 8 +- src/bin/platforms/linux.ts | 14 +- src/bin/platforms/win32.ts | 10 +- src/core/auth/auth.controller.ts | 20 +- src/core/auth/auth.dto.ts | 7 +- src/core/auth/auth.module.ts | 8 +- src/core/auth/auth.service.ts | 20 +- src/core/auth/guards/admin.guard.ts | 2 +- src/core/auth/guards/ws-admin-guard.ts | 2 +- src/core/auth/guards/ws.guard.ts | 2 +- src/core/auth/jwt.strategy.ts | 6 +- src/core/config/config.service.ts | 42 +- src/core/config/config.startup.ts | 1 - .../homebridge-ipc/homebridge-ipc.service.ts | 3 +- src/core/node-pty/node-pty.service.ts | 2 +- src/core/spa/spa.filter.ts | 8 +- src/index.ts | 20 +- src/main.ts | 15 +- .../accessories/accessories.controller.ts | 19 +- src/modules/accessories/accessories.dto.ts | 6 +- .../accessories/accessories.gateway.ts | 4 +- src/modules/accessories/accessories.module.ts | 6 +- .../accessories/accessories.service.ts | 5 +- src/modules/backup/backup.controller.ts | 27 +- src/modules/backup/backup.gateway.ts | 7 +- src/modules/backup/backup.module.ts | 9 +- src/modules/backup/backup.service.ts | 31 +- .../child-bridges/child-bridges.gateway.ts | 7 +- .../child-bridges/child-bridges.module.ts | 3 +- .../child-bridges/child-bridges.service.ts | 3 +- .../config-editor/config-editor.controller.ts | 22 +- .../config-editor/config-editor.module.ts | 4 +- .../config-editor/config-editor.service.ts | 8 +- .../homebridge-deconz.controller.ts | 10 +- .../homebridge-deconz.module.ts | 2 +- .../homebridge-deconz.service.ts | 2 +- .../homebridge-hue.controller.ts | 10 +- .../homebridge-hue/homebridge-hue.module.ts | 2 +- .../homebridge-hue/homebridge-hue.service.ts | 2 +- .../plugins-settings-ui.controller.ts | 11 +- .../plugins-settings-ui.gateway.ts | 5 +- .../plugins-settings-ui.module.ts | 3 +- .../plugins-settings-ui.service.ts | 20 +- src/modules/log/log.gateway.ts | 1 - src/modules/log/log.module.ts | 5 +- src/modules/log/log.service.ts | 15 +- .../docker/docker.controller.ts | 11 +- .../platform-tools/docker/docker.module.ts | 2 +- .../platform-tools/docker/docker.service.ts | 3 +- .../hb-service/hb-service.controller.ts | 19 +- .../hb-service/hb-service.dto.ts | 12 +- .../hb-service/hb-service.module.ts | 2 +- .../hb-service/hb-service.service.ts | 4 +- .../platform-tools/linux/linux.controller.ts | 6 +- .../platform-tools/linux/linux.module.ts | 2 +- .../platform-tools/platform-tools.module.ts | 4 +- .../terminal/terminal.gateway.ts | 5 +- .../terminal/terminal.module.ts | 5 +- .../terminal/terminal.service.ts | 11 +- src/modules/plugins/plugins.controller.ts | 16 +- src/modules/plugins/plugins.dto.ts | 37 +- src/modules/plugins/plugins.gateway.ts | 7 +- src/modules/plugins/plugins.module.ts | 9 +- src/modules/plugins/plugins.service.ts | 45 +- src/modules/plugins/types.d.ts | 132 ++--- src/modules/server/server.controller.ts | 23 +- src/modules/server/server.dto.ts | 23 +- src/modules/server/server.module.ts | 9 +- src/modules/server/server.service.ts | 31 +- .../setup-wizard/setup-wizard.controller.ts | 15 +- .../setup-wizard/setup-wizard.gateway.ts | 7 +- .../setup-wizard/setup-wizard.guard.ts | 1 - .../setup-wizard/setup-wizard.module.ts | 5 +- src/modules/status/status.controller.ts | 7 +- src/modules/status/status.gateway.ts | 5 +- src/modules/status/status.module.ts | 11 +- src/modules/status/status.service.ts | 21 +- src/modules/users/users.controller.ts | 29 +- src/modules/users/users.dto.ts | 60 ++- src/modules/users/users.module.ts | 5 +- src/self-check.ts | 64 +-- test/e2e/accessories.e2e-spec.ts | 7 +- test/e2e/app.e2e-spec.ts | 5 +- test/e2e/auth.e2e-spec.ts | 15 +- test/e2e/backup.e2e-spec.ts | 17 +- test/e2e/config-editor.e2e-spec.ts | 9 +- test/e2e/custom-plugins.e2e-spec.ts | 7 +- test/e2e/fastify.e2e-spec.ts | 7 +- test/e2e/log.gateway.e2e-spec.ts | 11 +- test/e2e/platform-tools-docker.e2e-spec.ts | 7 +- .../e2e/platform-tools-hb-service.e2e-spec.ts | 7 +- test/e2e/platform-tools-linux.e2e-spec.ts | 5 +- test/e2e/platform-tools-terminal.e2e-spec.ts | 21 +- test/e2e/plugin-settings-ui.e2e-spec.ts | 7 +- test/e2e/plugins.e2e-spec.ts | 7 +- test/e2e/plugins.gateway.e2e-spec.ts | 11 +- test/e2e/server.e2e-spec.ts | 7 +- test/e2e/setup-wizard.e2e-spec.ts | 5 +- test/e2e/status.e2e-spec.ts | 13 +- test/e2e/users.e2e-spec.ts | 14 +- 106 files changed, 1218 insertions(+), 606 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 98985892f..fac7e65be 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,11 +10,11 @@ module.exports = { 'dist/**/*', '.eslintrc.js' ], - plugins: ['@typescript-eslint/eslint-plugin'], + plugins: ['@typescript-eslint/eslint-plugin', 'import', 'prettier', 'import-newlines', 'sort-exports'], extends: [ - 'plugin:@typescript-eslint/eslint-recommended', + 'airbnb-typescript/base', 'plugin:@typescript-eslint/recommended', - 'prettier' + 'prettier', ], root: true, env: { @@ -22,19 +22,25 @@ module.exports = { jest: true, }, rules: { - 'quotes': ['error', 'single'], 'comma-dangle': ['error', 'only-multiline'], - 'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 0 }], 'eol-last': ['error', 'always'], - 'space-before-function-paren': ['error', { named: 'never' }], - '@typescript-eslint/lines-between-class-members': ['warn', 'always', { exceptAfterOverload: true, exceptAfterSingleLine: true }], - '@typescript-eslint/interface-name-prefix': 'off', + 'import-newlines/enforce': ['error', 3], + 'import/no-extraneous-dependencies': 'off', + 'import/order': ['warn', { alphabetize: { order: 'asc' }, 'newlines-between': 'never' }], + 'indent': ['error', 2, { SwitchCase: 1 }], '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/semi': ['warn'], + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/lines-between-class-members': ['warn', 'always', { exceptAfterOverload: true, exceptAfterSingleLine: true }], '@typescript-eslint/member-delimiter-style': ['warn'], + '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': ['warn', { args: 'none', vars: 'local', varsIgnorePattern: 'key' }], + '@typescript-eslint/semi': ['warn'], + 'quotes': ['error', 'single'], + 'sort-exports/sort-exports': ['warn', { sortDir: 'asc' }], + 'sort-imports': ['warn', { ignoreDeclarationSort: true }], + 'space-before-function-paren': ['error', { named: 'never' }], + }, overrides: [ { diff --git a/package-lock.json b/package-lock.json index 8c7acd98b..9f8e1a14c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,9 +77,13 @@ "buffer-shims": "^1.0.0", "concurrently": "^8.2.2", "eslint": "^8.53.0", + "eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.29.0", + "eslint-plugin-import-newlines": "^1.3.4", "eslint-plugin-jest": "^27.6.0", + "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-sort-exports": "^0.8.0", "form-data": "^4.0.0", "jest": "^29.7.0", "lodash": "^4.17.21", @@ -2302,6 +2306,26 @@ "node": ">=14" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -3591,6 +3615,18 @@ "multicast-dns": "^7.2.5" } }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3720,6 +3756,21 @@ "node": ">=0.2.0" } }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", @@ -4129,6 +4180,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "node_modules/consola": { "version": "2.15.3", "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", @@ -4406,6 +4463,150 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -4439,6 +4640,18 @@ "node": ">= 0.4" } }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-properties": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", @@ -4893,6 +5106,49 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-config-airbnb-base/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-config-airbnb-typescript": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.1.0.tgz", + "integrity": "sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==", + "dev": true, + "dependencies": { + "eslint-config-airbnb-base": "^15.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.13.0 || ^6.0.0", + "@typescript-eslint/parser": "^5.0.0 || ^6.0.0", + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3" + } + }, "node_modules/eslint-config-prettier": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", @@ -4982,6 +5238,21 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, + "node_modules/eslint-plugin-import-newlines": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.3.4.tgz", + "integrity": "sha512-Lmf/BbK+EQKUfjKPcZpslE/KTGYlgaI8ZJ/sYzdbb3BVTg5+GmLBLHBjsUKNEVRM1SEhDTF/didtOSYKi4tSnQ==", + "dev": true, + "bin": { + "import-linter": "lib/index.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -5192,6 +5463,44 @@ "node": ">=4.0" } }, + "node_modules/eslint-plugin-prettier": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", + "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-sort-exports": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-exports/-/eslint-plugin-sort-exports-0.8.0.tgz", + "integrity": "sha512-5x7kJNjIS5bSyehFJ6Gk2gh2wUPt/rmhwDHF8JPDicSH7bvrLRFdlkhHu74YqYBjEySHYaOZVoKNP90TjI0v6w==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -5534,6 +5843,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -6602,6 +6917,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -6641,6 +6971,24 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -6819,6 +7167,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is2": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.9.tgz", @@ -9342,6 +9717,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.entries": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", + "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object.fromentries": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", @@ -9423,6 +9812,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/openapi-types": { "version": "12.1.3", "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", @@ -9902,6 +10309,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -10320,6 +10739,21 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -10957,6 +11391,22 @@ "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.9.0.tgz", "integrity": "sha512-NUHSYoe5XRTk/Are8jPJ6phzBh3l9l33nEyXosM17QInoV95/jng8+PuSGtbD407QoPf93MH3Bkh773OgesJpA==" }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/systeminformation": { "version": "5.21.15", "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.15.tgz", @@ -11247,6 +11697,18 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -11737,6 +12199,15 @@ "node": ">= 10.0.0" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/unzipper": { "version": "0.10.14", "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", diff --git a/package.json b/package.json index e99adf0fb..43adf93fb 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "start": "ts-node -r tsconfig-paths/register src/main.ts", "serve": "npm run watch", "lint": "npm run lint:server && npm run lint:ui", - "lint:server": "eslint \"{src,test}/**/*.ts\" --max-warnings=0", - "lint:ui": "npm run lint --prefix ui", + "lint:server": "eslint \"{src,test}/**/*.ts\" --max-warnings=0 --fix", + "lint:ui": "npm run lint --prefix ui --fix", "webpack": "webpack --config webpack.config.js", "install:ui": "npm install --prefix ui", "test": "jest --forceExit --detectOpenHandles --verbose=true --silent --config ./test/jest-e2e.json", @@ -106,9 +106,13 @@ "buffer-shims": "^1.0.0", "concurrently": "^8.2.2", "eslint": "^8.53.0", + "eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.29.0", + "eslint-plugin-import-newlines": "^1.3.4", "eslint-plugin-jest": "^27.6.0", + "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-sort-exports": "^0.8.0", "form-data": "^4.0.0", "jest": "^29.7.0", "lodash": "^4.17.21", diff --git a/src/app.module.ts b/src/app.module.ts index 4b9c043a6..f1e640848 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,22 +1,22 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from './core/logger/logger.module'; import { AppController } from './app.controller'; -import { AppService } from './app.service'; import { AppGateway } from './app.gateway'; +import { AppService } from './app.service'; +import { AuthModule } from './core/auth/auth.module'; import { ConfigModule } from './core/config/config.module'; -import { PluginsModule } from './modules/plugins/plugins.module'; -import { CustomPluginsModule } from './modules/custom-plugins/custom-plugins.module'; -import { UsersModule } from './modules/users/users.module'; -import { StatusModule } from './modules/status/status.module'; -import { LogModule } from './modules/log/log.module'; +import { LoggerModule } from './core/logger/logger.module'; import { AccessoriesModule } from './modules/accessories/accessories.module'; +import { BackupModule } from './modules/backup/backup.module'; +import { ChildBridgesModule } from './modules/child-bridges/child-bridges.module'; import { ConfigEditorModule } from './modules/config-editor/config-editor.module'; -import { AuthModule } from './core/auth/auth.module'; -import { ServerModule } from './modules/server/server.module'; +import { CustomPluginsModule } from './modules/custom-plugins/custom-plugins.module'; +import { LogModule } from './modules/log/log.module'; import { PlatformToolsModule } from './modules/platform-tools/platform-tools.module'; -import { BackupModule } from './modules/backup/backup.module'; +import { PluginsModule } from './modules/plugins/plugins.module'; +import { ServerModule } from './modules/server/server.module'; import { SetupWizardModule } from './modules/setup-wizard/setup-wizard.module'; -import { ChildBridgesModule } from './modules/child-bridges/child-bridges.module'; +import { StatusModule } from './modules/status/status.module'; +import { UsersModule } from './modules/users/users.module'; @Module({ imports: [ diff --git a/src/bin/hb-service.ts b/src/bin/hb-service.ts index 78d5ec3e9..bc432ddc9 100644 --- a/src/bin/hb-service.ts +++ b/src/bin/hb-service.ts @@ -6,26 +6,24 @@ process.title = 'hb-service'; +import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; +import axios from 'axios'; import * as commander from 'commander'; -import * as child_process from 'child_process'; import * as fs from 'fs-extra'; -import * as tcpPortUsed from 'tcp-port-used'; -import * as si from 'systeminformation'; -import * as semver from 'semver'; import * as ora from 'ora'; -import * as tar from 'tar'; -import axios from 'axios'; +import * as semver from 'semver'; +import * as si from 'systeminformation'; import { Tail } from 'tail'; - +import * as tar from 'tar'; +import * as tcpPortUsed from 'tcp-port-used'; +import type { HomebridgeIpcService } from '../core/homebridge-ipc/homebridge-ipc.service'; import { BasePlatform } from './base-platform'; -import { Win32Installer } from './platforms/win32'; -import { LinuxInstaller } from './platforms/linux'; import { DarwinInstaller } from './platforms/darwin'; import { FreeBSDInstaller } from './platforms/freebsd'; - -import type { HomebridgeIpcService } from '../core/homebridge-ipc/homebridge-ipc.service'; +import { LinuxInstaller } from './platforms/linux'; +import { Win32Installer } from './platforms/win32'; export class HomebridgeServiceHelper { public action: 'install' | 'uninstall' | 'start' | 'stop' | 'restart' | 'rebuild' | 'run' | 'add' | 'remove' | 'logs' | 'view' | 'update-node' | 'before-start' | 'status'; diff --git a/src/bin/platforms/darwin.ts b/src/bin/platforms/darwin.ts index 0997fe183..30fe5514f 100644 --- a/src/bin/platforms/darwin.ts +++ b/src/bin/platforms/darwin.ts @@ -1,19 +1,13 @@ +import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; -import * as child_process from 'child_process'; import * as fs from 'fs-extra'; import * as semver from 'semver'; - -import { HomebridgeServiceHelper } from '../hb-service'; import { BasePlatform } from '../base-platform'; export class DarwinInstaller extends BasePlatform { private user: string; - constructor(hbService: HomebridgeServiceHelper) { - super(hbService); - } - private get plistName() { return `com.${this.hbService.serviceName.toLowerCase()}.server`; } diff --git a/src/bin/platforms/freebsd.ts b/src/bin/platforms/freebsd.ts index d68140c86..7aabf142c 100644 --- a/src/bin/platforms/freebsd.ts +++ b/src/bin/platforms/freebsd.ts @@ -1,16 +1,10 @@ +import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; -import * as child_process from 'child_process'; import * as fs from 'fs-extra'; - -import { HomebridgeServiceHelper } from '../hb-service'; import { BasePlatform } from '../base-platform'; export class FreeBSDInstaller extends BasePlatform { - constructor(hbService: HomebridgeServiceHelper) { - super(hbService); - } - private get rcServiceName() { return this.hbService.serviceName.toLowerCase(); } diff --git a/src/bin/platforms/linux.ts b/src/bin/platforms/linux.ts index 0825ff687..7476a1884 100644 --- a/src/bin/platforms/linux.ts +++ b/src/bin/platforms/linux.ts @@ -1,18 +1,12 @@ +import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; -import * as child_process from 'child_process'; import * as fs from 'fs-extra'; -import * as si from 'systeminformation'; import * as semver from 'semver'; - -import { HomebridgeServiceHelper } from '../hb-service'; +import * as si from 'systeminformation'; import { BasePlatform } from '../base-platform'; export class LinuxInstaller extends BasePlatform { - constructor(hbService: HomebridgeServiceHelper) { - super(hbService); - } - private get systemdServiceName() { return this.hbService.serviceName.toLowerCase(); } @@ -622,12 +616,12 @@ export class LinuxInstaller extends BasePlatform { private async createFirewallRules() { // check ufw is present on the system (debian based linux) if (await fs.pathExists('/usr/sbin/ufw')) { - return await this.createUfwRules(); + return this.createUfwRules(); } // check firewall-cmd is present on the system (enterprise linux) if (await fs.pathExists('/usr/bin/firewall-cmd')) { - return await this.createFirewallCmdRules(); + return this.createFirewallCmdRules(); } } diff --git a/src/bin/platforms/win32.ts b/src/bin/platforms/win32.ts index 648435a6e..c307aac90 100644 --- a/src/bin/platforms/win32.ts +++ b/src/bin/platforms/win32.ts @@ -1,17 +1,11 @@ +import * as child_process from 'child_process'; import * as os from 'os'; -import axios from 'axios'; import * as path from 'path'; -import * as child_process from 'child_process'; +import axios from 'axios'; import * as fs from 'fs-extra'; - -import { HomebridgeServiceHelper } from '../hb-service'; import { BasePlatform } from '../base-platform'; export class Win32Installer extends BasePlatform { - constructor(hbService: HomebridgeServiceHelper) { - super(hbService); - } - /** * Installs the Windows 10 Homebridge Service */ diff --git a/src/core/auth/auth.controller.ts b/src/core/auth/auth.controller.ts index 3ecfc2e49..53d4c90fa 100644 --- a/src/core/auth/auth.controller.ts +++ b/src/core/auth/auth.controller.ts @@ -1,9 +1,21 @@ -import { Controller, Post, Body, Get, UseGuards, Header } from '@nestjs/common'; +import { + Body, + Controller, + Get, + Header, + Post, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiExcludeEndpoint, ApiOperation } from '@nestjs/swagger'; -import { AuthService } from './auth.service'; -import { AuthDto } from './auth.dto'; +import { + ApiBearerAuth, + ApiExcludeEndpoint, + ApiOperation, + ApiTags +} from '@nestjs/swagger'; import { ConfigService } from '../config/config.service'; +import { AuthDto } from './auth.dto'; +import { AuthService } from './auth.service'; @ApiTags('Authentication') @Controller('auth') diff --git a/src/core/auth/auth.dto.ts b/src/core/auth/auth.dto.ts index 6e1cdb095..26d4bc03b 100644 --- a/src/core/auth/auth.dto.ts +++ b/src/core/auth/auth.dto.ts @@ -1,5 +1,10 @@ -import { IsString, IsNotEmpty, IsOptional, IsDefined } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; +import { + IsDefined, + IsNotEmpty, + IsOptional, + IsString +} from 'class-validator'; export class AuthDto { @IsDefined() diff --git a/src/core/auth/auth.module.ts b/src/core/auth/auth.module.ts index 3ed415291..1f09fab51 100644 --- a/src/core/auth/auth.module.ts +++ b/src/core/auth/auth.module.ts @@ -1,15 +1,15 @@ import { Module } from '@nestjs/common'; -import { PassportModule } from '@nestjs/passport'; import { JwtModule } from '@nestjs/jwt'; -import { LoggerModule } from '../logger/logger.module'; +import { PassportModule } from '@nestjs/passport'; import { ConfigModule } from '../config/config.module'; import { ConfigService } from '../config/config.service'; -import { JwtStrategy } from './jwt.strategy'; +import { LoggerModule } from '../logger/logger.module'; import { AuthController } from './auth.controller'; import { AuthService } from './auth.service'; -import { WsGuard } from './guards/ws.guard'; import { AdminGuard } from './guards/admin.guard'; import { WsAdminGuard } from './guards/ws-admin-guard'; +import { WsGuard } from './guards/ws.guard'; +import { JwtStrategy } from './jwt.strategy'; @Module({ imports: [ diff --git a/src/core/auth/auth.service.ts b/src/core/auth/auth.service.ts index e33ef90cd..24617feed 100644 --- a/src/core/auth/auth.service.ts +++ b/src/core/auth/auth.service.ts @@ -1,14 +1,22 @@ -import * as fs from 'fs-extra'; import * as crypto from 'crypto'; -import * as jwt from 'jsonwebtoken'; -import { authenticator } from 'otplib'; +import { + BadRequestException, + ConflictException, + ForbiddenException, + HttpException, + Injectable, + NotFoundException, + UnauthorizedException +} from '@nestjs/common'; import { JwtService } from '@nestjs/jwt'; -import { Injectable, ForbiddenException, BadRequestException, UnauthorizedException, ConflictException, NotFoundException, HttpException } from '@nestjs/common'; import { WsException } from '@nestjs/websockets'; +import * as fs from 'fs-extra'; +import * as jwt from 'jsonwebtoken'; import * as NodeCache from 'node-cache'; +import { authenticator } from 'otplib'; +import { UserDto } from '../../modules/users/users.dto'; import { ConfigService } from '../config/config.service'; import { Logger } from '../logger/logger.service'; -import { UserDto } from '../../modules/users/users.dto'; @Injectable() export class AuthService { @@ -302,7 +310,7 @@ export class AuthService { */ private async saveUserFile(users: UserDto[]) { // update the auth.json - return await fs.writeJson(this.configService.authPath, users, { spaces: 4 }); + return fs.writeJson(this.configService.authPath, users, { spaces: 4 }); } /** diff --git a/src/core/auth/guards/admin.guard.ts b/src/core/auth/guards/admin.guard.ts index ee0ec9ffe..93f056832 100644 --- a/src/core/auth/guards/admin.guard.ts +++ b/src/core/auth/guards/admin.guard.ts @@ -1,4 +1,4 @@ -import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'; +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; @Injectable() export class AdminGuard implements CanActivate { diff --git a/src/core/auth/guards/ws-admin-guard.ts b/src/core/auth/guards/ws-admin-guard.ts index f5bdce61a..4afc0b444 100644 --- a/src/core/auth/guards/ws-admin-guard.ts +++ b/src/core/auth/guards/ws-admin-guard.ts @@ -1,7 +1,7 @@ import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import * as jwt from 'jsonwebtoken'; -import { ConfigService } from '../../config/config.service'; import { UserDto } from '../../../modules/users/users.dto'; +import { ConfigService } from '../../config/config.service'; @Injectable() export class WsAdminGuard implements CanActivate { diff --git a/src/core/auth/guards/ws.guard.ts b/src/core/auth/guards/ws.guard.ts index abe0ccf64..abf793ddb 100644 --- a/src/core/auth/guards/ws.guard.ts +++ b/src/core/auth/guards/ws.guard.ts @@ -1,8 +1,8 @@ import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import * as jwt from 'jsonwebtoken'; -import { ConfigService } from '../../config/config.service'; import { UserDto } from '../../../modules/users/users.dto'; +import { ConfigService } from '../../config/config.service'; @Injectable() export class WsGuard implements CanActivate { diff --git a/src/core/auth/jwt.strategy.ts b/src/core/auth/jwt.strategy.ts index aa4e3e3b6..03af2488f 100644 --- a/src/core/auth/jwt.strategy.ts +++ b/src/core/auth/jwt.strategy.ts @@ -1,8 +1,8 @@ -import { ExtractJwt, Strategy } from 'passport-jwt'; -import { AuthService } from './auth.service'; -import { PassportStrategy } from '@nestjs/passport'; import { Injectable, UnauthorizedException } from '@nestjs/common'; +import { PassportStrategy } from '@nestjs/passport'; +import { ExtractJwt, Strategy } from 'passport-jwt'; import { ConfigService } from '../config/config.service'; +import { AuthService } from './auth.service'; @Injectable() export class JwtStrategy extends PassportStrategy(Strategy) { diff --git a/src/core/config/config.service.ts b/src/core/config/config.service.ts index 4a03be91e..e791a7b14 100644 --- a/src/core/config/config.service.ts +++ b/src/core/config/config.service.ts @@ -1,28 +1,10 @@ -import { Injectable } from '@nestjs/common'; +import * as crypto from 'crypto'; import * as os from 'os'; import * as path from 'path'; +import { Injectable } from '@nestjs/common'; import * as fs from 'fs-extra'; -import * as crypto from 'crypto'; -import * as semver from 'semver'; import * as _ from 'lodash'; - -export interface HomebridgeConfig { - bridge: { - username: string; - pin: string; - name: string; - port: number; - advertiser?: 'avahi' | 'resolved' | 'ciao' | 'bonjour-hap'; - bind?: string | string[]; - }; - mdns?: { - interface?: string | string[]; - }; - platforms: Record[]; - accessories: Record[]; - plugins?: string[]; - disabledPlugins?: string[]; -} +import * as semver from 'semver'; @Injectable() export class ConfigService { @@ -373,3 +355,21 @@ export class ConfigService { } } + +export interface HomebridgeConfig { + bridge: { + username: string; + pin: string; + name: string; + port: number; + advertiser?: 'avahi' | 'resolved' | 'ciao' | 'bonjour-hap'; + bind?: string | string[]; + }; + mdns?: { + interface?: string | string[]; + }; + platforms: Record[]; + accessories: Record[]; + plugins?: string[]; + disabledPlugins?: string[]; +} diff --git a/src/core/config/config.startup.ts b/src/core/config/config.startup.ts index 242db18fa..76465eee0 100644 --- a/src/core/config/config.startup.ts +++ b/src/core/config/config.startup.ts @@ -1,7 +1,6 @@ import * as os from 'os'; import * as path from 'path'; import * as fs from 'fs-extra'; - import { Logger } from '../logger/logger.service'; /** diff --git a/src/core/homebridge-ipc/homebridge-ipc.service.ts b/src/core/homebridge-ipc/homebridge-ipc.service.ts index cd2b058ac..d5dc083c7 100644 --- a/src/core/homebridge-ipc/homebridge-ipc.service.ts +++ b/src/core/homebridge-ipc/homebridge-ipc.service.ts @@ -1,6 +1,6 @@ -import { Injectable, ServiceUnavailableException } from '@nestjs/common'; import { ChildProcess } from 'child_process'; import { EventEmitter } from 'events'; +import { Injectable, ServiceUnavailableException } from '@nestjs/common'; import { ConfigService } from '../config/config.service'; import { Logger } from '../logger/logger.service'; @@ -55,6 +55,7 @@ export class HomebridgeIpcService extends EventEmitter { public async requestResponse(requestEvent: string, responseEvent: string) { return new Promise((resolve, reject) => { const actionTimeout = setTimeout(() => { + // eslint-disable-next-line @typescript-eslint/no-use-before-define this.removeListener(responseEvent, listener); reject('The Homebridge service did not respond'); }, 3000); diff --git a/src/core/node-pty/node-pty.service.ts b/src/core/node-pty/node-pty.service.ts index ed5d69b8e..7db78a666 100644 --- a/src/core/node-pty/node-pty.service.ts +++ b/src/core/node-pty/node-pty.service.ts @@ -1,5 +1,5 @@ -import { Injectable } from '@nestjs/common'; import * as pty from '@homebridge/node-pty-prebuilt-multiarch'; +import { Injectable } from '@nestjs/common'; @Injectable() export class NodePtyService { diff --git a/src/core/spa/spa.filter.ts b/src/core/spa/spa.filter.ts index 492da587b..2e8211c21 100644 --- a/src/core/spa/spa.filter.ts +++ b/src/core/spa/spa.filter.ts @@ -1,7 +1,13 @@ import * as path from 'path'; +import { + ArgumentsHost, + Catch, + ExceptionFilter, + HttpException, + NotFoundException +} from '@nestjs/common'; import * as fs from 'fs-extra'; -import { Catch, NotFoundException, ExceptionFilter, HttpException, ArgumentsHost } from '@nestjs/common'; @Catch(NotFoundException) export class SpaFilter implements ExceptionFilter { diff --git a/src/index.ts b/src/index.ts index 300e77685..cd5d21c47 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,22 +2,13 @@ * Homebridge Entry Point */ -import * as path from 'path'; import * as child_process from 'child_process'; +import * as path from 'path'; import * as commander from 'commander'; import * as semver from 'semver'; let homebridge; -export = (api) => { - homebridge = api; - homebridge.registerPlatform('homebridge-config-ui-x', 'config', HomebridgeConfigUi); - - if (process.env.UIX_SERVICE_MODE === '1' && process.connected) { - HomebridgeConfigUi.serviceMode(); - } -}; - class HomebridgeConfigUi { log; @@ -99,3 +90,12 @@ class HomebridgeConfigUi { callback(accessories); } } + +export = (api) => { + homebridge = api; + homebridge.registerPlatform('homebridge-config-ui-x', 'config', HomebridgeConfigUi); + + if (process.env.UIX_SERVICE_MODE === '1' && process.connected) { + HomebridgeConfigUi.serviceMode(); + } +}; diff --git a/src/main.ts b/src/main.ts index 65431f0eb..7e8596486 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,20 +1,19 @@ import './self-check'; import * as path from 'path'; -import { FastifyReply, FastifyRequest } from 'fastify'; -import fastifyMultipart from '@fastify/multipart'; import helmet from '@fastify/helmet'; -import * as fs from 'fs-extra'; -import { NestFactory } from '@nestjs/core'; +import fastifyMultipart from '@fastify/multipart'; import { ValidationPipe } from '@nestjs/common'; +import { NestFactory } from '@nestjs/core'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; -import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; - +import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; +import { FastifyReply, FastifyRequest } from 'fastify'; +import * as fs from 'fs-extra'; import { AppModule } from './app.module'; -import { Logger } from './core/logger/logger.service'; -import { SpaFilter } from './core/spa/spa.filter'; import { ConfigService } from './core/config/config.service'; import { getStartupConfig } from './core/config/config.startup'; +import { Logger } from './core/logger/logger.service'; +import { SpaFilter } from './core/spa/spa.filter'; export { HomebridgeIpcService } from './core/homebridge-ipc/homebridge-ipc.service'; diff --git a/src/modules/accessories/accessories.controller.ts b/src/modules/accessories/accessories.controller.ts index 60f524288..2e4396a86 100644 --- a/src/modules/accessories/accessories.controller.ts +++ b/src/modules/accessories/accessories.controller.ts @@ -1,8 +1,21 @@ -import { Controller, UseGuards, Get, Put, Param, Body, Req } from '@nestjs/common'; +import { + Body, + Controller, + Get, + Param, + Put, + Req, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiOperation, ApiParam } from '@nestjs/swagger'; -import { AccessoriesService } from './accessories.service'; +import { + ApiBearerAuth, + ApiOperation, + ApiParam, + ApiTags +} from '@nestjs/swagger'; import { AccessorySetCharacteristicDto } from './accessories.dto'; +import { AccessoriesService } from './accessories.service'; @ApiTags('Accessories') @ApiBearerAuth() diff --git a/src/modules/accessories/accessories.dto.ts b/src/modules/accessories/accessories.dto.ts index 5d2063b70..2f8dd0af8 100644 --- a/src/modules/accessories/accessories.dto.ts +++ b/src/modules/accessories/accessories.dto.ts @@ -1,14 +1,14 @@ -import { IsString, IsNotEmpty, IsDefined } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; +import { IsDefined, IsNotEmpty, IsString } from 'class-validator'; export class AccessorySetCharacteristicDto { @ApiProperty({ required: true }) @IsDefined() @IsString() - characteristicType: string; + characteristicType: string; @ApiProperty({ required: true, type: 'string', title: 'Accepts a string, boolean, or integer value.' }) @IsDefined() @IsNotEmpty() - value: string | boolean | number; + value: string | boolean | number; } diff --git a/src/modules/accessories/accessories.gateway.ts b/src/modules/accessories/accessories.gateway.ts index 9ae8eaee8..eb1434515 100644 --- a/src/modules/accessories/accessories.gateway.ts +++ b/src/modules/accessories/accessories.gateway.ts @@ -1,5 +1,5 @@ -import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; import { UseGuards } from '@nestjs/common'; +import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; import { WsGuard } from '../../core/auth/guards/ws.guard'; import { AccessoriesService } from './accessories.service'; @@ -22,7 +22,7 @@ export class AccessoriesGateway { @SubscribeMessage('get-layout') async getAccessoryLayout(client: any, payload: any) { - return await this.accessoriesService.getAccessoryLayout(payload.user); + return this.accessoriesService.getAccessoryLayout(payload.user); } @SubscribeMessage('save-layout') diff --git a/src/modules/accessories/accessories.module.ts b/src/modules/accessories/accessories.module.ts index 902910674..9d7488227 100644 --- a/src/modules/accessories/accessories.module.ts +++ b/src/modules/accessories/accessories.module.ts @@ -1,10 +1,10 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; -import { AccessoriesService } from './accessories.service'; -import { AccessoriesGateway } from './accessories.gateway'; -import { AccessoriesController } from './accessories.controller'; import { ConfigModule } from '../../core/config/config.module'; import { LoggerModule } from '../../core/logger/logger.module'; +import { AccessoriesController } from './accessories.controller'; +import { AccessoriesGateway } from './accessories.gateway'; +import { AccessoriesService } from './accessories.service'; @Module({ imports: [ diff --git a/src/modules/accessories/accessories.service.ts b/src/modules/accessories/accessories.service.ts index ae459b991..77c735ba0 100644 --- a/src/modules/accessories/accessories.service.ts +++ b/src/modules/accessories/accessories.service.ts @@ -1,9 +1,8 @@ import * as path from 'path'; +import { BadRequestException, Injectable } from '@nestjs/common'; +import { HapClient, ServiceType } from '@oznu/hap-client'; import * as fs from 'fs-extra'; import * as NodeCache from 'node-cache'; -import { Injectable, BadRequestException } from '@nestjs/common'; -import { HapClient, ServiceType } from '@oznu/hap-client'; - import { ConfigService } from '../../core/config/config.service'; import { Logger } from '../../core/logger/logger.service'; diff --git a/src/modules/backup/backup.controller.ts b/src/modules/backup/backup.controller.ts index 1f6e08395..5c0db441c 100644 --- a/src/modules/backup/backup.controller.ts +++ b/src/modules/backup/backup.controller.ts @@ -1,11 +1,28 @@ -import { Controller, Get, Post, Put, UseGuards, Res, Req, InternalServerErrorException, Param, StreamableFile } from '@nestjs/common'; +import { + Controller, + Get, + InternalServerErrorException, + Param, + Post, + Put, + Req, + Res, + StreamableFile, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiOperation, ApiBody, ApiConsumes, ApiParam } from '@nestjs/swagger'; +import { + ApiBearerAuth, + ApiBody, + ApiConsumes, + ApiOperation, + ApiParam, + ApiTags +} from '@nestjs/swagger'; import { FastifyRequest } from 'fastify'; - -import { BackupService } from './backup.service'; import { AdminGuard } from '../../core/auth/guards/admin.guard'; import { Logger } from '../../core/logger/logger.service'; +import { BackupService } from './backup.service'; @ApiTags('Backup & Restore') @ApiBearerAuth() @@ -88,7 +105,7 @@ export class BackupController { description: 'Logs to stdout / stderr.', }) async restoreBackupTrigger() { - return await this.backupService.triggerHeadlessRestore(); + return this.backupService.triggerHeadlessRestore(); } @UseGuards(AdminGuard) diff --git a/src/modules/backup/backup.gateway.ts b/src/modules/backup/backup.gateway.ts index e303b9088..986296f65 100644 --- a/src/modules/backup/backup.gateway.ts +++ b/src/modules/backup/backup.gateway.ts @@ -1,10 +1,9 @@ -import * as color from 'bash-color'; import { EventEmitter } from 'events'; import { UseGuards } from '@nestjs/common'; -import { WebSocketGateway, SubscribeMessage, WsException } from '@nestjs/websockets'; - -import { Logger } from '../../core/logger/logger.service'; +import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; +import * as color from 'bash-color'; import { WsAdminGuard } from '../../core/auth/guards/ws-admin-guard'; +import { Logger } from '../../core/logger/logger.service'; import { BackupService } from './backup.service'; @UseGuards(WsAdminGuard) diff --git a/src/modules/backup/backup.module.ts b/src/modules/backup/backup.module.ts index 6101ac3bf..d0d3d76dd 100644 --- a/src/modules/backup/backup.module.ts +++ b/src/modules/backup/backup.module.ts @@ -1,14 +1,13 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - import { ConfigModule } from '../../core/config/config.module'; +import { HomebridgeIpcModule } from '../../core/homebridge-ipc/homebridge-ipc.module'; import { LoggerModule } from '../../core/logger/logger.module'; import { SchedulerModule } from '../../core/scheduler/scheduler.module'; -import { HomebridgeIpcModule } from '../../core/homebridge-ipc/homebridge-ipc.module'; -import { BackupService } from './backup.service'; -import { BackupGateway } from './backup.gateway'; -import { BackupController } from './backup.controller'; import { PluginsModule } from '../plugins/plugins.module'; +import { BackupController } from './backup.controller'; +import { BackupGateway } from './backup.gateway'; +import { BackupService } from './backup.service'; @Module({ imports: [ diff --git a/src/modules/backup/backup.service.ts b/src/modules/backup/backup.service.ts index c11e8afee..065b0d3b0 100644 --- a/src/modules/backup/backup.service.ts +++ b/src/modules/backup/backup.service.ts @@ -1,23 +1,28 @@ +import * as child_process from 'child_process'; +import { EventEmitter } from 'events'; import * as os from 'os'; -import * as tar from 'tar'; import * as path from 'path'; +import { pipeline } from 'stream'; import * as util from 'util'; -import * as fs from 'fs-extra'; +import { MultipartFile } from '@fastify/multipart'; +import { + BadRequestException, + Injectable, + InternalServerErrorException, + NotFoundException, + StreamableFile +} from '@nestjs/common'; import * as color from 'bash-color'; -import * as unzipper from 'unzipper'; -import * as child_process from 'child_process'; import * as dayjs from 'dayjs'; -import { pipeline } from 'stream'; -import { EventEmitter } from 'events'; -import { Injectable, BadRequestException, NotFoundException, InternalServerErrorException, StreamableFile } from '@nestjs/common'; import { FastifyReply } from 'fastify'; -import { MultipartFile } from '@fastify/multipart'; - -import { PluginsService } from '../plugins/plugins.service'; -import { SchedulerService } from '../../core/scheduler/scheduler.service'; +import * as fs from 'fs-extra'; +import * as tar from 'tar'; +import * as unzipper from 'unzipper'; import { ConfigService, HomebridgeConfig } from '../../core/config/config.service'; import { HomebridgeIpcService } from '../../core/homebridge-ipc/homebridge-ipc.service'; import { Logger } from '../../core/logger/logger.service'; +import { SchedulerService } from '../../core/scheduler/scheduler.service'; +import { PluginsService } from '../plugins/plugins.service'; import { HomebridgePlugin } from '../plugins/types'; const pump = util.promisify(pipeline); @@ -170,7 +175,7 @@ export class BackupService { } } else { // when not using a custom backup path, just ensure it exists - return await fs.ensureDir(this.configService.instanceBackupPath); + return fs.ensureDir(this.configService.instanceBackupPath); } } @@ -332,7 +337,7 @@ export class BackupService { */ async removeRestoreDirectory() { if (this.restoreDirectory) { - return await fs.remove(this.restoreDirectory); + return fs.remove(this.restoreDirectory); } } diff --git a/src/modules/child-bridges/child-bridges.gateway.ts b/src/modules/child-bridges/child-bridges.gateway.ts index 0de603db2..26038e512 100644 --- a/src/modules/child-bridges/child-bridges.gateway.ts +++ b/src/modules/child-bridges/child-bridges.gateway.ts @@ -1,6 +1,5 @@ import { UseGuards } from '@nestjs/common'; import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; - import { WsGuard } from '../../core/auth/guards/ws.guard'; import { ChildBridgesService } from './child-bridges.service'; @@ -33,7 +32,7 @@ export class ChildBridgesGateway { @SubscribeMessage('restart-child-bridge') async restartChildBridge(client, payload) { try { - return await this.childBridgesService.restartChildBridge(payload); + return this.childBridgesService.restartChildBridge(payload); } catch (e) { return new WsException(e.message); } @@ -42,7 +41,7 @@ export class ChildBridgesGateway { @SubscribeMessage('stop-child-bridge') async stopChildBridge(client, payload) { try { - return await this.childBridgesService.stopChildBridge(payload); + return this.childBridgesService.stopChildBridge(payload); } catch (e) { return new WsException(e.message); } @@ -51,7 +50,7 @@ export class ChildBridgesGateway { @SubscribeMessage('start-child-bridge') async startChildBridge(client, payload) { try { - return await this.childBridgesService.startChildBridge(payload); + return this.childBridgesService.startChildBridge(payload); } catch (e) { return new WsException(e.message); } diff --git a/src/modules/child-bridges/child-bridges.module.ts b/src/modules/child-bridges/child-bridges.module.ts index 6aff8d29b..08ca4dd40 100644 --- a/src/modules/child-bridges/child-bridges.module.ts +++ b/src/modules/child-bridges/child-bridges.module.ts @@ -1,9 +1,8 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - -import { LoggerModule } from '../../core/logger/logger.module'; import { ConfigModule } from '../../core/config/config.module'; import { HomebridgeIpcModule } from '../../core/homebridge-ipc/homebridge-ipc.module'; +import { LoggerModule } from '../../core/logger/logger.module'; import { AccessoriesModule } from '../accessories/accessories.module'; import { ChildBridgesGateway } from './child-bridges.gateway'; import { ChildBridgesService } from './child-bridges.service'; diff --git a/src/modules/child-bridges/child-bridges.service.ts b/src/modules/child-bridges/child-bridges.service.ts index f1d63e49b..94eab6229 100644 --- a/src/modules/child-bridges/child-bridges.service.ts +++ b/src/modules/child-bridges/child-bridges.service.ts @@ -1,9 +1,8 @@ import { BadRequestException, Injectable } from '@nestjs/common'; import * as semver from 'semver'; - -import { Logger } from '../../core/logger/logger.service'; import { ConfigService } from '../../core/config/config.service'; import { HomebridgeIpcService } from '../../core/homebridge-ipc/homebridge-ipc.service'; +import { Logger } from '../../core/logger/logger.service'; import { AccessoriesService } from '../accessories/accessories.service'; @Injectable() diff --git a/src/modules/config-editor/config-editor.controller.ts b/src/modules/config-editor/config-editor.controller.ts index 0112d5c73..30f6ba9d5 100644 --- a/src/modules/config-editor/config-editor.controller.ts +++ b/src/modules/config-editor/config-editor.controller.ts @@ -1,8 +1,24 @@ -import { Controller, UseGuards, Get, Post, Body, Param, Delete, ParseIntPipe, Put } from '@nestjs/common'; +import { + Body, + Controller, + Delete, + Get, + Param, + ParseIntPipe, + Post, + Put, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiOperation, ApiBody, ApiParam } from '@nestjs/swagger'; -import { ConfigEditorService } from './config-editor.service'; +import { + ApiBearerAuth, + ApiBody, + ApiOperation, + ApiParam, + ApiTags +} from '@nestjs/swagger'; import { AdminGuard } from '../../core/auth/guards/admin.guard'; +import { ConfigEditorService } from './config-editor.service'; @ApiTags('Homebridge Config Editor') @ApiBearerAuth() diff --git a/src/modules/config-editor/config-editor.module.ts b/src/modules/config-editor/config-editor.module.ts index 18bbd2e32..3c1b34efa 100644 --- a/src/modules/config-editor/config-editor.module.ts +++ b/src/modules/config-editor/config-editor.module.ts @@ -1,11 +1,11 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; -import { ConfigEditorService } from './config-editor.service'; -import { ConfigEditorController } from './config-editor.controller'; import { ConfigModule } from '../../core/config/config.module'; import { LoggerModule } from '../../core/logger/logger.module'; import { SchedulerModule } from '../../core/scheduler/scheduler.module'; import { PluginsModule } from '../plugins/plugins.module'; +import { ConfigEditorController } from './config-editor.controller'; +import { ConfigEditorService } from './config-editor.service'; @Module({ imports: [ diff --git a/src/modules/config-editor/config-editor.service.ts b/src/modules/config-editor/config-editor.service.ts index f8ffc8883..cb139f90f 100644 --- a/src/modules/config-editor/config-editor.service.ts +++ b/src/modules/config-editor/config-editor.service.ts @@ -1,9 +1,9 @@ -import * as fs from 'fs-extra'; import * as path from 'path'; -import * as dayjs from 'dayjs'; import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; -import { Logger } from '../../core/logger/logger.service'; +import * as dayjs from 'dayjs'; +import * as fs from 'fs-extra'; import { ConfigService, HomebridgeConfig } from '../../core/config/config.service'; +import { Logger } from '../../core/logger/logger.service'; import { SchedulerService } from '../../core/scheduler/scheduler.service'; import { PluginsService } from '../plugins/plugins.service'; @@ -333,7 +333,7 @@ export class ConfigEditorService { } // read source backup - return await fs.readFile(requestedBackupPath); + return fs.readFile(requestedBackupPath); } /** diff --git a/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.ts b/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.ts index 5dcb80c79..7f9b08888 100644 --- a/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.ts +++ b/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.ts @@ -1,6 +1,12 @@ -import { Controller, UseGuards, Get, Header, StreamableFile } from '@nestjs/common'; +import { + Controller, + Get, + Header, + StreamableFile, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth } from '@nestjs/swagger'; +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; import { AdminGuard } from '../../../core/auth/guards/admin.guard'; import { HomebridgeDeconzService } from './homebridge-deconz.service'; diff --git a/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.ts b/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.ts index f87163d53..65f5b5ffd 100644 --- a/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.ts +++ b/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; -import { LoggerModule } from '../../../core/logger/logger.module'; import { ConfigModule } from '../../../core/config/config.module'; +import { LoggerModule } from '../../../core/logger/logger.module'; import { HomebridgeDeconzController } from './homebridge-deconz.controller'; import { HomebridgeDeconzService } from './homebridge-deconz.service'; diff --git a/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.ts b/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.ts index 6200e1d14..2fc394417 100644 --- a/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.ts +++ b/src/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.ts @@ -1,6 +1,6 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { Injectable, NotFoundException, StreamableFile } from '@nestjs/common'; +import * as fs from 'fs-extra'; import { ConfigService } from '../../../core/config/config.service'; @Injectable() diff --git a/src/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.ts b/src/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.ts index 7d53039aa..9467e70e7 100644 --- a/src/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.ts +++ b/src/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.ts @@ -1,6 +1,12 @@ -import { Controller, UseGuards, Get, Header, StreamableFile } from '@nestjs/common'; +import { + Controller, + Get, + Header, + StreamableFile, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth } from '@nestjs/swagger'; +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; import { AdminGuard } from '../../../core/auth/guards/admin.guard'; import { HomebridgeHueService } from './homebridge-hue.service'; diff --git a/src/modules/custom-plugins/homebridge-hue/homebridge-hue.module.ts b/src/modules/custom-plugins/homebridge-hue/homebridge-hue.module.ts index bf8aca426..a444f30fe 100644 --- a/src/modules/custom-plugins/homebridge-hue/homebridge-hue.module.ts +++ b/src/modules/custom-plugins/homebridge-hue/homebridge-hue.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; -import { LoggerModule } from '../../../core/logger/logger.module'; import { ConfigModule } from '../../../core/config/config.module'; +import { LoggerModule } from '../../../core/logger/logger.module'; import { HomebridgeHueController } from './homebridge-hue.controller'; import { HomebridgeHueService } from './homebridge-hue.service'; diff --git a/src/modules/custom-plugins/homebridge-hue/homebridge-hue.service.ts b/src/modules/custom-plugins/homebridge-hue/homebridge-hue.service.ts index e12c4c8e9..73b4f8de5 100644 --- a/src/modules/custom-plugins/homebridge-hue/homebridge-hue.service.ts +++ b/src/modules/custom-plugins/homebridge-hue/homebridge-hue.service.ts @@ -1,6 +1,6 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { Injectable, NotFoundException, StreamableFile } from '@nestjs/common'; +import * as fs from 'fs-extra'; import { ConfigService } from '../../../core/config/config.service'; @Injectable() diff --git a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.ts b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.ts index 784bd2d02..acf611589 100644 --- a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.ts +++ b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.ts @@ -1,6 +1,11 @@ -import { Controller, Get, Param, Query, Res } from '@nestjs/common'; +import { + Controller, + Get, + Param, + Query, + Res +} from '@nestjs/common'; import { ApiOperation, ApiParam, ApiTags } from '@nestjs/swagger'; - import { PluginsSettingsUiService } from './plugins-settings-ui.service'; @ApiTags('Plugins') @@ -15,7 +20,7 @@ export class PluginsSettingsUiController { @ApiOperation({ summary: 'Returns the HTML assets for a plugin\'s custom UI' }) @ApiParam({ name: 'pluginName', type: 'string' }) async serveCustomUiAsset(@Res() reply, @Param('pluginName') pluginName, @Param('*') file, @Query('origin') origin: string, @Query('v') v?: string) { - return await this.pluginSettingsUiService.serveCustomUiAsset(reply, pluginName, file, origin, v); + return this.pluginSettingsUiService.serveCustomUiAsset(reply, pluginName, file, origin, v); } } diff --git a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.ts b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.ts index c46fc7d60..24af368dc 100644 --- a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.ts +++ b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.ts @@ -1,7 +1,6 @@ -import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; -import { UseGuards } from '@nestjs/common'; import { EventEmitter } from 'events'; - +import { UseGuards } from '@nestjs/common'; +import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; import { WsAdminGuard } from '../../../core/auth/guards/ws-admin-guard'; import { PluginsSettingsUiService } from './plugins-settings-ui.service'; diff --git a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.ts b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.ts index dc4e84df7..235cddfa2 100644 --- a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.ts +++ b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.ts @@ -1,6 +1,5 @@ -import { Module } from '@nestjs/common'; import { HttpModule } from '@nestjs/axios'; - +import { Module } from '@nestjs/common'; import { ConfigModule } from '../../../core/config/config.module'; import { LoggerModule } from '../../../core/logger/logger.module'; import { PluginsModule } from '../../plugins/plugins.module'; diff --git a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts index ecc571606..d90053495 100644 --- a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts +++ b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts @@ -1,16 +1,15 @@ +import * as child_process from 'child_process'; +import { EventEmitter } from 'events'; import * as path from 'path'; +import { HttpService } from '@nestjs/axios'; +import { Injectable, NotFoundException } from '@nestjs/common'; import * as fs from 'fs-extra'; import * as NodeCache from 'node-cache'; -import * as child_process from 'child_process'; -import { Injectable, NotFoundException } from '@nestjs/common'; -import { HttpService } from '@nestjs/axios'; - -import { Logger } from '../../../core/logger/logger.service'; import { ConfigService } from '../../../core/config/config.service'; +import { Logger } from '../../../core/logger/logger.service'; import { PluginsService } from '../../plugins/plugins.service'; import { HomebridgePluginUiMetadata } from '../../plugins/types'; -import { EventEmitter } from 'events'; @Injectable() export class PluginsSettingsUiService { @@ -49,7 +48,7 @@ export class PluginsSettingsUiService { return reply.code(404).send('Not Found'); } - // this will severely limit the ability for this page to do anything if loaded outside of the UI + // this will severely limit the ability for this page to do anything if loaded outside the UI reply.header('Content-Security-Policy', ''); if (assetPath === 'index.html') { @@ -59,7 +58,7 @@ export class PluginsSettingsUiService { } if (pluginUi.devServer) { - return this.serveAssetsFromDevServer(reply, pluginUi, assetPath); + return await this.serveAssetsFromDevServer(reply, pluginUi, assetPath); } // fallback path (to serve static assets from the plugin ui public folder) @@ -74,9 +73,8 @@ export class PluginsSettingsUiService { return reply.code(404).send('Not Found'); } } catch (e) { - e.message === 'Not Found' ? reply.code(404) : reply.code(500); this.loggerService.error(`[${pluginName}]`, e.message); - return reply.send(e.message); + return e.message === 'Not Found' ? reply.code(404).send(e.message) : reply.code(500).send(e.message); } } @@ -119,7 +117,7 @@ export class PluginsSettingsUiService { // dev server is only enabled for private plugins return (await this.httpService.get(pluginUi.devServer, { responseType: 'text' }).toPromise()).data; } else { - return await fs.readFile(path.join(pluginUi.publicPath, 'index.html'), 'utf8'); + return fs.readFile(path.join(pluginUi.publicPath, 'index.html'), 'utf8'); } } diff --git a/src/modules/log/log.gateway.ts b/src/modules/log/log.gateway.ts index a3d7f6abc..efc2d3e78 100644 --- a/src/modules/log/log.gateway.ts +++ b/src/modules/log/log.gateway.ts @@ -1,7 +1,6 @@ import { EventEmitter } from 'events'; import { UseGuards } from '@nestjs/common'; import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; - import { WsGuard } from '../../core/auth/guards/ws.guard'; import { LogService, LogTermSize } from './log.service'; diff --git a/src/modules/log/log.module.ts b/src/modules/log/log.module.ts index 42f984538..5b2d3c488 100644 --- a/src/modules/log/log.module.ts +++ b/src/modules/log/log.module.ts @@ -1,10 +1,9 @@ import { Module } from '@nestjs/common'; -import { LogService } from './log.service'; -import { LogGateway } from './log.gateway'; - import { ConfigModule } from '../../core/config/config.module'; import { LoggerModule } from '../../core/logger/logger.module'; import { NodePtyModule } from '../../core/node-pty/node-pty.module'; +import { LogGateway } from './log.gateway'; +import { LogService } from './log.service'; @Module({ imports: [ diff --git a/src/modules/log/log.service.ts b/src/modules/log/log.service.ts index ef904db4a..fce9bf94c 100644 --- a/src/modules/log/log.service.ts +++ b/src/modules/log/log.service.ts @@ -1,17 +1,14 @@ -import * as os from 'os'; -import * as color from 'bash-color'; -import * as semver from 'semver'; import * as child_process from 'child_process'; -import * as fs from 'fs-extra'; import { EventEmitter } from 'events'; +import * as os from 'os'; import { Injectable } from '@nestjs/common'; +import * as color from 'bash-color'; +import * as fs from 'fs-extra'; +import * as semver from 'semver'; import { Tail } from 'tail'; - import { ConfigService } from '../../core/config/config.service'; import { NodePtyService } from '../../core/node-pty/node-pty.service'; -export type LogTermSize = { cols: number; rows: number }; - @Injectable() export class LogService { private command: string[]; @@ -250,10 +247,12 @@ export class LogService { } /** - * Logs are not configued + * Logs are not configured */ private logNotConfigured() { this.command = null; } } + +export type LogTermSize = { cols: number; rows: number }; diff --git a/src/modules/platform-tools/docker/docker.controller.ts b/src/modules/platform-tools/docker/docker.controller.ts index c6a74f899..30036f033 100644 --- a/src/modules/platform-tools/docker/docker.controller.ts +++ b/src/modules/platform-tools/docker/docker.controller.ts @@ -1,7 +1,12 @@ -import { Controller, UseGuards, Get, Put, Body } from '@nestjs/common'; +import { + Body, + Controller, + Get, + Put, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; - +import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { AdminGuard } from '../../../core/auth/guards/admin.guard'; import { DockerService } from './docker.service'; diff --git a/src/modules/platform-tools/docker/docker.module.ts b/src/modules/platform-tools/docker/docker.module.ts index 5e2c4efe9..36d014970 100644 --- a/src/modules/platform-tools/docker/docker.module.ts +++ b/src/modules/platform-tools/docker/docker.module.ts @@ -2,8 +2,8 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; import { ConfigModule } from '../../../core/config/config.module'; import { LoggerModule } from '../../../core/logger/logger.module'; -import { DockerService } from './docker.service'; import { DockerController } from './docker.controller'; +import { DockerService } from './docker.service'; @Module({ imports: [ diff --git a/src/modules/platform-tools/docker/docker.service.ts b/src/modules/platform-tools/docker/docker.service.ts index 73ad38046..17e694482 100644 --- a/src/modules/platform-tools/docker/docker.service.ts +++ b/src/modules/platform-tools/docker/docker.service.ts @@ -1,7 +1,6 @@ -import * as fs from 'fs-extra'; import * as child_process from 'child_process'; import { Injectable } from '@nestjs/common'; - +import * as fs from 'fs-extra'; import { ConfigService } from '../../../core/config/config.service'; import { Logger } from '../../../core/logger/logger.service'; diff --git a/src/modules/platform-tools/hb-service/hb-service.controller.ts b/src/modules/platform-tools/hb-service/hb-service.controller.ts index d8ee9cab6..1012c9a96 100644 --- a/src/modules/platform-tools/hb-service/hb-service.controller.ts +++ b/src/modules/platform-tools/hb-service/hb-service.controller.ts @@ -1,9 +1,22 @@ -import { Controller, UseGuards, Get, Put, Body, Req, Query } from '@nestjs/common'; +import { + Body, + Controller, + Get, + Put, + Query, + Req, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiQuery, ApiOperation } from '@nestjs/swagger'; +import { + ApiBearerAuth, + ApiOperation, + ApiQuery, + ApiTags +} from '@nestjs/swagger'; import { AdminGuard } from '../../../core/auth/guards/admin.guard'; -import { HbServiceService } from './hb-service.service'; import { HbServiceStartupSettings } from './hb-service.dto'; +import { HbServiceService } from './hb-service.service'; @ApiTags('Platform - HB Service') @ApiBearerAuth() diff --git a/src/modules/platform-tools/hb-service/hb-service.dto.ts b/src/modules/platform-tools/hb-service/hb-service.dto.ts index 626816ef7..ba57258ce 100644 --- a/src/modules/platform-tools/hb-service/hb-service.dto.ts +++ b/src/modules/platform-tools/hb-service/hb-service.dto.ts @@ -1,26 +1,26 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsString, IsBoolean, IsOptional } from 'class-validator'; +import { IsBoolean, IsOptional, IsString } from 'class-validator'; export class HbServiceStartupSettings { @IsBoolean() @ApiProperty({ default: false, required: true }) - HOMEBRIDGE_DEBUG: boolean; + HOMEBRIDGE_DEBUG: boolean; @IsBoolean() @ApiProperty({ default: false, required: true }) - HOMEBRIDGE_KEEP_ORPHANS: boolean; + HOMEBRIDGE_KEEP_ORPHANS: boolean; @IsBoolean() @IsOptional() @ApiProperty({ default: true, required: true }) - HOMEBRIDGE_INSECURE: boolean; + HOMEBRIDGE_INSECURE: boolean; @IsString() @ApiProperty({ required: false }) - ENV_DEBUG?: string; + ENV_DEBUG?: string; @IsString() @IsOptional() @ApiProperty({ required: false }) - ENV_NODE_OPTIONS?: string; + ENV_NODE_OPTIONS?: string; } diff --git a/src/modules/platform-tools/hb-service/hb-service.module.ts b/src/modules/platform-tools/hb-service/hb-service.module.ts index 1478a785c..37fdc5c3b 100644 --- a/src/modules/platform-tools/hb-service/hb-service.module.ts +++ b/src/modules/platform-tools/hb-service/hb-service.module.ts @@ -2,8 +2,8 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; import { ConfigModule } from '../../../core/config/config.module'; import { LoggerModule } from '../../../core/logger/logger.module'; -import { HbServiceService } from './hb-service.service'; import { HbServiceController } from './hb-service.controller'; +import { HbServiceService } from './hb-service.service'; @Module({ imports: [ diff --git a/src/modules/platform-tools/hb-service/hb-service.service.ts b/src/modules/platform-tools/hb-service/hb-service.service.ts index a72c4f412..ae65900ee 100644 --- a/src/modules/platform-tools/hb-service/hb-service.service.ts +++ b/src/modules/platform-tools/hb-service/hb-service.service.ts @@ -1,7 +1,7 @@ -import * as fs from 'fs-extra'; import * as path from 'path'; import * as stream from 'stream'; -import { Injectable, BadRequestException } from '@nestjs/common'; +import { BadRequestException, Injectable } from '@nestjs/common'; +import * as fs from 'fs-extra'; import { ConfigService } from '../../../core/config/config.service'; import { Logger } from '../../../core/logger/logger.service'; diff --git a/src/modules/platform-tools/linux/linux.controller.ts b/src/modules/platform-tools/linux/linux.controller.ts index 0f4455444..0754f389b 100644 --- a/src/modules/platform-tools/linux/linux.controller.ts +++ b/src/modules/platform-tools/linux/linux.controller.ts @@ -1,8 +1,8 @@ -import { Controller, UseGuards, Put } from '@nestjs/common'; +import { Controller, Put, UseGuards } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; -import { LinuxService } from './linux.service'; +import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { AdminGuard } from '../../../core/auth/guards/admin.guard'; +import { LinuxService } from './linux.service'; @ApiTags('Platform - Linux') @ApiBearerAuth() diff --git a/src/modules/platform-tools/linux/linux.module.ts b/src/modules/platform-tools/linux/linux.module.ts index cfa36de72..20189f212 100644 --- a/src/modules/platform-tools/linux/linux.module.ts +++ b/src/modules/platform-tools/linux/linux.module.ts @@ -2,8 +2,8 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; import { ConfigModule } from '../../../core/config/config.module'; import { LoggerModule } from '../../../core/logger/logger.module'; -import { LinuxService } from './linux.service'; import { LinuxController } from './linux.controller'; +import { LinuxService } from './linux.service'; @Module({ imports: [ diff --git a/src/modules/platform-tools/platform-tools.module.ts b/src/modules/platform-tools/platform-tools.module.ts index a8514c64b..0d4e4c9bd 100644 --- a/src/modules/platform-tools/platform-tools.module.ts +++ b/src/modules/platform-tools/platform-tools.module.ts @@ -1,8 +1,8 @@ import { Module } from '@nestjs/common'; -import { LinuxModule } from './linux/linux.module'; import { DockerModule } from './docker/docker.module'; -import { TerminalModule } from './terminal/terminal.module'; import { HbServiceModule } from './hb-service/hb-service.module'; +import { LinuxModule } from './linux/linux.module'; +import { TerminalModule } from './terminal/terminal.module'; @Module({ imports: [ diff --git a/src/modules/platform-tools/terminal/terminal.gateway.ts b/src/modules/platform-tools/terminal/terminal.gateway.ts index e1f9cb473..588e9cbdb 100644 --- a/src/modules/platform-tools/terminal/terminal.gateway.ts +++ b/src/modules/platform-tools/terminal/terminal.gateway.ts @@ -1,8 +1,7 @@ -import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; import { UseGuards } from '@nestjs/common'; - +import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; import { WsAdminGuard } from '../../../core/auth/guards/ws-admin-guard'; -import { TerminalService, WsEventEmitter, TermSize } from './terminal.service'; +import { TermSize, TerminalService, WsEventEmitter } from './terminal.service'; @UseGuards(WsAdminGuard) @WebSocketGateway({ diff --git a/src/modules/platform-tools/terminal/terminal.module.ts b/src/modules/platform-tools/terminal/terminal.module.ts index 6bb8e92d9..5a9ea7640 100644 --- a/src/modules/platform-tools/terminal/terminal.module.ts +++ b/src/modules/platform-tools/terminal/terminal.module.ts @@ -1,11 +1,10 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - -import { TerminalService } from './terminal.service'; -import { TerminalGateway } from './terminal.gateway'; import { ConfigModule } from '../../../core/config/config.module'; import { LoggerModule } from '../../../core/logger/logger.module'; import { NodePtyModule } from '../../../core/node-pty/node-pty.module'; +import { TerminalGateway } from './terminal.gateway'; +import { TerminalService } from './terminal.service'; @Module({ imports: [ diff --git a/src/modules/platform-tools/terminal/terminal.service.ts b/src/modules/platform-tools/terminal/terminal.service.ts index 61fb4ea25..f114db264 100644 --- a/src/modules/platform-tools/terminal/terminal.service.ts +++ b/src/modules/platform-tools/terminal/terminal.service.ts @@ -1,17 +1,12 @@ import { EventEmitter } from 'events'; -import * as fs from 'fs-extra'; import { Injectable } from '@nestjs/common'; - +import * as fs from 'fs-extra'; import { ConfigService } from '../../../core/config/config.service'; import { Logger } from '../../../core/logger/logger.service'; import { NodePtyService } from '../../../core/node-pty/node-pty.service'; export type TermSize = { cols: number; rows: number }; -export interface WsEventEmitter extends EventEmitter { - disconnect: () => void; -} - @Injectable() export class TerminalService { private ending = false; @@ -97,3 +92,7 @@ export class TerminalService { client.on('disconnect', onEnd.bind(this)); } } + +export interface WsEventEmitter extends EventEmitter { + disconnect: () => void; +} diff --git a/src/modules/plugins/plugins.controller.ts b/src/modules/plugins/plugins.controller.ts index ba632e2a3..e4645863f 100644 --- a/src/modules/plugins/plugins.controller.ts +++ b/src/modules/plugins/plugins.controller.ts @@ -1,8 +1,18 @@ -import { Controller, Get, Param, UseGuards } from '@nestjs/common'; +import { + Controller, + Get, + Param, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiParam, ApiOperation } from '@nestjs/swagger'; -import { PluginsService } from './plugins.service'; +import { + ApiBearerAuth, + ApiOperation, + ApiParam, + ApiTags +} from '@nestjs/swagger'; import { AdminGuard } from '../../core/auth/guards/admin.guard'; +import { PluginsService } from './plugins.service'; @ApiTags('Plugins') @ApiBearerAuth() diff --git a/src/modules/plugins/plugins.dto.ts b/src/modules/plugins/plugins.dto.ts index c243d8db3..1f053629b 100644 --- a/src/modules/plugins/plugins.dto.ts +++ b/src/modules/plugins/plugins.dto.ts @@ -1,35 +1,42 @@ -import { IsDefined, IsNotEmpty, IsNumber, IsOptional, IsString, Matches } from 'class-validator'; - -export class PluginActionDto { - @IsDefined() - @IsNotEmpty() - @IsString() - @Matches(/^((@[\w-]*)\/)?(homebridge-[\w-]*)$/) - name: string; +import { + IsDefined, + IsNotEmpty, + IsNumber, + IsOptional, + IsString, + Matches +} from 'class-validator'; +export class HomebridgeUpdateActionDto { @IsOptional() @IsString() - version?: string; + version?: string; @IsOptional() @IsNumber() - termCols?: number; + termCols?: number; @IsOptional() @IsNotEmpty() - termRows?: number; + termRows?: number; } -export class HomebridgeUpdateActionDto { +export class PluginActionDto { + @IsDefined() + @IsNotEmpty() + @IsString() + @Matches(/^((@[\w-]*)\/)?(homebridge-[\w-]*)$/) + name: string; + @IsOptional() @IsString() - version?: string; + version?: string; @IsOptional() @IsNumber() - termCols?: number; + termCols?: number; @IsOptional() @IsNotEmpty() - termRows?: number; + termRows?: number; } diff --git a/src/modules/plugins/plugins.gateway.ts b/src/modules/plugins/plugins.gateway.ts index 3f2ecbab9..8c85b5277 100644 --- a/src/modules/plugins/plugins.gateway.ts +++ b/src/modules/plugins/plugins.gateway.ts @@ -2,11 +2,10 @@ import { EventEmitter } from 'events'; import { UseGuards, UsePipes, ValidationPipe } from '@nestjs/common'; import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; import * as color from 'bash-color'; - -import { PluginsService } from './plugins.service'; -import { PluginActionDto, HomebridgeUpdateActionDto } from './plugins.dto'; -import { Logger } from '../../core/logger/logger.service'; import { WsAdminGuard } from '../../core/auth/guards/ws-admin-guard'; +import { Logger } from '../../core/logger/logger.service'; +import { HomebridgeUpdateActionDto, PluginActionDto } from './plugins.dto'; +import { PluginsService } from './plugins.service'; @UseGuards(WsAdminGuard) @WebSocketGateway({ diff --git a/src/modules/plugins/plugins.module.ts b/src/modules/plugins/plugins.module.ts index c2f78e9bc..0e525e4d5 100644 --- a/src/modules/plugins/plugins.module.ts +++ b/src/modules/plugins/plugins.module.ts @@ -1,14 +1,13 @@ import * as https from 'https'; -import { Module } from '@nestjs/common'; import { HttpModule } from '@nestjs/axios'; +import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - -import { PluginsService } from './plugins.service'; +import { ConfigModule } from '../../core/config/config.module'; import { LoggerModule } from '../../core/logger/logger.module'; +import { NodePtyModule } from '../../core/node-pty/node-pty.module'; import { PluginsController } from './plugins.controller'; import { PluginsGateway } from './plugins.gateway'; -import { ConfigModule } from '../../core/config/config.module'; -import { NodePtyModule } from '../../core/node-pty/node-pty.module'; +import { PluginsService } from './plugins.service'; @Module({ imports: [ diff --git a/src/modules/plugins/plugins.service.ts b/src/modules/plugins/plugins.service.ts index bfcb2af7a..2328984b3 100755 --- a/src/modules/plugins/plugins.service.ts +++ b/src/modules/plugins/plugins.service.ts @@ -1,23 +1,32 @@ +import * as child_process from 'child_process'; import { EventEmitter } from 'events'; -import { Injectable, NotFoundException, InternalServerErrorException, BadRequestException } from '@nestjs/common'; -import { HttpService } from '@nestjs/axios'; -import { HomebridgePlugin, IPackageJson, INpmSearchResults, INpmRegistryModule } from './types'; -import { HomebridgePluginVersions, HomebridgePluginUiMetadata, PluginAlias } from './types'; -import axios from 'axios'; import * as os from 'os'; -import * as _ from 'lodash'; import * as path from 'path'; -import * as fs from 'fs-extra'; -import * as child_process from 'child_process'; -import * as semver from 'semver'; +import { HttpService } from '@nestjs/axios'; +import { + BadRequestException, + Injectable, + InternalServerErrorException, + NotFoundException +} from '@nestjs/common'; +import axios from 'axios'; import * as color from 'bash-color'; +import * as fs from 'fs-extra'; +import * as _ from 'lodash'; import * as NodeCache from 'node-cache'; import * as pLimit from 'p-limit'; - -import { Logger } from '../../core/logger/logger.service'; +import * as semver from 'semver'; import { ConfigService, HomebridgeConfig } from '../../core/config/config.service'; +import { Logger } from '../../core/logger/logger.service'; import { NodePtyService } from '../../core/node-pty/node-pty.service'; import { HomebridgeUpdateActionDto, PluginActionDto } from './plugins.dto'; +import { + HomebridgePlugin, + INpmRegistryModule, + INpmSearchResults, + IPackageJson +} from './types'; +import { HomebridgePluginUiMetadata, HomebridgePluginVersions, PluginAlias } from './types'; @Injectable() export class PluginsService { @@ -257,7 +266,7 @@ export class PluginsService { && (query.indexOf('homebridge-') === 0 || this.isScopedPlugin(query)) && !this.searchResultBlacklist.includes(query.toLowerCase()) ) { - return await this.searchNpmRegistrySingle(query.toLowerCase()); + return this.searchNpmRegistrySingle(query.toLowerCase()); } return _.orderBy(result, ['verifiedPlugin'], ['desc']); @@ -446,7 +455,7 @@ export class PluginsService { if (this.configService.ui.homebridgePackagePath) { const pjsonPath = path.join(this.configService.ui.homebridgePackagePath, 'package.json'); if (await fs.pathExists(pjsonPath)) { - return await this.parsePackageJson(await fs.readJson(pjsonPath), this.configService.ui.homebridgePackagePath); + return this.parsePackageJson(await fs.readJson(pjsonPath), this.configService.ui.homebridgePackagePath); } else { this.logger.error(`"homebridgePath" (${this.configService.ui.homebridgePackagePath}) does not exist`); } @@ -499,10 +508,10 @@ export class PluginsService { semver.gt(homebridge.installedVersion, homebridge.latestVersion) ) { const versions = await this.getAvailablePluginVersions('homebridge'); - if (versions.tags['beta'] && semver.gt(versions.tags['beta'], homebridge.installedVersion)) { + if (versions.tags.beta && semver.gt(versions.tags.beta, homebridge.installedVersion)) { homebridge.updateAvailable = false; homebridge.betaUpdateAvailable = true; - homebridge.latestVersion = versions.tags['beta']; + homebridge.latestVersion = versions.tags.beta; } } @@ -714,7 +723,7 @@ export class PluginsService { const schemaPath = path.resolve(plugin.installPath, pluginName, 'config.schema.json'); if (this.miscSchemas[pluginName] && !await fs.pathExists(schemaPath)) { - return await fs.readJson(this.miscSchemas[pluginName]); + return fs.readJson(this.miscSchemas[pluginName]); } let configSchema = await fs.readJson(schemaPath); @@ -1223,9 +1232,9 @@ export class PluginsService { semver.gt(plugin.installedVersion, plugin.latestVersion) ) { const versions = await this.getAvailablePluginVersions(plugin.name); - if (versions.tags['beta'] && semver.gt(versions.tags['beta'], plugin.installedVersion)) { + if (versions.tags.beta && semver.gt(versions.tags.beta, plugin.installedVersion)) { plugin.betaUpdateAvailable = true; - plugin.latestVersion = versions.tags['beta']; + plugin.latestVersion = versions.tags.beta; } } } diff --git a/src/modules/plugins/types.d.ts b/src/modules/plugins/types.d.ts index 44ed7604a..7610da543 100644 --- a/src/modules/plugins/types.d.ts +++ b/src/modules/plugins/types.d.ts @@ -26,42 +26,18 @@ export interface HomebridgePlugin { funding?: NpmFunding; } +export type HomebridgePluginUiMetadata = { + devServer: null | string; + publicPath: string; + serverPath: string; + plugin: HomebridgePlugin; +}; + export interface HomebridgePluginVersions { tags: Record; versions: Array; } -export interface IPackageJson { - name: string; - displayName?: string; - version?: string; - description?: string; - keywords?: string[]; - homepage?: string; - bugs?: string | { email?: string; url?: string }; - license?: string; - author?: string | INpmPerson; - maintainers?: INpmPerson[]; - contributors?: string[] | INpmPerson[]; - funding?: NpmFunding; - files?: string[]; - main?: string; - bin?: string | { [key: string]: string }; - repository?: string | { type: string; url: string }; - scripts?: { [key: string]: string }; - dependencies?: { [key: string]: string }; - devDependencies?: { [key: string]: string }; - peerDependencies?: { [key: string]: string }; - optionalDependencies?: { [key: string]: string }; - bundledDependencies?: string[]; - engines?: { [key: string]: string }; - os?: string[]; - cpu?: string[]; - preferGlobal?: boolean; - private?: boolean; - publishConfig?: { registry?: string }; -} - export interface INpmPerson { name?: string; email?: string; @@ -70,6 +46,34 @@ export interface INpmPerson { url?: string; } +export interface INpmRegistryModule { + _id: string; + _rev: string; + name: string; + 'dist-tags': { + latest: string; + [key: string]: string; + }; + versions: { + [key: string]: IPackageJson; + }; + time: { + created: string; + modified: string; + [key: string]: string; + }; + maintainers: INpmPerson[]; + description: string; + homepage: string; + keywords: string[]; + repository: { type: string; url: string }; + author: INpmPerson; + bugs: { email?: string; url?: string }; + license: string; + readme: string; + readmeFilename: string; +} + export interface INpmSearchResultItem { package: { name: string; @@ -102,46 +106,42 @@ export interface INpmSearchResultItem { searchScore: number; } -export interface INpmRegistryModule { - _id: string; - _rev: string; - name: string; - 'dist-tags': { - latest: string; - [key: string]: string; - }; - versions: { - [key: string]: IPackageJson; - }; - time: { - created: string; - modified: string; - [key: string]: string; - }; - maintainers: INpmPerson[]; - description: string; - homepage: string; - keywords: string[]; - repository: { type: string; url: string }; - author: INpmPerson; - bugs: { email?: string; url?: string }; - license: string; - readme: string; - readmeFilename: string; -} - export interface INpmSearchResults { objects: INpmSearchResultItem[]; } -export type NpmFunding = { type: string; url: string } | string | Array<{ type: string; url: string } | string>; +export interface IPackageJson { + name: string; + displayName?: string; + version?: string; + description?: string; + keywords?: string[]; + homepage?: string; + bugs?: string | { email?: string; url?: string }; + license?: string; + author?: string | INpmPerson; + maintainers?: INpmPerson[]; + contributors?: string[] | INpmPerson[]; + funding?: NpmFunding; + files?: string[]; + main?: string; + bin?: string | { [key: string]: string }; + repository?: string | { type: string; url: string }; + scripts?: { [key: string]: string }; + dependencies?: { [key: string]: string }; + devDependencies?: { [key: string]: string }; + peerDependencies?: { [key: string]: string }; + optionalDependencies?: { [key: string]: string }; + bundledDependencies?: string[]; + engines?: { [key: string]: string }; + os?: string[]; + cpu?: string[]; + preferGlobal?: boolean; + private?: boolean; + publishConfig?: { registry?: string }; +} -export type HomebridgePluginUiMetadata = { - devServer: null | string; - publicPath: string; - serverPath: string; - plugin: HomebridgePlugin; -}; +export type NpmFunding = { type: string; url: string } | string | Array<{ type: string; url: string } | string>; export type PluginAlias = { pluginAlias: null | string; diff --git a/src/modules/server/server.controller.ts b/src/modules/server/server.controller.ts index 8af1a235a..13586dc01 100644 --- a/src/modules/server/server.controller.ts +++ b/src/modules/server/server.controller.ts @@ -1,11 +1,26 @@ -import { Controller, Get, UseGuards, Put, Delete, Param, HttpCode, Body, Query } from '@nestjs/common'; +import { + Body, + Controller, + Delete, + Get, + HttpCode, + Param, + Put, + Query, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiParam, ApiOperation, ApiQuery } from '@nestjs/swagger'; - +import { + ApiBearerAuth, + ApiOperation, + ApiParam, + ApiQuery, + ApiTags +} from '@nestjs/swagger'; import { AdminGuard } from '../../core/auth/guards/admin.guard'; import { ChildBridgesService } from '../child-bridges/child-bridges.service'; -import { ServerService } from './server.service'; import { HomebridgeMdnsSettingDto, HomebridgeNetworkInterfacesDto } from './server.dto'; +import { ServerService } from './server.service'; @ApiTags('Homebridge') @ApiBearerAuth() diff --git a/src/modules/server/server.dto.ts b/src/modules/server/server.dto.ts index b8e4eaaf4..bbbe4585a 100644 --- a/src/modules/server/server.dto.ts +++ b/src/modules/server/server.dto.ts @@ -1,17 +1,22 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsArray, IsDefined, IsIn, IsString } from 'class-validator'; - -export class HomebridgeNetworkInterfacesDto { - @IsArray() - @IsString({ each: true }) - @ApiProperty() - adapters: string[]; -} +import { + IsArray, + IsDefined, + IsIn, + IsString +} from 'class-validator'; export class HomebridgeMdnsSettingDto { @IsString() @IsDefined() @IsIn(['avahi', 'resolved', 'ciao', 'bonjour-hap']) @ApiProperty() - advertiser: 'avahi' | 'resolved' | 'ciao' | 'bonjour-hap'; + advertiser: 'avahi' | 'resolved' | 'ciao' | 'bonjour-hap'; +} + +export class HomebridgeNetworkInterfacesDto { + @IsArray() + @IsString({ each: true }) + @ApiProperty() + adapters: string[]; } diff --git a/src/modules/server/server.module.ts b/src/modules/server/server.module.ts index 5b1ff4c72..155d5491f 100644 --- a/src/modules/server/server.module.ts +++ b/src/modules/server/server.module.ts @@ -1,14 +1,13 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - import { ConfigModule } from '../../core/config/config.module'; -import { LoggerModule } from '../../core/logger/logger.module'; import { HomebridgeIpcModule } from '../../core/homebridge-ipc/homebridge-ipc.module'; -import { ConfigEditorModule } from '../config-editor/config-editor.module'; -import { ChildBridgesModule } from '../child-bridges/child-bridges.module'; +import { LoggerModule } from '../../core/logger/logger.module'; import { AccessoriesModule } from '../accessories/accessories.module'; -import { ServerService } from './server.service'; +import { ChildBridgesModule } from '../child-bridges/child-bridges.module'; +import { ConfigEditorModule } from '../config-editor/config-editor.module'; import { ServerController } from './server.controller'; +import { ServerService } from './server.service'; @Module({ imports: [ diff --git a/src/modules/server/server.service.ts b/src/modules/server/server.service.ts index 3e7bd0eaf..55ee36e80 100644 --- a/src/modules/server/server.service.ts +++ b/src/modules/server/server.service.ts @@ -1,18 +1,23 @@ -import * as fs from 'fs-extra'; +import * as child_process from 'child_process'; import * as path from 'path'; +import { + BadRequestException, + Injectable, + InternalServerErrorException, + NotFoundException, + ServiceUnavailableException +} from '@nestjs/common'; +import { Categories } from '@oznu/hap-client/dist/hap-types'; import * as bufferShim from 'buffer-shims'; -import * as si from 'systeminformation'; +import * as fs from 'fs-extra'; import * as NodeCache from 'node-cache'; -import * as child_process from 'child_process'; +import * as si from 'systeminformation'; import * as tcpPortUsed from 'tcp-port-used'; -import { Injectable, NotFoundException, BadRequestException, ServiceUnavailableException, InternalServerErrorException } from '@nestjs/common'; -import { Categories } from '@oznu/hap-client/dist/hap-types'; - -import { Logger } from '../../core/logger/logger.service'; import { ConfigService, HomebridgeConfig } from '../../core/config/config.service'; import { HomebridgeIpcService } from '../../core/homebridge-ipc/homebridge-ipc.service'; -import { ConfigEditorService } from '../config-editor/config-editor.service'; +import { Logger } from '../../core/logger/logger.service'; import { AccessoriesService } from '../accessories/accessories.service'; +import { ConfigEditorService } from '../config-editor/config-editor.service'; import { HomebridgeMdnsSettingDto } from './server.dto'; @Injectable() @@ -103,7 +108,7 @@ export class ServerService { .filter(x => x.match(/AccessoryInfo\.([A-F,a-f,0-9]+)\.json/)); return Promise.all(devices.map(async (x) => { - return await this.getDevicePairingById(x.split('.')[1]); + return this.getDevicePairingById(x.split('.')[1]); })); } @@ -256,10 +261,10 @@ export class ServerService { try { this.logger.log('Clearing Cached Homebridge Accessories...'); - for (const cachedAccessoriesPath of cachedAccessoryPaths) { - if (await fs.pathExists(cachedAccessoriesPath)) { - await fs.unlink(cachedAccessoriesPath); - this.logger.warn(`Removed ${cachedAccessoriesPath}`); + for (const thisCachedAccessoriesPath of cachedAccessoryPaths) { + if (await fs.pathExists(thisCachedAccessoriesPath)) { + await fs.unlink(thisCachedAccessoriesPath); + this.logger.warn(`Removed ${thisCachedAccessoriesPath}`); } } } catch (e) { diff --git a/src/modules/setup-wizard/setup-wizard.controller.ts b/src/modules/setup-wizard/setup-wizard.controller.ts index 0f1714ad7..af49162b5 100644 --- a/src/modules/setup-wizard/setup-wizard.controller.ts +++ b/src/modules/setup-wizard/setup-wizard.controller.ts @@ -1,8 +1,13 @@ -import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common'; +import { + Body, + Controller, + Get, + Post, + UseGuards +} from '@nestjs/common'; import { ApiOperation, ApiTags } from '@nestjs/swagger'; - -import { UserDto } from '../users/users.dto'; import { AuthService } from '../../core/auth/auth.service'; +import { UserDto } from '../users/users.dto'; import { SetupWizardGuard } from './setup-wizard.guard'; @ApiTags('Setup Wizard') @@ -19,7 +24,7 @@ export class SetupWizardController { description: 'This endpoint is not available after the Homebridge setup wizard is complete.', }) async setupFirstUser(@Body() body: UserDto) { - return await this.authService.setupFirstUser(body); + return this.authService.setupFirstUser(body); } @Get('/get-setup-wizard-token') @@ -28,6 +33,6 @@ export class SetupWizardController { description: 'This endpoint is not available after the Homebridge setup wizard is complete.', }) async generateSetupWizardToken() { - return await this.authService.generateSetupWizardToken(); + return this.authService.generateSetupWizardToken(); } } diff --git a/src/modules/setup-wizard/setup-wizard.gateway.ts b/src/modules/setup-wizard/setup-wizard.gateway.ts index a065a4c66..7d27f5cc0 100644 --- a/src/modules/setup-wizard/setup-wizard.gateway.ts +++ b/src/modules/setup-wizard/setup-wizard.gateway.ts @@ -1,10 +1,9 @@ -import * as color from 'bash-color'; import { EventEmitter } from 'events'; import { UseGuards } from '@nestjs/common'; -import { WebSocketGateway, SubscribeMessage, WsException } from '@nestjs/websockets'; - -import { Logger } from '../../core/logger/logger.service'; +import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; +import * as color from 'bash-color'; import { WsAdminGuard } from '../../core/auth/guards/ws-admin-guard'; +import { Logger } from '../../core/logger/logger.service'; import { BackupService } from '../backup/backup.service'; @UseGuards(WsAdminGuard) diff --git a/src/modules/setup-wizard/setup-wizard.guard.ts b/src/modules/setup-wizard/setup-wizard.guard.ts index 8cfda4786..076633148 100644 --- a/src/modules/setup-wizard/setup-wizard.guard.ts +++ b/src/modules/setup-wizard/setup-wizard.guard.ts @@ -1,6 +1,5 @@ import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import { Observable } from 'rxjs'; - import { ConfigService } from '../../core/config/config.service'; @Injectable() diff --git a/src/modules/setup-wizard/setup-wizard.module.ts b/src/modules/setup-wizard/setup-wizard.module.ts index 8a0c83835..e8289cdaf 100644 --- a/src/modules/setup-wizard/setup-wizard.module.ts +++ b/src/modules/setup-wizard/setup-wizard.module.ts @@ -1,9 +1,8 @@ import { Module } from '@nestjs/common'; - -import { SetupWizardController } from './setup-wizard.controller'; import { AuthModule } from '../../core/auth/auth.module'; -import { LoggerModule } from '../../core/logger/logger.module'; import { ConfigModule } from '../../core/config/config.module'; +import { LoggerModule } from '../../core/logger/logger.module'; +import { SetupWizardController } from './setup-wizard.controller'; @Module({ imports: [ diff --git a/src/modules/status/status.controller.ts b/src/modules/status/status.controller.ts index fb1da2360..bce4ae15a 100644 --- a/src/modules/status/status.controller.ts +++ b/src/modules/status/status.controller.ts @@ -1,9 +1,8 @@ -import { Controller, UseGuards, Get } from '@nestjs/common'; +import { Controller, Get, UseGuards } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; - -import { StatusService } from './status.service'; +import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { ChildBridgesService } from '../child-bridges/child-bridges.service'; +import { StatusService } from './status.service'; @ApiTags('Server Status') @ApiBearerAuth() diff --git a/src/modules/status/status.gateway.ts b/src/modules/status/status.gateway.ts index 44c2df2e6..3e6cc7ddb 100644 --- a/src/modules/status/status.gateway.ts +++ b/src/modules/status/status.gateway.ts @@ -1,10 +1,9 @@ import { UseGuards } from '@nestjs/common'; import { SubscribeMessage, WebSocketGateway, WsException } from '@nestjs/websockets'; - -import { PluginsService } from '../plugins/plugins.service'; -import { StatusService } from './status.service'; import { WsGuard } from '../../core/auth/guards/ws.guard'; import { ChildBridgesService } from '../child-bridges/child-bridges.service'; +import { PluginsService } from '../plugins/plugins.service'; +import { StatusService } from './status.service'; @UseGuards(WsGuard) @WebSocketGateway({ diff --git a/src/modules/status/status.module.ts b/src/modules/status/status.module.ts index 335920c96..f12c5ca05 100644 --- a/src/modules/status/status.module.ts +++ b/src/modules/status/status.module.ts @@ -1,16 +1,15 @@ -import { Module } from '@nestjs/common'; import { HttpModule } from '@nestjs/axios'; +import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - -import { PluginsModule } from '../plugins/plugins.module'; import { ConfigModule } from '../../core/config/config.module'; -import { LoggerModule } from '../../core/logger/logger.module'; import { HomebridgeIpcModule } from '../../core/homebridge-ipc/homebridge-ipc.module'; +import { LoggerModule } from '../../core/logger/logger.module'; import { ChildBridgesModule } from '../child-bridges/child-bridges.module'; +import { PluginsModule } from '../plugins/plugins.module'; import { ServerModule } from '../server/server.module'; -import { StatusService } from './status.service'; -import { StatusGateway } from './status.gateway'; import { StatusController } from './status.controller'; +import { StatusGateway } from './status.gateway'; +import { StatusService } from './status.service'; @Module({ imports: [ diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index 54faae533..14f48ebfb 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -1,18 +1,17 @@ +import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; -import * as child_process from 'child_process'; import * as util from 'util'; +import { HttpService } from '@nestjs/axios'; +import { BadRequestException, Injectable } from '@nestjs/common'; import * as fs from 'fs-extra'; -import * as si from 'systeminformation'; -import * as semver from 'semver'; import * as NodeCache from 'node-cache'; import { Subject, Subscription } from 'rxjs'; -import { Injectable, BadRequestException } from '@nestjs/common'; -import { HttpService } from '@nestjs/axios'; - -import { Logger } from '../../core/logger/logger.service'; +import * as semver from 'semver'; +import * as si from 'systeminformation'; import { ConfigService } from '../../core/config/config.service'; import { HomebridgeIpcService } from '../../core/homebridge-ipc/homebridge-ipc.service'; +import { Logger } from '../../core/logger/logger.service'; import { PluginsService } from '../plugins/plugins.service'; import { ServerService } from '../server/server.service'; @@ -178,11 +177,11 @@ export class StatusService { const net = await si.networkStats(defaultInterfaceName); // TODO: be able to specify in the ui the unit size (i.e. bytes, megabytes, gigabytes) - const tx_rx_sec = (net[0].tx_sec + net[0].rx_sec) / 1024 / 1024; + const txRxSec = (net[0].tx_sec + net[0].rx_sec) / 1024 / 1024; // TODO: break out the sent and received figures to two separate stacked graphs - // (these should ideally be positive/negative mirrored linecharts) - return { net: net[0], point: tx_rx_sec }; + // (these should ideally be positive/negative mirrored line charts) + return { net: net[0], point: txRxSec }; } /** @@ -452,7 +451,7 @@ export class StatusService { } /** - * Returns infomation about the current state of the Raspberry Pi + * Returns information about the current state of the Raspberry Pi */ public async getRaspberryPiThrottledStatus() { if (!this.configService.runningOnRaspberryPi) { diff --git a/src/modules/users/users.controller.ts b/src/modules/users/users.controller.ts index e51eaf499..fe18cdbf5 100644 --- a/src/modules/users/users.controller.ts +++ b/src/modules/users/users.controller.ts @@ -1,9 +1,32 @@ -import { Controller, UseGuards, Body, Post, Get, Param, Delete, Patch, ParseIntPipe, Req } from '@nestjs/common'; +import { + Body, + Controller, + Delete, + Get, + Param, + ParseIntPipe, + Patch, + Post, + Req, + UseGuards +} from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import { ApiTags, ApiBearerAuth, ApiBody, ApiResponse, ApiOperation, ApiParam } from '@nestjs/swagger'; +import { + ApiBearerAuth, + ApiBody, + ApiOperation, + ApiParam, + ApiResponse, + ApiTags +} from '@nestjs/swagger'; import { AuthService } from '../../core/auth/auth.service'; import { AdminGuard } from '../../core/auth/guards/admin.guard'; -import { UserDto, UserUpdatePasswordDto, UserActivateOtpDto, UserDeactivateOtpDto } from './users.dto'; +import { + UserActivateOtpDto, + UserDeactivateOtpDto, + UserDto, + UserUpdatePasswordDto +} from './users.dto'; @ApiTags('User Management') @ApiBearerAuth() diff --git a/src/modules/users/users.dto.ts b/src/modules/users/users.dto.ts index 20268938c..17d201287 100644 --- a/src/modules/users/users.dto.ts +++ b/src/modules/users/users.dto.ts @@ -1,68 +1,76 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsString, IsNumber, IsNotEmpty, IsBoolean, IsOptional, Equals, IsDefined } from 'class-validator'; +import { + Equals, + IsBoolean, + IsDefined, + IsNotEmpty, + IsNumber, + IsOptional, + IsString +} from 'class-validator'; + +export class UserActivateOtpDto { + @IsString() + @IsNotEmpty() + @ApiProperty() + code: string; +} + +export class UserDeactivateOtpDto { + @IsString() + @IsNotEmpty() + @ApiProperty() + password: string; +} export class UserDto { @IsNumber() @ApiProperty({ readOnly: true }) - id?: number; + id?: number; @IsString() @IsNotEmpty() @IsDefined() @ApiProperty() - name: string; + name: string; @IsString() @IsNotEmpty() @IsDefined() @ApiProperty() - username: string; + username: string; @ApiProperty() @IsBoolean() - admin: boolean; + admin: boolean; @IsString() @IsOptional() @ApiProperty({ writeOnly: true }) - password?: string; + password?: string; @Equals(undefined) - hashedPassword?: string; + hashedPassword?: string; @Equals(undefined) - salt?: string; + salt?: string; @Equals(undefined) - otpSecret?: string; + otpSecret?: string; @Equals(undefined) @ApiProperty({ readOnly: true }) - otpActive?: boolean; + otpActive?: boolean; } export class UserUpdatePasswordDto { @IsString() @IsNotEmpty() @ApiProperty() - currentPassword: string; + currentPassword: string; @IsString() @IsNotEmpty() @ApiProperty() - newPassword: string; -} - -export class UserActivateOtpDto { - @IsString() - @IsNotEmpty() - @ApiProperty() - code: string; -} - -export class UserDeactivateOtpDto { - @IsString() - @IsNotEmpty() - @ApiProperty() - password: string; + newPassword: string; } diff --git a/src/modules/users/users.module.ts b/src/modules/users/users.module.ts index 9aad9c295..d23e6b796 100644 --- a/src/modules/users/users.module.ts +++ b/src/modules/users/users.module.ts @@ -1,10 +1,9 @@ import { Module } from '@nestjs/common'; import { PassportModule } from '@nestjs/passport'; - -import { UsersController } from './users.controller'; +import { AuthModule } from '../../core/auth/auth.module'; import { ConfigModule } from '../../core/config/config.module'; import { LoggerModule } from '../../core/logger/logger.module'; -import { AuthModule } from '../../core/auth/auth.module'; +import { UsersController } from './users.controller'; @Module({ imports: [ diff --git a/src/self-check.ts b/src/self-check.ts index 4fc6e7fa0..6c3456cfa 100644 --- a/src/self-check.ts +++ b/src/self-check.ts @@ -1,18 +1,48 @@ /** - * Pollyfill for Node.js 11.x that does not support `globalThis` + * Polyfill for Node.js 11.x that does not support `globalThis` * This should be removed when support for < Node.js 12 is dropped */ if (!global.globalThis && (process.versions.modules === '67' || process.versions.modules === '64')) { (global as any).globalThis = global; } +import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; -import * as child_process from 'child_process'; import { Logger } from './core/logger/logger.service'; const logger = new Logger(); +function tryRebuildNodePtyModule() { + // using eval('require') here so it does not break with webpack + const modulePath = path.dirname(path.dirname(eval('require').resolve('@homebridge/node-pty-prebuilt-multiarch'))); + + logger.warn('[node-pty] Trying to rebuild automatically...'); + logger.warn(`[node-pty] Path: ${modulePath}`); + try { + if (process.env.UIX_USE_PNPM === '1' && process.env.UIX_CUSTOM_PLUGIN_PATH) { + child_process.execSync('pnpm rebuild @homebridge/node-pty-prebuilt-multiarch', { + cwd: process.env.UIX_CUSTOM_PLUGIN_PATH, + stdio: 'ignore', + }); + } else { + child_process.execSync('npm run install --unsafe-perm', { + cwd: modulePath, + stdio: 'ignore', + }); + } + } catch (e) { + if (os.platform() !== 'win32') { + child_process.execSync('sudo -E -n run install --unsafe-perm', { + cwd: modulePath, + stdio: 'ignore', + }); + } else { + throw e; + } + } +} + /** * The purpose of this script is to check the environment before launching the UI */ @@ -66,36 +96,6 @@ function main() { } -function tryRebuildNodePtyModule() { - // using eval('require') here so it does not break with webpack - const modulePath = path.dirname(path.dirname(eval('require').resolve('@homebridge/node-pty-prebuilt-multiarch'))); - - logger.warn('[node-pty] Trying to rebuild automatically...'); - logger.warn(`[node-pty] Path: ${modulePath}`); - try { - if (process.env.UIX_USE_PNPM === '1' && process.env.UIX_CUSTOM_PLUGIN_PATH) { - child_process.execSync('pnpm rebuild @homebridge/node-pty-prebuilt-multiarch', { - cwd: process.env.UIX_CUSTOM_PLUGIN_PATH, - stdio: 'ignore', - }); - } else { - child_process.execSync('npm run install --unsafe-perm', { - cwd: modulePath, - stdio: 'ignore', - }); - } - } catch (e) { - if (os.platform() !== 'win32') { - child_process.execSync('sudo -E -n run install --unsafe-perm', { - cwd: modulePath, - stdio: 'ignore', - }); - } else { - throw e; - } - } -} - main(); /** diff --git a/test/e2e/accessories.e2e-spec.ts b/test/e2e/accessories.e2e-spec.ts index 0df73c1d6..c05af9c42 100644 --- a/test/e2e/accessories.e2e-spec.ts +++ b/test/e2e/accessories.e2e-spec.ts @@ -1,12 +1,11 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; -import { AccessoriesModule } from '../../src/modules/accessories/accessories.module'; import { ConfigService } from '../../src/core/config/config.service'; +import { AccessoriesModule } from '../../src/modules/accessories/accessories.module'; import { AccessoriesService } from '../../src/modules/accessories/accessories.service'; describe('AccessoriesController (e2e)', () => { diff --git a/test/e2e/app.e2e-spec.ts b/test/e2e/app.e2e-spec.ts index fdf39a3c2..c8fda035b 100644 --- a/test/e2e/app.e2e-spec.ts +++ b/test/e2e/app.e2e-spec.ts @@ -1,9 +1,8 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import { Test, TestingModule } from '@nestjs/testing'; import { ValidationPipe } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AppModule } from '../../src/app.module'; describe('AppController (e2e)', () => { diff --git a/test/e2e/auth.e2e-spec.ts b/test/e2e/auth.e2e-spec.ts index 900a4043c..1cba8313b 100644 --- a/test/e2e/auth.e2e-spec.ts +++ b/test/e2e/auth.e2e-spec.ts @@ -1,12 +1,11 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; -import { ConfigService } from '../../src/core/config/config.service'; import { AuthService } from '../../src/core/auth/auth.service'; +import { ConfigService } from '../../src/core/config/config.service'; describe('AuthController (e2e)', () => { let app: NestFastifyApplication; @@ -58,8 +57,8 @@ describe('AuthController (e2e)', () => { afterEach(async () => { // restore auth mode after each test - const configService: ConfigService = app.get(ConfigService); - configService.ui.auth = 'form'; + const thisConfigService: ConfigService = app.get(ConfigService); + thisConfigService.ui.auth = 'form'; }); it('should .uix-secrets on launch', async () => { @@ -147,8 +146,8 @@ describe('AuthController (e2e)', () => { it('POST /auth/noauth (auth disabled)', async () => { // set auth mode to none - const configService: ConfigService = app.get(ConfigService); - configService.ui.auth = 'none'; + const thisConfigService: ConfigService = app.get(ConfigService); + thisConfigService.ui.auth = 'none'; const res = await app.inject({ method: 'POST', diff --git a/test/e2e/backup.e2e-spec.ts b/test/e2e/backup.e2e-spec.ts index e50fb3e59..99c35eeec 100644 --- a/test/e2e/backup.e2e-spec.ts +++ b/test/e2e/backup.e2e-spec.ts @@ -1,20 +1,19 @@ -import * as path from 'path'; -import * as fs from 'fs-extra'; -import * as dayjs from 'dayjs'; import { EventEmitter } from 'events'; +import * as path from 'path'; +import fastifyMultipart from '@fastify/multipart'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; -import fastifyMultipart from '@fastify/multipart'; +import { Test, TestingModule } from '@nestjs/testing'; +import * as dayjs from 'dayjs'; import * as FormData from 'form-data'; - +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; +import { ConfigService } from '../../src/core/config/config.service'; +import { SchedulerService } from '../../src/core/scheduler/scheduler.service'; +import { BackupGateway } from '../../src/modules/backup/backup.gateway'; import { BackupModule } from '../../src/modules/backup/backup.module'; import { BackupService } from '../../src/modules/backup/backup.service'; -import { BackupGateway } from '../../src/modules/backup/backup.gateway'; import { PluginsService } from '../../src/modules/plugins/plugins.service'; -import { ConfigService } from '../../src/core/config/config.service'; -import { SchedulerService } from '../../src/core/scheduler/scheduler.service'; describe('BackupController (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/config-editor.e2e-spec.ts b/test/e2e/config-editor.e2e-spec.ts index 6108806ec..527efcaae 100644 --- a/test/e2e/config-editor.e2e-spec.ts +++ b/test/e2e/config-editor.e2e-spec.ts @@ -1,14 +1,13 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import * as dayjs from 'dayjs'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as dayjs from 'dayjs'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; -import { ConfigEditorModule } from '../../src/modules/config-editor/config-editor.module'; import { HomebridgeConfig } from '../../src/core/config/config.service'; import { SchedulerService } from '../../src/core/scheduler/scheduler.service'; +import { ConfigEditorModule } from '../../src/modules/config-editor/config-editor.module'; import { ConfigEditorService } from '../../src/modules/config-editor/config-editor.service'; describe('ConfigEditorController (e2e)', () => { diff --git a/test/e2e/custom-plugins.e2e-spec.ts b/test/e2e/custom-plugins.e2e-spec.ts index fef952db1..3d1ac7a0b 100644 --- a/test/e2e/custom-plugins.e2e-spec.ts +++ b/test/e2e/custom-plugins.e2e-spec.ts @@ -1,10 +1,9 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import { ValidationPipe } from '@nestjs/common'; import { HttpService } from '@nestjs/axios'; -import { Test, TestingModule } from '@nestjs/testing'; +import { ValidationPipe } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; import { CustomPluginsModule } from '../../src/modules/custom-plugins/custom-plugins.module'; diff --git a/test/e2e/fastify.e2e-spec.ts b/test/e2e/fastify.e2e-spec.ts index 06144521f..0c1d56d44 100644 --- a/test/e2e/fastify.e2e-spec.ts +++ b/test/e2e/fastify.e2e-spec.ts @@ -1,11 +1,10 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; +import fastifyMultipart from '@fastify/multipart'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; +import { Test, TestingModule } from '@nestjs/testing'; import { fastify } from 'fastify'; -import fastifyMultipart from '@fastify/multipart'; - +import * as fs from 'fs-extra'; import { AppModule } from '../../src/app.module'; describe('FastifyOptions (e2e)', () => { diff --git a/test/e2e/log.gateway.e2e-spec.ts b/test/e2e/log.gateway.e2e-spec.ts index 3a489a93f..5c60620ca 100644 --- a/test/e2e/log.gateway.e2e-spec.ts +++ b/test/e2e/log.gateway.e2e-spec.ts @@ -1,14 +1,13 @@ +import { EventEmitter } from 'events'; import * as os from 'os'; import * as path from 'path'; -import * as fs from 'fs-extra'; -import { EventEmitter } from 'events'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - -import { LogModule } from '../../src/modules/log/log.module'; +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; +import { ConfigService } from '../../src/core/config/config.service'; import { LogGateway } from '../../src/modules/log/log.gateway'; +import { LogModule } from '../../src/modules/log/log.module'; import { LogService } from '../../src/modules/log/log.service'; -import { ConfigService } from '../../src/core/config/config.service'; describe('LogGateway (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/platform-tools-docker.e2e-spec.ts b/test/e2e/platform-tools-docker.e2e-spec.ts index 2353e52d9..d8436e26f 100644 --- a/test/e2e/platform-tools-docker.e2e-spec.ts +++ b/test/e2e/platform-tools-docker.e2e-spec.ts @@ -1,12 +1,11 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; -import { DockerService } from '../../src/modules/platform-tools/docker/docker.service'; import { DockerModule } from '../../src/modules/platform-tools/docker/docker.module'; +import { DockerService } from '../../src/modules/platform-tools/docker/docker.service'; describe('PlatformToolsDocker (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/platform-tools-hb-service.e2e-spec.ts b/test/e2e/platform-tools-hb-service.e2e-spec.ts index dbe8026ea..b67809db7 100644 --- a/test/e2e/platform-tools-hb-service.e2e-spec.ts +++ b/test/e2e/platform-tools-hb-service.e2e-spec.ts @@ -1,12 +1,11 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; -import { HbServiceModule } from '../../src/modules/platform-tools/hb-service/hb-service.module'; import { ConfigService } from '../../src/core/config/config.service'; +import { HbServiceModule } from '../../src/modules/platform-tools/hb-service/hb-service.module'; describe('PlatformToolsHbService (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/platform-tools-linux.e2e-spec.ts b/test/e2e/platform-tools-linux.e2e-spec.ts index 4867e7bd8..a875c38b5 100644 --- a/test/e2e/platform-tools-linux.e2e-spec.ts +++ b/test/e2e/platform-tools-linux.e2e-spec.ts @@ -1,9 +1,8 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; import { LinuxModule } from '../../src/modules/platform-tools/linux/linux.module'; import { LinuxService } from '../../src/modules/platform-tools/linux/linux.service'; diff --git a/test/e2e/platform-tools-terminal.e2e-spec.ts b/test/e2e/platform-tools-terminal.e2e-spec.ts index 50eee02db..d6799f86a 100644 --- a/test/e2e/platform-tools-terminal.e2e-spec.ts +++ b/test/e2e/platform-tools-terminal.e2e-spec.ts @@ -1,22 +1,17 @@ -import * as path from 'path'; -import * as fs from 'fs-extra'; import { EventEmitter } from 'events'; -import { Test, TestingModule } from '@nestjs/testing'; -import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; +import * as path from 'path'; import type { IPty } from '@homebridge/node-pty-prebuilt-multiarch'; - +import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { ConfigService } from '../../src/core/config/config.service'; +import { NodePtyService } from '../../src/core/node-pty/node-pty.service'; +import { TerminalGateway } from '../../src/modules/platform-tools/terminal/terminal.gateway'; import { TerminalModule } from '../../src/modules/platform-tools/terminal/terminal.module'; import { WsEventEmitter } from '../../src/modules/platform-tools/terminal/terminal.service'; -import { TerminalGateway } from '../../src/modules/platform-tools/terminal/terminal.gateway'; -import { NodePtyService } from '../../src/core/node-pty/node-pty.service'; // create mock websocket client -class MockWsEventEmmiter extends EventEmitter implements WsEventEmitter { - constructor() { - super(); - } - +class MockWsEventEmitter extends EventEmitter implements WsEventEmitter { disconnect = jest.fn(); } @@ -74,7 +69,7 @@ describe('PlatformToolsTerminal (e2e)', () => { jest.resetAllMocks(); // create client - client = new MockWsEventEmmiter(); + client = new MockWsEventEmitter(); jest.spyOn(client, 'emit'); jest.spyOn(client, 'on'); diff --git a/test/e2e/plugin-settings-ui.e2e-spec.ts b/test/e2e/plugin-settings-ui.e2e-spec.ts index 151f6a78e..392a2cd88 100644 --- a/test/e2e/plugin-settings-ui.e2e-spec.ts +++ b/test/e2e/plugin-settings-ui.e2e-spec.ts @@ -1,10 +1,9 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import { ValidationPipe } from '@nestjs/common'; import { HttpService } from '@nestjs/axios'; -import { Test, TestingModule } from '@nestjs/testing'; +import { ValidationPipe } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; import { PluginsSettingsUiModule } from '../../src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module'; diff --git a/test/e2e/plugins.e2e-spec.ts b/test/e2e/plugins.e2e-spec.ts index 5615f39da..f422ce38a 100644 --- a/test/e2e/plugins.e2e-spec.ts +++ b/test/e2e/plugins.e2e-spec.ts @@ -1,10 +1,9 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import { ValidationPipe } from '@nestjs/common'; import { HttpService } from '@nestjs/axios'; -import { Test, TestingModule } from '@nestjs/testing'; +import { ValidationPipe } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; import { PluginsModule } from '../../src/modules/plugins/plugins.module'; import { HomebridgePlugin } from '../../src/modules/plugins/types'; diff --git a/test/e2e/plugins.gateway.e2e-spec.ts b/test/e2e/plugins.gateway.e2e-spec.ts index f2ce8d52b..e7f33099a 100644 --- a/test/e2e/plugins.gateway.e2e-spec.ts +++ b/test/e2e/plugins.gateway.e2e-spec.ts @@ -1,15 +1,14 @@ +import { EventEmitter } from 'events'; import * as os from 'os'; import * as path from 'path'; -import * as fs from 'fs-extra'; -import { EventEmitter } from 'events'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { ConfigService } from '../../src/core/config/config.service'; +import { NodePtyService } from '../../src/core/node-pty/node-pty.service'; +import { PluginsGateway } from '../../src/modules/plugins/plugins.gateway'; import { PluginsModule } from '../../src/modules/plugins/plugins.module'; import { PluginsService } from '../../src/modules/plugins/plugins.service'; -import { PluginsGateway } from '../../src/modules/plugins/plugins.gateway'; -import { NodePtyService } from '../../src/core/node-pty/node-pty.service'; describe('PluginsGateway (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/server.e2e-spec.ts b/test/e2e/server.e2e-spec.ts index a2e608930..07e333647 100644 --- a/test/e2e/server.e2e-spec.ts +++ b/test/e2e/server.e2e-spec.ts @@ -1,13 +1,12 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { AuthModule } from '../../src/core/auth/auth.module'; +import { ConfigService, HomebridgeConfig } from '../../src/core/config/config.service'; import { ServerModule } from '../../src/modules/server/server.module'; import { ServerService } from '../../src/modules/server/server.service'; -import { ConfigService, HomebridgeConfig } from '../../src/core/config/config.service'; describe('ServerController (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/setup-wizard.e2e-spec.ts b/test/e2e/setup-wizard.e2e-spec.ts index d98d51c13..abecc843b 100644 --- a/test/e2e/setup-wizard.e2e-spec.ts +++ b/test/e2e/setup-wizard.e2e-spec.ts @@ -1,9 +1,8 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; import { ConfigService } from '../../src/core/config/config.service'; import { SetupWizardModule } from '../../src/modules/setup-wizard/setup-wizard.module'; import { UserDto } from '../../src/modules/users/users.dto'; diff --git a/test/e2e/status.e2e-spec.ts b/test/e2e/status.e2e-spec.ts index 86fc3e877..f6f1a9794 100644 --- a/test/e2e/status.e2e-spec.ts +++ b/test/e2e/status.e2e-spec.ts @@ -1,14 +1,13 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import { AxiosResponse, AxiosError, InternalAxiosRequestConfig } from 'axios'; -import { of, throwError } from 'rxjs'; -import { ValidationPipe } from '@nestjs/common'; import { HttpService } from '@nestjs/axios'; -import { Test, TestingModule } from '@nestjs/testing'; +import { ValidationPipe } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - -import { StatusModule } from '../../src/modules/status/status.module'; +import { Test, TestingModule } from '@nestjs/testing'; +import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; +import * as fs from 'fs-extra'; +import { of, throwError } from 'rxjs'; import { AuthModule } from '../../src/core/auth/auth.module'; +import { StatusModule } from '../../src/modules/status/status.module'; describe('StatusController (e2e)', () => { let app: NestFastifyApplication; diff --git a/test/e2e/users.e2e-spec.ts b/test/e2e/users.e2e-spec.ts index b3eb32aa8..f00443380 100644 --- a/test/e2e/users.e2e-spec.ts +++ b/test/e2e/users.e2e-spec.ts @@ -1,12 +1,16 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; -import { authenticator } from 'otplib'; import { ValidationPipe } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; - +import { Test, TestingModule } from '@nestjs/testing'; +import * as fs from 'fs-extra'; +import { authenticator } from 'otplib'; +import { + UserActivateOtpDto, + UserDeactivateOtpDto, + UserDto, + UserUpdatePasswordDto +} from '../../src/modules/users/users.dto'; import { UsersModule } from '../../src/modules/users/users.module'; -import { UserDto, UserUpdatePasswordDto, UserActivateOtpDto, UserDeactivateOtpDto } from '../../src/modules/users/users.dto'; describe('UsersController (e2e)', () => { let app: NestFastifyApplication; From babaaca489ffcef2b1e50e47b9496b2f393f509c Mon Sep 17 00:00:00 2001 From: SonnyT72 Date: Sun, 5 Nov 2023 13:51:19 +0100 Subject: [PATCH 004/110] Update fr.json (#1629) Language update --- ui/src/i18n/fr.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/i18n/fr.json b/ui/src/i18n/fr.json index 929f24fdc..60c14cc33 100644 --- a/ui/src/i18n/fr.json +++ b/ui/src/i18n/fr.json @@ -180,8 +180,8 @@ "plugins.manage.label_installed": "Installé", "plugins.manage.label_manual_update_required": "Mise à jour manuelle requise", "plugins.manage.label_online_updates_not_supported_on_windows": "Les mises à jour en ligne ne sont pas supportées sous Windows. Vous devrez mettre à jour Homebridge UI manuellement après avoir arrêté le service Homebridge.", - "plugins.manage.label_release_notes": "Release Notes", - "plugins.manage.label_release_notes_beta": "Beta Information", + "plugins.manage.label_release_notes": "Notes de Version", + "plugins.manage.label_release_notes_beta": "Notes de la Version Bêta", "plugins.manage.label_uninstall": "Désinstaller", "plugins.manage.label_uninstalled": "Désinstallé", "plugins.manage.label_update": "Mettre à jour", @@ -219,7 +219,7 @@ "plugins.status_installed": "Installé", "plugins.status_not_installed": "Non installé", "plugins.status_update_available": "Mise à jour disponible", - "plugins.status_update_beta_available": "Beta Update Available", + "plugins.status_update_beta_available": "Mise à jour version Bêta disponible", "plugins.toast_failed_to_load_plugins": "Erreur de chargement des plugins", "plugins.tooltip_update_plugin_to": "Mettre à jour le plugin vers v{{latestVersion}}", "reset.accessories_will_may_need_to_be_reconfigured": "Après la réalisation de cette action, certains accessoires devront peut-être être reconfigurés dans HomeKit ou de nouveau ajoutés à vos Automatisations.", From 3d09163cee52fc308afa581c34a9ad57b77f99e7 Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Mon, 6 Nov 2023 05:34:44 +0100 Subject: [PATCH 005/110] Update pl.json (#1633) --- ui/src/i18n/pl.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/i18n/pl.json b/ui/src/i18n/pl.json index 80ca47411..c901b9e4a 100644 --- a/ui/src/i18n/pl.json +++ b/ui/src/i18n/pl.json @@ -180,8 +180,8 @@ "plugins.manage.label_installed": "Zainstalowano", "plugins.manage.label_manual_update_required": "Wymagana ręczna aktualizacja", "plugins.manage.label_online_updates_not_supported_on_windows": "Aktualizacje online w systemie Windows nie są wspierane. Musisz zaktualizować Config UI X ręcznie po zatrzymaniu Homebridge.", - "plugins.manage.label_release_notes": "Release Notes", - "plugins.manage.label_release_notes_beta": "Beta Information", + "plugins.manage.label_release_notes": "Opis zmian", + "plugins.manage.label_release_notes_beta": "Opis zmian beta", "plugins.manage.label_uninstall": "Odinstaluj", "plugins.manage.label_uninstalled": "Odinstalowano", "plugins.manage.label_update": "Aktualizuj", @@ -191,7 +191,7 @@ "plugins.manage.message_install_alternate_version": "Zainstaluj inną wersję", "plugins.manage.message_select_version_to_install": "Wybierz wersję do instalacji", "plugins.manage.message_thanks_for_updating": "Dziękujemy za zainstalowanie najnowszej wersji interfejsu {{ pluginName }}.", - "plugins.manage.message_thanks_for_updating_restart": "Please restart Homebridge for the changes to apply. Alternatively, if you have this plugin running in child bridges, you can close this modal and restart these instead.", + "plugins.manage.message_thanks_for_updating_restart": "Zrestartuj Homebridge aby zastosować zmiany. Alternatywnie, jeśli ta wtyczka pracuje jako mostek podżędny, możesz zamknąć to okno i zrestartować sam mostek.", "plugins.manage.message_uninstall_remove_config_required": "Jeśli całkowicie usunąłeś tę wtyczkę, upewnij się, że usunąłeś jej konfigurację w pliku config.json przed zrestartowaniem Homebridge.", "plugins.manage.message_uninstall_remove_confirmation": "Jesteś pewny że chcesz odinstalować {{ pluginName }}?", "plugins.manage.message_uninstall_remove_plugin_config": "Usunąć również konfigurację tej wtyczki?", @@ -219,7 +219,7 @@ "plugins.status_installed": "Zainstalowany", "plugins.status_not_installed": "Niezainstalowany", "plugins.status_update_available": "Dostępna aktualizacja", - "plugins.status_update_beta_available": "Beta Update Available", + "plugins.status_update_beta_available": "Dostępna aktualizacja beta", "plugins.toast_failed_to_load_plugins": "Nie udało się załadować wtyczek", "plugins.tooltip_update_plugin_to": "Zaktualizuj wtyczkę do wersji {{latestVersion}}", "reset.accessories_will_may_need_to_be_reconfigured": "Po wykonaniu tej czynności dla niektórych akcesoriów może być wymagana ponowna ich konfiguracja w HomeKit lub ponowne dodanie do automatyzacji.", From 35e94b935d4a7f4f486ee4845ee07f8510a3dd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20Silva=20Mart=C3=ADnez?= <56647475+AxelDreemurr@users.noreply.github.com> Date: Mon, 6 Nov 2023 01:44:50 -0300 Subject: [PATCH 006/110] Update es.json (Improves Spanish localization) (#1632) Major improvements to the Spanish localization. ### :recycle: Current situation The current Spanish localization of the Homebridge UI has room for improvement. Some phrases and terms used are not the most accurate or natural translations, which can lead to confusion for Spanish-speaking users. For example, the term "triggered" was translated as "activado", which is incorrect. ### :bulb: Proposed solution This pull request introduces major improvements to the Spanish localization of the Homebridge UI. The changes include more accurate translations of technical terms, better grammar, and more natural sounding phrases. These changes do not affect the internal structure of the project, but they significantly improve the user experience for Spanish-speaking users. ### :gear: Release Notes From a user's point of view, Spanish-speaking users will notice a significant improvement in the translations. The language will sound more natural and less like a direct translation from English. This will make the Homebridge UI more accessible and user-friendly for Spanish-speaking users. There are no breaking changes introduced with this pull request. --- ui/src/i18n/es.json | 110 ++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/ui/src/i18n/es.json b/ui/src/i18n/es.json index 9f1116cd1..f1b76a484 100644 --- a/ui/src/i18n/es.json +++ b/ui/src/i18n/es.json @@ -1,15 +1,15 @@ { - "accessories.button_add_room": "Añadir Habitación", - "accessories.button_create_room": "Crear Habitación", - "accessories.button_toggle_hidden": "Ocultar Interruptor", - "accessories.button_toggle_layout_lock": "Bloquear interfaz interruptor", - "accessories.control.default_room": "Habitación Predeterminada", + "accessories.button_add_room": "Añadir habitación", + "accessories.button_create_room": "Crear habitación", + "accessories.button_toggle_hidden": "Ocultar interruptor", + "accessories.button_toggle_layout_lock": "Bloquear interfaz del interruptor", + "accessories.control.default_room": "Habitación predeterminada", "accessories.control.drag_here": "Arrastrar y soltar aquí.", "accessories.control.label_auto": "Auto", - "accessories.control.label_away": "Away", + "accessories.control.label_away": "Ausente", "accessories.control.label_batteryservice_charging": "Cargando", "accessories.control.label_batteryservice_notchargeable": "No cargable", - "accessories.control.label_batteryservice_notcharging": "No Cargando", + "accessories.control.label_batteryservice_notcharging": "No está cargando", "accessories.control.label_brightness": "Brillo", "accessories.control.label_closed": "Cerrado", "accessories.control.label_closing": "Cerrando", @@ -26,18 +26,18 @@ "accessories.control.label_mute": "Silencio", "accessories.control.label_night": "Noche", "accessories.control.label_not_mute": "On", - "accessories.control.label_off": "Off", - "accessories.control.label_on": "On", + "accessories.control.label_off": "Apagado", + "accessories.control.label_on": "Encendido", "accessories.control.label_open": "Abierto", "accessories.control.label_opening": "Abriendo", "accessories.control.label_rotation_speed": "Velocidad de giro", - "accessories.control.label_running": "Running", + "accessories.control.label_running": "En funcionamiento", "accessories.control.label_speaker_volume": "Volumen", "accessories.control.label_stopped": "Detenido", "accessories.control.label_target": "Objetivo", - "accessories.control.label_target_humidity": "Humedad Deseada", + "accessories.control.label_target_humidity": "Humedad deseada", "accessories.control.label_target_temperature": "Temperatura deseada", - "accessories.control.label_triggered": "Activado", + "accessories.control.label_triggered": "Accionado", "accessories.control.label_unknown": "Desconocido", "accessories.control.label_unlocked": "Desbloqueado", "accessories.label_hide_this_accessory": "Ocultar este accesorio", @@ -49,24 +49,24 @@ "accessories.message_for_more_information": "para más información.", "accessories.message_must_use_insecure_mode": "Para controlar tus accesorios debes ejecutar Homebridge en el modo inseguro.", "accessories.message_please_see": "Por favor, mira", - "accessories.message_rooms_not_appear_in_homekit": "Las habitaciones creadas aquí no aparecerán en HomeKit, sólo son para organizar los accesorios en Homebridge UI.", + "accessories.message_rooms_not_appear_in_homekit": "Las habitaciones creadas aquí no aparecerán en HomeKit, son sólo para organizar los accesorios en Homebridge UI.", "accessories.title_accessories": "Accesorios", "accessories.title_accessory_control_disabled": "Control de accesorios Homebridge desactivado", "accessories.title_create_new_room": "Crear habitación nueva", - "backup.button_download_backup_archive": "Descargar Copia de Seguridad", - "backup.button_restore_backup": "Restaurar Copia de Seguridad", - "backup.label_archive_name": "Nombre del Archivo", - "backup.label_backup_time": "Tiempo de Respaldo", + "backup.button_download_backup_archive": "Crear y descargar copia de seguridad", + "backup.button_restore_backup": "Restaurar copia de Seguridad", + "backup.label_archive_name": "Nombre del archivo", + "backup.label_backup_time": "Hora del respaldo", "backup.label_choose_backup_file_to_restore": "Elige el archivo de copia de seguridad para restaurar…", - "backup.label_uploading": "Cargando…", - "backup.message_backup_archive_created": "Archivo de Copia de Seguridad Creado", - "backup.message_backup_download_failed": "Error al Descargar Copia de Seguridad", - "backup.message_backup_help_one": "Descargar un archivo de copia de seguridad de todo el entorno de Homebridge. Esto hará una copia de seguridad de todo el contenido de su directorio de almacenamiento de Homebridge que más tarde podrás restaurar en cualquier plataforma capaz de ejecutar Homebridge UI.", - "backup.message_backup_help_two": "Los plugins no alojados en npm, ni los plugins instalados directamente desde GitHub no serán respaldados o restaurados.", - "backup.message_backup_restored": "Copia de Seguridad Restaurada", + "backup.label_uploading": "Subiendo…", + "backup.message_backup_archive_created": "Archivo de copia de seguridad creado", + "backup.message_backup_download_failed": "Error al descargar copia de seguridad", + "backup.message_backup_help_one": "Descarga un archivo de copia de seguridad de todo el entorno de Homebridge. Esto hará una copia de seguridad de todo el contenido de su directorio de almacenamiento de Homebridge que más tarde podrás restaurar en cualquier plataforma capaz de ejecutar Homebridge UI.", + "backup.message_backup_help_two": "Aquellos plugins que no estén alojados en npm, ni los plugins que hayan sido instalados directamente desde GitHub no serán respaldados o restaurados.", + "backup.message_backup_restored": "Copia de seguridad restaurada", "backup.message_backup_warning": "Los archivos de copias de seguridad contienen información sensible que no deberías compartir con los demás.", - "backup.message_restore_failed": "Error al Restaurar", - "backup.message_restore_help_one": "Restaurar una copia de seguridad que previamente hiciste usando Homebridge UI. Tu configuración de Homebridge, accesorios en caché, emparejamientos de HomeKit y cuentas de usuario de Homebridge UI serán restaurados. Cualquier plugin de Homebridge que hayas instalado también será descargado del registro npm.", + "backup.message_restore_failed": "Error al restaurar", + "backup.message_restore_help_one": "Restaura una copia de seguridad que previamente hiciste usando Homebridge UI. Tu configuración de Homebridge, accesorios en caché, emparejamientos de HomeKit y cuentas de usuario de Homebridge UI serán restauradas. Cualquier plugin de Homebridge que hayas instalado también será descargado del registro npm.", "backup.message_restore_help_two": "Necesitarás acceder de nuevo a Homebridge UI después de realizar la restauración y utilizar las credenciales de la instancia restaurada.", "backup.message_restore_warning": "Restaurar una copia de seguridad es un proceso irreversible, sobreescribirá la configuración actual de Homebridge.", "backup.message_scheduled_backup_none_yet": "Aún no se han creado las copias de seguridad programadas. El siguiente respaldo automático está programado para realizarse a las {{ backupTime }}, horario del servidor.", @@ -74,13 +74,13 @@ "backup.title_backup": "Respaldar", "backup.title_backup_restore": "Respaldar / Restaurar", "backup.title_restore": "Restaurar", - "backup.title_scheduled_backups": "Respaldos Programados", + "backup.title_scheduled_backups": "Respaldos programados", "child_bridge.label_bridge_connect_to_homekit": "Conectar a HomeKit", - "child_bridge.label_bridge_paired": "Puente Emparejado", + "child_bridge.label_bridge_paired": "Puente emparejado", "child_bridge.label_bridge_restart_child_bridges": "Reiniciar Puentes Hijos", "child_bridge.label_bridge_settings": "Ajustes de Puente", "child_bridge.label_child_bridges": "Puentes Hijo", - "child_bridge.message_about": "Homebridge permite ejecutar la plataforma o accesorio del plugin como un puente hijo aislado. Esto puede ayudar a mejorar la capacidad general de respuesta y la fiabilidad de Homebridge.", + "child_bridge.message_about": "Homebridge permite ejecutar la plataforma o accesorio del plugin como un 'puente hijo' aislado. Esto puede ayudar a mejorar la capacidad general de respuesta y la fiabilidad de Homebridge.", "child_bridge.message_child_bridges_must_be_paired_separately": "Cada puente hijo de plataforma o accesorio deberá ser emparejado a HomeKit por separado.", "child_bridge.message_must_configure_plugin_first": "Es necesario configurar este plugin para poder modificar los ajustes del puente.", "child_bridge.message_restart_homebridge": "Reinicia Homebridge para terminar de configurar este puente hijo.", @@ -100,7 +100,7 @@ "config.toast_click_save_to_confirm_backup_restore": "Pulsa Guardar para confirmar la restauración de esta copia de seguridad.", "config.toast_config_accessory_must_be_array": "accesorios deben estar en una colección []", "config.toast_config_bridge_missing": "Falta configuración del puente", - "config.toast_config_invalid_json": "Configuración contiene un JSON inválido", + "config.toast_config_invalid_json": "La configuración contiene un JSON inválido", "config.toast_config_platform_must_be_array": "plataformas deben estar en una colección []", "config.toast_config_saved": "Configuración guardada", "config.toast_config_username_format_error": "El nombre de usuario del puente debe tener 6 pares de caracteres hexadecimales (A-F 0-9) separados por dos puntos.", @@ -113,20 +113,20 @@ "form.button_delete": "Eliminar", "form.button_edit": "Editar", "form.button_save": "Guardar", - "login.button_login": "Iniciar Sesión", - "login.label_2fa_code": "Código de Autenticación de Dos Factores", + "login.button_login": "Iniciar sesión", + "login.label_2fa_code": "Código de autenticación de dos factores", "login.label_password": "Contraseña", "login.label_username": "Usuario", "login.message_invalid_2fa_code": "El código ingresado es incorrecto o ha expirado.", - "login.message_invalid_username_or_password": "Usuario o contraseña incorrecto", + "login.message_invalid_username_or_password": "Usuario o contraseña incorrectos", "logs.label_download": "Descargar", "logs.label_truncate": "Truncar", "logs.message_download_warning": "ADVERTENCIA: El archivo de logs de Homebridge puede contener información personal, contraseñas o tokens de acceso. Por favor revisa el archivo de log y elimina cualquier información sensible antes de compartirlo con los demás.", "logs.message_log_file_truncated": "Archivo de Logs truncado.", "logs.message_truncate_log_warning": "Esta acción es irreversible y eliminará los logs existentes de Homebridge. ¿Seguro que deseas continuar?", - "logs.title_download_log_file": "Descargar Archivo de Logs", - "logs.title_truncate_log_file": "Truncar Archivo de Logs", - "menu.docker.label_restart_container": "Reiniciar Contenedor", + "logs.title_download_log_file": "Descargar archivo de Logs", + "logs.title_truncate_log_file": "Truncar archivo de Logs", + "menu.docker.label_restart_container": "Reiniciar contenedor", "menu.docker.label_settings": "Ajustes", "menu.docker.label_startup_script": "Script de inicio", "menu.docker.label_terminal": "Terminal", @@ -143,7 +143,7 @@ "menu.tooltip_user_accounts": "Cuentas de Usuario", "menu.tooltip_view_logs": "Ver logs", "platform.docker.restart_container.message_run_with_restart_always": "Asegúrate de que estés ejecutando el contenedor Docker con --restart=always", - "platform.docker.restart_container.message_server_taking_long_time_to_restart": "El reinicio del servidor está tardando mucho. Quizá debas iniciar el contedor de Docker de forma manual.", + "platform.docker.restart_container.message_server_taking_long_time_to_restart": "El reinicio del servidor está tardando mucho. Quizá debas iniciar el contenedor de Docker de forma manual.", "platform.docker.restart_container.title_restarting": "Reiniciando contenedor Docker", "platform.docker.restart_container.toast_container_restarted": "Contenedor Docker reiniciado", "platform.docker.settings.button_restart_required": "Requiere reiniciar", @@ -153,7 +153,7 @@ "platform.docker.startup_script.toast_title_script_error": "Error de Script", "platform.docker.startup_script.toast_title_script_saved": "Script de inicio guardado", "platform.linux.restart.confirmation": "¿Estás seguro de que quieres reiniciar tu sistema operativo?", - "platform.linux.restart.message_please_wait_while_server_restarts": "Por favor, espera, esta página te redigirá a Homebridge cuando se reinicie.", + "platform.linux.restart.message_please_wait_while_server_restarts": "Por favor, espera, esta página te redireccionará a Homebridge cuando se reinicie.", "platform.linux.restart.message_server_taking_long_time_to_restart": "El reinicio del servidor está tardando demasiado tiempo. Quizá debas iniciarlo de nuevo manualmente.", "platform.linux.restart.title_restarting_server": "Reiniciando Servidor", "platform.linux.restart.toast_server_restart_error": "Un error ha ocurrido al enviar el comando de reinicio al servidor", @@ -180,8 +180,8 @@ "plugins.manage.label_installed": "Instalado", "plugins.manage.label_manual_update_required": "Reinicio Manual Requerido", "plugins.manage.label_online_updates_not_supported_on_windows": "Las actualizaciones en línea no están soportadas en Windows. Necesitarás actualizar manualmente la Homebridge UI después de detener el servicio de Homebridge.", - "plugins.manage.label_release_notes": "Release Notes", - "plugins.manage.label_release_notes_beta": "Beta Information", + "plugins.manage.label_release_notes": "Notas de la actualización", + "plugins.manage.label_release_notes_beta": "Notas de la actualización beta", "plugins.manage.label_uninstall": "Desinstalar", "plugins.manage.label_uninstalled": "Desinstalado", "plugins.manage.label_update": "Actualizar", @@ -191,7 +191,7 @@ "plugins.manage.message_install_alternate_version": "Instalar versión alterna", "plugins.manage.message_select_version_to_install": "Elige la versión para instalar", "plugins.manage.message_thanks_for_updating": "Gracias por instalar la última versión de {{ pluginName }}.", - "plugins.manage.message_thanks_for_updating_restart": "Please restart Homebridge for the changes to apply. Alternatively, if you have this plugin running in child bridges, you can close this modal and restart these instead.", + "plugins.manage.message_thanks_for_updating_restart": "Por favor, reinicia Homebridge para aplicar los cambios. Sin embargo, si ejecutas este plugin como un puente hijo, puedes cerrar esta ventana y reiniciar dicho puente.", "plugins.manage.message_uninstall_remove_config_required": "Si eliminarás este plugin de forma permanente, asegúrate de quitar cualquier configuración de este plugin en el archivo config.json antes de reiniciar Homebridge.", "plugins.manage.message_uninstall_remove_confirmation": "¿Estás seguro que deseas desinstalar {{ pluginName }}?", "plugins.manage.message_uninstall_remove_plugin_config": "¿Eliminar la Configuración del Plugin?", @@ -199,13 +199,13 @@ "plugins.node_update.homebridge_node_version_too_low": "Homebridge v{{latestVersion}} requiere Node.js v{{minVersion}} o superior. Actualmente estás ejecutando Node.js {{ installedVersion }}.", "plugins.node_update.node_version_too_low": "El plugin {{ pluginName }} recomienda ejecutarse en Node.js v{{ minVersion }} o superior. Actualmente estás ejecutando Node.js {{ installedVersion }}.", "plugins.node_update.title": "Versión de Node.js", - "plugins.node_update.update_anyway": "No Importa, Actualizar", + "plugins.node_update.update_anyway": "Actualizar de todas formas", "plugins.node_update_homebridge_ui_upgrade_and_try_again": "Por favor actualiza Node.js antes de actualizar Homebridge UI.", "plugins.node_update_homebridge_upgrade_and_try_again": "Por favor actualiza Node.js antes de actualizar Homebridge.", - "plugins.placeholder_search_plugin": "Buscar plugins para instalar…", - "plugins.settings.custom.homebridge-gsh.label_account_linked": "Cuenta Vinculada", - "plugins.settings.custom.homebridge-gsh.label_link_account": "Vincular Cuenta", - "plugins.settings.custom.homebridge-gsh.label_unlink_account": "Desvincular Cuenta", + "plugins.placeholder_search_plugin": "Buscar plugins disponibles para instalar…", + "plugins.settings.custom.homebridge-gsh.label_account_linked": "Cuenta vinculada", + "plugins.settings.custom.homebridge-gsh.label_link_account": "Vincular cuenta", + "plugins.settings.custom.homebridge-gsh.label_unlink_account": "Desvincular cuenta", "plugins.settings.custom.homebridge-gsh.message_about": "El plugin Homebridge Google Smart Home te permite controlar tus accesorios de Homebridge desde un altavoz inteligente Google Home o desde la aplicación móvil Google Home.", "plugins.settings.custom.homebridge-gsh.message_account_link_required": "Para activar esta funcionalidad debes iniciar sesión con tu cuenta Google o GitHub; asegúrate que usas la misma cuenta cuando estés añadiendo la acción de Homebridge en la aplicación móvil Google Home.", "plugins.settings.custom.homebridge-gsh.message_homebridge_restart_required": "Homebridge necesita reiniciarse para que los cambios tengan efecto.", @@ -219,12 +219,12 @@ "plugins.status_installed": "Instalado", "plugins.status_not_installed": "No instalado", "plugins.status_update_available": "Actualización disponible", - "plugins.status_update_beta_available": "Beta Update Available", + "plugins.status_update_beta_available": "Actualización beta disponible", "plugins.toast_failed_to_load_plugins": "Error al cargar los plugins", - "plugins.tooltip_update_plugin_to": "Actualizar plugin a v{{latestVersion}}", + "plugins.tooltip_update_plugin_to": "Actualizar plugin a la versión {{latestVersion}}", "reset.accessories_will_may_need_to_be_reconfigured": "Después de realizar esta acción, puede que sea necesario configurar de nuevo algunos accesorios en HomeKit o volver a añadirlos a sus automatizaciones.", "reset.button_reset_homebridge_now": "Reiniciar Homebrige ahora", - "reset.message_accessory_config_will_not_be_changed": "El resto de tu configuración no será cambiada. Si Homebridge no inicia debido a una mala configuración, un reinicio no lo arreglará.", + "reset.message_accessory_config_will_not_be_changed": "El resto de tu configuración no sufrirá cambios. Si Homebridge no inicia debido a una mala configuración, un reinicio no bastará para repararlo.", "reset.message_action_is_irreversible": "Esta acción es irreversible. Por favor, lee con precaución antes de continuar.", "reset.message_all_automations_will_be_reset": "Todas las automatizaciones necesitarán ser configuradas de nuevo después de reinicio.", "reset.message_force_restart_hb_help_text": "Use esta acción para forzar el servicio hb-service a hacer un reinicio completo.", @@ -235,9 +235,9 @@ "reset.message_reset_will_unpair_from_homekit": "Un reinicio desemparejará esta instancia de Homebridge de tu configuración de Apple HomeKit.", "reset.message_unpair_bridges_cameras_tv_external_accessories": "Esta acción permite desemparejar los Puentes / Cámaras / TVs seleccionados u otros accesorios externos.", "reset.message_your_homebridge_username_will_be_changed": "Tu usuario y PIN de Homebridge han cambiado.", - "reset.title_clear_cached_accessories": "Eliminar Todos los Accesorios de la Caché", - "reset.title_clear_cached_accessories_single": "Eliminar Accesorio de la Caché", - "reset.title_force_restart_hb_service": "Forzar Reinicio del Servicio", + "reset.title_clear_cached_accessories": "Eliminar todos los accesorios de la caché", + "reset.title_clear_cached_accessories_single": "Eliminar accesorio de la caché", + "reset.title_force_restart_hb_service": "Forzar reinicio del servicio", "reset.title_reset": "Reiniciar", "reset.title_reset_homebridge_accessory": "Reiniciar accesorio Homebridge", "reset.title_unpair_bridges_cameras_tv_external_accessories": "Desemparejar Puentes / Cámaras / TVs / Accesorios Externos", @@ -246,7 +246,7 @@ "reset.toast_cached_accessory_removed": "Accesorio eliminado de la caché.", "reset.toast_clear_cached_accessories_success": "Reiniciando Homebridge y limpiando caché de accesorios.", "reset.toast_failed_to_delete_cached_accessory": "Error al eliminar accesorio.", - "reset.toast_failed_to_reset": "Error al reiniciar Homebridge. Mira los logs.", + "reset.toast_failed_to_reset": "Error al reiniciar Homebridge. Comprueba los logs.", "reset.toast_removing_cached_accessory_please_wait": "Eliminando accesorio de la caché, por favor espera…", "restart.label_restart_command_executed": "Comando de reinicio ejecutado", "restart.message_homebridge_service_ready": "Servidor Homebridge Listo", @@ -287,11 +287,11 @@ "status.cpu.title_cpu": "CPU", "status.homebridge.label_checking_for_updates": "Buscando actualizaciones…", "status.homebridge.label_up_to_date": "Actualizado", - "status.homebridge.label_update_available": "v{{latestVersion}} actualización disponible", + "status.homebridge.label_update_available": "Actualización disponible: v{{latestVersion}}", "status.memory.label_available": "Libre", "status.memory.label_total": "Total", "status.memory.title_memory": "Memoria", - "status.message_code_scan_instructions": "Escanea este código con la cámara de tu dispositivo iOS para añadirlo a la aplicación Casa.", + "status.message_code_scan_instructions": "Escanea este código con la cámara de tu dispositivo iOS o iPadOS para vincular a la aplicación Casa.", "status.network.label_received_per_second": "Recibido", "status.network.label_sent_per_second": "Enviado", "status.network.title_network": "Actividad de la Red", @@ -301,7 +301,7 @@ "status.services.label_running": "Ejecutándose", "status.services.label_running_on_port": "Ejecutándose en el Puerto {{port}}", "status.services.label_starting": "Iniciando…", - "status.uptime.title_uptime": "Tiempo Encendido", + "status.uptime.title_uptime": "Tiempo encendido", "status.widget.accessories.label_choose_accessories_to_display": "Selecciona los accesorios para mostrar en este widget desde la pestaña Accesorios.", "status.widget.add.label_homebridge_status": "Estado de Homebridge", "status.widget.add.label_pairing_code": "Código de Emparejamiento", From 672a12727bfbb3df449f917c113739d2804311f4 Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Sun, 5 Nov 2023 22:45:55 -0600 Subject: [PATCH 007/110] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d89591b..4d2f4fd9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to homebridge-config-ui-x will be documented in this file. +## Beta-4.52.2 (2023-11-XX) + +### Other Changes + +- **i18n:** Update pl.json ([1633](https://github.com/homebridge/homebridge-config-ui-x/pull/1633)) +- **i18n:** Update fr.json ([1629](https://github.com/homebridge/homebridge-config-ui-x/pull/1629)) +- **i18n:** Update es.json (Improves Spanish localization) ([1632](https://github.com/homebridge/homebridge-config-ui-x/pull/1632)) + ## 4.52.1 (2023-11-04) ### Other Changes From 8ad2f51a3b4bba97521419e7b9ac8114920dbcd1 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:04:39 +0000 Subject: [PATCH 008/110] dependencies, changelog (#1635) --- CHANGELOG.md | 7 ++++ package-lock.json | 48 +++++++++++++++---------- package.json | 6 ++-- test/e2e/config-editor.e2e-spec.ts | 2 +- test/e2e/plugin-settings-ui.e2e-spec.ts | 2 +- test/e2e/plugins.e2e-spec.ts | 2 +- test/e2e/plugins.gateway.e2e-spec.ts | 2 +- test/e2e/server.e2e-spec.ts | 4 +-- ui/package-lock.json | 18 +++++----- 9 files changed, 54 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d2f4fd9f..d2c759a41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,18 @@ All notable changes to homebridge-config-ui-x will be documented in this file. ## Beta-4.52.2 (2023-11-XX) +### Notable Changes + +- Prevent the UI from updating when running an unsupported version of Node.js + - This mimics the behaviour of updating Homebridge itself + - The option of 'Update Anyway' will still appear for other plugins when running an unsupported version of Node.js + ### Other Changes - **i18n:** Update pl.json ([1633](https://github.com/homebridge/homebridge-config-ui-x/pull/1633)) - **i18n:** Update fr.json ([1629](https://github.com/homebridge/homebridge-config-ui-x/pull/1629)) - **i18n:** Update es.json (Improves Spanish localization) ([1632](https://github.com/homebridge/homebridge-config-ui-x/pull/1632)) +- Updated dependencies, including `@homebridge/node-pty-prebuilt-multiarch` to `0.11.10` ## 4.52.1 (2023-11-04) diff --git a/package-lock.json b/package-lock.json index 9f8e1a14c..68e6210a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@fastify/multipart": "8.0.0", "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "0.11.8", + "@homebridge/node-pty-prebuilt-multiarch": "0.11.10", "@nestjs/axios": "3.0.1", "@nestjs/common": "10.2.8", "@nestjs/core": "10.2.8", @@ -41,7 +41,7 @@ "dayjs": "1.11.10", "emoji-js": "3.7.0", "fastify": "4.24.3", - "fs-extra": "10.1.0", + "fs-extra": "11.1.1", "node-cache": "5.1.2", "node-schedule": "2.1.1", "ora": "5.4.1", @@ -63,7 +63,7 @@ }, "devDependencies": { "@nestjs/testing": "^10.2.7", - "@types/fs-extra": "^9.0.13", + "@types/fs-extra": "^11.0.3", "@types/jest": "^29.5.7", "@types/node": "^18.18.8", "@types/node-schedule": "^2.1.2", @@ -938,9 +938,9 @@ } }, "node_modules/@homebridge/node-pty-prebuilt-multiarch": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.8.tgz", - "integrity": "sha512-rVG0Hr6kYeauCtKZRoJaNg2jNlx4LPSH5siQdWlfrezwjxXw3Whu50ulGKL42dHvkpvJDj5EpZbOhIgm3RpVFQ==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.10.tgz", + "integrity": "sha512-ttOE8QQRq/aRXDoKD2rfYEF50AiDLM9LPTohqCog1Z78g8k3Zqk15R/EHfTl/8cfw4l0fxt3y0dWL56wq79p2A==", "hasInstallScript": true, "dependencies": { "nan": "^2.18.0", @@ -2460,11 +2460,12 @@ "dev": true }, "node_modules/@types/fs-extra": { - "version": "9.0.13", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", - "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.3.tgz", + "integrity": "sha512-sF59BlXtUdzEAL1u0MSvuzWd7PdZvZEtnaVkzX5mjpdWTJ8brG0jUqve3jPCzSzvAKKMHTG8F8o/WMQLtleZdQ==", "dev": true, "dependencies": { + "@types/jsonfile": "*", "@types/node": "*" } }, @@ -2523,6 +2524,15 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/jsonfile": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.3.tgz", + "integrity": "sha512-/yqTk2SZ1wIezK0hiRZD7RuSf4B3whFxFamB1kGStv+8zlWScTMcHanzfc0XKWs5vA1TkHeckBlOyM8jxU8nHA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -5850,9 +5860,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "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", @@ -6200,16 +6210,16 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.14" } }, "node_modules/fs-minipass": { @@ -7229,9 +7239,9 @@ } }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.1.tgz", + "integrity": "sha512-opCrKqbthmq3SKZ10mFMQG9dk3fTa3quaOLD35kJa5ejwZHd9xAr+kLuziiZz2cG32s4lMZxNdmdcEQnTDP4+g==", "dev": true, "engines": { "node": ">=8" diff --git a/package.json b/package.json index 43adf93fb..d36b3a294 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@fastify/multipart": "8.0.0", "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "0.11.8", + "@homebridge/node-pty-prebuilt-multiarch": "0.11.10", "@nestjs/axios": "3.0.1", "@nestjs/common": "10.2.8", "@nestjs/core": "10.2.8", @@ -74,7 +74,7 @@ "dayjs": "1.11.10", "emoji-js": "3.7.0", "fastify": "4.24.3", - "fs-extra": "10.1.0", + "fs-extra": "11.1.1", "node-cache": "5.1.2", "node-schedule": "2.1.1", "ora": "5.4.1", @@ -92,7 +92,7 @@ }, "devDependencies": { "@nestjs/testing": "^10.2.7", - "@types/fs-extra": "^9.0.13", + "@types/fs-extra": "^11.0.3", "@types/jest": "^29.5.7", "@types/node": "^18.18.8", "@types/node-schedule": "^2.1.2", diff --git a/test/e2e/config-editor.e2e-spec.ts b/test/e2e/config-editor.e2e-spec.ts index 527efcaae..ffd0b9029 100644 --- a/test/e2e/config-editor.e2e-spec.ts +++ b/test/e2e/config-editor.e2e-spec.ts @@ -44,7 +44,7 @@ describe('ConfigEditorController (e2e)', () => { // copy test plugins await fs.remove(pluginsPath); - await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath, { recursive: true }); + await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath); const moduleFixture: TestingModule = await Test.createTestingModule({ imports: [ConfigEditorModule, AuthModule], diff --git a/test/e2e/plugin-settings-ui.e2e-spec.ts b/test/e2e/plugin-settings-ui.e2e-spec.ts index 392a2cd88..1ab2c32e5 100644 --- a/test/e2e/plugin-settings-ui.e2e-spec.ts +++ b/test/e2e/plugin-settings-ui.e2e-spec.ts @@ -33,7 +33,7 @@ describe('PluginsSettingsUiController (e2e)', () => { await fs.copy(path.resolve(__dirname, '../mocks', '.uix-secrets'), secretsFilePath); await fs.remove(pluginsPath); - await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath, { recursive: true }); + await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath); // create httpService instance httpService = new HttpService(); diff --git a/test/e2e/plugins.e2e-spec.ts b/test/e2e/plugins.e2e-spec.ts index f422ce38a..b61ee994c 100644 --- a/test/e2e/plugins.e2e-spec.ts +++ b/test/e2e/plugins.e2e-spec.ts @@ -35,7 +35,7 @@ describe('PluginController (e2e)', () => { await fs.copy(path.resolve(__dirname, '../mocks', '.uix-secrets'), secretsFilePath); await fs.remove(pluginsPath); - await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath, { recursive: true }); + await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath); // create httpService instance httpService = new HttpService(); diff --git a/test/e2e/plugins.gateway.e2e-spec.ts b/test/e2e/plugins.gateway.e2e-spec.ts index e7f33099a..69e136212 100644 --- a/test/e2e/plugins.gateway.e2e-spec.ts +++ b/test/e2e/plugins.gateway.e2e-spec.ts @@ -46,7 +46,7 @@ describe('PluginsGateway (e2e)', () => { await fs.copy(path.resolve(__dirname, '../mocks', '.uix-secrets'), secretsFilePath); await fs.remove(pluginsPath); - await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath, { recursive: true }); + await fs.copy(path.resolve(__dirname, '../mocks', 'plugins'), pluginsPath); const moduleFixture: TestingModule = await Test.createTestingModule({ imports: [PluginsModule], diff --git a/test/e2e/server.e2e-spec.ts b/test/e2e/server.e2e-spec.ts index 07e333647..39a08a47f 100644 --- a/test/e2e/server.e2e-spec.ts +++ b/test/e2e/server.e2e-spec.ts @@ -72,8 +72,8 @@ describe('ServerController (e2e)', () => { await fs.remove(accessoriesPath); // copy mock accessories and persist - await fs.copy(path.resolve(__dirname, '../mocks', 'persist'), persistPath, { recursive: true }); - await fs.copy(path.resolve(__dirname, '../mocks', 'accessories'), accessoriesPath, { recursive: true }); + await fs.copy(path.resolve(__dirname, '../mocks', 'persist'), persistPath); + await fs.copy(path.resolve(__dirname, '../mocks', 'accessories'), accessoriesPath); }); it('PUT /server/restart', async () => { diff --git a/ui/package-lock.json b/ui/package-lock.json index ace00726c..0e616fdc6 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -7944,9 +7944,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "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", @@ -9500,9 +9500,9 @@ } }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.1.tgz", + "integrity": "sha512-opCrKqbthmq3SKZ10mFMQG9dk3fTa3quaOLD35kJa5ejwZHd9xAr+kLuziiZz2cG32s4lMZxNdmdcEQnTDP4+g==", "dev": true, "engines": { "node": ">=8" @@ -10426,9 +10426,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { From b8736631224b1b5ca4282c5704a1836f5400ed57 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:32:21 +0000 Subject: [PATCH 009/110] update commander (#1636) update `commander` --------- Co-authored-by: Donavan Becker --- package-lock.json | 10 +++++----- package.json | 2 +- src/bin/hb-service.ts | 14 +++++++------- src/bin/standalone.ts | 4 ++-- src/index.ts | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 68e6210a6..809fcc257 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "axios": "1.6.0", "class-transformer": "0.5.1", "class-validator": "0.14.0", - "commander": "7.2.0", + "commander": "11.1.0", "dayjs": "1.11.10", "emoji-js": "3.7.0", "fastify": "4.24.3", @@ -4066,11 +4066,11 @@ } }, "node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "engines": { - "node": ">= 10" + "node": ">=16" } }, "node_modules/concat-map": { diff --git a/package.json b/package.json index d36b3a294..ac14448df 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "axios": "1.6.0", "class-transformer": "0.5.1", "class-validator": "0.14.0", - "commander": "7.2.0", + "commander": "11.1.0", "dayjs": "1.11.10", "emoji-js": "3.7.0", "fastify": "4.24.3", diff --git a/src/bin/hb-service.ts b/src/bin/hb-service.ts index bc432ddc9..366dded64 100644 --- a/src/bin/hb-service.ts +++ b/src/bin/hb-service.ts @@ -10,7 +10,7 @@ import * as child_process from 'child_process'; import * as os from 'os'; import * as path from 'path'; import axios from 'axios'; -import * as commander from 'commander'; +import { program } from 'commander'; import * as fs from 'fs-extra'; import * as ora from 'ora'; import * as semver from 'semver'; @@ -87,7 +87,7 @@ export class HomebridgeServiceHelper { process.exit(1); } - commander + program .allowUnknownOption() .storeOptionsAsProperties(true) .arguments('[install|uninstall|start|stop|restart|rebuild|run|logs|view|add|remove]') @@ -139,7 +139,7 @@ export class HomebridgeServiceHelper { } case 'rebuild': { this.logger(`Rebuilding for Node.js ${process.version}...`); - this.installer.rebuild(commander.args.includes('--all')); + this.installer.rebuild(program.args.includes('--all')); break; } case 'run': { @@ -155,15 +155,15 @@ export class HomebridgeServiceHelper { break; } case 'add': { - this.npmPluginManagement(commander.args); + this.npmPluginManagement(program.args); break; } case 'remove': { - this.npmPluginManagement(commander.args); + this.npmPluginManagement(program.args); break; } case 'update-node': { - this.checkForNodejsUpdates(commander.args.length === 2 ? commander.args[1] : null); + this.checkForNodejsUpdates(program.args.length === 2 ? program.args[1] : null); break; } case 'before-start': { @@ -175,7 +175,7 @@ export class HomebridgeServiceHelper { break; } default: { - commander.outputHelp(); + program.outputHelp(); console.log('\nThe hb-service command is provided by homebridge-config-ui-x\n'); console.log('Please provide a command:'); diff --git a/src/bin/standalone.ts b/src/bin/standalone.ts index c27feaa01..cf7f1c486 100644 --- a/src/bin/standalone.ts +++ b/src/bin/standalone.ts @@ -4,9 +4,9 @@ process.title = 'homebridge-config-ui-x'; import * as os from 'os'; import * as path from 'path'; -import * as commander from 'commander'; +import { program } from 'commander'; -commander +program .allowUnknownOption() .option('-U, --user-storage-path [path]', '', (p) => process.env.UIX_STORAGE_PATH = p) .option('-P, --plugin-path [path]', '', (p) => process.env.UIX_CUSTOM_PLUGIN_PATH = p) diff --git a/src/index.ts b/src/index.ts index cd5d21c47..dc6c03b85 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import * as commander from 'commander'; +import { program } from 'commander'; import * as semver from 'semver'; let homebridge; @@ -19,7 +19,7 @@ class HomebridgeConfigUi { process.env.UIX_STORAGE_PATH = homebridge.user.storagePath(); process.env.UIX_PLUGIN_NAME = config.name || 'homebridge-config-ui-x'; - commander + program .allowUnknownOption() .option('-P, --plugin-path [path]', '', (p) => process.env.UIX_CUSTOM_PLUGIN_PATH = p) .option('-I, --insecure', '', () => process.env.UIX_INSECURE_MODE = '1') From d937c6771393a002c9d0042a43f56b74620e07b0 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 07:03:00 +0000 Subject: [PATCH 010/110] show glibc row --- package-lock.json | 155 +++++++++--------- package.json | 5 +- src/modules/server/server.controller.ts | 1 + src/modules/server/server.dto.ts | 1 + src/modules/server/server.module.ts | 1 + src/modules/server/server.service.ts | 31 ++-- src/modules/status/status.service.ts | 63 +++++-- ui/package-lock.json | 60 +++---- ui/package.json | 1 - .../system-info-widget.component.html | 28 ++-- 10 files changed, 193 insertions(+), 153 deletions(-) diff --git a/package-lock.json b/package-lock.json index 809fcc257..85286e547 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,9 +69,10 @@ "@types/node-schedule": "^2.1.2", "@types/semver": "^7.5.4", "@types/tar": "^6.1.7", + "@types/tcp-port-used": "^1.0.3", "@types/unzipper": "^0.10.8", - "@typescript-eslint/eslint-plugin": "^6.9.1", - "@typescript-eslint/parser": "^6.9.1", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", "babel-jest": "^29.7.0", "bash-color": "^0.0.4", "buffer-shims": "^1.0.0", @@ -2380,9 +2381,9 @@ "dev": true }, "node_modules/@types/babel__core": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz", - "integrity": "sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==", + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.4.tgz", + "integrity": "sha512-mLnSC22IC4vcWiuObSRjrLd9XcBTGf59vUSoq2jkQDJ/QQ8PMI9rSuzE+aEV8karUMbskw07bKYoUJCKTUaygg==", "dev": true, "dependencies": { "@babel/parser": "^7.20.7", @@ -2393,18 +2394,18 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.6", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.6.tgz", - "integrity": "sha512-66BXMKb/sUWbMdBNdMvajU7i/44RkrA3z/Yt1c7R5xejt8qh84iU54yUWCtm0QwGJlDcf/gg4zd/x4mpLAlb/w==", + "version": "7.6.7", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", + "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.3.tgz", - "integrity": "sha512-ciwyCLeuRfxboZ4isgdNZi/tkt06m8Tw6uGbBSBgWrnnZGNXiEyM27xc/PjXGQLqlZ6ylbgHMnm7ccF9tCkOeQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -2412,9 +2413,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.3.tgz", - "integrity": "sha512-Lsh766rGEFbaxMIDH7Qa+Yha8cMVI3qAK6CHt3OR0YfxOIn5Z54iHiyDRycHrBqeIiqGa20Kpsv1cavfBKkRSw==", + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", + "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -2426,17 +2427,17 @@ "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==" }, "node_modules/@types/cors": { - "version": "2.8.15", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.15.tgz", - "integrity": "sha512-n91JxbNLD8eQIuXDIChAN1tCKNWCEgpceU9b7ZMbFA+P+Q4yIeh80jizFLEvolRPc1ES0VdwFlGv+kJTSirogw==", + "version": "2.8.16", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.16.tgz", + "integrity": "sha512-Trx5or1Nyg1Fq138PCuWqoApzvoSLWzZ25ORBiHMbbUT42g578lH1GT4TwYDbiUOLFuDsCkfLneT2105fsFWGg==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/eslint": { - "version": "8.44.6", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.6.tgz", - "integrity": "sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==", + "version": "8.44.7", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz", + "integrity": "sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==", "dev": true, "dependencies": { "@types/estree": "*", @@ -2444,9 +2445,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.6.tgz", - "integrity": "sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ==", + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", "dev": true, "dependencies": { "@types/eslint": "*", @@ -2454,9 +2455,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.4.tgz", - "integrity": "sha512-2JwWnHK9H+wUZNorf2Zr6ves96WHoWDJIftkcxPKsS7Djta6Zu519LarhRNljPXkpsZR2ZMwNCPeW7omW07BJw==", + "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/fs-extra": { @@ -2470,9 +2471,9 @@ } }, "node_modules/@types/graceful-fs": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.8.tgz", - "integrity": "sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -2580,6 +2581,12 @@ "minipass": "^4.0.0" } }, + "node_modules/@types/tcp-port-used": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/tcp-port-used/-/tcp-port-used-1.0.3.tgz", + "integrity": "sha512-Lq0Z8iw3uiBJzOdfL+ip6l6vOJw++XEyXPa7/3hMkWVU2YMsKuQBjjK5M2Fmq/533DBVW9L5I/XlJvcHnfAP4g==", + "dev": true + }, "node_modules/@types/unzipper": { "version": "0.10.8", "resolved": "https://registry.npmjs.org/@types/unzipper/-/unzipper-0.10.8.tgz", @@ -2595,9 +2602,9 @@ "integrity": "sha512-xW4qsT4UIYILu+7ZrBnfQdBYniZrMLYYK3wN9M/NdeIHgBN5pZI2/8Q7UfdWIcr5RLJv/OGENsx91JIpUUoC7Q==" }, "node_modules/@types/yargs": { - "version": "17.0.29", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.29.tgz", - "integrity": "sha512-nacjqA3ee9zRF/++a3FUY1suHTFKZeHba2n8WeDw9cCVdmzmHpIxyzOJBcpHvvEmS8E9KqWlSnWHUkOrkhWcvA==", + "version": "17.0.30", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.30.tgz", + "integrity": "sha512-3SJLzYk3yz3EgI9I8OLoH06B3PdXIoU2imrBZzaGqUtUXf5iUNDtmAfCGuQrny1bnmyjh/GM/YNts6WK5jR5Rw==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -2610,16 +2617,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz", - "integrity": "sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz", + "integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.9.1", - "@typescript-eslint/type-utils": "6.9.1", - "@typescript-eslint/utils": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1", + "@typescript-eslint/scope-manager": "6.10.0", + "@typescript-eslint/type-utils": "6.10.0", + "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2645,15 +2652,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", - "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", + "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.9.1", - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/typescript-estree": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1", + "@typescript-eslint/scope-manager": "6.10.0", + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0", "debug": "^4.3.4" }, "engines": { @@ -2673,13 +2680,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz", - "integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", + "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1" + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2690,13 +2697,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz", - "integrity": "sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz", + "integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.9.1", - "@typescript-eslint/utils": "6.9.1", + "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/utils": "6.10.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2717,9 +2724,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", - "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", + "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2730,13 +2737,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz", - "integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", + "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1", + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2757,17 +2764,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.1.tgz", - "integrity": "sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", + "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", "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.9.1", - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/typescript-estree": "6.9.1", + "@typescript-eslint/scope-manager": "6.10.0", + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/typescript-estree": "6.10.0", "semver": "^7.5.4" }, "engines": { @@ -2782,12 +2789,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz", - "integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", + "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/types": "6.10.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/package.json b/package.json index ac14448df..1fa410932 100644 --- a/package.json +++ b/package.json @@ -98,9 +98,10 @@ "@types/node-schedule": "^2.1.2", "@types/semver": "^7.5.4", "@types/tar": "^6.1.7", + "@types/tcp-port-used": "^1.0.3", "@types/unzipper": "^0.10.8", - "@typescript-eslint/eslint-plugin": "^6.9.1", - "@typescript-eslint/parser": "^6.9.1", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", "babel-jest": "^29.7.0", "bash-color": "^0.0.4", "buffer-shims": "^1.0.0", diff --git a/src/modules/server/server.controller.ts b/src/modules/server/server.controller.ts index 13586dc01..c3fe7c271 100644 --- a/src/modules/server/server.controller.ts +++ b/src/modules/server/server.controller.ts @@ -171,3 +171,4 @@ export class ServerController { return this.serverService.setHomebridgeMdnsSetting(body); } } + diff --git a/src/modules/server/server.dto.ts b/src/modules/server/server.dto.ts index bbbe4585a..006684b3c 100644 --- a/src/modules/server/server.dto.ts +++ b/src/modules/server/server.dto.ts @@ -20,3 +20,4 @@ export class HomebridgeNetworkInterfacesDto { @ApiProperty() adapters: string[]; } + diff --git a/src/modules/server/server.module.ts b/src/modules/server/server.module.ts index 155d5491f..b7ea59b64 100644 --- a/src/modules/server/server.module.ts +++ b/src/modules/server/server.module.ts @@ -30,3 +30,4 @@ import { ServerService } from './server.service'; ] }) export class ServerModule { } + diff --git a/src/modules/server/server.service.ts b/src/modules/server/server.service.ts index 55ee36e80..fcaaf2684 100644 --- a/src/modules/server/server.service.ts +++ b/src/modules/server/server.service.ts @@ -7,18 +7,18 @@ import { NotFoundException, ServiceUnavailableException } from '@nestjs/common'; -import { Categories } from '@oznu/hap-client/dist/hap-types'; +import {Categories} from '@oznu/hap-client/dist/hap-types'; import * as bufferShim from 'buffer-shims'; import * as fs from 'fs-extra'; import * as NodeCache from 'node-cache'; import * as si from 'systeminformation'; import * as tcpPortUsed from 'tcp-port-used'; -import { ConfigService, HomebridgeConfig } from '../../core/config/config.service'; -import { HomebridgeIpcService } from '../../core/homebridge-ipc/homebridge-ipc.service'; -import { Logger } from '../../core/logger/logger.service'; -import { AccessoriesService } from '../accessories/accessories.service'; -import { ConfigEditorService } from '../config-editor/config-editor.service'; -import { HomebridgeMdnsSettingDto } from './server.dto'; +import {ConfigService, HomebridgeConfig} from '../../core/config/config.service'; +import {HomebridgeIpcService} from '../../core/homebridge-ipc/homebridge-ipc.service'; +import {Logger} from '../../core/logger/logger.service'; +import {AccessoriesService} from '../accessories/accessories.service'; +import {ConfigEditorService} from '../config-editor/config-editor.service'; +import {HomebridgeMdnsSettingDto} from './server.dto'; @Injectable() export class ServerService { @@ -105,7 +105,7 @@ export class ServerService { const persistPath = path.join(this.configService.storagePath, 'persist'); const devices = (await fs.readdir(persistPath)) - .filter(x => x.match(/AccessoryInfo\.([A-F,a-f,0-9]+)\.json/)); + .filter(x => x.match(/AccessoryInfo\.([A-F,a-f0-9]+)\.json/)); return Promise.all(devices.map(async (x) => { return this.getDevicePairingById(x.split('.')[1]); @@ -119,7 +119,7 @@ export class ServerService { public async getDevicePairingById(deviceId: string) { const persistPath = path.join(this.configService.storagePath, 'persist'); - let device; + let device: any; try { device = await fs.readJson(path.join(persistPath, `AccessoryInfo.${deviceId}.json`)); } catch (e) { @@ -296,11 +296,10 @@ export class ServerService { /** * Generates the setup code */ - private generateSetupCode(accessoryInfo): string { + private generateSetupCode(accessoryInfo: any): string { // this code is from https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/Accessory.js#L369 const buffer = bufferShim.alloc(8); - const setupCode = parseInt(accessoryInfo.pincode.replace(/-/g, ''), 10); - let valueLow = setupCode; + let valueLow = parseInt(accessoryInfo.pincode.replace(/-/g, ''), 10); const valueHigh = accessoryInfo.category >> 1; valueLow |= 1 << 28; // Supports IP; @@ -452,17 +451,13 @@ export class ServerService { * Check if the system Node.js version has changed */ private async nodeVersionChanged(): Promise { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { let result = false; const child = child_process.spawn(process.execPath, ['-v']); child.stdout.once('data', (data) => { - if (data.toString().trim() === process.version) { - result = false; - } else { - result = true; - } + result = data.toString().trim() !== process.version; }); child.on('error', () => { diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index 14f48ebfb..29f996726 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -16,7 +16,6 @@ import { PluginsService } from '../plugins/plugins.service'; import { ServerService } from '../server/server.service'; export const enum HomebridgeStatus { - PENDING = 'pending', OK = 'ok', UP = 'up', DOWN = 'down', @@ -36,7 +35,7 @@ const execAsync = util.promisify(child_process.exec); @Injectable() export class StatusService { private statusCache = new NodeCache({ stdTTL: 3600 }); - private dashboardLayout; + private dashboardLayout: any; private homebridgeStatus: HomebridgeStatus = HomebridgeStatus.DOWN; private homebridgeStatusChange = new Subject(); @@ -204,7 +203,7 @@ export class StatusService { /** * Saves the current dashboard layout */ - public async setDashboardLayout(layout) { + public async setDashboardLayout(layout: any) { fs.writeJSONSync(path.resolve(this.configService.storagePath, '.uix-dashboard.json'), layout); this.dashboardLayout = layout; return { status: 'ok' }; @@ -244,7 +243,7 @@ export class StatusService { */ public async getServerUptimeInfo() { return { - time: await si.time(), + time: si.time(), processUptime: process.uptime(), }; } @@ -278,7 +277,7 @@ export class StatusService { * Start emitting server stats to client * @param client */ - public async watchStats(client) { + public async watchStats(client: any) { let homebridgeStatusChangeSub: Subscription; let homebridgeStatusInterval: NodeJS.Timeout; @@ -286,7 +285,7 @@ export class StatusService { // ipc status events are only available in Homebridge 1.3.3 or later - and when running in service mode if (this.configService.serviceMode && this.configService.homebridgeVersion && semver.gt(this.configService.homebridgeVersion, '1.3.3-beta.5')) { - homebridgeStatusChangeSub = this.homebridgeStatusChange.subscribe(async (status) => { + homebridgeStatusChangeSub = this.homebridgeStatusChange.subscribe(async () => { client.emit('homebridge-status', await this.getHomebridgeStats()); }); } else { @@ -387,6 +386,27 @@ export class StatusService { return osInfo; } + /** + * Get / Cache the GLIBC version + */ + private getGlibcVersion(): string { + const cachedResult = this.statusCache.get('glibcVersion') as string; + + if (cachedResult) { + return cachedResult; + } + + try { + const glibcVersion = child_process.execSync('getconf GNU_LIBC_VERSION 2>/dev/null').toString().split('glibc')[1].trim(); + this.statusCache.set('glibcVersion', glibcVersion, 86400); + return glibcVersion; + } catch (e) { + this.logger.debug('Could not check glibc version:', e.message); + return null; + } + + } + /** * Returns details about this Homebridge server */ @@ -403,7 +423,8 @@ export class StatusService { homebridgeServiceMode: this.configService.serviceMode, nodeVersion: process.version, os: await this.getOsInfo(), - time: await si.time(), + glibcVersion: os.platform() === 'linux' ? this.getGlibcVersion() : null, + time: si.time(), network: await this.getDefaultInterface() || {}, }; } @@ -428,11 +449,32 @@ export class StatusService { try { const versionList = (await this.httpService.get('https://nodejs.org/dist/index.json').toPromise()).data; const currentLts = versionList.filter(x => x.lts)[0]; + + // let showNextUpdateWarning = false; + // if (os.platform() === 'linux') { + // const glibcVersion = parseFloat(child_process.execSync('getconf GNU_LIBC_VERSION 2>/dev/null').toString().split('glibc')[1].trim()); + // if (glibcVersion < 2.23) { + // this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + + // `Wanted: >=2.23. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); + // showNextUpdateWarning = true; + // } + // if (semver.gte(currentLts.version, '18.0.0') && glibcVersion < 2.28) { + // this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + + // `Wanted: >=2.28. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); + // showNextUpdateWarning = true; + // } + // if (semver.gte(currentLts.version, '20.0.0') && glibcVersion < 2.29) { + // this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + + // `Wanted: >=2.29. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); + // showNextUpdateWarning = true; + // } + // } const versionInformation = { currentVersion: process.version, latestVersion: currentLts.version, updateAvailable: semver.gt(currentLts.version, process.version), showUpdateWarning: semver.lt(process.version, '18.15.0'), + // showNextUpdateWarning, installPath: path.dirname(process.execPath), }; this.statusCache.set('nodeJsVersion', versionInformation, 86400); @@ -444,6 +486,7 @@ export class StatusService { latestVersion: process.version, updateAvailable: false, showUpdateWarning: false, + // showNextUpdateWarning: false, }; this.statusCache.set('nodeJsVersion', versionInformation, 3600); return versionInformation; @@ -470,11 +513,7 @@ export class StatusService { if (!isNaN(throttledHex)) { for (const bit of Object.keys(this.rpiGetThrottledMapping)) { - if ((throttledHex >> parseInt(bit, 10)) & 1) { - output[this.rpiGetThrottledMapping[bit]] = true; - } else { - output[this.rpiGetThrottledMapping[bit]] = false; - } + output[this.rpiGetThrottledMapping[bit]] = !!((throttledHex >> parseInt(bit, 10)) & 1); } } } catch (e) { diff --git a/ui/package-lock.json b/ui/package-lock.json index 0e616fdc6..33500d54e 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -36,7 +36,6 @@ "lodash-es": "4.17.21", "mdbootstrap": "4.20.0", "mobile-detect": "1.4.5", - "monaco-editor": "0.33.0", "ng-inline-svg": "13.1.2", "ng2-charts": "2.4.3", "ng2-dragula": "2.1.1", @@ -3510,9 +3509,9 @@ "dev": true }, "node_modules/@types/body-parser": { - "version": "1.19.4", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.4.tgz", - "integrity": "sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, "dependencies": { "@types/connect": "*", @@ -3520,35 +3519,35 @@ } }, "node_modules/@types/bonjour": { - "version": "3.5.12", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.12.tgz", - "integrity": "sha512-ky0kWSqXVxSqgqJvPIkgFkcn4C8MnRog308Ou8xBBIVo39OmUFy+jqNe0nPwLCDFxUpmT9EvT91YzOJgkDRcFg==", + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", + "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/chart.js": { - "version": "2.9.39", - "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.39.tgz", - "integrity": "sha512-FAsZ6v8ds40mVCgM44T1/ZDKuT1Lh6/a2D3nD8ZNX9SqBObBc0vH2VrcLjYP3PL8onPPt9rIw+QyEkgrzj31TQ==", + "version": "2.9.40", + "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.40.tgz", + "integrity": "sha512-ApIH2LIDXzKTNtG4oTMmn2CIII6lvRvxyKnmLb1zYFlwXtE4lTOb2ywgXQJYVuhgWpqaCSHSYOlzO+5gs6hL+A==", "dependencies": { "moment": "^2.10.2" } }, "node_modules/@types/connect": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.37.tgz", - "integrity": "sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/connect-history-api-fallback": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.2.tgz", - "integrity": "sha512-gX2j9x+NzSh4zOhnRPSdPPmTepS4DfxES0AvIFv3jGv5QyeAJf6u6dY5/BAoAJU9Qq1uTvwOku8SSC2GnCRl6Q==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.3.tgz", + "integrity": "sha512-6mfQ6iNvhSKCZJoY6sIG3m0pKkdUcweVNOLuBBKvoWGzl2yRxOJcYOTRyLKt3nxXvBLJWa6QkW//tgbIwJehmA==", "dev": true, "dependencies": { "@types/express-serve-static-core": "*", @@ -3561,9 +3560,9 @@ "integrity": "sha512-JM8Qu+ym7d5oTSYFGmXj3Uj9sZ1K91OcMAxlgJgjVMjDPPp8xCKpvALh0gdP4PhiWPn4rEx1GqFkN24zfAk8kw==" }, "node_modules/@types/eslint": { - "version": "8.44.6", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.6.tgz", - "integrity": "sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==", + "version": "8.44.7", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz", + "integrity": "sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==", "dev": true, "dependencies": { "@types/estree": "*", @@ -3571,9 +3570,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.6.tgz", - "integrity": "sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ==", + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", "dev": true, "dependencies": { "@types/eslint": "*", @@ -3587,9 +3586,9 @@ "dev": true }, "node_modules/@types/express": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.20.tgz", - "integrity": "sha512-rOaqlkgEvOW495xErXMsmyX3WKBInbhG5eqojXYi3cGUaLoRDlXa5d52fkfWZT963AZ3v2eZ4MbKE6WpDAGVsw==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dev": true, "dependencies": { "@types/body-parser": "*", @@ -3599,9 +3598,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.39", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.39.tgz", - "integrity": "sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==", + "version": "4.17.41", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", + "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", "dev": true, "dependencies": { "@types/node": "*", @@ -10397,11 +10396,6 @@ "node": "*" } }, - "node_modules/monaco-editor": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.33.0.tgz", - "integrity": "sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw==" - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", diff --git a/ui/package.json b/ui/package.json index 29d7edad3..18b5a3802 100644 --- a/ui/package.json +++ b/ui/package.json @@ -38,7 +38,6 @@ "lodash-es": "4.17.21", "mdbootstrap": "4.20.0", "mobile-detect": "1.4.5", - "monaco-editor": "0.33.0", "ng-inline-svg": "13.1.2", "ng2-charts": "2.4.3", "ng2-dragula": "2.1.1", diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index f7d84da1f..74c02c79d 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -42,6 +42,10 @@ {{ serverInfo.network.ip6 }} + + GLIBC Version + {{ serverInfo.glibcVersion }} + @@ -56,23 +60,23 @@ - User - + Node.js Path + {{ nodejsInfo.installPath }} + + + User {{ serverInfo.serviceUser }} - Storage Path - + Storage Path {{ serverInfo.homebridgeStoragePath }} - Config Path - + Config Path {{ serverInfo.homebridgeConfigJsonPath }} - Plugin Path - + Plugin Path {{ serverInfo.homebridgeCustomPluginPath }} @@ -81,16 +85,14 @@ - Synology Package - + Synology Package Yes - Service Mode - + Service Mode Yes - \ No newline at end of file + From df46598b47cae5687513caa85acbe9a5bc96a738 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 07:23:42 +0000 Subject: [PATCH 011/110] update ui / xterm --- ui/package-lock.json | 34 +++++++++---------- ui/package.json | 6 ++-- .../homebridge-logs-widget.component.ts | 4 +-- .../terminal-widget.component.ts | 4 +-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ui/package-lock.json b/ui/package-lock.json index 33500d54e..92f4deb8a 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -50,9 +50,9 @@ "semver": "7.5.4", "socket.io-client": "2.5.0", "tslib": "2.6.2", - "xterm": "4.19.0", - "xterm-addon-fit": "0.5.0", - "xterm-addon-web-links": "0.6.0", + "xterm": "5.3.0", + "xterm-addon-fit": "0.8.0", + "xterm-addon-web-links": "0.9.0", "zone.js": "0.11.8" }, "devDependencies": { @@ -6536,9 +6536,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.576", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.576.tgz", - "integrity": "sha512-yXsZyXJfAqzWk1WKryr0Wl0MN2D47xodPvEEwlVePBnhU5E7raevLQR+E6b9JAD3GfL/7MbAL9ZtWQQPcLx7wA==" + "version": "1.4.577", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.577.tgz", + "integrity": "sha512-/5xHPH6f00SxhHw6052r+5S1xO7gHNc89hV7tqlvnStvKbSrDqc/u6AlwPvVWWNj+s4/KL6T6y8ih+nOY0qYNA==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -15184,24 +15184,24 @@ } }, "node_modules/xterm": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/xterm/-/xterm-4.19.0.tgz", - "integrity": "sha512-c3Cp4eOVsYY5Q839dR5IejghRPpxciGmLWWaP9g+ppfMeBChMeLa1DCA+pmX/jyDZ+zxFOmlJL/82qVdayVoGQ==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/xterm/-/xterm-5.3.0.tgz", + "integrity": "sha512-8QqjlekLUFTrU6x7xck1MsPzPA571K5zNqWm0M0oroYEWVOptZ0+ubQSkQ3uxIEhcIHRujJy6emDWX4A7qyFzg==" }, "node_modules/xterm-addon-fit": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.5.0.tgz", - "integrity": "sha512-DsS9fqhXHacEmsPxBJZvfj2la30Iz9xk+UKjhQgnYNkrUIN5CYLbw7WEfz117c7+S86S/tpHPfvNxJsF5/G8wQ==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.8.0.tgz", + "integrity": "sha512-yj3Np7XlvxxhYF/EJ7p3KHaMt6OdwQ+HDu573Vx1lRXsVxOcnVJs51RgjZOouIZOczTsskaS+CpXspK81/DLqw==", "peerDependencies": { - "xterm": "^4.0.0" + "xterm": "^5.0.0" } }, "node_modules/xterm-addon-web-links": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/xterm-addon-web-links/-/xterm-addon-web-links-0.6.0.tgz", - "integrity": "sha512-H6XzjWWZu8FBo+fnYpxdPk9w5M6drbsvwPEJZGRS38MihiQaVFpKlCMKdfRgDbKGE530tw1yH54rhpZfHgt2/A==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/xterm-addon-web-links/-/xterm-addon-web-links-0.9.0.tgz", + "integrity": "sha512-LIzi4jBbPlrKMZF3ihoyqayWyTXAwGfu4yprz1aK2p71e9UKXN6RRzVONR0L+Zd+Ik5tPVI9bwp9e8fDTQh49Q==", "peerDependencies": { - "xterm": "^4.0.0" + "xterm": "^5.0.0" } }, "node_modules/y18n": { diff --git a/ui/package.json b/ui/package.json index 18b5a3802..13e5aacb1 100644 --- a/ui/package.json +++ b/ui/package.json @@ -52,9 +52,9 @@ "semver": "7.5.4", "socket.io-client": "2.5.0", "tslib": "2.6.2", - "xterm": "4.19.0", - "xterm-addon-fit": "0.5.0", - "xterm-addon-web-links": "0.6.0", + "xterm": "5.3.0", + "xterm-addon-fit": "0.8.0", + "xterm-addon-web-links": "0.9.0", "zone.js": "0.11.8" }, "devDependencies": { diff --git a/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts b/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts index a81983004..24e2f6545 100644 --- a/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts +++ b/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts @@ -53,8 +53,8 @@ export class HomebridgeLogsWidgetComponent implements OnInit, OnDestroy { if (this.widget.fontSize !== this.fontSize || this.widget.fontWeight !== this.fontWeight) { this.fontSize = this.widget.fontSize; this.fontWeight = this.widget.fontWeight; - this.$log.term.setOption('fontSize', this.widget.fontSize); - this.$log.term.setOption('fontWeight', this.widget.fontWeight); + this.$log.term.options.fontSize = this.widget.fontSize; + this.$log.term.options.fontWeight = this.widget.fontWeight; this.resizeEvent.next(undefined); setTimeout(() => { this.$log.term.scrollToBottom(); diff --git a/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts b/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts index 29f032747..606273d77 100644 --- a/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts +++ b/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts @@ -53,8 +53,8 @@ export class TerminalWidgetComponent implements OnInit, OnDestroy { if (this.widget.fontSize !== this.fontSize || this.widget.fontWeight !== this.fontWeight) { this.fontSize = this.widget.fontSize; this.fontWeight = this.widget.fontWeight; - this.$terminal.term.setOption('fontSize', this.widget.fontSize); - this.$terminal.term.setOption('fontWeight', this.widget.fontWeight); + this.$terminal.term.options.fontSize = this.widget.fontSize; + this.$terminal.term.options.fontWeight = this.widget.fontWeight; this.resizeEvent.next(undefined); setTimeout(() => { this.$terminal.term.scrollToBottom(); From e3463a4110f3d350dd2ec1d509dc288799c02e76 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 07:54:39 +0000 Subject: [PATCH 012/110] glibc warning --- src/modules/status/status.service.ts | 54 ++++++++++--------- .../system-info-widget.component.html | 9 +++- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index 29f996726..e43b60238 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -390,8 +390,11 @@ export class StatusService { * Get / Cache the GLIBC version */ private getGlibcVersion(): string { - const cachedResult = this.statusCache.get('glibcVersion') as string; + if (os.platform() !== 'linux') { + return ''; + } + const cachedResult = this.statusCache.get('glibcVersion') as string; if (cachedResult) { return cachedResult; } @@ -402,9 +405,8 @@ export class StatusService { return glibcVersion; } catch (e) { this.logger.debug('Could not check glibc version:', e.message); - return null; + return ''; } - } /** @@ -423,7 +425,7 @@ export class StatusService { homebridgeServiceMode: this.configService.serviceMode, nodeVersion: process.version, os: await this.getOsInfo(), - glibcVersion: os.platform() === 'linux' ? this.getGlibcVersion() : null, + glibcVersion: this.getGlibcVersion(), time: si.time(), network: await this.getDefaultInterface() || {}, }; @@ -450,31 +452,33 @@ export class StatusService { const versionList = (await this.httpService.get('https://nodejs.org/dist/index.json').toPromise()).data; const currentLts = versionList.filter(x => x.lts)[0]; - // let showNextUpdateWarning = false; - // if (os.platform() === 'linux') { - // const glibcVersion = parseFloat(child_process.execSync('getconf GNU_LIBC_VERSION 2>/dev/null').toString().split('glibc')[1].trim()); - // if (glibcVersion < 2.23) { - // this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - // `Wanted: >=2.23. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); - // showNextUpdateWarning = true; - // } - // if (semver.gte(currentLts.version, '18.0.0') && glibcVersion < 2.28) { - // this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - // `Wanted: >=2.28. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); - // showNextUpdateWarning = true; - // } - // if (semver.gte(currentLts.version, '20.0.0') && glibcVersion < 2.29) { - // this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - // `Wanted: >=2.29. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); - // showNextUpdateWarning = true; - // } - // } + const glibcVersion = this.getGlibcVersion(); + let showNextUpdateWarning = false; + if (glibcVersion) { + const glibcVersionFloat = parseFloat(glibcVersion); + if (glibcVersionFloat < 2.23) { + this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + + `Wanted: >=2.23. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); + showNextUpdateWarning = true; + } + if (semver.gte(currentLts.version, '18.0.0') && glibcVersionFloat < 2.28) { + this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + + `Wanted: >=2.28. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); + showNextUpdateWarning = true; + } + if (semver.gte(currentLts.version, '20.0.0') && glibcVersionFloat < 2.29) { + this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + + `Wanted: >=2.29. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); + showNextUpdateWarning = true; + } + } + const versionInformation = { currentVersion: process.version, latestVersion: currentLts.version, updateAvailable: semver.gt(currentLts.version, process.version), showUpdateWarning: semver.lt(process.version, '18.15.0'), - // showNextUpdateWarning, + showNextUpdateWarning, installPath: path.dirname(process.execPath), }; this.statusCache.set('nodeJsVersion', versionInformation, 86400); @@ -486,7 +490,7 @@ export class StatusService { latestVersion: process.version, updateAvailable: false, showUpdateWarning: false, - // showNextUpdateWarning: false, + showNextUpdateWarning: false, }; this.statusCache.set('nodeJsVersion', versionInformation, 3600); return versionInformation; diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index 74c02c79d..fa48ef6e0 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -44,7 +44,14 @@ GLIBC Version - {{ serverInfo.glibcVersion }} + + + {{ serverInfo.glibcVersion }} + + + {{ serverInfo.glibcVersion }} + Date: Tue, 7 Nov 2023 08:20:42 +0000 Subject: [PATCH 013/110] translations, nouislider --- package.json | 4 +- ui/package-lock.json | 37 ++++++++++--------- ui/package.json | 3 +- .../system-info-widget.component.html | 9 ++--- ui/src/i18n/bg.json | 3 ++ ui/src/i18n/ca.json | 3 ++ ui/src/i18n/cs.json | 3 ++ ui/src/i18n/de.json | 3 ++ ui/src/i18n/en.json | 3 ++ ui/src/i18n/es.json | 3 ++ ui/src/i18n/fr.json | 3 ++ ui/src/i18n/he.json | 3 ++ ui/src/i18n/hu.json | 3 ++ ui/src/i18n/id.json | 3 ++ ui/src/i18n/it.json | 3 ++ ui/src/i18n/ja.json | 3 ++ ui/src/i18n/ko.json | 3 ++ ui/src/i18n/mk.json | 3 ++ ui/src/i18n/nl.json | 3 ++ ui/src/i18n/no.json | 3 ++ ui/src/i18n/pl.json | 3 ++ ui/src/i18n/pt-BR.json | 3 ++ ui/src/i18n/pt.json | 3 ++ ui/src/i18n/ru.json | 3 ++ ui/src/i18n/sl.json | 3 ++ ui/src/i18n/sv.json | 3 ++ ui/src/i18n/th.json | 3 ++ ui/src/i18n/tr.json | 3 ++ ui/src/i18n/uk.json | 3 ++ ui/src/i18n/zh-CN.json | 3 ++ ui/src/i18n/zh-TW.json | 3 ++ ui/src/scss/styles.scss | 2 +- 32 files changed, 109 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 1fa410932..fe399a387 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "start": "ts-node -r tsconfig-paths/register src/main.ts", "serve": "npm run watch", "lint": "npm run lint:server && npm run lint:ui", - "lint:server": "eslint \"{src,test}/**/*.ts\" --max-warnings=0 --fix", - "lint:ui": "npm run lint --prefix ui --fix", + "lint:server": "eslint \"{src,test}/**/*.ts\" --max-warnings=0", + "lint:ui": "npm run lint --prefix ui", "webpack": "webpack --config webpack.config.js", "install:ui": "npm install --prefix ui", "test": "jest --forceExit --detectOpenHandles --verbose=true --silent --config ./test/jest-e2e.json", diff --git a/ui/package-lock.json b/ui/package-lock.json index 92f4deb8a..853b3d57e 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -39,11 +39,10 @@ "ng-inline-svg": "13.1.2", "ng2-charts": "2.4.3", "ng2-dragula": "2.1.1", - "ng2-nouislider": "1.8.3", + "ng2-nouislider": "2.0.0", "ngx-md": "8.1.6", "ngx-monaco-editor": "8.1.1", "ngx-toastr": "15.2.2", - "nouislider": "14.7.0", "popper.js": "1.16.1", "qrcode": "1.5.3", "rxjs": "7.8.1", @@ -3610,15 +3609,15 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.3.tgz", - "integrity": "sha512-pP0P/9BnCj1OVvQR2lF41EkDG/lWWnDyA203b/4Fmi2eTyORnBtcDoKDwjWQthELrBvWkMOrvSOnZ8OVlW6tXA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", "dev": true }, "node_modules/@types/http-proxy": { - "version": "1.17.13", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.13.tgz", - "integrity": "sha512-GkhdWcMNiR5QSQRYnJ+/oXzu0+7JJEPC8vkWXK351BkhjraZF+1W13CUYARUvX9+NqIU2n6YHA4iwywsc/M6Sw==", + "version": "1.17.14", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", + "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", "dev": true, "dependencies": { "@types/node": "*" @@ -10546,13 +10545,16 @@ } }, "node_modules/ng2-nouislider": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/ng2-nouislider/-/ng2-nouislider-1.8.3.tgz", - "integrity": "sha512-Vl8tHCcJ/ioJLAs2t6FBC35sZq1P/O5ZdqdFwYxOCOMVbILGWNg+2gWZIjFstvv9pqb/mVvVUYe6qGG/mA/RBQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ng2-nouislider/-/ng2-nouislider-2.0.0.tgz", + "integrity": "sha512-NGbF/0w0+bZqclpSPFOlWIeVJaVwRRYFJzD1x8PClbw9GIeo7fCHoBzZ81y7K7FTJg6to+cgjSTFETPZG/Dizg==", + "dependencies": { + "tslib": "^2.3.0" + }, "peerDependencies": { - "@angular/common": ">=2.x", - "@angular/core": ">=2.x", - "nouislider": ">=9.x" + "@angular/common": ">=14.x", + "@angular/core": ">=14.x", + "nouislider": ">=15.x" } }, "node_modules/ngx-md": { @@ -10767,9 +10769,10 @@ } }, "node_modules/nouislider": { - "version": "14.7.0", - "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-14.7.0.tgz", - "integrity": "sha512-4RtQ1+LHJKesDCNJrXkQcwXAWCrC2aggdLYMstS/G5fEWL+fXZbUA9pwVNHFghMGuFGRATlDLNInRaPeRKzpFQ==" + "version": "15.7.1", + "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-15.7.1.tgz", + "integrity": "sha512-5N7C1ru/i8y3dg9+Z6ilj6+m1EfabvOoaRa7ztpxBSKKRZso4vA52DGSbBJjw5XLtFr/LZ9SgGAXqyVtlVHO5w==", + "peer": true }, "node_modules/npm-bundled": { "version": "1.1.2", diff --git a/ui/package.json b/ui/package.json index 13e5aacb1..99ea583dc 100644 --- a/ui/package.json +++ b/ui/package.json @@ -41,11 +41,10 @@ "ng-inline-svg": "13.1.2", "ng2-charts": "2.4.3", "ng2-dragula": "2.1.1", - "ng2-nouislider": "1.8.3", + "ng2-nouislider": "2.0.0", "ngx-md": "8.1.6", "ngx-monaco-editor": "8.1.1", "ngx-toastr": "15.2.2", - "nouislider": "14.7.0", "popper.js": "1.16.1", "qrcode": "1.5.3", "rxjs": "7.8.1", diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index fa48ef6e0..797bf9776 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -43,10 +43,10 @@ {{ serverInfo.network.ip6 }} - GLIBC Version + GLIBC Version + ngbTooltip="{{'status.widget.systeminfo.glibc_warning' | translate }}"> {{ serverInfo.glibcVersion }} @@ -54,8 +54,7 @@ - + Node.js Version @@ -67,7 +66,7 @@ - Node.js Path + Node.js Path {{ nodejsInfo.installPath }} diff --git a/ui/src/i18n/bg.json b/ui/src/i18n/bg.json index 70f10182b..eebb4ffdd 100644 --- a/ui/src/i18n/bg.json +++ b/ui/src/i18n/bg.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Version", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin Path", diff --git a/ui/src/i18n/ca.json b/ui/src/i18n/ca.json index 593b70a35..be16b0ae2 100644 --- a/ui/src/i18n/ca.json +++ b/ui/src/i18n/ca.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Desbloquejar disseny", "status.widget.systeminfo.label_config_path": "Ruta de configuració", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Versió de Node.js", "status.widget.systeminfo.label_os": "Sistema operatiu", "status.widget.systeminfo.label_plugin_path": "Ruta plugins", diff --git a/ui/src/i18n/cs.json b/ui/src/i18n/cs.json index a1b706586..731949bfa 100644 --- a/ui/src/i18n/cs.json +++ b/ui/src/i18n/cs.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Odemknout rozložení", "status.widget.systeminfo.label_config_path": "Cesta ke konfiguraci", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Název hostitele", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js verze", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Cesta k pluginu", diff --git a/ui/src/i18n/de.json b/ui/src/i18n/de.json index 31abc368a..e55be2952 100644 --- a/ui/src/i18n/de.json +++ b/ui/src/i18n/de.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Layout entsperren", "status.widget.systeminfo.label_config_path": "Konfigurationspfad", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Version", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Pluginpfad", diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json index f30416521..ebb098d95 100644 --- a/ui/src/i18n/en.json +++ b/ui/src/i18n/en.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Version", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin Path", diff --git a/ui/src/i18n/es.json b/ui/src/i18n/es.json index f1b76a484..97f49cdd4 100644 --- a/ui/src/i18n/es.json +++ b/ui/src/i18n/es.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Desbloquear Diseño", "status.widget.systeminfo.label_config_path": "Ruta de Configuración", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Versión de Node.js", "status.widget.systeminfo.label_os": "Sistema Operativo", "status.widget.systeminfo.label_plugin_path": "Ruta de Plugins", diff --git a/ui/src/i18n/fr.json b/ui/src/i18n/fr.json index 60c14cc33..4f7d2e5e1 100644 --- a/ui/src/i18n/fr.json +++ b/ui/src/i18n/fr.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Déverrouiller la Mise en page", "status.widget.systeminfo.label_config_path": "Répertoire de la Config", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Version de Node.js", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Répertoire des plugins", diff --git a/ui/src/i18n/he.json b/ui/src/i18n/he.json index 773416f5f..5b8bb504f 100644 --- a/ui/src/i18n/he.json +++ b/ui/src/i18n/he.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "שחרר נעילת סדור", "status.widget.systeminfo.label_config_path": "שביל קונפיגורציה", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js גרסאת", "status.widget.systeminfo.label_os": "מערכת הפעלה", "status.widget.systeminfo.label_plugin_path": "נתיב לתוסף", diff --git a/ui/src/i18n/hu.json b/ui/src/i18n/hu.json index 87e9c8e39..1182ac56b 100644 --- a/ui/src/i18n/hu.json +++ b/ui/src/i18n/hu.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Version", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin Path", diff --git a/ui/src/i18n/id.json b/ui/src/i18n/id.json index cf70b47aa..459c4c0d4 100644 --- a/ui/src/i18n/id.json +++ b/ui/src/i18n/id.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Buka Tata Letak", "status.widget.systeminfo.label_config_path": "Path Konfigurasi", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nama Host", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Versi Node.js", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Path Plugin", diff --git a/ui/src/i18n/it.json b/ui/src/i18n/it.json index 499e2a387..22b72b87d 100644 --- a/ui/src/i18n/it.json +++ b/ui/src/i18n/it.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Sblocca il layout", "status.widget.systeminfo.label_config_path": "Percorso configurazione", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nome host", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Versione Node.js", "status.widget.systeminfo.label_os": "Sistema operativo", "status.widget.systeminfo.label_plugin_path": "Percorso plugin", diff --git a/ui/src/i18n/ja.json b/ui/src/i18n/ja.json index a17af2bdd..c00f57b1b 100644 --- a/ui/src/i18n/ja.json +++ b/ui/src/i18n/ja.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "配置固定を解除", "status.widget.systeminfo.label_config_path": "コンフィグの場所", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "ホストネーム", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js バージョン", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "プラグインの場所", diff --git a/ui/src/i18n/ko.json b/ui/src/i18n/ko.json index f553fac8a..4d0c555c3 100644 --- a/ui/src/i18n/ko.json +++ b/ui/src/i18n/ko.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "레이아웃 잠금 해제", "status.widget.systeminfo.label_config_path": "Config 경로", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "호스트명", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js 버전", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "플러그인 경로", diff --git a/ui/src/i18n/mk.json b/ui/src/i18n/mk.json index e97f53b9c..d53a344e2 100644 --- a/ui/src/i18n/mk.json +++ b/ui/src/i18n/mk.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Отклучи распоред", "status.widget.systeminfo.label_config_path": "Патека за конфигурацијата", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Име на host", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js верзија", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Патека за плагинот", diff --git a/ui/src/i18n/nl.json b/ui/src/i18n/nl.json index 1b486db4e..3bc7ad1b5 100644 --- a/ui/src/i18n/nl.json +++ b/ui/src/i18n/nl.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Ontgrendel Layout", "status.widget.systeminfo.label_config_path": "Config Pad", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostnaam", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Versie", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin Pad", diff --git a/ui/src/i18n/no.json b/ui/src/i18n/no.json index bcfe933a3..b8991b89c 100644 --- a/ui/src/i18n/no.json +++ b/ui/src/i18n/no.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Version", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin Path", diff --git a/ui/src/i18n/pl.json b/ui/src/i18n/pl.json index c901b9e4a..b80a61495 100644 --- a/ui/src/i18n/pl.json +++ b/ui/src/i18n/pl.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Odblokuj wygląd", "status.widget.systeminfo.label_config_path": "Ścieżka konfiguracji", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nazwa hosta", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js", "status.widget.systeminfo.label_os": "System", "status.widget.systeminfo.label_plugin_path": "Ścieżka wtyczki", diff --git a/ui/src/i18n/pt-BR.json b/ui/src/i18n/pt-BR.json index 65a389131..c7b578550 100644 --- a/ui/src/i18n/pt-BR.json +++ b/ui/src/i18n/pt-BR.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Desbloquear Layout", "status.widget.systeminfo.label_config_path": "Local das Configurações", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nome do Servidor", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Versão Node.js", "status.widget.systeminfo.label_os": "Sistema Operacional", "status.widget.systeminfo.label_plugin_path": "Local do Plugin", diff --git a/ui/src/i18n/pt.json b/ui/src/i18n/pt.json index afbce3e74..9da52c196 100644 --- a/ui/src/i18n/pt.json +++ b/ui/src/i18n/pt.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Desbloquear Layout", "status.widget.systeminfo.label_config_path": "Caminho das Configurações", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nome do Servidor", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Versão Node.js", "status.widget.systeminfo.label_os": "Sistema Operativo", "status.widget.systeminfo.label_plugin_path": "Caminho do Plugin", diff --git a/ui/src/i18n/ru.json b/ui/src/i18n/ru.json index 5e53fefe6..fbeff2f94 100644 --- a/ui/src/i18n/ru.json +++ b/ui/src/i18n/ru.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Разблокировать оформление", "status.widget.systeminfo.label_config_path": "Файл конфигурации", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Имя хоста", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Версия Node.js", "status.widget.systeminfo.label_os": "ОС", "status.widget.systeminfo.label_plugin_path": "Директория плагинов", diff --git a/ui/src/i18n/sl.json b/ui/src/i18n/sl.json index 89345ab4d..dc6b6ddbc 100644 --- a/ui/src/i18n/sl.json +++ b/ui/src/i18n/sl.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Odkleni postavitev", "status.widget.systeminfo.label_config_path": "Konfiguriraj pot", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Ime gostitelja", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Verzija", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Pot vtičnika", diff --git a/ui/src/i18n/sv.json b/ui/src/i18n/sv.json index cad7a33a2..d35d52991 100644 --- a/ui/src/i18n/sv.json +++ b/ui/src/i18n/sv.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Lås upp Layout", "status.widget.systeminfo.label_config_path": "Konfiguration sökväg", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Värdnamn", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Version", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin sökväg", diff --git a/ui/src/i18n/th.json b/ui/src/i18n/th.json index 7b7de6249..04a554ae2 100644 --- a/ui/src/i18n/th.json +++ b/ui/src/i18n/th.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "ปลดล็อกเค้าโครง", "status.widget.systeminfo.label_config_path": "เส้นทางกำหนดค่า", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "ชื่อโฮสต์", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "รุ่นของ Node.js", "status.widget.systeminfo.label_os": "ระบบปฏิบัติการ", "status.widget.systeminfo.label_plugin_path": "เส้นทางปลั๊กอิน", diff --git a/ui/src/i18n/tr.json b/ui/src/i18n/tr.json index 01b4460d0..36f3e848a 100644 --- a/ui/src/i18n/tr.json +++ b/ui/src/i18n/tr.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "Yerleşim Kildini Aç", "status.widget.systeminfo.label_config_path": "Yapılandırma Konumu", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Ana Bilgisayar Adı", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js Sürümü", "status.widget.systeminfo.label_os": "İS", "status.widget.systeminfo.label_plugin_path": "Eklentiler Konumu", diff --git a/ui/src/i18n/uk.json b/ui/src/i18n/uk.json index 5412c174b..a0f55b908 100644 --- a/ui/src/i18n/uk.json +++ b/ui/src/i18n/uk.json @@ -329,9 +329,12 @@ "status.widget.label_unlock_layout": "Разблокувати оформлення", "status.widget.systeminfo.label_config_path": "Файл конфігурації", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Назва хосту", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Версія Node.js", "status.widget.systeminfo.label_os": "ОС", "status.widget.systeminfo.label_plugin_path": "Директорія плагінів", diff --git a/ui/src/i18n/zh-CN.json b/ui/src/i18n/zh-CN.json index d7d26b657..9e0a8e9b8 100644 --- a/ui/src/i18n/zh-CN.json +++ b/ui/src/i18n/zh-CN.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "解锁布局", "status.widget.systeminfo.label_config_path": "Config 路径", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "主机名称", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js 版本", "status.widget.systeminfo.label_os": "操作系统", "status.widget.systeminfo.label_plugin_path": "插件路径", diff --git a/ui/src/i18n/zh-TW.json b/ui/src/i18n/zh-TW.json index 282931828..97e2cc87c 100644 --- a/ui/src/i18n/zh-TW.json +++ b/ui/src/i18n/zh-TW.json @@ -327,9 +327,12 @@ "status.widget.label_unlock_layout": "解除版面鎖定", "status.widget.systeminfo.label_config_path": "Config 路徑", "status.widget.systeminfo.label_docker": "Docker", + "status.widget.systeminfo.label_glibc_version": "GLIBC Version", + "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", "status.widget.systeminfo.label_ipv6": "IPv6", + "status.widget.systeminfo.label_nodejs_path": "Node.js Path", "status.widget.systeminfo.label_nodejs_version": "Node.js 版本", "status.widget.systeminfo.label_os": "OS", "status.widget.systeminfo.label_plugin_path": "Plugin 路徑", diff --git a/ui/src/scss/styles.scss b/ui/src/scss/styles.scss index b772a5597..6b3c7107d 100644 --- a/ui/src/scss/styles.scss +++ b/ui/src/scss/styles.scss @@ -17,7 +17,7 @@ $image-path: "../../img"; @import "mdbootstrap/scss/mdb-free"; @import "xterm/css/xterm.css"; -@import "nouislider/distribute/nouislider.min.css"; +@import "nouislider/dist/nouislider.min.css"; @import "dragula/dist/dragula.min.css"; @import "./base/checkbox.scss"; From e43035c2462f9be8b443046847829b11f8445390 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 08:34:51 +0000 Subject: [PATCH 014/110] fix translations --- .../system-info-widget/system-info-widget.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index 797bf9776..28b0dda49 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -43,7 +43,7 @@ {{ serverInfo.network.ip6 }} - GLIBC Version + GLIBC Version @@ -66,7 +66,7 @@ - Node.js Path + Node.js Path {{ nodejsInfo.installPath }} From 306f4fc8dcce69b0ece8c4fd5bff5690f6515e3c Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:57:12 +0100 Subject: [PATCH 015/110] Add link to Homebridge in footer (#1639) --- ui/src/app/modules/status/status.component.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/src/app/modules/status/status.component.html b/ui/src/app/modules/status/status.component.html index 5e1bb9384..12b43cc79 100644 --- a/ui/src/app/modules/status/status.component.html +++ b/ui/src/app/modules/status/status.component.html @@ -33,18 +33,20 @@
+ + + © 2023 + Homebridge. + {{ $settings.env.packageName }} v{{ $settings.env.packageVersion }} - - - - - - © 2023 Homebridge. Originally created by - oznu. - + - originally created by + oznu. +
From 0d8aa29dded1b454ed606224feffdf3a57ef1f34 Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:55:08 +0100 Subject: [PATCH 016/110] Small changes in widgets (#1637) --- .../hap-qrcode-widget.component.html | 2 +- .../homebridge-status-widget.component.html | 99 ++++++++++--------- .../system-info-widget.component.html | 44 ++++----- 3 files changed, 73 insertions(+), 72 deletions(-) diff --git a/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html b/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html index f772c0513..f9d7d98dc 100644 --- a/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html +++ b/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html @@ -15,4 +15,4 @@

- \ No newline at end of file + diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html index 9fd0d78d3..e7f765f8a 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html @@ -1,51 +1,9 @@
Homebridge
-
+
-
- - - -
-
- - Checking for updates... - - - Up To Date - - - Update Available - - - Update Available - -
- - - v{{ homebridgePkg.installedVersion }} - - -
- -
-
- -
-
-
+
- Homebridge + System
Starting... @@ -71,17 +29,60 @@
+ +
+
+
+ + + +
+
+ Homebridge + + + v{{ homebridgePkg.installedVersion }} + + +
+ + + Checking for updates... + + + Up To Date + + + Update Available + + + Update Available + + +
+
+
-
\ No newline at end of file +
diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index 28b0dda49..78eb2b96a 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -5,10 +5,6 @@
- - - - - - - - - - - - - - - - - + @@ -69,6 +49,22 @@ + + + + + + + + + + + + @@ -94,6 +90,10 @@ Synology Package + + + + From 32aa7b6b00d25a75f0f638c69b05c21c45af1b63 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:33:05 +0000 Subject: [PATCH 017/110] widgets --- ui/package-lock.json | 54 +++++++++++-------- ui/package.json | 4 +- .../homebridge-status-widget.component.html | 19 +++---- .../system-info-widget.component.html | 23 ++++---- 4 files changed, 51 insertions(+), 49 deletions(-) diff --git a/ui/package-lock.json b/ui/package-lock.json index 853b3d57e..b4859bfdd 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -52,7 +52,7 @@ "xterm": "5.3.0", "xterm-addon-fit": "0.8.0", "xterm-addon-web-links": "0.9.0", - "zone.js": "0.11.8" + "zone.js": "0.12.0" }, "devDependencies": { "@angular-devkit/build-angular": "^14.2.13", @@ -74,7 +74,7 @@ "codelyzer": "^6.0.2", "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-jsdoc": "^39.9.1", + "eslint-plugin-jsdoc": "^41.1.2", "eslint-plugin-prefer-arrow": "^1.2.3", "ts-node": "^10.9.1", "typescript": "^4.8.4" @@ -2891,17 +2891,17 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz", - "integrity": "sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==", + "version": "0.37.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.1.tgz", + "integrity": "sha512-5vxWJ1gEkEF0yRd0O+uK6dHJf7adrxwQSX8PuRiPfFSAbNLnY0ZJfXaZucoz14Jj2N11xn2DnlEPwWRpYpvRjg==", "dev": true, "dependencies": { "comment-parser": "1.3.1", - "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "~3.1.0" + "esquery": "^1.5.0", + "jsdoc-type-pratt-parser": "~4.0.0" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": "^14 || ^16 || ^17 || ^18 || ^19 || ^20" } }, "node_modules/@esbuild/linux-loong64": { @@ -3624,9 +3624,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", - "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", + "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": { @@ -4629,6 +4629,15 @@ "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", "dev": true }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/are-we-there-yet": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", @@ -7404,16 +7413,17 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "39.9.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz", - "integrity": "sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==", + "version": "41.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.2.tgz", + "integrity": "sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.36.1", + "@es-joy/jsdoccomment": "~0.37.0", + "are-docs-informative": "^0.0.2", "comment-parser": "1.3.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", - "esquery": "^1.4.0", + "esquery": "^1.5.0", "semver": "^7.3.8", "spdx-expression-parse": "^3.0.1" }, @@ -9593,9 +9603,9 @@ } }, "node_modules/jsdoc-type-pratt-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz", - "integrity": "sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", "dev": true, "engines": { "node": ">=12.0.0" @@ -15281,9 +15291,9 @@ } }, "node_modules/zone.js": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.8.tgz", - "integrity": "sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.12.0.tgz", + "integrity": "sha512-XtC+I5dXU14HrzidAKBNMqneIVUykLEAA1x+v4KVrd6AUPWlwYORF8KgsVqvgdHiKZ4BkxxjvYi/ksEixTPR0Q==", "dependencies": { "tslib": "^2.3.0" } diff --git a/ui/package.json b/ui/package.json index 99ea583dc..b7faec122 100644 --- a/ui/package.json +++ b/ui/package.json @@ -54,7 +54,7 @@ "xterm": "5.3.0", "xterm-addon-fit": "0.8.0", "xterm-addon-web-links": "0.9.0", - "zone.js": "0.11.8" + "zone.js": "0.12.0" }, "devDependencies": { "@angular-devkit/build-angular": "^14.2.13", @@ -76,7 +76,7 @@ "codelyzer": "^6.0.2", "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-jsdoc": "^39.9.1", + "eslint-plugin-jsdoc": "^41.1.2", "eslint-plugin-prefer-arrow": "^1.2.3", "ts-node": "^10.9.1", "typescript": "^4.8.4" diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html index e7f765f8a..8d757d5aa 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html @@ -11,7 +11,7 @@ }">
- System + Status
Starting... @@ -29,7 +29,7 @@
- + - + diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index 78eb2b96a..d8cf7ab79 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -21,7 +21,15 @@ - + + + + + + + + + - - - - - - - - - - - -
Timezone{{ serverInfo.time.timezone }}
OS @@ -25,23 +21,7 @@ Synology DSM
Hostname{{ serverInfo.os.hostname }}
- {{ 'status.widget.systeminfo.label_ipv4' | translate }} ({{ serverInfo.network.iface }}) - {{ serverInfo.network.ip4 }}
- {{ 'status.widget.systeminfo.label_ipv6' | translate }} ({{ serverInfo.network.iface }}) - {{ serverInfo.network.ip6 }}
GLIBC Version @@ -61,7 +41,7 @@ {{ serverInfo.nodeVersion }} - +
Node.js Path {{ nodejsInfo.installPath }}
+ {{ 'status.widget.systeminfo.label_ipv4' | translate }} ({{ serverInfo.network.iface }}) + {{ serverInfo.network.ip4 }}
+ {{ 'status.widget.systeminfo.label_ipv6' | translate }} ({{ serverInfo.network.iface }}) + {{ serverInfo.network.ip6 }}
Hostname{{ serverInfo.os.hostname }}
User {{ serverInfo.serviceUser }} Yes
Timezone{{ serverInfo.time.timezone }}
Service Mode Yes Synology DSM
DockerYes
Service ModeYes
GLIBC Version @@ -81,23 +89,10 @@ Plugin Path {{ serverInfo.homebridgeCustomPluginPath }}
DockerYes
- Synology PackageYes
Timezone {{ serverInfo.time.timezone }}
Service ModeYes
From 1eac32c32ee7d989df29bb42df59df5e9c0379cf Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:50:43 +0000 Subject: [PATCH 018/110] fiz --- .../homebridge-status-widget.component.html | 4 ++-- .../homebridge-status-widget.component.scss | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html index 8d757d5aa..c3e08f295 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html @@ -41,7 +41,7 @@
diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.scss b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.scss index 1d500a251..0737cd022 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.scss +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.scss @@ -6,4 +6,10 @@ @media (max-width: 767px) { width: 100%; } -} \ No newline at end of file +} + +::ng-deep body.dark-mode { + .card-link-title { + color: #ffffff !important; + } +} From b5d6128b4302bb5084364cdd04a1c47bb0b0af21 Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:11:10 +0100 Subject: [PATCH 019/110] Default widget layout (#1641) My last approach to default look suggestion. Zrzut ekranu 2023-11-7 o 09 31 00 --- .../status/default-dashboard-layout.json | 42 +++++++++---------- .../hap-qrcode-widget.component.html | 2 +- ui/src/i18n/bg.json | 2 +- ui/src/i18n/ca.json | 2 +- ui/src/i18n/cs.json | 2 +- ui/src/i18n/de.json | 2 +- ui/src/i18n/en.json | 2 +- ui/src/i18n/es.json | 2 +- ui/src/i18n/fr.json | 2 +- ui/src/i18n/he.json | 2 +- ui/src/i18n/hu.json | 2 +- ui/src/i18n/id.json | 2 +- ui/src/i18n/it.json | 2 +- ui/src/i18n/ja.json | 2 +- ui/src/i18n/ko.json | 2 +- ui/src/i18n/mk.json | 2 +- ui/src/i18n/nl.json | 2 +- ui/src/i18n/no.json | 2 +- ui/src/i18n/pl.json | 2 +- ui/src/i18n/pt-BR.json | 2 +- ui/src/i18n/pt.json | 2 +- ui/src/i18n/ru.json | 2 +- ui/src/i18n/sl.json | 2 +- ui/src/i18n/sv.json | 2 +- ui/src/i18n/th.json | 2 +- ui/src/i18n/tr.json | 2 +- ui/src/i18n/uk.json | 2 +- ui/src/i18n/zh-CN.json | 2 +- ui/src/i18n/zh-TW.json | 2 +- 29 files changed, 49 insertions(+), 49 deletions(-) diff --git a/ui/src/app/modules/status/default-dashboard-layout.json b/ui/src/app/modules/status/default-dashboard-layout.json index eb3a8aead..904bd3fd6 100644 --- a/ui/src/app/modules/status/default-dashboard-layout.json +++ b/ui/src/app/modules/status/default-dashboard-layout.json @@ -1,26 +1,26 @@ [ { - "x": 5, - "y": 0, + "x": 0, + "y": 8, "component": "HomebridgeStatusWidgetComponent", - "cols": 10, - "rows": 3, + "cols": 5, + "rows": 6, "mobileOrder": 10, "hidePort": true, "hideOnMobile": false }, { - "x": 15, - "y": 0, + "x": 16, + "y": 8, "component": "ChildBridgeWidgetComponent", "cols": 5, - "rows": 9, + "rows": 6, "mobileOrder": 35, "hideOnMobile": false }, { "x": 5, - "y": 3, + "y": 8, "component": "CpuWidgetComponent", "cols": 5, "rows": 3, @@ -28,8 +28,8 @@ "hideOnMobile": false }, { - "x": 10, - "y": 3, + "x": 5, + "y": 11, "component": "MemoryWidgetComponent", "cols": 5, "rows": 3, @@ -38,7 +38,7 @@ }, { "x": 10, - "y": 6, + "y": 11, "component": "NetworkWidgetComponent", "cols": 5, "rows": 3, @@ -46,8 +46,8 @@ "hideOnMobile": false }, { - "x": 5, - "y": 6, + "x": 10, + "y": 8, "component": "UptimeWidgetComponent", "cols": 5, "rows": 3, @@ -55,11 +55,11 @@ "hideOnMobile": false }, { - "x": 0, - "y": 9, + "x": 15, + "y": 0, "component": "SystemInfoWidgetComponent", "cols": 5, - "rows": 9, + "rows": 8, "mobileOrder": 70, "hideOnMobile": false }, @@ -68,17 +68,17 @@ "y": 0, "component": "HapQrcodeWidgetComponent", "cols": 5, - "rows": 9, + "rows": 8, "mobileOrder": 100, "hideOnMobile": false }, { "x": 5, - "y": 9, + "y": 0, "component": "HomebridgeLogsWidgetComponent", - "cols": 15, - "rows": 9, + "cols": 10, + "rows": 8, "mobileOrder": 1000, "hideOnMobile": true } -] \ No newline at end of file +] diff --git a/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html b/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html index f9d7d98dc..696aca6c5 100644 --- a/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html +++ b/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.html @@ -11,7 +11,7 @@

{{ pin }}

- Scan this code with the camera on your iOS device to add to Apple Home. + Scan to add to HomeKit.

diff --git a/ui/src/i18n/bg.json b/ui/src/i18n/bg.json index eebb4ffdd..ed62e67b0 100644 --- a/ui/src/i18n/bg.json +++ b/ui/src/i18n/bg.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Свободна", "status.memory.label_total": "Общо", "status.memory.title_memory": "Рам Памет", - "status.message_code_scan_instructions": "Сканирайте този код с камерата на вашето iOS устройство, за да го добавите към Apple Home.", + "status.message_code_scan_instructions": "Сканирайте, за да добавите към Homekit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/ca.json b/ui/src/i18n/ca.json index be16b0ae2..33d76fb03 100644 --- a/ui/src/i18n/ca.json +++ b/ui/src/i18n/ca.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Lliure", "status.memory.label_total": "Total", "status.memory.title_memory": "Memòria", - "status.message_code_scan_instructions": "Escaneja aquest codi amb la càmera del teu dispositiu iOS per afegir-lo a l'aplicació 'Home'.", + "status.message_code_scan_instructions": "Escaneja per afegir a HomeKit.", "status.network.label_received_per_second": "Rebut", "status.network.label_sent_per_second": "Enviat", "status.network.title_network": "Activitat en xarxa", diff --git a/ui/src/i18n/cs.json b/ui/src/i18n/cs.json index 731949bfa..4481d4fb2 100644 --- a/ui/src/i18n/cs.json +++ b/ui/src/i18n/cs.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Volná", "status.memory.label_total": "Celková", "status.memory.title_memory": "Paměť RAM", - "status.message_code_scan_instructions": "Sejměte fotoaparátem ve vašem iOS zařízením tento QR kód a přidejte Homebridge most do aplikace Domácnost.", + "status.message_code_scan_instructions": "Naskenováním přidejte do HomeKit.", "status.network.label_received_per_second": "Přijato", "status.network.label_sent_per_second": "Odesláno", "status.network.title_network": "Aktivita Sítě", diff --git a/ui/src/i18n/de.json b/ui/src/i18n/de.json index e55be2952..96853dca4 100644 --- a/ui/src/i18n/de.json +++ b/ui/src/i18n/de.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Frei", "status.memory.label_total": "Gesamt", "status.memory.title_memory": "Arbeitsspeicher", - "status.message_code_scan_instructions": "Scanne diesen Code mit der Kamera auf deinem iOS-Gerät, um Homebridge zu Apple Home hinzuzufügen.", + "status.message_code_scan_instructions": "Scannen, um es zu HomeKit hinzuzufügen.", "status.network.label_received_per_second": "Empfangen", "status.network.label_sent_per_second": "Gesendet", "status.network.title_network": "Netzwerkaktivitäten", diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json index ebb098d95..7b936d34c 100644 --- a/ui/src/i18n/en.json +++ b/ui/src/i18n/en.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Available", "status.memory.label_total": "Total", "status.memory.title_memory": "Memory", - "status.message_code_scan_instructions": "Scan this code with the camera on your iOS device to add to Apple Home.", + "status.message_code_scan_instructions": "Scan to add to HomeKit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/es.json b/ui/src/i18n/es.json index 97f49cdd4..0d30e24df 100644 --- a/ui/src/i18n/es.json +++ b/ui/src/i18n/es.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Libre", "status.memory.label_total": "Total", "status.memory.title_memory": "Memoria", - "status.message_code_scan_instructions": "Escanea este código con la cámara de tu dispositivo iOS o iPadOS para vincular a la aplicación Casa.", + "status.message_code_scan_instructions": "Escanear para agregar a HomeKit.", "status.network.label_received_per_second": "Recibido", "status.network.label_sent_per_second": "Enviado", "status.network.title_network": "Actividad de la Red", diff --git a/ui/src/i18n/fr.json b/ui/src/i18n/fr.json index 4f7d2e5e1..355cb6b3f 100644 --- a/ui/src/i18n/fr.json +++ b/ui/src/i18n/fr.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Disponible", "status.memory.label_total": "Totale", "status.memory.title_memory": "Mémoire", - "status.message_code_scan_instructions": "Scannez ce code avec l'appareil photo de votre appareil iOS pour l'ajouter à l'app Maison.", + "status.message_code_scan_instructions": "Numériser pour ajouter à HomeKit.", "status.network.label_received_per_second": "Reçu", "status.network.label_sent_per_second": "Envoyé", "status.network.title_network": "Activité Réseau", diff --git a/ui/src/i18n/he.json b/ui/src/i18n/he.json index 5b8bb504f..383e2f235 100644 --- a/ui/src/i18n/he.json +++ b/ui/src/i18n/he.json @@ -291,7 +291,7 @@ "status.memory.label_available": "פנוי", "status.memory.label_total": "סה״כ", "status.memory.title_memory": "זכרון", - "status.message_code_scan_instructions": "סרוק קוד זה באמצעות המצלמה במכשיר הiOS שלך על מנת להוסיף לאפליקצית הבית", + "status.message_code_scan_instructions": "סרוק כדי להוסיף ל-HomeKit", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/hu.json b/ui/src/i18n/hu.json index 1182ac56b..51cf35162 100644 --- a/ui/src/i18n/hu.json +++ b/ui/src/i18n/hu.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Szabad", "status.memory.label_total": "Összesen", "status.memory.title_memory": "Memória", - "status.message_code_scan_instructions": "Az iOS készülék kameráját irányítsd a kódra, hogy a az Apple Home-ba bekerüljön a Homebridge", + "status.message_code_scan_instructions": "Szkennelje be, hogy hozzáadja a HomeKit", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/id.json b/ui/src/i18n/id.json index 459c4c0d4..c57501844 100644 --- a/ui/src/i18n/id.json +++ b/ui/src/i18n/id.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Tersedia", "status.memory.label_total": "Total", "status.memory.title_memory": "Memori", - "status.message_code_scan_instructions": "Pindai kode ini dengan kamera di perangkat iOS anda untuk ditambahkan ke dalam Apple Home", + "status.message_code_scan_instructions": "Pindai untuk menambahkan ke HomeKit.", "status.network.label_received_per_second": "Diterima", "status.network.label_sent_per_second": "Dikirim", "status.network.title_network": "Aktivitas Jaringan", diff --git a/ui/src/i18n/it.json b/ui/src/i18n/it.json index 22b72b87d..581b56ae2 100644 --- a/ui/src/i18n/it.json +++ b/ui/src/i18n/it.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Libera", "status.memory.label_total": "Totale", "status.memory.title_memory": "Memoria", - "status.message_code_scan_instructions": "Inquadra questo codice QR con la fotocamera del tuo dispositivo iOS per aggiungere questa istanza di Homebridge all'applicazione Apple Casa.", + "status.message_code_scan_instructions": "Scansiona per aggiungere a HomeKit.", "status.network.label_received_per_second": "Ricevuti", "status.network.label_sent_per_second": "Inviati", "status.network.title_network": "Attività di rete", diff --git a/ui/src/i18n/ja.json b/ui/src/i18n/ja.json index c00f57b1b..976d9f3a5 100644 --- a/ui/src/i18n/ja.json +++ b/ui/src/i18n/ja.json @@ -291,7 +291,7 @@ "status.memory.label_available": "空き", "status.memory.label_total": "合計", "status.memory.title_memory": "メモリ", - "status.message_code_scan_instructions": "Appleホームアプリに追加するには、iOSデバイスのカメラでこのコードを読み取ってください。", + "status.message_code_scan_instructions": "スキャンして HomeKit に追加します。", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/ko.json b/ui/src/i18n/ko.json index 4d0c555c3..b55345cc3 100644 --- a/ui/src/i18n/ko.json +++ b/ui/src/i18n/ko.json @@ -291,7 +291,7 @@ "status.memory.label_available": "가능", "status.memory.label_total": "전체", "status.memory.title_memory": "메모리", - "status.message_code_scan_instructions": "Apple Home에 추가하려면 iOS 디바이스의 카메라로 이 코드를 스캔하세요.", + "status.message_code_scan_instructions": "HomeKit에 추가하려면 스캔하세요.", "status.network.label_received_per_second": "수신됨", "status.network.label_sent_per_second": "전송", "status.network.title_network": "네트워크 Activity", diff --git a/ui/src/i18n/mk.json b/ui/src/i18n/mk.json index d53a344e2..276481860 100644 --- a/ui/src/i18n/mk.json +++ b/ui/src/i18n/mk.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Достапно", "status.memory.label_total": "Вкупно", "status.memory.title_memory": "Меморија", - "status.message_code_scan_instructions": "Скенирајте го овој код камерата на вашиот iOS уред за да го даодадете во Apple Home.", + "status.message_code_scan_instructions": "Скенирајте за да додадете во HomeKit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/nl.json b/ui/src/i18n/nl.json index 3bc7ad1b5..251ccf7df 100644 --- a/ui/src/i18n/nl.json +++ b/ui/src/i18n/nl.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Vrij", "status.memory.label_total": "Totaal", "status.memory.title_memory": "Geheugen", - "status.message_code_scan_instructions": "Scan deze code met de camera op uw iOS-apparaat om toe te voegen aan Apple Home.", + "status.message_code_scan_instructions": "Scannen om toe te voegen aan HomeKit.", "status.network.label_received_per_second": "Ontvangen", "status.network.label_sent_per_second": "Verzonden", "status.network.title_network": "Netwerk Activiteit", diff --git a/ui/src/i18n/no.json b/ui/src/i18n/no.json index b8991b89c..055661075 100644 --- a/ui/src/i18n/no.json +++ b/ui/src/i18n/no.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Ledig", "status.memory.label_total": "Totalt", "status.memory.title_memory": "Minne", - "status.message_code_scan_instructions": "Scan denne koden med kameraet på din iOS-enhet for å legge til i Apple Home.", + "status.message_code_scan_instructions": "Skann for å legge til HomeKit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/pl.json b/ui/src/i18n/pl.json index b80a61495..65fd0992b 100644 --- a/ui/src/i18n/pl.json +++ b/ui/src/i18n/pl.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Dostępna", "status.memory.label_total": "Całkowita", "status.memory.title_memory": "Pamięć", - "status.message_code_scan_instructions": "Zeskanuj ten kod na urządzeniu z systemem iOS, aby dodać go do HomeKit.", + "status.message_code_scan_instructions": "Zeskanuj aby dodać do HomeKit.", "status.network.label_received_per_second": "Odebrano", "status.network.label_sent_per_second": "Wysłano", "status.network.title_network": "Aktywność sieci", diff --git a/ui/src/i18n/pt-BR.json b/ui/src/i18n/pt-BR.json index c7b578550..1eab22039 100644 --- a/ui/src/i18n/pt-BR.json +++ b/ui/src/i18n/pt-BR.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Disponível", "status.memory.label_total": "Total", "status.memory.title_memory": "Memória", - "status.message_code_scan_instructions": "Leia este QR Code com a câmera do seu dispositivo iOS para adicionar ao Apple Casa.", + "status.message_code_scan_instructions": "Digitalize para adicionar ao HomeKit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/pt.json b/ui/src/i18n/pt.json index 9da52c196..95212bd5f 100644 --- a/ui/src/i18n/pt.json +++ b/ui/src/i18n/pt.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Disponível", "status.memory.label_total": "Total", "status.memory.title_memory": "Memória", - "status.message_code_scan_instructions": "Leia este código com a câmara do seu dispositivo iOS para adicionar ao Apple Home.", + "status.message_code_scan_instructions": "Digitalize para adicionar ao HomeKit.", "status.network.label_received_per_second": "Recebido", "status.network.label_sent_per_second": "Enviado", "status.network.title_network": "Atividade da Rede", diff --git a/ui/src/i18n/ru.json b/ui/src/i18n/ru.json index fbeff2f94..4a36cf5ca 100644 --- a/ui/src/i18n/ru.json +++ b/ui/src/i18n/ru.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Свободно", "status.memory.label_total": "Всего", "status.memory.title_memory": "Память", - "status.message_code_scan_instructions": "Отсканируйте этот код с помощью камеры iOS устройства, чтобы добавить в приложение \"Дом\".", + "status.message_code_scan_instructions": "Отсканируйте, чтобы добавить в HomeKit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/sl.json b/ui/src/i18n/sl.json index dc6b6ddbc..1a2821066 100644 --- a/ui/src/i18n/sl.json +++ b/ui/src/i18n/sl.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Na voljo", "status.memory.label_total": "Skupaj", "status.memory.title_memory": "Spomin", - "status.message_code_scan_instructions": "Preglejte to kodo s kamero v napravi iOS, da jo dodate v Apple Home.", + "status.message_code_scan_instructions": "Skenirajte za dodajanje v HomeKit.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/sv.json b/ui/src/i18n/sv.json index d35d52991..14c667715 100644 --- a/ui/src/i18n/sv.json +++ b/ui/src/i18n/sv.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Fritt", "status.memory.label_total": "Totalt", "status.memory.title_memory": "Minne", - "status.message_code_scan_instructions": "Skanna den här koden med kameran på din iOS-enhet för att lägga till i Apple Home.", + "status.message_code_scan_instructions": "Skanna för att lägga till i HomeKit.", "status.network.label_received_per_second": "Mottaget", "status.network.label_sent_per_second": "Skickat", "status.network.title_network": "Nätverksaktivitet", diff --git a/ui/src/i18n/th.json b/ui/src/i18n/th.json index 04a554ae2..91b4302c3 100644 --- a/ui/src/i18n/th.json +++ b/ui/src/i18n/th.json @@ -291,7 +291,7 @@ "status.memory.label_available": "เหลือว่าง", "status.memory.label_total": "ทั้งหมด", "status.memory.title_memory": "หน่วยความจำ", - "status.message_code_scan_instructions": "สแกนรหัสนี้ด้วยกล้องบนอุปกรณ์ iOS ของคุณเพื่อเพิ่มลงใน Apple Home", + "status.message_code_scan_instructions": "สแกนเพื่อเพิ่มลงใน HomeKit", "status.network.label_received_per_second": "ได้รับแล้ว", "status.network.label_sent_per_second": "ส่ง", "status.network.title_network": "กิจกรรมเครือข่าย", diff --git a/ui/src/i18n/tr.json b/ui/src/i18n/tr.json index 36f3e848a..11665a755 100644 --- a/ui/src/i18n/tr.json +++ b/ui/src/i18n/tr.json @@ -291,7 +291,7 @@ "status.memory.label_available": "Kullanılabilir", "status.memory.label_total": "Toplam", "status.memory.title_memory": "Bellek", - "status.message_code_scan_instructions": "Apple Ev uygulamasına eklemek için bu kodu iOS/iPadOS cihazınızdaki kamerayla tarayın.", + "status.message_code_scan_instructions": "HomeKit'e eklemek için tarayın.", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/uk.json b/ui/src/i18n/uk.json index a0f55b908..3bc55cbd3 100644 --- a/ui/src/i18n/uk.json +++ b/ui/src/i18n/uk.json @@ -293,7 +293,7 @@ "status.memory.label_available": "Вільно", "status.memory.label_total": "Всього", "status.memory.title_memory": "Пам'ять", - "status.message_code_scan_instructions": "Відскануйте цей код за допомогою камери iOS пристрою, щоб додати в додаток \"Дім\".", + "status.message_code_scan_instructions": "Скануйте, щоб додати до HomeKit.", "status.network.label_received_per_second": "Отримано", "status.network.label_sent_per_second": "Надіслано", "status.network.title_network": "Активність у мережі", diff --git a/ui/src/i18n/zh-CN.json b/ui/src/i18n/zh-CN.json index 9e0a8e9b8..83df8ef4f 100644 --- a/ui/src/i18n/zh-CN.json +++ b/ui/src/i18n/zh-CN.json @@ -291,7 +291,7 @@ "status.memory.label_available": "空闲", "status.memory.label_total": "总内存", "status.memory.title_memory": "内存", - "status.message_code_scan_instructions": "使用 iOS 设备扫描二维码以添加至家庭应用。", + "status.message_code_scan_instructions": "扫描添加到HomeKit。", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", diff --git a/ui/src/i18n/zh-TW.json b/ui/src/i18n/zh-TW.json index 97e2cc87c..dc08ff1ff 100644 --- a/ui/src/i18n/zh-TW.json +++ b/ui/src/i18n/zh-TW.json @@ -291,7 +291,7 @@ "status.memory.label_available": "閒置", "status.memory.label_total": "記憶體總計", "status.memory.title_memory": "記憶體", - "status.message_code_scan_instructions": "用 iOS 裝置內建相機掃描此條碼以新增至「家庭」App。", + "status.message_code_scan_instructions": "掃描加入到HomeKit。", "status.network.label_received_per_second": "Received", "status.network.label_sent_per_second": "Sent", "status.network.title_network": "Network Activity", From 3087249566dd6527dcdedb08b0b7fcd7dbfb05f3 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:18:50 +0000 Subject: [PATCH 020/110] updates --- package-lock.json | 7 ++++ package.json | 1 + src/bin/hb-service.ts | 32 ++++++++----------- src/bin/platforms/darwin.ts | 4 +-- src/bin/platforms/freebsd.ts | 2 +- src/bin/platforms/linux.ts | 6 ++-- src/bin/platforms/win32.ts | 2 +- src/modules/log/log.service.ts | 15 +++++++-- .../donate-modal/donate-modal.component.html | 4 +-- 9 files changed, 44 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85286e547..4634c90ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,7 @@ "@types/node": "^18.18.8", "@types/node-schedule": "^2.1.2", "@types/semver": "^7.5.4", + "@types/tail": "^2.2.2", "@types/tar": "^6.1.7", "@types/tcp-port-used": "^1.0.3", "@types/unzipper": "^0.10.8", @@ -2571,6 +2572,12 @@ "integrity": "sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw==", "dev": true }, + "node_modules/@types/tail": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@types/tail/-/tail-2.2.2.tgz", + "integrity": "sha512-+CjjgMFjIVgTYsJXWNpAKVRerFWc9c+GTMzY/336fSW6BhY5TJwo2CNYJiNq7mO9rBHmtmpceKf2DnkrnaR3Vg==", + "dev": true + }, "node_modules/@types/tar": { "version": "6.1.7", "resolved": "https://registry.npmjs.org/@types/tar/-/tar-6.1.7.tgz", diff --git a/package.json b/package.json index fe399a387..11d44ef72 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "@types/node": "^18.18.8", "@types/node-schedule": "^2.1.2", "@types/semver": "^7.5.4", + "@types/tail": "^2.2.2", "@types/tar": "^6.1.7", "@types/tcp-port-used": "^1.0.3", "@types/unzipper": "^0.10.8", diff --git a/src/bin/hb-service.ts b/src/bin/hb-service.ts index 366dded64..97072cdd8 100644 --- a/src/bin/hb-service.ts +++ b/src/bin/hb-service.ts @@ -29,18 +29,17 @@ export class HomebridgeServiceHelper { public action: 'install' | 'uninstall' | 'start' | 'stop' | 'restart' | 'rebuild' | 'run' | 'add' | 'remove' | 'logs' | 'view' | 'update-node' | 'before-start' | 'status'; public selfPath = __filename; public serviceName = 'Homebridge'; - public storagePath; + public storagePath: string; public usingCustomStoragePath = false; public allowRunRoot = false; public enableHbServicePluginManagement = false; - public asUser; + public asUser: string; public addGroup: string; private log: fs.WriteStream | NodeJS.WriteStream; private homebridgeModulePath: string; private homebridgePackage: { version: string; bin: { homebridge: string } }; private homebridgeBinary: string; private homebridge: child_process.ChildProcessWithoutNullStreams; - private homebridgeStopped = true; private homebridgeOpts = ['-I']; private homebridgeCustomEnv = {}; private uiBinary: string; @@ -204,7 +203,7 @@ export class HomebridgeServiceHelper { /** * Logger function, log to homebridge.log file when possible */ - public logger(msg, type: 'info' | 'succeed' | 'fail' | 'warn' = 'info') { + public logger(msg: string, type: 'info' | 'succeed' | 'fail' | 'warn' = 'info') { if (this.action === 'run') { msg = `\x1b[37m[${new Date().toLocaleString()}]\x1b[0m ` + '\x1b[36m[HB Supervisor]\x1b[0m ' + msg; @@ -374,7 +373,7 @@ export class HomebridgeServiceHelper { // start the ui await this.runUi(); - // tell the ui what homebridge we are running initialy (this is refreshed when Homebridge is restarted) + // tell the ui what homebridge we are running initially (this is refreshed when Homebridge is restarted) if (this.ipcService && this.homebridgePackage) { this.ipcService.setHomebridgeVersion(this.homebridgePackage.version); } @@ -416,8 +415,6 @@ export class HomebridgeServiceHelper { * Starts homebridge as a child process, sending the log output to the homebridge.log */ private runHomebridge() { - this.homebridgeStopped = false; - if (!this.homebridgeBinary || !fs.pathExistsSync(this.homebridgeBinary)) { this.logger('Could not find Homebridge. Make sure you have installed homebridge using the -g flag then restart.', 'fail'); this.logger('npm install -g --unsafe-perm homebridge', 'fail'); @@ -509,7 +506,6 @@ export class HomebridgeServiceHelper { * @param signal */ private handleHomebridgeClose(code: number, signal: string) { - this.homebridgeStopped = true; this.logger(`Homebridge Process Ended. Code: ${code}, Signal: ${signal}`); this.checkForStaleHomebridgeProcess(); @@ -655,7 +651,7 @@ export class HomebridgeServiceHelper { // See https://github.com/sebhildebrandt/systeminformation/issues/775#issuecomment-1741836906 // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - const defaultInterface = (await si.networkInterfaces()).find(x => x.iface === defaultAdapter); + const defaultInterface = (await si.networkInterfaces()).find((x: any) => x.iface === defaultAdapter); console.log('\nManage Homebridge by going to one of the following in your browser:\n'); @@ -724,7 +720,7 @@ export class HomebridgeServiceHelper { if (!Array.isArray(currentConfig.platforms)) { currentConfig.platforms = []; } - let uiConfigBlock = currentConfig.platforms.find((x) => x.platform === 'config'); + let uiConfigBlock = currentConfig.platforms.find((x: any) => x.platform === 'config'); // if the config block does not exist, then create it if (!uiConfigBlock) { @@ -743,7 +739,7 @@ export class HomebridgeServiceHelper { restartRequired = true; } - // if doing an install, make sure the port number matches the value passed in by the user + // if doing an installation, make sure the port number matches the value passed in by the user if (this.action === 'install') { // correct the port if (uiConfigBlock.port !== this.uiPort) { @@ -861,7 +857,7 @@ export class HomebridgeServiceHelper { } /** - * Returns true if running on the Homebridge Rasbpian Image + * Returns true if running on the Homebridge Raspbian Image */ private async isRaspbianImage(): Promise { return os.platform() === 'linux' && await fs.pathExists('/etc/hb-ui-port'); @@ -886,7 +882,7 @@ export class HomebridgeServiceHelper { return envPort; } - // otherwise return the defaul port + // otherwise return the default port return this.uiPort; } @@ -1225,7 +1221,7 @@ export class HomebridgeServiceHelper { const spinner = ora(`Installing Node.js ${targetVersion}`).start(); try { - await tar.x(extractConfig); + tar.x(extractConfig); spinner.succeed(`Installed Node.js ${targetVersion}`); } catch (e) { spinner.fail(e.message); @@ -1252,7 +1248,7 @@ export class HomebridgeServiceHelper { } /** - * Check the current status of the Homebridge UI by calling it's API + * Check the current status of the Homebridge UI by calling its API */ private async checkStatus() { this.logger(`Testing hb-service is running on port ${this.uiPort}...`); @@ -1272,7 +1268,7 @@ export class HomebridgeServiceHelper { } /** - * Parse an npm package and version string + * Parse an NPM package and version string * Based on: https://github.com/egoist/parse-package-name */ private parseNpmPackageString(input: string) { @@ -1296,7 +1292,7 @@ export class HomebridgeServiceHelper { /** * Install / Remove a plugin using pnpm (supported platforms only) */ - private async npmPluginManagement(args) { + private async npmPluginManagement(args: any[]) { if (!this.enableHbServicePluginManagement) { this.logger('Plugin management is not supported on your platform using hb-service.', 'fail'); process.exit(1); @@ -1326,7 +1322,7 @@ export class HomebridgeServiceHelper { this.logger(`Path does not exist: "${cwd}"`, 'fail'); } - let cmd; + let cmd: string; if (process.env.UIX_USE_PNPM === '1') { cmd = `pnpm -C "${cwd}" ${action} ${target.name}`; diff --git a/src/bin/platforms/darwin.ts b/src/bin/platforms/darwin.ts index 30fe5514f..3cf32e3ec 100644 --- a/src/bin/platforms/darwin.ts +++ b/src/bin/platforms/darwin.ts @@ -214,7 +214,7 @@ export class DarwinInstaller extends BasePlatform { } /** - * Resolves the target user home directory when running the install command as SUDO + * Resolves the target user home directory when running the installation command as SUDO */ private getUserHomeDir() { try { @@ -253,7 +253,7 @@ export class DarwinInstaller extends BasePlatform { const downloadUrl = `https://nodejs.org/dist/${job.target}/node-${job.target}-darwin-${process.arch}.tar.gz`; const targetPath = path.dirname(path.dirname(process.execPath)); - // only allow updates when installed using the offical Node.js installer / Homebridge package + // only allow updates when installed using the official Node.js installer / Homebridge package if (targetPath !== '/usr/local' && !targetPath.startsWith('/Library/Application Support/Homebridge/node-')) { this.hbService.logger(`Cannot update Node.js on your system. Non-standard installation path detected: ${targetPath}`, 'fail'); process.exit(1); diff --git a/src/bin/platforms/freebsd.ts b/src/bin/platforms/freebsd.ts index 7aabf142c..52e75a5ba 100644 --- a/src/bin/platforms/freebsd.ts +++ b/src/bin/platforms/freebsd.ts @@ -222,7 +222,7 @@ export class FreeBSDInstaller extends BasePlatform { } /** - * Allows the homebridge user to shutdown and restart the server from the UI + * Allows the homebridge user to shut down and restart the server from the UI * There is no need for full sudo access when running using hb-service */ private setupSudo() { diff --git a/src/bin/platforms/linux.ts b/src/bin/platforms/linux.ts index 7476a1884..b55cacc14 100644 --- a/src/bin/platforms/linux.ts +++ b/src/bin/platforms/linux.ts @@ -142,7 +142,7 @@ export class LinuxInstaller extends BasePlatform { '/usr/local/lib/node_modules', '/usr/lib/node_modules' ].includes(path.dirname(process.env.UIX_BASE_PATH))) { - // systemd has a 90 second default timeout in the pre-start jobs + // systemd has a 90-second default timeout in the pre-start jobs // terminate this task after 60 seconds to be safe setTimeout(() => { process.exit(0); @@ -553,7 +553,7 @@ export class LinuxInstaller extends BasePlatform { } /** - * Allows the homebridge user to shutdown and restart the server from the UI + * Allows the homebridge user to shut down and restart the server from the UI * There is no need for full sudo access when running using hb-service */ private setupSudo() { @@ -689,7 +689,7 @@ export class LinuxInstaller extends BasePlatform { } /** - * Setup the run-parts path and scripts + * Set up the run-parts path and scripts * This allows users to define their own scripts to run before Homebridge starts/restarts * The default script will ensure the homebridge storage path has the correct permissions each time Homebridge starts */ diff --git a/src/bin/platforms/win32.ts b/src/bin/platforms/win32.ts index c307aac90..9654fa88b 100644 --- a/src/bin/platforms/win32.ts +++ b/src/bin/platforms/win32.ts @@ -161,7 +161,7 @@ export class Win32Installer extends BasePlatform { .on('finish', () => { return resolve(nssmPath); }) - .on('error', (err) => { + .on('error', (err: any) => { return reject(err); }); }).catch(async (e) => { diff --git a/src/modules/log/log.service.ts b/src/modules/log/log.service.ts index fce9bf94c..6394dfcce 100644 --- a/src/modules/log/log.service.ts +++ b/src/modules/log/log.service.ts @@ -47,6 +47,7 @@ export class LogService { /** * Socket handler * @param client + * @param size */ public connect(client: EventEmitter, size: LogTermSize) { this.ending = false; @@ -203,8 +204,11 @@ export class LogService { interval: 200, }, }); - } else if (this.nativeTail.listenerCount('line') === 0) { - this.nativeTail.watch(); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + } else { // @ts-expect-error + if (this.nativeTail.listenerCount('line') === 0) { + this.nativeTail.watch(); + } } // watch for lines and emit to client @@ -223,10 +227,17 @@ export class LogService { const onEnd = () => { this.ending = true; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error this.nativeTail.removeListener('line', onLine); + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error this.nativeTail.removeListener('error', onError); // stop watching the file if there are no other watchers + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error if (this.nativeTail.listenerCount('line') === 0) { this.nativeTail.unwatch(); } diff --git a/ui/src/app/modules/plugins/donate-modal/donate-modal.component.html b/ui/src/app/modules/plugins/donate-modal/donate-modal.component.html index 36d45ce12..a9cc1ef31 100644 --- a/ui/src/app/modules/plugins/donate-modal/donate-modal.component.html +++ b/ui/src/app/modules/plugins/donate-modal/donate-modal.component.html @@ -22,11 +22,11 @@ - \ No newline at end of file + From 74ac8fbe8bc2fcbb0121387c08fb162f9d57b4bb Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:27:20 +0000 Subject: [PATCH 021/110] Update homebridge-status-widget.component.html --- .../homebridge-status-widget.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html index c3e08f295..6f8c68d7b 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html @@ -84,9 +84,9 @@ {{ homebridgePluginStatus.length }} {{ homebridgePluginStatus.length === 1 ? ('status.plugin_out_of_date' | translate) : ('status.plugins_out_of_date' | translate) }} - + {{ 'status.homebridge.label_up_to_date' | translate }} - + From 650744e839a954ae62a9190283b77b5f2694df70 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:02:22 +0000 Subject: [PATCH 022/110] corrections --- package-lock.json | 163 +++++++++++++++++++++++++++++----- package.json | 3 +- src/core/auth/auth.service.ts | 38 ++++---- src/core/auth/jwt.strategy.ts | 2 +- 4 files changed, 163 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4634c90ef..7ff35276b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,7 +66,8 @@ "@types/fs-extra": "^11.0.3", "@types/jest": "^29.5.7", "@types/node": "^18.18.8", - "@types/node-schedule": "^2.1.2", + "@types/node-schedule": "^2.1.3", + "@types/passport-jwt": "^3.0.13", "@types/semver": "^7.5.4", "@types/tail": "^2.2.2", "@types/tar": "^6.1.7", @@ -2422,6 +2423,25 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -2461,6 +2481,30 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.41", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", + "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, "node_modules/@types/fs-extra": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.3.tgz", @@ -2480,25 +2524,31 @@ "@types/node": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true + }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.2.tgz", - "integrity": "sha512-8toY6FgdltSdONav1XtUHl4LN1yTmLza+EuDazb/fEmRNCwjyqNVIQWs2IfC74IqjHkREs/nQ2FWq5kZU9IC0w==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.3.tgz", - "integrity": "sha512-1nESsePMBlf0RPRffLZi5ujYh7IH1BWL4y9pr+Bn3cJBdxz+RTP8bUFljLz9HvzhhOSWKdyBZ4DIivdL6rvgZg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "dependencies": { "@types/istanbul-lib-report": "*" @@ -2515,9 +2565,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", - "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", + "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": { @@ -2527,9 +2577,9 @@ "dev": true }, "node_modules/@types/jsonfile": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.3.tgz", - "integrity": "sha512-/yqTk2SZ1wIezK0hiRZD7RuSf4B3whFxFamB1kGStv+8zlWScTMcHanzfc0XKWs5vA1TkHeckBlOyM8jxU8nHA==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -2543,6 +2593,12 @@ "@types/node": "*" } }, + "node_modules/@types/mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.4.tgz", + "integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==", + "dev": true + }, "node_modules/@types/node": { "version": "18.18.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz", @@ -2552,20 +2608,83 @@ } }, "node_modules/@types/node-schedule": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@types/node-schedule/-/node-schedule-2.1.2.tgz", - "integrity": "sha512-pNf6vCw14EYbqo0Y1eLGhkyv9RhgvphrxpPk4bd1CqwsWbHCrLSVYpO+9NmKOCUSYwxG6eRaWDR3Y6C+4gtzow==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/node-schedule/-/node-schedule-2.1.3.tgz", + "integrity": "sha512-sTWHBCD+17XjHRuxkLwoC0VdxAx/TVNny+1DUxv8RTPJNZGuokEKiSiGag+v9XdrnJ/c36ObWi4HA3JiokvOQw==", "dev": true, "dependencies": { "@types/node": "*" } }, + "node_modules/@types/passport": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.15.tgz", + "integrity": "sha512-oHOgzPBp5eLI1U/7421qYV/ZySQXMYCBSfRkDe1tQ0YrIbLY/M/76qIXE7Bs7lFyvw1x5QqiNQ9imvh0fQHe9Q==", + "dev": true, + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/passport-jwt": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@types/passport-jwt/-/passport-jwt-3.0.13.tgz", + "integrity": "sha512-fjHaC6Bv8EpMMqzTnHP32SXlZGaNfBPC/Po5dmRGYi2Ky7ljXPbGnOy+SxZqa6iZvFgVhoJ1915Re3m93zmcfA==", + "dev": true, + "dependencies": { + "@types/express": "*", + "@types/jsonwebtoken": "*", + "@types/passport-strategy": "*" + } + }, + "node_modules/@types/passport-strategy": { + "version": "0.2.38", + "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.38.tgz", + "integrity": "sha512-GC6eMqqojOooq993Tmnmp7AUTbbQSgilyvpCYQjT+H6JfG/g6RGc7nXEniZlp0zyKJ0WUdOiZWLBZft9Yug1uA==", + "dev": true, + "dependencies": { + "@types/express": "*", + "@types/passport": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.9", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz", + "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.6.tgz", + "integrity": "sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA==", + "dev": true + }, "node_modules/@types/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, + "node_modules/@types/send": { + "version": "0.17.3", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.3.tgz", + "integrity": "sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.4.tgz", + "integrity": "sha512-aqqNfs1XTF0HDrFdlY//+SGUxmdSUbjeRXb5iaZc3x0/vMbYmdw9qvOgHWOyyLFxSSRnUuP5+724zBgfw8/WAw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, "node_modules/@types/stack-utils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.2.tgz", @@ -4839,9 +4958,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.576", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.576.tgz", - "integrity": "sha512-yXsZyXJfAqzWk1WKryr0Wl0MN2D47xodPvEEwlVePBnhU5E7raevLQR+E6b9JAD3GfL/7MbAL9ZtWQQPcLx7wA==", + "version": "1.4.577", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.577.tgz", + "integrity": "sha512-/5xHPH6f00SxhHw6052r+5S1xO7gHNc89hV7tqlvnStvKbSrDqc/u6AlwPvVWWNj+s4/KL6T6y8ih+nOY0qYNA==", "dev": true }, "node_modules/emittery": { diff --git a/package.json b/package.json index 11d44ef72..013236a23 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,8 @@ "@types/fs-extra": "^11.0.3", "@types/jest": "^29.5.7", "@types/node": "^18.18.8", - "@types/node-schedule": "^2.1.2", + "@types/node-schedule": "^2.1.3", + "@types/passport-jwt": "^3.0.13", "@types/semver": "^7.5.4", "@types/tail": "^2.2.2", "@types/tar": "^6.1.7", diff --git a/src/core/auth/auth.service.ts b/src/core/auth/auth.service.ts index 24617feed..83d34de51 100644 --- a/src/core/auth/auth.service.ts +++ b/src/core/auth/auth.service.ts @@ -39,6 +39,7 @@ export class AuthService { * Authenticate a user with their credentials * @param username * @param password + * @param otp */ async authenticate(username: string, password: string, otp?: string): Promise { try { @@ -86,10 +87,11 @@ export class AuthService { * Authenticate and provide a JWT response * @param username * @param password + * @param otp */ async signIn(username: string, password: string, otp?: string): Promise { const user = await this.authenticate(username, password, otp); - const token = await this.jwtService.sign(user); + const token = this.jwtService.sign(user); return { access_token: token, @@ -128,7 +130,7 @@ export class AuthService { const user = users.find(x => x.admin === true); // generate a token - const token = await this.jwtService.sign({ + const token = this.jwtService.sign({ username: user.username, name: user.name, admin: user.admin, @@ -147,15 +149,15 @@ export class AuthService { * All information about the user we need is stored in the payload * @param payload the decoded, verified jwt payload */ - async validateUser(payload): Promise { + async validateUser(payload: any): Promise { return payload; } /** * Verify a token is signed correctly - * @param token + * @param client */ - async verifyWsConnection(client) { + async verifyWsConnection(client: any) { try { return jwt.verify(client.handshake.query.token, this.configService.secrets.secretKey); } catch (e) { @@ -191,7 +193,7 @@ export class AuthService { } /** - * Setup the first user + * Set up the first user */ async setupFirstUser(user: UserDto) { if (this.configService.setupWizardComplete) { @@ -224,7 +226,7 @@ export class AuthService { } // generate a token - const token = await this.jwtService.sign({ + const token = this.jwtService.sign({ username: 'setup-wizard', name: 'setup-wizard', admin: true, @@ -239,7 +241,7 @@ export class AuthService { } /** - * Executed on startup to see if the auth file is setup yet + * Executed on startup to see if the auth file is set up yet */ async checkAuthFile() { if (!await fs.pathExists(this.configService.authPath)) { @@ -285,23 +287,21 @@ export class AuthService { } /** - * Return a user by it's id + * Return a user by id * @param id */ async findById(id: number): Promise { const users = await this.getUsers(); - const user = users.find(x => x.id === id); - return user; + return users.find(x => x.id === id); } /** - * Return a user by it's username + * Return a user by username * @param username */ async findByUsername(username: string): Promise { const users = await this.getUsers(); - const user = users.find(x => x.username === username); - return user; + return users.find(x => x.username === username); } /** @@ -317,7 +317,7 @@ export class AuthService { * Add a new user * @param user */ - async addUser(user) { + async addUser(user: UserDto) { const authfile = await this.getUsers(); const salt = await this.genSalt(); @@ -373,7 +373,7 @@ export class AuthService { /** * Updates a user - * @param userId + * @param id * @param update */ async updateUser(id: number, update: UserDto) { @@ -404,7 +404,7 @@ export class AuthService { } // update the auth.json - this.saveUserFile(authfile); + await this.saveUserFile(authfile); this.logger.log(`Updated user: ${user.username}`); return this.desensitiseUserProfile(user); @@ -413,7 +413,7 @@ export class AuthService { /** * Change a users own password */ - async updateOwnPassword(username, currentPassword: string, newPassword: string) { + async updateOwnPassword(username: string, currentPassword: string, newPassword: string) { const authfile = await this.getUsers(); const user = authfile.find(x => x.username === username); @@ -424,7 +424,7 @@ export class AuthService { // this will throw an error of the password is wrong await this.checkPassword(user, currentPassword); - // generate a new salf + // generate a new salt const salt = await this.genSalt(); user.hashedPassword = await this.hashPassword(newPassword, salt); user.salt = salt; diff --git a/src/core/auth/jwt.strategy.ts b/src/core/auth/jwt.strategy.ts index 03af2488f..932f5835b 100644 --- a/src/core/auth/jwt.strategy.ts +++ b/src/core/auth/jwt.strategy.ts @@ -16,7 +16,7 @@ export class JwtStrategy extends PassportStrategy(Strategy) { }); } - async validate(payload) { + async validate(payload: any) { const user = await this.authService.validateUser(payload); if (!user) { throw new UnauthorizedException(); From ca4cb222b725451d8bdafb41c762d165bf961b4a Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:27:07 +0100 Subject: [PATCH 023/110] Update themes-dark.scss (#1644) --- ui/src/scss/themes/themes-dark.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ui/src/scss/themes/themes-dark.scss b/ui/src/scss/themes/themes-dark.scss index 5aa7a29d5..8a62e0cbe 100644 --- a/ui/src/scss/themes/themes-dark.scss +++ b/ui/src/scss/themes/themes-dark.scss @@ -19,6 +19,22 @@ border-bottom-width: 1px; } + .dropdown-menu { + background-color: $secondaryBackground; + } + + .dropdown-divider { + border-top: 1px solid #555555; + } + + .navbar .dropdown-menu a:not(.active) { + color: #eeeeee; + } + + .dropdown-item:hover, .dropdown-item:focus { + background-color: #555555; + } + .primary-text { color: $darkModePrimary; } From 06df4e1b714626ba8fd3791aa186ceb5071e6896 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:21:52 +0000 Subject: [PATCH 024/110] glibc changes --- src/modules/status/status.service.ts | 21 ++-------------- .../system-info-widget.component.html | 24 +++++++------------ ui/src/i18n/bg.json | 1 - ui/src/i18n/ca.json | 1 - ui/src/i18n/cs.json | 1 - ui/src/i18n/de.json | 1 - ui/src/i18n/en.json | 1 - ui/src/i18n/es.json | 1 - ui/src/i18n/fr.json | 1 - ui/src/i18n/he.json | 1 - ui/src/i18n/hu.json | 1 - ui/src/i18n/id.json | 1 - ui/src/i18n/it.json | 1 - ui/src/i18n/ja.json | 1 - ui/src/i18n/ko.json | 1 - ui/src/i18n/mk.json | 1 - ui/src/i18n/nl.json | 1 - ui/src/i18n/no.json | 1 - ui/src/i18n/pl.json | 1 - ui/src/i18n/pt-BR.json | 1 - ui/src/i18n/pt.json | 1 - ui/src/i18n/ru.json | 1 - ui/src/i18n/sl.json | 1 - ui/src/i18n/sv.json | 1 - ui/src/i18n/th.json | 1 - ui/src/i18n/tr.json | 1 - ui/src/i18n/uk.json | 1 - ui/src/i18n/zh-CN.json | 1 - ui/src/i18n/zh-TW.json | 1 - 29 files changed, 11 insertions(+), 61 deletions(-) diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index e43b60238..ae0bfcb0f 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -452,26 +452,9 @@ export class StatusService { const versionList = (await this.httpService.get('https://nodejs.org/dist/index.json').toPromise()).data; const currentLts = versionList.filter(x => x.lts)[0]; + // See why this is set to 2.29 at https://homebridge.io/w/JJSun const glibcVersion = this.getGlibcVersion(); - let showNextUpdateWarning = false; - if (glibcVersion) { - const glibcVersionFloat = parseFloat(glibcVersion); - if (glibcVersionFloat < 2.23) { - this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - `Wanted: >=2.23. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); - showNextUpdateWarning = true; - } - if (semver.gte(currentLts.version, '18.0.0') && glibcVersionFloat < 2.28) { - this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - `Wanted: >=2.28. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); - showNextUpdateWarning = true; - } - if (semver.gte(currentLts.version, '20.0.0') && glibcVersionFloat < 2.29) { - this.logger.warn('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - `Wanted: >=2.29. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); - showNextUpdateWarning = true; - } - } + const showNextUpdateWarning = glibcVersion && parseFloat(glibcVersion) < 2.29; const versionInformation = { currentVersion: process.version, diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index d8cf7ab79..148edf6f3 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -15,11 +15,17 @@ {{ serverInfo.os.distro }} - {{ serverInfo.os.distro }} {{ serverInfo.os.codename | titlecase }} ({{ serverInfo.os.release }}) + + + {{ serverInfo.os.distro }} {{ serverInfo.os.codename | titlecase }} ({{ serverInfo.os.release }}) - Synology DSM + + + Synology DSM @@ -30,17 +36,6 @@ Service Mode Yes - - GLIBC Version - - - {{ serverInfo.glibcVersion }} - - - {{ serverInfo.glibcVersion }} - - Node.js Version @@ -48,8 +43,7 @@ - {{ serverInfo.nodeVersion }} - + {{ serverInfo.nodeVersion }} diff --git a/ui/src/i18n/bg.json b/ui/src/i18n/bg.json index ed62e67b0..3ce921ff5 100644 --- a/ui/src/i18n/bg.json +++ b/ui/src/i18n/bg.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/ca.json b/ui/src/i18n/ca.json index 33d76fb03..45030cf11 100644 --- a/ui/src/i18n/ca.json +++ b/ui/src/i18n/ca.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Desbloquejar disseny", "status.widget.systeminfo.label_config_path": "Ruta de configuració", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/cs.json b/ui/src/i18n/cs.json index 4481d4fb2..1b8a718ab 100644 --- a/ui/src/i18n/cs.json +++ b/ui/src/i18n/cs.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Odemknout rozložení", "status.widget.systeminfo.label_config_path": "Cesta ke konfiguraci", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Název hostitele", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/de.json b/ui/src/i18n/de.json index 96853dca4..fa72674a9 100644 --- a/ui/src/i18n/de.json +++ b/ui/src/i18n/de.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Layout entsperren", "status.widget.systeminfo.label_config_path": "Konfigurationspfad", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json index 7b936d34c..7ce5ab457 100644 --- a/ui/src/i18n/en.json +++ b/ui/src/i18n/en.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/es.json b/ui/src/i18n/es.json index 0d30e24df..9d2acc20e 100644 --- a/ui/src/i18n/es.json +++ b/ui/src/i18n/es.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Desbloquear Diseño", "status.widget.systeminfo.label_config_path": "Ruta de Configuración", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/fr.json b/ui/src/i18n/fr.json index 355cb6b3f..f46a499d1 100644 --- a/ui/src/i18n/fr.json +++ b/ui/src/i18n/fr.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Déverrouiller la Mise en page", "status.widget.systeminfo.label_config_path": "Répertoire de la Config", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/he.json b/ui/src/i18n/he.json index 383e2f235..36b522537 100644 --- a/ui/src/i18n/he.json +++ b/ui/src/i18n/he.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "שחרר נעילת סדור", "status.widget.systeminfo.label_config_path": "שביל קונפיגורציה", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/hu.json b/ui/src/i18n/hu.json index 51cf35162..031c57c79 100644 --- a/ui/src/i18n/hu.json +++ b/ui/src/i18n/hu.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/id.json b/ui/src/i18n/id.json index c57501844..fd454a839 100644 --- a/ui/src/i18n/id.json +++ b/ui/src/i18n/id.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Buka Tata Letak", "status.widget.systeminfo.label_config_path": "Path Konfigurasi", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nama Host", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/it.json b/ui/src/i18n/it.json index 581b56ae2..1da0bca6b 100644 --- a/ui/src/i18n/it.json +++ b/ui/src/i18n/it.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Sblocca il layout", "status.widget.systeminfo.label_config_path": "Percorso configurazione", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nome host", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/ja.json b/ui/src/i18n/ja.json index 976d9f3a5..836cd402c 100644 --- a/ui/src/i18n/ja.json +++ b/ui/src/i18n/ja.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "配置固定を解除", "status.widget.systeminfo.label_config_path": "コンフィグの場所", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "ホストネーム", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/ko.json b/ui/src/i18n/ko.json index b55345cc3..12b5362e8 100644 --- a/ui/src/i18n/ko.json +++ b/ui/src/i18n/ko.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "레이아웃 잠금 해제", "status.widget.systeminfo.label_config_path": "Config 경로", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "호스트명", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/mk.json b/ui/src/i18n/mk.json index 276481860..21431ca6c 100644 --- a/ui/src/i18n/mk.json +++ b/ui/src/i18n/mk.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Отклучи распоред", "status.widget.systeminfo.label_config_path": "Патека за конфигурацијата", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Име на host", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/nl.json b/ui/src/i18n/nl.json index 251ccf7df..e4caf4eae 100644 --- a/ui/src/i18n/nl.json +++ b/ui/src/i18n/nl.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Ontgrendel Layout", "status.widget.systeminfo.label_config_path": "Config Pad", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostnaam", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/no.json b/ui/src/i18n/no.json index 055661075..1be1224a5 100644 --- a/ui/src/i18n/no.json +++ b/ui/src/i18n/no.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Unlock Layout", "status.widget.systeminfo.label_config_path": "Config Path", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/pl.json b/ui/src/i18n/pl.json index 65fd0992b..85609924a 100644 --- a/ui/src/i18n/pl.json +++ b/ui/src/i18n/pl.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Odblokuj wygląd", "status.widget.systeminfo.label_config_path": "Ścieżka konfiguracji", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nazwa hosta", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/pt-BR.json b/ui/src/i18n/pt-BR.json index 1eab22039..d2b313444 100644 --- a/ui/src/i18n/pt-BR.json +++ b/ui/src/i18n/pt-BR.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Desbloquear Layout", "status.widget.systeminfo.label_config_path": "Local das Configurações", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nome do Servidor", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/pt.json b/ui/src/i18n/pt.json index 95212bd5f..ce60ea45b 100644 --- a/ui/src/i18n/pt.json +++ b/ui/src/i18n/pt.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Desbloquear Layout", "status.widget.systeminfo.label_config_path": "Caminho das Configurações", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Nome do Servidor", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/ru.json b/ui/src/i18n/ru.json index 4a36cf5ca..b8d00318b 100644 --- a/ui/src/i18n/ru.json +++ b/ui/src/i18n/ru.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Разблокировать оформление", "status.widget.systeminfo.label_config_path": "Файл конфигурации", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Имя хоста", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/sl.json b/ui/src/i18n/sl.json index 1a2821066..bdc3550b1 100644 --- a/ui/src/i18n/sl.json +++ b/ui/src/i18n/sl.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Odkleni postavitev", "status.widget.systeminfo.label_config_path": "Konfiguriraj pot", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Ime gostitelja", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/sv.json b/ui/src/i18n/sv.json index 14c667715..c17bbaff7 100644 --- a/ui/src/i18n/sv.json +++ b/ui/src/i18n/sv.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Lås upp Layout", "status.widget.systeminfo.label_config_path": "Konfiguration sökväg", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Värdnamn", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/th.json b/ui/src/i18n/th.json index 91b4302c3..fb2668ff0 100644 --- a/ui/src/i18n/th.json +++ b/ui/src/i18n/th.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "ปลดล็อกเค้าโครง", "status.widget.systeminfo.label_config_path": "เส้นทางกำหนดค่า", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "ชื่อโฮสต์", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/tr.json b/ui/src/i18n/tr.json index 11665a755..9ab06b968 100644 --- a/ui/src/i18n/tr.json +++ b/ui/src/i18n/tr.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "Yerleşim Kildini Aç", "status.widget.systeminfo.label_config_path": "Yapılandırma Konumu", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Ana Bilgisayar Adı", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/uk.json b/ui/src/i18n/uk.json index 3bc55cbd3..c772bf567 100644 --- a/ui/src/i18n/uk.json +++ b/ui/src/i18n/uk.json @@ -329,7 +329,6 @@ "status.widget.label_unlock_layout": "Разблокувати оформлення", "status.widget.systeminfo.label_config_path": "Файл конфігурації", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Назва хосту", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/zh-CN.json b/ui/src/i18n/zh-CN.json index 83df8ef4f..67b60d540 100644 --- a/ui/src/i18n/zh-CN.json +++ b/ui/src/i18n/zh-CN.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "解锁布局", "status.widget.systeminfo.label_config_path": "Config 路径", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "主机名称", "status.widget.systeminfo.label_ipv4": "IPv4", diff --git a/ui/src/i18n/zh-TW.json b/ui/src/i18n/zh-TW.json index dc08ff1ff..8f1782f36 100644 --- a/ui/src/i18n/zh-TW.json +++ b/ui/src/i18n/zh-TW.json @@ -327,7 +327,6 @@ "status.widget.label_unlock_layout": "解除版面鎖定", "status.widget.systeminfo.label_config_path": "Config 路徑", "status.widget.systeminfo.label_docker": "Docker", - "status.widget.systeminfo.label_glibc_version": "GLIBC Version", "status.widget.systeminfo.label_glibc_warning": "Version is too low for updating Node.js to newer versions - https://homebridge.io/w/JJSun", "status.widget.systeminfo.label_hostname": "Hostname", "status.widget.systeminfo.label_ipv4": "IPv4", From 1be636f9e98da2de0a3c57a4af3e0843ea531dd0 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:33:04 +0000 Subject: [PATCH 025/110] test - always show plugin path --- src/modules/status/status.service.ts | 1 + ui/package-lock.json | 8 ++++---- ui/package.json | 2 +- .../system-info-widget/system-info-widget.component.html | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index ae0bfcb0f..14ada25e6 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -419,6 +419,7 @@ export class StatusService { homebridgeStoragePath: this.configService.storagePath, homebridgeInsecureMode: this.configService.homebridgeInsecureMode, homebridgeCustomPluginPath: this.configService.customPluginPath, + homebridgePluginPath: path.resolve(process.env.UIX_BASE_PATH, '..'), homebridgeRunningInDocker: this.configService.runningInDocker, homebridgeRunningInSynologyPackage: this.configService.runningInSynologyPackage, homebridgeRunningInPackageMode: this.configService.runningInPackageMode, diff --git a/ui/package-lock.json b/ui/package-lock.json index b4859bfdd..a28e5530a 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -66,7 +66,7 @@ "@angular/language-service": "^14.3.0", "@fortawesome/fontawesome-free": "^6.4.2", "@types/node": "^18.18.8", - "@types/qrcode": "^1.5.4", + "@types/qrcode": "^1.5.5", "@types/semver": "^7.5.4", "@types/socket.io-client": "^1.4.36", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -3666,9 +3666,9 @@ "dev": true }, "node_modules/@types/qrcode": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.4.tgz", - "integrity": "sha512-ufYqUO7wUBq49hugJry+oIYKscvxIQerJSmXeny215aJKfrepN04DDZP8FCgxvV82kOqKPULCE4PIW3qUmZrRA==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.5.tgz", + "integrity": "sha512-CdfBi/e3Qk+3Z/fXYShipBT13OJ2fDO2Q2w5CIP5anLTLIndQG9z6P1cnm+8zCWSpm5dnxMFd/uREtb0EXuQzg==", "dev": true, "dependencies": { "@types/node": "*" diff --git a/ui/package.json b/ui/package.json index b7faec122..643d39a3d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -68,7 +68,7 @@ "@angular/language-service": "^14.3.0", "@fortawesome/fontawesome-free": "^6.4.2", "@types/node": "^18.18.8", - "@types/qrcode": "^1.5.4", + "@types/qrcode": "^1.5.5", "@types/semver": "^7.5.4", "@types/socket.io-client": "^1.4.36", "@typescript-eslint/eslint-plugin": "^5.62.0", diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html index 148edf6f3..9e476a3e7 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.html @@ -79,9 +79,9 @@ Config Path {{ serverInfo.homebridgeConfigJsonPath }} - + Plugin Path - {{ serverInfo.homebridgeCustomPluginPath }} + {{ serverInfo.homebridgeCustomPluginPath || serverInfo.homebridgePluginPath }} Timezone From 99da34fb43f4f4e98718435b03cf6ddfe08531c3 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:49:31 +0000 Subject: [PATCH 026/110] Update plugins-settings-ui.service.ts --- .../plugins-settings-ui/plugins-settings-ui.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts index d90053495..e32e4e36e 100644 --- a/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts +++ b/src/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.ts @@ -190,7 +190,7 @@ export class PluginsSettingsUiService { }); child.on('exit', () => { - this.loggerService.log(`[${pluginName}]`, 'Child process ended'); + this.loggerService.debug(`[${pluginName}]`, 'Custom UI: closed (child process ended)'); }); child.addListener('message', (response: { action: string; payload: any }) => { @@ -202,7 +202,7 @@ export class PluginsSettingsUiService { // function to handle cleanup const cleanup = () => { - this.loggerService.log(`[${pluginName}]`, 'Terminating child process...'); + this.loggerService.debug(`[${pluginName}]`, 'Custom UI: closing (terminating child process)...'); const childPid = child.pid; if (child.connected) { From de8f5c53af3909218683735347f20815684b4955 Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Tue, 7 Nov 2023 11:31:57 -0600 Subject: [PATCH 027/110] Update default-dashboard-layout.json fix #1641 --- .../app/modules/status/default-dashboard-layout.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/app/modules/status/default-dashboard-layout.json b/ui/src/app/modules/status/default-dashboard-layout.json index 904bd3fd6..d6347d7a0 100644 --- a/ui/src/app/modules/status/default-dashboard-layout.json +++ b/ui/src/app/modules/status/default-dashboard-layout.json @@ -10,8 +10,8 @@ "hideOnMobile": false }, { - "x": 16, - "y": 8, + "x": 0, + "y": 0, "component": "ChildBridgeWidgetComponent", "cols": 5, "rows": 6, @@ -64,7 +64,7 @@ "hideOnMobile": false }, { - "x": 0, + "x": 5, "y": 0, "component": "HapQrcodeWidgetComponent", "cols": 5, @@ -73,12 +73,12 @@ "hideOnMobile": false }, { - "x": 5, - "y": 0, + "x": 0, + "y": 14, "component": "HomebridgeLogsWidgetComponent", "cols": 10, "rows": 8, "mobileOrder": 1000, "hideOnMobile": true } -] +] \ No newline at end of file From 1cf5fce781ef8f4db021362ab17fda618c869a10 Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Tue, 7 Nov 2023 12:15:12 -0600 Subject: [PATCH 028/110] Revert "Update default-dashboard-layout.json" This reverts commit de8f5c53af3909218683735347f20815684b4955. --- .../app/modules/status/default-dashboard-layout.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/app/modules/status/default-dashboard-layout.json b/ui/src/app/modules/status/default-dashboard-layout.json index d6347d7a0..8d4887852 100644 --- a/ui/src/app/modules/status/default-dashboard-layout.json +++ b/ui/src/app/modules/status/default-dashboard-layout.json @@ -10,8 +10,8 @@ "hideOnMobile": false }, { - "x": 0, - "y": 0, + "x": 15, + "y": 8, "component": "ChildBridgeWidgetComponent", "cols": 5, "rows": 6, @@ -64,7 +64,7 @@ "hideOnMobile": false }, { - "x": 5, + "x": 0, "y": 0, "component": "HapQrcodeWidgetComponent", "cols": 5, @@ -73,8 +73,8 @@ "hideOnMobile": false }, { - "x": 0, - "y": 14, + "x": 5, + "y": 0, "component": "HomebridgeLogsWidgetComponent", "cols": 10, "rows": 8, From 425dad52d7911763f02180ef26862fea35620067 Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Tue, 7 Nov 2023 12:40:45 -0600 Subject: [PATCH 029/110] Update themes-dark.scss --- ui/src/scss/themes/themes-dark.scss | 30 +++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/ui/src/scss/themes/themes-dark.scss b/ui/src/scss/themes/themes-dark.scss index 8a62e0cbe..d68667012 100644 --- a/ui/src/scss/themes/themes-dark.scss +++ b/ui/src/scss/themes/themes-dark.scss @@ -22,19 +22,25 @@ .dropdown-menu { background-color: $secondaryBackground; } - + .dropdown-divider { border-top: 1px solid #555555; } - + .navbar .dropdown-menu a:not(.active) { color: #eeeeee; } - - .dropdown-item:hover, .dropdown-item:focus { + + .dropdown-item:hover, + .dropdown-item:focus { background-color: #555555; } + .dropdown-item, + .dropdown-item:hover { + color: #eeeeee; + } + .primary-text { color: $darkModePrimary; } @@ -44,7 +50,7 @@ opacity: 1 !important; } - .hb-uix-switch input:checked ~ .hb-uix-slider { + .hb-uix-switch input:checked~.hb-uix-slider { background-color: $darkModePrimary; } @@ -53,7 +59,7 @@ border-color: #898989 !important; } - .rendux-input:checked + label { + .rendux-input:checked+label { background: $darkModePrimary !important; border-color: $darkModePrimary !important; } @@ -86,17 +92,20 @@ .nav-tabs { border-bottom: 1px solid $darkModePrimary; + .nav-link { &.active { color: #ffffff; background-color: $darkModePrimary; border-color: $darkModePrimary; } + @media (hover: hover) { &:hover { border-color: $darkModePrimary !important; } } + &:focus { border-color: $darkModePrimary !important; } @@ -110,6 +119,7 @@ a { color: $secondaryBackground; + @media (hover: hover) { &:hover { text-decoration: underline; @@ -226,7 +236,8 @@ &:focus { box-shadow: 0 1px 0 0 $darkModePrimary !important; border-bottom: 1px solid $darkModePrimary !important; - & + label { + + &+label { color: $darkModePrimary !important; } } @@ -263,6 +274,7 @@ .list-group-item { background-color: $secondaryBackground; color: #ffffff; + .badge-primary { background-color: $darkModePrimary !important; } @@ -270,6 +282,7 @@ .hb-plugin-settings-modal, .hb-backup-modal { + input, select { border-color: #242424 !important; //$backgroundColor; @@ -340,6 +353,7 @@ .spinner_outer { stroke: $darkModePrimary; } + .spinner_inner { stroke: #fff; } @@ -369,4 +383,4 @@ @include make-dark-theme("dark-mode-grey", #9e9e9e, "grey"); @include make-dark-theme("dark-mode-brown", #795548, "brown"); @include make-dark-theme("dark-mode-teal", #009688, "teal"); -@include make-dark-theme("dark-mode-cyan", #00838f, "cyan"); +@include make-dark-theme("dark-mode-cyan", #00838f, "cyan"); \ No newline at end of file From 15fc84dde61e49bb6090774989a49073d7c5bede Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:14:21 +0100 Subject: [PATCH 030/110] Update homebridge-status-widget.component.html (#1646) This fix layout. I haven't changed the port text here yet. @donavanbecker Do you prefer to change the text permanently? Or should it be translated in every language? --- .../homebridge-status-widget.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html index 6f8c68d7b..2288e3345 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html @@ -1,9 +1,9 @@
Homebridge
-
+
-
+
+
-
+
@@ -72,9 +72,9 @@
-
+
-
+
From df326d5a5de5f4009a3c2f2359bab721310036b0 Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:44:31 +0100 Subject: [PATCH 031/110] Update homebridge-status-widget.component.html (#1648) Small correction. Sorry. --- .../homebridge-status-widget.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html index 2288e3345..87ab1eb46 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.html @@ -1,7 +1,7 @@
Homebridge
-
+
+
@@ -72,7 +72,7 @@
-
+
From c0ec82ca689c2b64f6008f929ef6faf82a723602 Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:48:27 +0100 Subject: [PATCH 032/110] Port translation (#1647) Change to: Port: 12345 --- ui/src/i18n/bg.json | 2 +- ui/src/i18n/ca.json | 2 +- ui/src/i18n/cs.json | 2 +- ui/src/i18n/de.json | 2 +- ui/src/i18n/en.json | 2 +- ui/src/i18n/es.json | 2 +- ui/src/i18n/fr.json | 2 +- ui/src/i18n/he.json | 2 +- ui/src/i18n/hu.json | 2 +- ui/src/i18n/id.json | 2 +- ui/src/i18n/it.json | 2 +- ui/src/i18n/ja.json | 2 +- ui/src/i18n/ko.json | 2 +- ui/src/i18n/mk.json | 2 +- ui/src/i18n/nl.json | 2 +- ui/src/i18n/no.json | 2 +- ui/src/i18n/pl.json | 2 +- ui/src/i18n/pt-BR.json | 2 +- ui/src/i18n/pt.json | 2 +- ui/src/i18n/sl.json | 2 +- ui/src/i18n/sv.json | 2 +- ui/src/i18n/th.json | 2 +- ui/src/i18n/tr.json | 2 +- ui/src/i18n/zh-TW.json | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ui/src/i18n/bg.json b/ui/src/i18n/bg.json index 3ce921ff5..d09c52aee 100644 --- a/ui/src/i18n/bg.json +++ b/ui/src/i18n/bg.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Добавките са остарели", "status.services.label_not_running": "Не работи", "status.services.label_running": "Работи", - "status.services.label_running_on_port": "Работи на порт {{port}}", + "status.services.label_running_on_port": "порт: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Време на работа", "status.widget.accessories.label_choose_accessories_to_display": "Choose the Accessories to display in this widget from the Accessories tab.", diff --git a/ui/src/i18n/ca.json b/ui/src/i18n/ca.json index 45030cf11..5369a1b76 100644 --- a/ui/src/i18n/ca.json +++ b/ui/src/i18n/ca.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins sense actualitzar", "status.services.label_not_running": "Sense executar-se", "status.services.label_running": "Executant-se", - "status.services.label_running_on_port": "Executant-se en el port {{ port }}", + "status.services.label_running_on_port": "Port: {{ port }}", "status.services.label_starting": "Iniciant…", "status.uptime.title_uptime": "Temps encesa", "status.widget.accessories.label_choose_accessories_to_display": "Selecciona els accessoris per a mostrar en aquest widget des de la pestanya Accessoris.", diff --git a/ui/src/i18n/cs.json b/ui/src/i18n/cs.json index 1b8a718ab..c139c3359 100644 --- a/ui/src/i18n/cs.json +++ b/ui/src/i18n/cs.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Neaktualizované pluginy", "status.services.label_not_running": "Nefunguje", "status.services.label_running": "Běží", - "status.services.label_running_on_port": "Běží na portu {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Zapíná se…", "status.uptime.title_uptime": "Doba provozu", "status.widget.accessories.label_choose_accessories_to_display": "Vyberte příslušenství, které se zobrazí v tomto widgetu na kartě Příslušenství.", diff --git a/ui/src/i18n/de.json b/ui/src/i18n/de.json index fa72674a9..ea5351705 100644 --- a/ui/src/i18n/de.json +++ b/ui/src/i18n/de.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins nicht mehr aktuell", "status.services.label_not_running": "Gestoppt", "status.services.label_running": "Läuft", - "status.services.label_running_on_port": "Läuft auf Port {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starte …", "status.uptime.title_uptime": "Betriebszeit", "status.widget.accessories.label_choose_accessories_to_display": "Wähle die Geräte, die in diesem Widget vom Geräte-Tab angezeigt werden sollen.", diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json index 7ce5ab457..5a236ac2c 100644 --- a/ui/src/i18n/en.json +++ b/ui/src/i18n/en.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins Out of Date", "status.services.label_not_running": "Not running", "status.services.label_running": "Running", - "status.services.label_running_on_port": "Running on port {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Uptime", "status.widget.accessories.label_choose_accessories_to_display": "Choose the Accessories to display in this widget from the Accessories tab.", diff --git a/ui/src/i18n/es.json b/ui/src/i18n/es.json index 9d2acc20e..7b3a317a6 100644 --- a/ui/src/i18n/es.json +++ b/ui/src/i18n/es.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins Sin Actualizar", "status.services.label_not_running": "Sin ejecutarse", "status.services.label_running": "Ejecutándose", - "status.services.label_running_on_port": "Ejecutándose en el Puerto {{port}}", + "status.services.label_running_on_port": "Puerto: {{port}}", "status.services.label_starting": "Iniciando…", "status.uptime.title_uptime": "Tiempo encendido", "status.widget.accessories.label_choose_accessories_to_display": "Selecciona los accesorios para mostrar en este widget desde la pestaña Accesorios.", diff --git a/ui/src/i18n/fr.json b/ui/src/i18n/fr.json index f46a499d1..f427600fe 100644 --- a/ui/src/i18n/fr.json +++ b/ui/src/i18n/fr.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins obsolètes", "status.services.label_not_running": "Non démarré", "status.services.label_running": "Démarré", - "status.services.label_running_on_port": "Démarré sur le port {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Démarrage en cours…", "status.uptime.title_uptime": "Temps de fonctionnement", "status.widget.accessories.label_choose_accessories_to_display": "Choisissez les accessoires à afficher dans ce widget dans l'onglet Accessoires.", diff --git a/ui/src/i18n/he.json b/ui/src/i18n/he.json index 36b522537..e8ad3ede4 100644 --- a/ui/src/i18n/he.json +++ b/ui/src/i18n/he.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "תוסף לא מעודכן", "status.services.label_not_running": "לא פועל", "status.services.label_running": "פועל", - "status.services.label_running_on_port": "פועל על פורט {{port}}", + "status.services.label_running_on_port": "נמל: {{port}}", "status.services.label_starting": "מתחיל…", "status.uptime.title_uptime": "Uptime", "status.widget.accessories.label_choose_accessories_to_display": "בחר את האביזר להצגה בווידג'ט מלשונית האיבזרים", diff --git a/ui/src/i18n/hu.json b/ui/src/i18n/hu.json index 031c57c79..1ab3ed7ee 100644 --- a/ui/src/i18n/hu.json +++ b/ui/src/i18n/hu.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "A bővítmények elavultak", "status.services.label_not_running": "Nem fut", "status.services.label_running": "Futó", - "status.services.label_running_on_port": "{{port}} portot használja a Homebridge", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Müködési idő", "status.widget.accessories.label_choose_accessories_to_display": "Choose the Accessories to display in this widget from the Accessories tab.", diff --git a/ui/src/i18n/id.json b/ui/src/i18n/id.json index fd454a839..587591075 100644 --- a/ui/src/i18n/id.json +++ b/ui/src/i18n/id.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugin Kadaluarsa", "status.services.label_not_running": "Tidak berjalan", "status.services.label_running": "Berjalan", - "status.services.label_running_on_port": "Berjalan pada port {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Waktu Aktif", "status.widget.accessories.label_choose_accessories_to_display": "Pilih Aksesoris yang akan ditampilkan dalam widget ini dari tab Aksesoris.", diff --git a/ui/src/i18n/it.json b/ui/src/i18n/it.json index 1da0bca6b..4779c7186 100644 --- a/ui/src/i18n/it.json +++ b/ui/src/i18n/it.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugin da aggiornare", "status.services.label_not_running": "Non in esecuzione", "status.services.label_running": "In esecuzione", - "status.services.label_running_on_port": "In esecuzione sulla porta {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Avvio in corso…", "status.uptime.title_uptime": "Avviato da", "status.widget.accessories.label_choose_accessories_to_display": "Scegli gli accessori da mostrare in questo widget dalla scheda Accessori.", diff --git a/ui/src/i18n/ja.json b/ui/src/i18n/ja.json index 836cd402c..89a522471 100644 --- a/ui/src/i18n/ja.json +++ b/ui/src/i18n/ja.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "期限切れのプラグイン", "status.services.label_not_running": "停止中", "status.services.label_running": "ランニング", - "status.services.label_running_on_port": "ポート番号{{port}}で稼働中", + "status.services.label_running_on_port": "ポート:{{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "稼働時間", "status.widget.accessories.label_choose_accessories_to_display": "アクセサリタブから、このウィジェットに表示するアクセサリを選択してください。", diff --git a/ui/src/i18n/ko.json b/ui/src/i18n/ko.json index 12b5362e8..f02325afc 100644 --- a/ui/src/i18n/ko.json +++ b/ui/src/i18n/ko.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "구버전", "status.services.label_not_running": "실행되지 않음", "status.services.label_running": "실행 중", - "status.services.label_running_on_port": "포트 {{port}}에서 실행 중", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "가동 시간", "status.widget.accessories.label_choose_accessories_to_display": "이 위젯에 나타날 액세서리를 액세서리 탭에서 선택해주세요.", diff --git a/ui/src/i18n/mk.json b/ui/src/i18n/mk.json index 21431ca6c..8cc0c772b 100644 --- a/ui/src/i18n/mk.json +++ b/ui/src/i18n/mk.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Плагините не се ажурирани", "status.services.label_not_running": "Не е активен", "status.services.label_running": "Активен", - "status.services.label_running_on_port": "Активен на порта {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Време на работа", "status.widget.accessories.label_choose_accessories_to_display": "Одбери кои уреди да бидат прикажани во овој widget преку табот Уред.", diff --git a/ui/src/i18n/nl.json b/ui/src/i18n/nl.json index e4caf4eae..f99595228 100644 --- a/ui/src/i18n/nl.json +++ b/ui/src/i18n/nl.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plug-ins verouderd", "status.services.label_not_running": "Draait Niet", "status.services.label_running": "Draait", - "status.services.label_running_on_port": "Draait op poort {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starten…", "status.uptime.title_uptime": "Uptime", "status.widget.accessories.label_choose_accessories_to_display": "Selecteer de Accessoires om te tonen in deze widget in de Accessoire tab.", diff --git a/ui/src/i18n/no.json b/ui/src/i18n/no.json index 1be1224a5..213e053d3 100644 --- a/ui/src/i18n/no.json +++ b/ui/src/i18n/no.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins utdaterte", "status.services.label_not_running": "Kjører ikke", "status.services.label_running": "Kjører", - "status.services.label_running_on_port": "Kjører på port {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Oppetid", "status.widget.accessories.label_choose_accessories_to_display": "Choose the Accessories to display in this widget from the Accessories tab.", diff --git a/ui/src/i18n/pl.json b/ui/src/i18n/pl.json index 85609924a..36d3fc0be 100644 --- a/ui/src/i18n/pl.json +++ b/ui/src/i18n/pl.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Wtyczki nieaktualne", "status.services.label_not_running": "Nieuruchomiony", "status.services.label_running": "Uruchomiony", - "status.services.label_running_on_port": "Uruchomiony na porcie {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Uruchamianie…", "status.uptime.title_uptime": "Czas pracy", "status.widget.accessories.label_choose_accessories_to_display": "Wybierz to akcesorium, aby wyświetlić go jako widżet.", diff --git a/ui/src/i18n/pt-BR.json b/ui/src/i18n/pt-BR.json index d2b313444..c14c93096 100644 --- a/ui/src/i18n/pt-BR.json +++ b/ui/src/i18n/pt-BR.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins Desatualizados", "status.services.label_not_running": "Parado", "status.services.label_running": "Executando", - "status.services.label_running_on_port": "Executando na porta {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Iniciando…", "status.uptime.title_uptime": "Tempo de Atividade", "status.widget.accessories.label_choose_accessories_to_display": "Escolha os acessórios para mostrar neste widget na aba de Acessórios.", diff --git a/ui/src/i18n/pt.json b/ui/src/i18n/pt.json index ce60ea45b..26448faab 100644 --- a/ui/src/i18n/pt.json +++ b/ui/src/i18n/pt.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins Desatualizados", "status.services.label_not_running": "Parado", "status.services.label_running": "A executar", - "status.services.label_running_on_port": "A executar na porta {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "A iniciar…", "status.uptime.title_uptime": "Tempo de Atividade", "status.widget.accessories.label_choose_accessories_to_display": "Escolha os acessórios para mostrar neste widget a partir da aba Acessórios.", diff --git a/ui/src/i18n/sl.json b/ui/src/i18n/sl.json index bdc3550b1..3cd74b3f9 100644 --- a/ui/src/i18n/sl.json +++ b/ui/src/i18n/sl.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Vtičniki so zastareli", "status.services.label_not_running": "Ne deluje", "status.services.label_running": "Proces deluje", - "status.services.label_running_on_port": "Deluje na portu {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Čas delovanja", "status.widget.accessories.label_choose_accessories_to_display": "Na zavihku Pripomočki izberite Pripomočki za prikaz v tem pripomočku.", diff --git a/ui/src/i18n/sv.json b/ui/src/i18n/sv.json index c17bbaff7..1bd07aa89 100644 --- a/ui/src/i18n/sv.json +++ b/ui/src/i18n/sv.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins inaktuella", "status.services.label_not_running": "Körs inte", "status.services.label_running": "Kör", - "status.services.label_running_on_port": "Kör på port {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Upptid", "status.widget.accessories.label_choose_accessories_to_display": "Välj Tillbehör som ska visas i den här widgeten från fliken Tillbehör.", diff --git a/ui/src/i18n/th.json b/ui/src/i18n/th.json index fb2668ff0..a928e3eb6 100644 --- a/ui/src/i18n/th.json +++ b/ui/src/i18n/th.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "ปลั๊กอินล้าสมัย", "status.services.label_not_running": "ไม่ทำงาน", "status.services.label_running": "กำลังทำงาน", - "status.services.label_running_on_port": "กำลังทำงานบนพอร์ต {{port}}", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "กำลังเริ่มทำงาน…", "status.uptime.title_uptime": "ระยะเวลาเปิดบริการ", "status.widget.accessories.label_choose_accessories_to_display": "เลือกอุปกรณ์เสริมที่จะแสดงในวิดเจ็ตนี้จากแท็บอุปกรณ์เสริม", diff --git a/ui/src/i18n/tr.json b/ui/src/i18n/tr.json index 9ab06b968..a254c2f1b 100644 --- a/ui/src/i18n/tr.json +++ b/ui/src/i18n/tr.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Eklentiler Güncel Değil", "status.services.label_not_running": "Çalışmıyor", "status.services.label_running": "Çalışıyor", - "status.services.label_running_on_port": "{{Port}} bağlantı noktasında çalışıyor", + "status.services.label_running_on_port": "Port: {{port}}", "status.services.label_starting": "Starting…", "status.uptime.title_uptime": "Çalışma Süresi", "status.widget.accessories.label_choose_accessories_to_display": "Bu araçta göstermek istediğiniz aksesuarları aksesuarlar sekmesinden seçin.", diff --git a/ui/src/i18n/zh-TW.json b/ui/src/i18n/zh-TW.json index 8f1782f36..8547f0c6b 100644 --- a/ui/src/i18n/zh-TW.json +++ b/ui/src/i18n/zh-TW.json @@ -299,7 +299,7 @@ "status.plugins_out_of_date": "Plugins 過舊", "status.services.label_not_running": "未啟動", "status.services.label_running": "執行中", - "status.services.label_running_on_port": "以通訊埠 {{port}} 執行", + "status.services.label_running_on_port": "港口: {{port}}", "status.services.label_starting": "啟始中…", "status.uptime.title_uptime": "系統執行時間", "status.widget.accessories.label_choose_accessories_to_display": "於配件欄位中選擇所要於 Widget 顯示的配件。", From 80312b583feaea3453a9ef8a8cb61cfb0da1f887 Mon Sep 17 00:00:00 2001 From: mkz212 <82271669+mkz212@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:19:31 +0100 Subject: [PATCH 033/110] Remove border from Child Bridge widget (#1649) --- .../child-bridge-widget/child-bridge-widget.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.html b/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.html index b0c7592ac..e935934c2 100644 --- a/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.html +++ b/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.html @@ -5,7 +5,7 @@