diff --git a/.github/workflows/Attach Artifacts.yml b/.github/workflows/Attach Artifacts.yml index 0cd1fd31b..7f0203286 100644 --- a/.github/workflows/Attach Artifacts.yml +++ b/.github/workflows/Attach Artifacts.yml @@ -1,4 +1,5 @@ -name: Manual Attach Artifacts +name: Manually Attach Artifacts ( If the automation fails ) +run-name: Manually Attach Artifacts against ${{ github.event.inputs.tag }} on: workflow_dispatch: @@ -30,13 +31,19 @@ jobs: run: | export npm_config_prefix=$(pwd)/package npm install -g homebridge-config-ui-x@${{ github.event.inputs.tag }} + + - name: Remove invalid node-pty node-gyp run + run: | + rm -rf $(pwd)/package/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build + - name: Create Bundle run: | tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz . shasum -a 256 homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz > SHASUMS256.txt + - name: Attach Bundle uses: AButler/upload-release-assets@v2.0 with: files: 'homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz;SHASUMS256.txt' repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: ${{ github.event.inputs.tag }} \ No newline at end of file + release-tag: ${{ github.event.inputs.tag }} diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index fa2578f25..b57742e0c 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -27,10 +27,10 @@ jobs: uses: homebridge/.github/.github/workflows/npm-publish.yml@latest with: - tag: 'test' + tag: 'beta' dynamically_adjust_version: true npm_version_command: 'pre' - pre_id: 'test' + pre_id: 'beta' install_cmd: npm ci && cd ui && npm ci secrets: npm_auth_token: ${{ secrets.npm_token }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 974fa007e..5691ac3cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ name: Node Release +run-name: Production Release ${{ github.event.release.tag_name }} on: # Removed publish on push, and forced manual release from github @@ -50,13 +51,19 @@ jobs: run: | export npm_config_prefix=$(pwd)/package npm install -g homebridge-config-ui-x@${{ github.event.release.tag_name }} + + - name: Remove invalid node-pty node-gyp run + run: | + rm -rf $(pwd)/package/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build + - name: Create Bundle run: | tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz . shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt + - name: Attach Bundle uses: AButler/upload-release-assets@v2.0 with: files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt' repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: ${{ github.event.release.tag_name }} + release-tag: ${{ github.event.release.tag_name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index a88f65997..9b3a30b4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,19 +2,43 @@ All notable changes to homebridge-config-ui-x will be documented in this file. +## BETA 4.52.0 (2023-XX-XX) + +### Notable Changes + +- Show UI and plugin updates for newer beta versions when already running a beta version of the plugin + - Note: this only works when using an npm tag called `beta` +- Show 'Restart Homebridge Now' modal (with additional messaging for child bridges) after any plugin update, not just the UI + +### i18n Changes + +- The following new language strings have been added/updated to each language file - calling on all our translators to continue your hard work! + - ADDED: + - `plugins.manage.label_release_notes` + - `plugins.manage.label_release_notes_beta` + - `plugins.manage.message_thanks_for_updating_restart` + - `plugins.status_update_beta_available` + - UPDATED: + - `plugins.manage.message_thanks_for_updating` + +### Other Changes + +- Obtain correct beta branch name for Homebridge (and UI) (https://github.com/homebridge/homebridge-config-ui-x/commit/212b3eb1d5cb3ccda01fe2c3be711b80af4d5bf6) +- Rename pre-release npm tag from `test` to `beta` for consistency with other Homebridge repositories (https://github.com/homebridge/homebridge-config-ui-x/commit/86ea73ffd0b35f372a164ee42e17a996905cffb6) + ## 4.51.2 (2023-10-27) ### Bug Fixes -- Improved guard rails around the NodeJS 20 update for environments that can not support NodeJS 20 (#1604) -- Include commentary in the release notes about the possiblity of needing to run `sudo hb-service rebuild` after updating, and how to determine if your system is compatible with NodeJS 20. +- Improved guard rails around the Node.js 20 update for environments that can not support Node.js 20 (#1604) +- Include commentary in the release notes about the possibility of needing to run `sudo hb-service rebuild` after updating, and how to determine if your system is compatible with Node.js 20. ## 4.51.1 (2023-10-25) ### Bug Fixes - Blocks update-node from updating to version 20 on versions of Linux that don't support it and prevents this issue `node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version 'GLIBCXX_3.4.26' not found (required by node)` ([#3453](https://github.com/homebridge/homebridge/issues/3453)) -- Fix for unable to update NodeSource based nodejs version ([#1603](https://github.com/homebridge/homebridge-config-ui-x/pull/1603)) +- Fix for unable to update NodeSource based Node.js version ([#1603](https://github.com/homebridge/homebridge-config-ui-x/pull/1603)) - Colon Markdown emojis are not parsed as they are on GitHub ([#1601](https://github.com/homebridge/homebridge-config-ui-x/pull/1601)) - Prevent tooltip from displaying after Node.js modal ([#1600](https://github.com/homebridge/homebridge-config-ui-x/pull/1600)) @@ -104,9 +128,9 @@ All notable changes to homebridge-config-ui-x will be documented in this file. ### Bug Fixes -- **Dashboard**: Fix an issue displaying the log viewer and termial widgets on Chrome > 104 ([#1400](https://github.com/oznu/homebridge-config-ui-x/issues/1400)) +- **Dashboard**: Fix an issue displaying the log viewer and terminal widgets on Chrome > 104 ([#1400](https://github.com/oznu/homebridge-config-ui-x/issues/1400)) - **Backups:** Fixed an issue restoring backups when the Homebridge storage directory is a symbolic link -- **Backups:** All symbolic links are dereferenced when performing a backup (the raw symlink is backed up, not what it pointed to) +- **Backups:** All symbolic links are de-referenced when performing a backup (the raw symlink is backed up, not what it pointed to) ### Other Changes @@ -144,7 +168,7 @@ All notable changes to homebridge-config-ui-x will be documented in this file. - Debian-based Linux (via apt package): requires apt package update (=>1.0.27) - Docker: requires image update (=>2022-07-08) - Synology DSM 7: requires package update via DSM Package Center (=>3.0.7) - - If the new install / update process fails, it will automatically fallback to using the standard `npm` update method + - If the new install / update process fails, it will automatically fall back to using the standard `npm` update method ### Other Changes @@ -154,8 +178,8 @@ All notable changes to homebridge-config-ui-x will be documented in this file. ### Bug Fixes -- **Backups:** Fixed an issue that could prevent backups being created on Synology DSM due to not being able read the `#recycle` directory -- **System:** Set a 60 second timeout on the pre-start job to clean up stale temporary npm directories on Linux running via `hb-service`; this should fix the errors some users were seeing when the task took more than the 90 seconds systemd allows by default ([#1371](https://github.com/oznu/homebridge-config-ui-x/issues/1371)) +- **Backups:** Fixed an issue that could prevent backups being created on Synology DSM due to not being able to read the `#recycle` directory +- **System:** Set a 60-second timeout on the pre-start job to clean up stale temporary npm directories on Linux running via `hb-service`; this should fix the errors some users were seeing when the task took more than the 90 seconds systemd allows by default ([#1371](https://github.com/oznu/homebridge-config-ui-x/issues/1371)) ## 4.48.1 (2022-06-24) @@ -163,7 +187,7 @@ All notable changes to homebridge-config-ui-x will be documented in this file. - **System** Faster, and hopefully more reliable, updater for the Homebridge UI on macOS, Linux, Docker and FreeBSD - This will only apply to updates after v4.48.0, not updating to v4.48.0 - - If the new update process fails, it will fallback to using the standard `npm` update method automatically + - If the new update process fails, it will fall back to using the standard `npm` update method automatically - Linux (via apt package): requires apt package update (=>1.0.25) - Linux / macOS / FreeBSD (setup via `hb-service install`): no changes required - Docker: may require image update (=>2022-06-24) @@ -194,7 +218,7 @@ All notable changes to homebridge-config-ui-x will be documented in this file. ### Notable Changes - **System:** [@ohmantics](https://github.com/ohmantics) added FreeBSD support to [`hb-service`](https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-Service-Command) ([#1349](https://github.com/oznu/homebridge-config-ui-x/pull/1349)) - - Users running FreeBSD can now setup Homebridge as a service using the `hb-service install` command + - Users running FreeBSD can now set up Homebridge as a service using the `hb-service install` command - Also supports running inside TrueNAS Jails (tested with a FreeBSD 13.1 Jail) ### Bug Fixes @@ -214,8 +238,8 @@ The following features have been added, but will not be active until the **upcom - **Plugins:** If a child bridge is not paired with HomeKit, a pairing icon will show on the plugin tile - **Plugins:** Add ability to stop / start a plugin's child bridges -- **Plugins:** When disabling a plugin, any of it's child bridges will be stopped -- **Plugins:** When enabling a plugin, any of it's child bridges already registered in the current Homebridge process will be re-started +- **Plugins:** When disabling a plugin, any of its child bridges will be stopped +- **Plugins:** When enabling a plugin, any of its child bridges already registered in the current Homebridge process will be re-started ### Other changes @@ -265,7 +289,7 @@ The following features have been added, but will not be active until the **upcom - **Dashboard:** Start showing Node.js update warning icon for users running < Node.js v14.15.0 - **Dashboard:** Removed npm version from the System Information widget - **System:** Changes to support Homebridge `apt` package installation -- **System:** Fresh installs on Linux will have the default mdns advertiser set to `avahi` if the `avahi-daemon` service is running +- **System:** Fresh installations on Linux will have the default mdns advertiser set to `avahi` if the `avahi-daemon` service is running ## 4.43.1 (2022-04-23) @@ -354,7 +378,7 @@ The following features have been added, but will not be active until the **upcom ### Other Changes - **i18n:** Improvements to Catalan language translations ([#1138](https://github.com/oznu/homebridge-config-ui-x/pull/1138)) -- **i18n:** Improvements to Brazillian Portuguese language translations ([#1139](https://github.com/oznu/homebridge-config-ui-x/pull/1139)) +- **i18n:** Improvements to Brazilian Portuguese language translations ([#1139](https://github.com/oznu/homebridge-config-ui-x/pull/1139)) - **i18n:** Improvements to Thai language translations ([#1141](https://github.com/oznu/homebridge-config-ui-x/pull/1141)) - **i18n:** Improvements to Simplified Chinese language translations ([#1153](https://github.com/oznu/homebridge-config-ui-x/pull/1153)) - **Accessory Control:** Updated accessory categories ([#1154](https://github.com/oznu/homebridge-config-ui-x/issues/1154)) @@ -469,7 +493,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed ([cur - **i18n:** Macedonian (mk) language added by [@dimovskidamjan](https://github.com/dimovskidamjan) ([#1011](https://github.com/oznu/homebridge-config-ui-x/pull/1011)) - The Homebridge UI is now available in 24 different languages! - **Plugins:** The following features have been added to assist plugin developers building [custom plugin user interfaces](https://github.com/homebridge/plugin-ui-utils): - - Added an option to retrive a list of cached accessories for the plugin using the `homebridge.getCachedAccessories` method + - Added an option to retrieve a list of cached accessories for the plugin using the `homebridge.getCachedAccessories` method ### Other Changes @@ -504,7 +528,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Bug Fixes -- **Auth:** Fix an issue that prevented the "Login" button from being enabled when auto filling credentials on iOS ([#993](https://github.com/oznu/homebridge-config-ui-x/pull/993)) +- **Auth:** Fix an issue that prevented the "Login" button from being enabled when autofilling credentials on iOS ([#993](https://github.com/oznu/homebridge-config-ui-x/pull/993)) ## 4.35.0 (2020-11-30) @@ -558,7 +582,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr - **i18n:** Improvements to Simplified Chinese language translations ([#942](https://github.com/oznu/homebridge-config-ui-x/pull/942)) - **i18n:** Improvements to German language translations ([#946](https://github.com/oznu/homebridge-config-ui-x/pull/946)) - **i18n:** Improvements to Spanish language translations ([#950](https://github.com/oznu/homebridge-config-ui-x/pull/950)) -- **API**: Added REST API endpoints to lookup and update the config for a single plugin, see the [Swagger API documentation](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for details +- **API**: Added REST API endpoints to look up and update the config for a single plugin, see the [Swagger API documentation](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for details - **System**: Display a warning in the UI when the client (browser) is running a newer version than the server - this can happen if the service is not restarted after updating the Homebridge UI ## 4.32.0 (2020-11-06) @@ -592,7 +616,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr - **Backup/Restore:** Full instance backups are now automatically made daily (01:15) ([#660](https://github.com/oznu/homebridge-config-ui-x/issues/660)) - Backup archives will be kept for 7 days before being removed - - Backup archives will stored in your Homebridge config folder (`./backups/instance-backups`) + - Backup archives will be stored in your Homebridge config folder (`./backups/instance-backups`) - Users can customise the directory that backups are saved to by setting the [`scheduledBackupPath`](https://github.com/oznu/homebridge-config-ui-x/wiki/Config-Options#scheduledbackuppath) option - this allows you to have the automated backups archives saved to a network share or backup drive - Users can download these scheduled backups by opening the existing [Backup / Restore](https://github.com/homebridge/homebridge/wiki/Backup-and-Restore) tool - Added [REST API endpoints](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for getting the list of automated backups, and downloading an existing backup archive @@ -620,7 +644,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr - **System:** Initial support for Node.js v15 and npm v7, however please stay on the current LTS version of Node.js (currently v12.19.0) ([#904](https://github.com/oznu/homebridge-config-ui-x/issues/904)) - **Config Editor:** Fixed a bug that prevented the purging of config.json backups ([#898](https://github.com/oznu/homebridge-config-ui-x/issues/898)) -- **Ring Plugin:** Fixed an issue that prevented two factor authentication codes with leading zeros from being accepted when linking a Ring Account ([#dgreif/ring#471](https://github.com/dgreif/ring/issues/471)) +- **Ring Plugin:** Fixed an issue that prevented two-factor authentication codes with leading zeros from being accepted when linking a Ring Account ([#dgreif/ring#471](https://github.com/dgreif/ring/issues/471)) ### Other Changes @@ -637,15 +661,15 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Notable Changes -- **Plugins:** Added the ability to rollback to a previous version of a plugin, or install the beta/test version of a plugin -- **Homebridge:** Added the ability to rollback to a previous version of Homebridge, or install the latest beta version of Homebridge ([#877](https://github.com/oznu/homebridge-config-ui-x/issues/877)) +- **Plugins:** Added the ability to roll back to a previous version of a plugin, or install the beta/test version of a plugin +- **Homebridge:** Added the ability to roll back to a previous version of Homebridge, or install the latest beta version of Homebridge ([#877](https://github.com/oznu/homebridge-config-ui-x/issues/877)) - Click the Homebridge version on the status dashboard to access this feature - **Config Editor:** Automatic backups of the `config.json` file are now saved to `./backups/config-backups/` to reduce clutter in the Homebridge storage folder ([#732](https://github.com/oznu/homebridge-config-ui-x/pull/732)) - Existing config backup files will be moved on next restart - **Restart:** Made it more obvious which button to click when you need to restart Homebridge - **Restart:** The restart page now shows separate statues for the UI and Homebridge - **Restart:** Users running with [`hb-service`](https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-Service-Command) will now be prompted to view the Homebridge logs if the Homebridge service is taking a long time to come back online after a restart -- **i18n:** Brazillian Portuguese (pt-BR) language added by [@zearthur99](https://github.com/zearthur99) ([#880](https://github.com/oznu/homebridge-config-ui-x/pull/880)) +- **i18n:** Brazilian Portuguese (pt-BR) language added by [@zearthur99](https://github.com/zearthur99) ([#880](https://github.com/oznu/homebridge-config-ui-x/pull/880)) - The Homebridge UI is now available in 21 different languages! ### Other Changes @@ -680,7 +704,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Other Changes -- **API**: Added REST API endpoints to lookup the plugin type and plugin alias that are needed to configure the plugin, see the [Swagger API documentation](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for details +- **API**: Added REST API endpoints to look up the plugin type and plugin alias that are needed to configure the plugin, see the [Swagger API documentation](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for details ## 4.27.2 (2020-09-25) @@ -693,7 +717,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr - **i18n:** Improvements to Spanish language translations ([#837](https://github.com/oznu/homebridge-config-ui-x/pull/837)) - **i18n:** Improvements to German language translations ([#834](https://github.com/oznu/homebridge-config-ui-x/pull/834)) - **i18n:** Improvements to Swedish language translations ([#850](https://github.com/oznu/homebridge-config-ui-x/pull/850)) -- **API**: Added REST API endpoints to lookup a single plugin from NPM, see the [Swagger API documentation](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for details +- **API**: Added REST API endpoints to look up a single plugin from NPM, see the [Swagger API documentation](https://github.com/oznu/homebridge-config-ui-x/wiki/API-Reference) for details ### Bug Fixes @@ -792,8 +816,8 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Notable Changes -- **Auth:** Two Factor Authentication codes are now only valid for a single login only -- **Auth:** Two Factor Authentication codes are now valid for a window of +1 +- **Auth:** Two-Factor Authentication codes are now only valid for a single login only +- **Auth:** Two-Factor Authentication codes are now valid for a window of +1 ### Other Changes @@ -838,7 +862,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Notable Changes - **API:** Added Swagger API Documentation; you can access this via `/swagger` (this is the same API already in use by the web client) -- **Auth:** Added the ability to secure your Homebridge UI user account with **Two Factor Authentication**, drop-down menu -> _User Accounts_ -> _Setup 2FA_ +- **Auth:** Added the ability to secure your Homebridge UI user account with **Two-Factor Authentication**, drop-down menu -> _User Accounts_ -> _Setup 2FA_ - **Login:** Custom wallpaper can now be added by added a `ui-wallpaper.jpg` file in your Homebridge storage directory (and leaving the `loginWallpaper` config option blank) ([#697](https://github.com/oznu/homebridge-config-ui-x/issues/690)) - **Login:** Custom wallpaper changes will now break the browser cache ([#700](https://github.com/oznu/homebridge-config-ui-x/issues/700)) - **i18n:** Portuguese language translation added by [@SamuelMagano](https://github.com/SamuelMagano) ([#698](https://github.com/oznu/homebridge-config-ui-x/pull/698), [#708](https://github.com/oznu/homebridge-config-ui-x/pull/708)) @@ -859,7 +883,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Notable Changes -- **Server:** Added the ability to unpair selected bridges / cameras / TVs without needed to reset the main Homebridge instance, this feature is available from the drop down menu -> _Homebridge Settings_ +- **Server:** Added the ability to unpair selected bridges / cameras / TVs without needed to reset the main Homebridge instance, this feature is available from the drop-down menu -> _Homebridge Settings_ - **hb-service:** Users can now remove individual accessories from the accessory cache, drop-down menu -> _Homebridge Settings_ -> _Remove Single Cached Accessory_ ([#202](https://github.com/oznu/homebridge-config-ui-x/issues/202)) - **i18n:** Slovenian language translation added by [@mitchoklemen](https://github.com/mitchoklemen) ([#694](https://github.com/oznu/homebridge-config-ui-x/pull/694)) @@ -903,7 +927,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Bug Fixes -- **Plugins:** Fixed a bug that prevented the plugins from loading when there was an bad file in the global node_modules directory ([#657](https://github.com/oznu/homebridge-config-ui-x/issues/657)) +- **Plugins:** Fixed a bug that prevented the plugins from loading when there was a bad file in the global node_modules directory ([#657](https://github.com/oznu/homebridge-config-ui-x/issues/657)) ## 4.17.1 (2020-04-29) @@ -977,7 +1001,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Other Changes -- **Plugins:** The service will not longer attempt to check if updates are available for plugins that have `"private": true` set in their `package.json` file +- **Plugins:** The service will no longer attempt to check if updates are available for plugins that have `"private": true` set in their `package.json` file - Updated npm dependencies ### Bug Fixes @@ -992,7 +1016,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Bug Fixes -- **System:** When updating Homebridge, the release notes will now be shown prior to the update occuring +- **System:** When updating Homebridge, the release notes will now be shown prior to the update occurring - **hb-service:** improved discovery of Homebridge install path ## 4.13.0 (2020-03-18) @@ -1005,7 +1029,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr - **i18n:** The display of dates (in the Clock widget for example) are now localised ([#528](https://github.com/oznu/homebridge-config-ui-x/issues/528)) - **Accessory Control:** If controlling an accessory fails, the error message is now shown in the UI as a toast notification -- **hb-service:** Linux only: Updated the generated systemd unit file, `homebridge.service`, to allow the UI to listen on ports below 1024 (requires service re-install for existing [`hb-service`](https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-Service-Command) users) ([#584](https://github.com/oznu/homebridge-config-ui-x/pull/584)) +- **hb-service:** Linux only: Updated the generated systemd unit file, `homebridge.service`, to allow the UI to listen on ports below 1024 (requires service re-installation for existing [`hb-service`](https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-Service-Command) users) ([#584](https://github.com/oznu/homebridge-config-ui-x/pull/584)) - **i18n:** Improvements to Traditional Chinese language translations ([#585](https://github.com/oznu/homebridge-config-ui-x/pull/585)) - **i18n:** Improvements to Dutch language translations ([#588](https://github.com/oznu/homebridge-config-ui-x/pull/588)) - Updated the loading spinner to match the set theme @@ -1042,7 +1066,7 @@ These features will appear in once Homebridge v1.3.0 or later is installed (curr ### Backup / Restore Feature -This release comes with a new feature that allows users to backup and restore their entire Homebridge instance. +This release comes with a new feature that allows users to back up and restore their entire Homebridge instance. The backup and restore process works in such a way that users should be able to use the feature roll back to a previous state, or transfer their current Homebridge setup to a new server without the need to re-pair with HomeKit. @@ -1113,7 +1137,7 @@ Highlights: - **Plugins:** Added a confirmation box when uninstalling plugins - **Plugins:** Added an option to have a plugin's config removed from the `config.json` when the plugin is being uninstalled (only plugins that implement the [Plugins Settings GUI](https://github.com/oznu/homebridge-config-ui-x/wiki/Developers:-Plugin-Settings-GUI) support this feature) -- **System:** The UI will now attempt to rebuild it's own modules after a Node.js upgrade +- **System:** The UI will now attempt to rebuild its own modules after a Node.js upgrade - **System:** Added the ability for [`hb-service`](https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-Service-Command) users to clear the Homebridge cached accessories from the UI (without doing a full Homebridge reset) - **Dashboard:** Weather widget now supports local translations of the current weather description ([#515](https://github.com/oznu/homebridge-config-ui-x/issues/515)) @@ -1165,7 +1189,7 @@ https://user-images.githubusercontent.com/3979615/72317538-b92b6780-36ed-11ea-80 - **i18n:** Improvements to Swedish language translations ([#476](https://github.com/oznu/homebridge-config-ui-x/pull/476)) - **i18n:** Improvements to German language translations ([#482](https://github.com/oznu/homebridge-config-ui-x/pull/482)) - **Dashboard:** Node.js / npm version warning icons will now only show up if you are using an unsupported version of Node.js, the latest available version can still be viewed by hovering over the current version -- **Plugins**: Added seemless account linking support for the [Homebridge Honeywell Home](https://github.com/donavanbecker/homebridge-honeywell-home#readme) plugin +- **Plugins**: Added seamless account linking support for the [Homebridge Honeywell Home](https://github.com/donavanbecker/homebridge-honeywell-home#readme) plugin - **Plugins**: Added the ability for [Homebridge Ring](https://github.com/dgreif/ring/tree/master/homebridge) users to get their Ring account `refreshToken` directly from the UI ([#486](https://github.com/oznu/homebridge-config-ui-x/pull/486)) ### Bug Fixes @@ -1175,13 +1199,13 @@ https://user-images.githubusercontent.com/3979615/72317538-b92b6780-36ed-11ea-80 - **System:** Fixed a bug that caused the UI to crash when running in debug mode in production ([#469](https://github.com/oznu/homebridge-config-ui-x/issues/469)) - **Dashboard:** Fixed a bug where the "Plugin Status" icon was not changing when there were updates available ([#443](https://github.com/oznu/homebridge-config-ui-x/issues/443)) - **Auth:** Fixed a warning about a depreciated option that was in use ([#473](https://github.com/oznu/homebridge-config-ui-x/issues/473)) -- **Config Editor:** Fixed a issue that prevented the on-screen keyboard from being able to be displayed after it was dismissed on an iPad Pro ([#480](https://github.com/oznu/homebridge-config-ui-x/issues/480)) +- **Config Editor:** Fixed an issue that prevented the on-screen keyboard from being able to be displayed after it was dismissed on an iPad Pro ([#480](https://github.com/oznu/homebridge-config-ui-x/issues/480)) ## 4.7.0 (2020-01-11) ### New Dashboard -This release comes with a brand new status dashboard that features a fully customisable, widget-based design. Users can decide which widgets they wish to enable and position and resize them as they like. +This release comes with a brand-new status dashboard that features a fully customisable, widget-based design. Users can decide which widgets they wish to enable and position and resize them as they like. https://user-images.githubusercontent.com/3979615/71886653-b16d3f80-3190-11ea-9ff8-49dc4ae4fff0.png @@ -1200,9 +1224,9 @@ New widgets include: ### Simple Service Installer -This release expands the `hb-service` command to support macOS and Linux in addition to Windows 10. This command allows you to setup a Homebridge instance as a service in seconds. +This release expands the `hb-service` command to support macOS and Linux in addition to Windows 10. This command allows you to set up a Homebridge instance as a service in seconds. -Running `hb-service install` will setup Homebridge and Homebridge Config UI X to run as a service with auto-start on boot. The same command works across Linux, macOS and Windows 10. +Running `hb-service install` will set up Homebridge and Homebridge Config UI X to run as a service with auto-start on boot. The same command works across Linux, macOS and Windows 10. https://user-images.githubusercontent.com/3979615/71888439-4291e580-3194-11ea-8687-a3d58f94ba47.gif @@ -1217,7 +1241,7 @@ Notable Features: The config editor (non-mobile) has had the Ace Editor replaced with the [Microsoft Monaco Editor](https://microsoft.github.io/monaco-editor/) (the code editor that powers VS Code). -This allow for much more powerful JSON syntax checking, more helpful error messages and the new ability to detect duplicate keys in object (like when a second platforms[] array is added by mistake!). +This allows for much more powerful JSON syntax checking, more helpful error messages and the new ability to detect duplicate keys in object (like when a second platforms[] array is added by mistake!). https://user-images.githubusercontent.com/3979615/71890579-b635f180-3198-11ea-98ab-cc7b7263afd9.gif @@ -1331,14 +1355,14 @@ In addition: - All instances you want to control must have the same PIN, be on the same network, and running in insecure mode - Your other instances are automatically discovered, however you can blacklist instances you don't want to control using the plugin settings - Due to the changes required to identify accessories across multiple instances your room/accessory layout will be reset after upgrading -- **System:** Added a new feature to help setup and run Homebridge and Homebridge Config UI X as a service on Windows 10 +- **System:** Added a new feature to help set up and run Homebridge and Homebridge Config UI X as a service on Windows 10 ### Notable Changes - **Plugins:** The "last updated" date is now displayed when searching for plugins to install ([#336](https://github.com/oznu/homebridge-config-ui-x/pull/336)) - **Logs:** Increased the default number of lines to show for the "Log from File" method from 200 to 500 ([#339](https://github.com/oznu/homebridge-config-ui-x/issues/339)) - **Accessory Control:** Accessory tiles now animate when clicked/pressed, similar to how they behave in the native iOS Home app -- **Accessory Control:** Accessory characteristics (on, off, brightness etc) now update immediately when changed in HomeKit (previously there was up to a 3 second delay) +- **Accessory Control:** Accessory characteristics (on, off, brightness etc.) now update immediately when changed in HomeKit (previously there was up to a 3-second delay) - **i18n:** Bulgarian language translation added by [@mafyata](https://github.com/mafyata) - **i18n:** Added translation support for accessory states and labels ([#342](https://github.com/oznu/homebridge-config-ui-x/pull/342)) - If you're still seeing English labels, we need your help translating the new values for your language, [get started here](https://github.com/oznu/homebridge-config-ui-x/tree/master/ui/src/i18n) @@ -1406,7 +1430,7 @@ In addition: ### Other Changes - Add an on-screen warning when attempting to install/update/uninstall a plugin, or view the logs on unsupported versions of Node.js ([#305](https://github.com/oznu/homebridge-config-ui-x/issues/305)) -- Added some more detailed log message to help when users are not able to login, need to reset their password, are unable to view accessories +- Added some more detailed log message to help when users are not able to log in, need to reset their password, are unable to view accessories ## 4.4.2 (2019-05-19) @@ -1414,7 +1438,7 @@ In addition: - **Plugins:** Added extra logging to try and investigate the cause of [#299](https://github.com/oznu/homebridge-config-ui-x/issues/299) - Provide a more detailed error with steps to resolve if the `node-pty` module fails to load (after a Node.js update for example) -- Added a warning message in the logs letting the user know if their Node.js version is to low (anything less than 8.15.1) +- Added a warning message in the logs letting the user know if their Node.js version is too low (anything less than 8.15.1) - Updated npm dependencies ## 4.4.1 (2019-05-16) @@ -1454,7 +1478,7 @@ In addition: ### Notable Changes -- **Homebridge:** Added `homebridgePackagePath` to allow users to defined where the Homebridge module is installed if it's not installed globally ([#280](https://github.com/oznu/homebridge-config-ui-x/issues/280)) +- **Homebridge:** Added `homebridgePackagePath` to allow users to define where the Homebridge module is installed if it's not installed globally ([#280](https://github.com/oznu/homebridge-config-ui-x/issues/280)) ### Other Changes @@ -1532,7 +1556,7 @@ In addition: ### Breaking Changes - **Auth:** The Basic Authentication option has been removed. Users who have Basic Authentication enabled will be swapped to Form Authentication -- **Reverse Proxy:** Some users who have setup a reverse proxy and defined the websocket path will need to swap the WebSocket endpoint from `/wsocket` to `/socket.io` +- **Reverse Proxy:** Some users who have set up a reverse proxy and defined the websocket path will need to swap the WebSocket endpoint from `/wsocket` to `/socket.io` - _If you are using the reverse proxy templates from the [wiki](https://github.com/oznu/homebridge-config-ui-x/wiki/) no changes are required_ - **Node.js Version:** Dropping support for Node 7 and below, this plugin now requires Node.js v8.15.1 or higher on Linux and v10 or higher on Windows @@ -1541,7 +1565,7 @@ In addition: - **Plugins:** Before updating a Homebridge plugin the release notes from GitHub will be shown where possible ([#233](https://github.com/oznu/homebridge-config-ui-x/issues/233)) - **Plugins:** A corrupt plugin will no longer prevent all the installed plugins from being displayed ([#252](https://github.com/oznu/homebridge-config-ui-x/issues/252)) - **i18n:** Turkish language translation added by [@btutal](https://github.com/btutal) -- **Theme:** The default theme for new installs is now `teal` instead of `red` +- **Theme:** The default theme for new installations is now `teal` instead of `red` - **Auth:** Ability to customise the session timeout - **System:** Added the ability for the plugin to run as a separate service rather than a Homebridge plugin, this will allow users who have configured this feature to manage their server even if Homebridge is crashing due to a bad config / other issue - Previously this has only been supported, and the default setup, when running in Docker ([oznu/homebridge](https://github.com/oznu/docker-homebridge)) @@ -1712,7 +1736,7 @@ In addition: ### Notable Changes -- **Accessory Control:** Long-clicking a lightbulb with no additional characteristics (eg. brightness) no longer opens a modal ([#47#issuecomment-405089113](https://github.com/oznu/homebridge-config-ui-x/issues/47#issuecomment-405089113)) +- **Accessory Control:** Long-clicking a lightbulb with no additional characteristics (e.g. brightness) no longer opens a modal ([#47#issuecomment-405089113](https://github.com/oznu/homebridge-config-ui-x/issues/47#issuecomment-405089113)) - **Accessory Control:** Right-clicking an accessory on a non-mobile device will bring up a modal showing all accessory characteristics and other information - **i18n:** Polish language translation added by [@mientki](https://github.com/mientki) - User contributions to the non-english translations are always welcome, [click here](https://github.com/oznu/homebridge-config-ui-x/blob/master/CONTRIBUTING.md#contributing-to-translations) for details on how you can help @@ -1818,7 +1842,7 @@ In addition: - **Beta Feature**: Initial implementation of GUI/form based setup for supported plugins - Added support for optional native HTTPS / SSL ([#68](https://github.com/oznu/homebridge-config-ui-x/issues/68), [#35](https://github.com/oznu/homebridge-config-ui-x/issues/35)) -- The Log Viewer config options have changed, existing options have been have depreciated, see [README](https://github.com/oznu/homebridge-config-ui-x#log-viewer-configuration) for details +- The Log Viewer config options have changed, existing options have been depreciated, see [README](https://github.com/oznu/homebridge-config-ui-x#log-viewer-configuration) for details - Docker users may now configure this plugin using the `config.json` or the new plugin GUI/form config method - Added metadata tag allow using plugin as a full screen web app on iOS ([#88](https://github.com/oznu/homebridge-config-ui-x/issues/88)) - Added ability to restore and cleanup `config.json` backups ([#77](https://github.com/oznu/homebridge-config-ui-x/issues/77)) @@ -1827,7 +1851,7 @@ In addition: - Added [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) headers - Links to external sites now have `rel="noopener noreferrer"` -- Links in plugin-author generated markdown (eg. change logs, plugin config) are now opened in a new tab +- Links in plugin-author generated markdown (e.g. change logs, plugin config) are now opened in a new tab - When on the status page, the browser will refresh automatically if the client version does not match the server version - Updated npm dependencies @@ -1871,7 +1895,7 @@ In addition: ### Notable Changes -- This plugin now runs in a seperate thread to the main homebridge process ([#75](https://github.com/oznu/homebridge-config-ui-x/issues/75)) +- This plugin now runs in a separate thread to the main homebridge process ([#75](https://github.com/oznu/homebridge-config-ui-x/issues/75)) - This can be disabled by setting `noFork` to `true` in the plugin config - Added ability to set a custom image for the login screen using the `loginWallpaper` option ([#34](https://github.com/oznu/homebridge-config-ui-x/issues/34)) - Updated npm dependencies @@ -1913,7 +1937,7 @@ In addition: ### Notable Changes -- Added ability for Linux users to shutdown and restart the server Homebridge is running on ([#39](https://github.com/oznu/homebridge-config-ui-x/issues/39)) +- Added ability for Linux users to shut down and restart the server Homebridge is running on ([#39](https://github.com/oznu/homebridge-config-ui-x/issues/39)) - Updated npm dependencies ## 3.2.1 (2018-03-13) diff --git a/package-lock.json b/package-lock.json index 714a53379..8dca89522 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,10 +21,10 @@ "dependencies": { "@fastify/helmet": "11.1.1", "@fastify/multipart": "8.0.0", - "@fastify/static": "6.11.2", + "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "0.11.7", - "@nestjs/axios": "3.0.0", + "@homebridge/node-pty-prebuilt-multiarch": "^0.11.8-beta.1", + "@nestjs/axios": "^3.0.1", "@nestjs/common": "10.2.7", "@nestjs/core": "10.2.7", "@nestjs/jwt": "10.1.1", @@ -64,14 +64,14 @@ "devDependencies": { "@nestjs/testing": "^10.2.7", "@types/fs-extra": "^9.0.13", - "@types/jest": "^29.5.6", - "@types/node": "^18.18.7", + "@types/jest": "^29.5.7", + "@types/node": "^18.18.8", "@types/node-schedule": "^2.1.2", "@types/semver": "^7.5.4", "@types/tar": "^6.1.7", "@types/unzipper": "^0.10.8", - "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "@typescript-eslint/parser": "^6.9.1", "babel-jest": "^29.7.0", "bash-color": "^0.0.4", "buffer-shims": "^1.0.0", @@ -897,9 +897,9 @@ } }, "node_modules/@fastify/static": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/@fastify/static/-/static-6.11.2.tgz", - "integrity": "sha512-EH7mh7q4MfNdT7N07ZVlwsX/ObngMvQ7KBP0FXAuPov99Fjn80KSJMdxQhhYKAKWW1jXiFdrk8X7d6uGWdZFxg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@fastify/static/-/static-6.12.0.tgz", + "integrity": "sha512-KK1B84E6QD/FcQWxDI2aiUCwHxMJBI1KeCUzm1BwYpPY1b742+jeKruGHP2uOluuM6OkBPI8CIANrXcCRtC2oQ==", "dependencies": { "@fastify/accept-negotiator": "^1.0.0", "@fastify/send": "^2.0.0", @@ -934,9 +934,9 @@ } }, "node_modules/@homebridge/node-pty-prebuilt-multiarch": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.7.tgz", - "integrity": "sha512-aaw66RDwHZ2Xs821U6hwEl2wPDyv9PAWEzNxS32YSRaoYmbie1AREehAfjbASGgpub+7d+3l98xft3oCCUKhSw==", + "version": "0.11.8-beta.1", + "resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.8-beta.1.tgz", + "integrity": "sha512-ixu+YYnq4CXfMneYDm8gY7iPK/ywgA0Z8Atr8dRjoQtkxInqnC4noZG+ieJSlPYHaQkoJCPhgir/ZzwnVQlrqA==", "hasInstallScript": true, "dependencies": { "nan": "^2.18.0", @@ -1863,9 +1863,9 @@ } }, "node_modules/@nestjs/axios": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.0.tgz", - "integrity": "sha512-ULdH03jDWkS5dy9X69XbUVbhC+0pVnrRcj7bIK/ytTZ76w7CgvTZDJqsIyisg3kNOiljRW/4NIjSf3j6YGvl+g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.1.tgz", + "integrity": "sha512-VlOZhAGDmOoFdsmewn8AyClAdGpKXQQaY1+3PGB+g6ceurGIdTxZgRX3VXc1T6Zs60PedWjg3A82TDOB05mrzQ==", "peerDependencies": { "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0", "axios": "^1.3.1", @@ -2430,9 +2430,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.4.tgz", + "integrity": "sha512-2JwWnHK9H+wUZNorf2Zr6ves96WHoWDJIftkcxPKsS7Djta6Zu519LarhRNljPXkpsZR2ZMwNCPeW7omW07BJw==", "dev": true }, "node_modules/@types/fs-extra": { @@ -2478,9 +2478,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.6.tgz", - "integrity": "sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w==", + "version": "29.5.7", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.7.tgz", + "integrity": "sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -2508,9 +2508,9 @@ } }, "node_modules/@types/node": { - "version": "18.18.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", - "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "version": "18.18.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz", + "integrity": "sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -2576,16 +2576,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.0.tgz", - "integrity": "sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz", + "integrity": "sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.9.0", - "@typescript-eslint/type-utils": "6.9.0", - "@typescript-eslint/utils": "6.9.0", - "@typescript-eslint/visitor-keys": "6.9.0", + "@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", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2611,15 +2611,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.0.tgz", - "integrity": "sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", + "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.9.0", - "@typescript-eslint/types": "6.9.0", - "@typescript-eslint/typescript-estree": "6.9.0", - "@typescript-eslint/visitor-keys": "6.9.0", + "@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", "debug": "^4.3.4" }, "engines": { @@ -2639,13 +2639,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz", - "integrity": "sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==", + "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==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.0", - "@typescript-eslint/visitor-keys": "6.9.0" + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2656,13 +2656,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.0.tgz", - "integrity": "sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz", + "integrity": "sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.9.0", - "@typescript-eslint/utils": "6.9.0", + "@typescript-eslint/typescript-estree": "6.9.1", + "@typescript-eslint/utils": "6.9.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2683,9 +2683,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.0.tgz", - "integrity": "sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", + "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2696,13 +2696,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.0.tgz", - "integrity": "sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==", + "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==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.0", - "@typescript-eslint/visitor-keys": "6.9.0", + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2723,17 +2723,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.0.tgz", - "integrity": "sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.1.tgz", + "integrity": "sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA==", "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.0", - "@typescript-eslint/types": "6.9.0", - "@typescript-eslint/typescript-estree": "6.9.0", + "@typescript-eslint/scope-manager": "6.9.1", + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/typescript-estree": "6.9.1", "semver": "^7.5.4" }, "engines": { @@ -2748,12 +2748,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz", - "integrity": "sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==", + "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==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.0", + "@typescript-eslint/types": "6.9.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3753,9 +3753,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001557", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001557.tgz", - "integrity": "sha512-91oR7hLNUP3gG6MLU+n96em322a8Xzes8wWdBKhLgUoiJsAF5irZnxSUCbc+qUZXNnPCfUwLOi9ZCZpkvjQajw==", + "version": "1.0.30001559", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz", + "integrity": "sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==", "dev": true, "funding": [ { @@ -4160,9 +4160,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.33.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.1.tgz", - "integrity": "sha512-wCXGbLjnsP10PlK/thHSQlOLlLKNEkaWbTzVvHHZ79fZNeN1gUmw2gBlpItxPv/pvqldevEXFh/d5stdNvl6EQ==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.2.tgz", + "integrity": "sha512-a8zeCdyVk7uF2elKIGz67AjcXOxjRbwOLz8SbklEso1V+2DoW4OkAMZN9S9GBgvZIaqQi/OemFX4OiSoQEmg1Q==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -4602,9 +4602,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.569", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz", - "integrity": "sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==", + "version": "1.4.571", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.571.tgz", + "integrity": "sha512-Sc+VtKwKCDj3f/kLBjdyjMpNzoZsU6WuL/wFb6EH8USmHEcebxRXcRrVpOpayxd52tuey4RUDpUsw5OS5LhJqg==", "dev": true }, "node_modules/emittery": { @@ -5629,9 +5629,9 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "node_modules/fast-uri": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.2.0.tgz", - "integrity": "sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.3.0.tgz", + "integrity": "sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -9983,9 +9983,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -11076,9 +11076,9 @@ } }, "node_modules/terser": { - "version": "5.22.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz", - "integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.23.0.tgz", + "integrity": "sha512-Iyy83LN0uX9ZZLCX4Qbu5JiHiWjOCTwrmM9InWOzVeM++KNWEsqV4YgN9U9E8AlohQ6Gs42ztczlWOG/lwDAMA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", diff --git a/package.json b/package.json index 585ca8c3c..092346c1e 100644 --- a/package.json +++ b/package.json @@ -54,10 +54,10 @@ "dependencies": { "@fastify/helmet": "11.1.1", "@fastify/multipart": "8.0.0", - "@fastify/static": "6.11.2", + "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "0.11.7", - "@nestjs/axios": "3.0.0", + "@homebridge/node-pty-prebuilt-multiarch": "^0.11.8-beta.1", + "@nestjs/axios": "^3.0.1", "@nestjs/common": "10.2.7", "@nestjs/core": "10.2.7", "@nestjs/jwt": "10.1.1", @@ -93,14 +93,14 @@ "devDependencies": { "@nestjs/testing": "^10.2.7", "@types/fs-extra": "^9.0.13", - "@types/jest": "^29.5.6", - "@types/node": "^18.18.7", + "@types/jest": "^29.5.7", + "@types/node": "^18.18.8", "@types/node-schedule": "^2.1.2", "@types/semver": "^7.5.4", "@types/tar": "^6.1.7", "@types/unzipper": "^0.10.8", - "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "@typescript-eslint/parser": "^6.9.1", "babel-jest": "^29.7.0", "bash-color": "^0.0.4", "buffer-shims": "^1.0.0", diff --git a/src/bin/hb-service.ts b/src/bin/hb-service.ts index 869989c39..78d5ec3e9 100644 --- a/src/bin/hb-service.ts +++ b/src/bin/hb-service.ts @@ -1148,9 +1148,9 @@ export class HomebridgeServiceHelper { if (requestedVersion) { const wantedVersion = versionList.find(x => x.version.startsWith('v' + requestedVersion)); if (wantedVersion) { - // check the requested version is greater than v14.15.0 - if (!semver.gte(wantedVersion.version, '14.15.0')) { - this.logger('Refusing to install Node.js version lower than v14.15.0.', 'fail'); + // check the requested version is greater than v16.18.2 + if (!semver.gte(wantedVersion.version, '16.18.2')) { + this.logger('Refusing to install Node.js version lower than v16.18.2.', 'fail'); return { update: false }; } this.logger(`Installing Node.js ${wantedVersion.version} over ${process.version}...`, 'info'); diff --git a/src/bin/platforms/darwin.ts b/src/bin/platforms/darwin.ts index ae125b3f8..0997fe183 100644 --- a/src/bin/platforms/darwin.ts +++ b/src/bin/platforms/darwin.ts @@ -245,8 +245,8 @@ export class DarwinInstaller extends BasePlatform { process.exit(1); } - if (process.arch === 'arm64' && semver.lt(job.target, '16.0.0')) { - this.hbService.logger('macOS M1 / arm64 support is only available from Node.js 16 onwards', 'fail'); + if (process.arch === 'arm64' && semver.lt(job.target, '18.0.0')) { + this.hbService.logger('macOS M1 / arm64 support is only available from Node.js v18 or later', 'fail'); process.exit(1); } diff --git a/src/bin/platforms/linux.ts b/src/bin/platforms/linux.ts index 512e506b3..0825ff687 100644 --- a/src/bin/platforms/linux.ts +++ b/src/bin/platforms/linux.ts @@ -315,17 +315,17 @@ export class LinuxInstaller extends BasePlatform { const glibcVersion = parseFloat(child_process.execSync('getconf GNU_LIBC_VERSION 2>/dev/null').toString().split('glibc')[1].trim()); if (glibcVersion < 2.23) { this.hbService.logger('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - `Wanted: >=2.23. Installed: ${glibcVersion}`, 'fail'); + `Wanted: >=2.23. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); process.exit(1); } if (semver.gte(target, '18.0.0') && glibcVersion < 2.28) { this.hbService.logger('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - `Wanted: >=2.28. Installed: ${glibcVersion}`, 'fail'); + `Wanted: >=2.28. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); process.exit(1); } if (semver.gte(target, '20.0.0') && glibcVersion < 2.29) { this.hbService.logger('Your version of Linux does not meet the GLIBC version requirements to use this tool to upgrade Node.js. ' + - `Wanted: >=2.29. Installed: ${glibcVersion}`, 'fail'); + `Wanted: >=2.29. Installed: ${glibcVersion} - see https://homebridge.io/w/JJSun`, 'fail'); process.exit(1); } } diff --git a/src/index.ts b/src/index.ts index e2331eced..300e77685 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,8 +35,8 @@ class HomebridgeConfigUi { .option('-T, --no-timestamp', '', () => process.env.UIX_LOG_NO_TIMESTAMPS = '1') .parse(process.argv); - if (!semver.satisfies(process.version, '>=10.17.0')) { - const msg = `Node.js v10.17.0 higher is required. You may experience issues running this plugin running on ${process.version}.`; + if (!semver.satisfies(process.version, '>=18.15.0')) { + const msg = `Node.js v18.15.0 higher is required. You may experience issues running this plugin running on ${process.version}.`; log.error(msg); log.warn(msg); } diff --git a/src/modules/plugins/plugins.service.ts b/src/modules/plugins/plugins.service.ts index ad7a072cf..8d3c90c04 100755 --- a/src/modules/plugins/plugins.service.ts +++ b/src/modules/plugins/plugins.service.ts @@ -143,7 +143,7 @@ export class PluginsService { })); this.installedPlugins = plugins; - return _.orderBy(plugins, [(resultItem) => { return resultItem.name === this.configService.name; }, 'updateAvailable', 'name'], ['desc', 'desc', 'asc']); + return _.orderBy(plugins, [(resultItem: { name: string }) => { return resultItem.name === this.configService.name; }, 'updateAvailable', 'betaUpdateAvailable', 'name'], ['desc', 'desc', 'desc', 'asc']); } /** @@ -151,7 +151,7 @@ export class PluginsService { */ public async getOutOfDatePlugins(): Promise { const plugins = await this.getInstalledPlugins(); - return plugins.filter(x => x.updateAvailable); + return plugins.filter(x => x.updateAvailable || x.betaUpdateAvailable); } /** @@ -181,7 +181,7 @@ export class PluginsService { const fromCache = this.npmPluginCache.get(`lookup-${pluginName}`); const pkg: INpmRegistryModule = fromCache || (await ( - this.httpService.get(`https://registry.npmjs.org/${encodeURIComponent(pluginName).replace('%40', '@')}`, { + this.httpService.get(`https://registry.npmjs.org/${encodeURIComponent(pluginName).replace(/%40/g, '@')}`, { headers: { 'accept': 'application/vnd.npm.install-v1+json', // only return minimal information }, @@ -273,7 +273,7 @@ export class PluginsService { const fromCache = this.npmPluginCache.get(`lookup-${query}`); const pkg: INpmRegistryModule = fromCache || (await ( - this.httpService.get(`https://registry.npmjs.org/${encodeURIComponent(query).replace('%40', '@')}`).toPromise() + this.httpService.get(`https://registry.npmjs.org/${encodeURIComponent(query).replace(/%40/g, '@')}`).toPromise() )).data; if (!fromCache) { @@ -308,6 +308,7 @@ export class PluginsService { plugin.latestVersion = pkg['dist-tags'] ? pkg['dist-tags'].latest : undefined; plugin.lastUpdated = pkg.time.modified; plugin.updateAvailable = false; + plugin.betaUpdateAvailable = false; plugin.links = { npm: `https://www.npmjs.com/package/${plugin.name}`, homepage: pkg.homepage, @@ -499,7 +500,8 @@ export class PluginsService { ) { const versions = await this.getAvailablePluginVersions('homebridge'); if (versions.tags['beta'] && semver.gt(versions.tags['beta'], homebridge.installedVersion)) { - homebridge.updateAvailable = true; + homebridge.updateAvailable = false; + homebridge.betaUpdateAvailable = true; homebridge.latestVersion = versions.tags['beta']; } } @@ -584,7 +586,8 @@ export class PluginsService { const npm = await this.parsePackageJson(pjson, npmPkg.path) as HomebridgePlugin & { showUpdateWarning?: boolean }; // show the update warning if the installed version is below the minimum recommended - npm.showUpdateWarning = semver.lt(npm.installedVersion, '6.4.1'); + // (bwp91) I set this to 9.5.0 to match a minimum node version of 18.15.0 + npm.showUpdateWarning = semver.lt(npm.installedVersion, '9.5.0'); this.npmPackage = npm; return npm; @@ -838,30 +841,7 @@ export class PluginsService { throw new NotFoundException(); } - // if loading a homebridge beta returned pre-defined help text - if (plugin.name === 'homebridge' && plugin.latestVersion?.includes('beta')) { - // Query the list of branches for the repo, if the request doesn't work it doesn't matter too much - let betaBranch: string; - - try { - // Find the first branch that starts with "beta" - betaBranch = (await this.httpService.get('https://api.github.com/repos/homebridge/homebridge/branches').toPromise()) - .data - .find((branch: any) => branch.name.startsWith('beta')) - ?.name; - } catch (e) { - this.logger.error(`Failed to get list of branches from GitHub: ${e.message}`); - } - - return { - name: 'v' + plugin.latestVersion, - changelog: 'Thank you for helping improve Homebridge by testing the beta build of Homebridge.\n\n\n' + - 'To see what needs testing or to report issues: https://github.com/homebridge/homebridge/issues' + - `${betaBranch && `\n\n\nSee the commit history for recent changes: https://github.com/homebridge/homebridge/commits/${betaBranch}`}`, - }; - } - - // plugin must have a homepage to workout Git Repo + // Plugin must have a homepage to work out Git Repo if (!plugin.links.homepage) { throw new NotFoundException(); } @@ -872,6 +852,44 @@ export class PluginsService { throw new NotFoundException(); } + // Special case for beta npm tags for homebridge, homebridge ui and all plugins + if (plugin.latestVersion?.includes('beta')) { + switch (plugin.name) { + case 'homebridge': + case 'homebridge-config-ui-x': { + // If loading a homebridge/ui beta returned pre-defined help text + // Query the list of branches for the repo, if the request doesn't work it doesn't matter too much + let betaBranch: string; + try { + // Find the first branch that starts with "beta" + betaBranch = (await this.httpService.get(`https://api.github.com/repos/homebridge/${plugin.name}/branches`).toPromise()) + .data + .find((branch: any) => branch.name.startsWith('beta-')) + ?.name; + } catch (e) { + this.logger.error(`Failed to get list of branches from GitHub: ${e.message}`); + } + return { + name: 'v' + plugin.latestVersion, + changelog: `Thank you for helping improve Homebridge by testing the beta build for \`${plugin.name}\`.\n\n` + + 'To see what needs testing or to report issues:\n' + + `- https://github.com/homebridge/${plugin.name}/issues` + + `${betaBranch && `\n\nSee the commit history for recent changes:\n- https://github.com/homebridge/${plugin.name}/commits/${betaBranch}`}`, + }; + } + default: { + // If loading any other plugin beta, return some generic text for now + return { + name: 'v' + plugin.latestVersion, + changelog: `Thank you for helping improve \`${pluginName}\` by testing the beta build.\n\n` + + 'You can use the Homebridge UI at any time to revert back to the stable version of this plugin.\n\n' + + 'Please remember this is a **test** version of the plugin, and report any issues to the plugin\'s GitHub page:\n' + + `- https://github.com/${repoMatch[1]}/${repoMatch[2]}/issues`, + }; + } + } + } + try { const release = (await this.httpService.get(`https://api.github.com/repos/${repoMatch[1]}/${repoMatch[2]}/releases/latest`).toPromise()).data; return { @@ -1180,6 +1198,7 @@ export class PluginsService { plugin.publicPackage = false; plugin.latestVersion = null; plugin.updateAvailable = false; + plugin.betaUpdateAvailable = false; plugin.links = {}; return plugin; } @@ -1195,20 +1214,38 @@ export class PluginsService { try { // attempt to load from cache const fromCache = this.npmPluginCache.get(plugin.name); + plugin.updateAvailable = false; + plugin.betaUpdateAvailable = false; // restore from cache, or load from npm const pkg: IPackageJson = fromCache || ( - await this.httpService.get(`https://registry.npmjs.org/${encodeURIComponent(plugin.name).replace('%40', '@')}/latest`).toPromise() + await this.httpService.get(`https://registry.npmjs.org/${encodeURIComponent(plugin.name).replace(/%40/g, '@')}/latest`).toPromise() ).data; + plugin.latestVersion = pkg.version; + plugin.updateAvailable = semver.gt(pkg.version, plugin.installedVersion); + + // check for beta updates, if no latest version is available + if (!plugin.updateAvailable) { + const pluginVersion = semver.parse(plugin.installedVersion); + if ( + pluginVersion.prerelease[0] === 'beta' && + semver.gt(plugin.installedVersion, plugin.latestVersion) + ) { + const versions = await this.getAvailablePluginVersions(plugin.name); + if (versions.tags['beta'] && semver.gt(versions.tags['beta'], plugin.installedVersion)) { + plugin.betaUpdateAvailable = true; + plugin.latestVersion = versions.tags['beta']; + } + } + } + // store in cache if it was not there already if (!fromCache) { this.npmPluginCache.set(plugin.name, pkg); } plugin.publicPackage = true; - plugin.latestVersion = pkg.version; - plugin.updateAvailable = semver.lt(plugin.installedVersion, plugin.latestVersion); plugin.links = { npm: `https://www.npmjs.com/package/${plugin.name}`, homepage: pkg.homepage, @@ -1222,6 +1259,7 @@ export class PluginsService { plugin.publicPackage = false; plugin.latestVersion = null; plugin.updateAvailable = false; + plugin.betaUpdateAvailable = false; plugin.links = {}; } return plugin; diff --git a/src/modules/plugins/types.d.ts b/src/modules/plugins/types.d.ts index 061896afa..44ed7604a 100644 --- a/src/modules/plugins/types.d.ts +++ b/src/modules/plugins/types.d.ts @@ -9,6 +9,7 @@ export interface HomebridgePlugin { latestVersion?: string; lastUpdated?: string; updateAvailable?: boolean; + betaUpdateAvailable?: boolean; installPath?: string; globalInstall?: boolean; settingsSchema?: boolean; diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index 08412fe8e..54faae533 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -433,7 +433,7 @@ export class StatusService { currentVersion: process.version, latestVersion: currentLts.version, updateAvailable: semver.gt(currentLts.version, process.version), - showUpdateWarning: semver.lt(process.version, '14.15.0'), + showUpdateWarning: semver.lt(process.version, '18.15.0'), installPath: path.dirname(process.execPath), }; this.statusCache.set('nodeJsVersion', versionInformation, 86400); diff --git a/tsconfig.json b/tsconfig.json index 102f4e28a..36e5f1857 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "es2017", + "target": "es2020", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/ui/package-lock.json b/ui/package-lock.json index 060958e7b..d5ab90221 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -67,7 +67,7 @@ "@angular/compiler-cli": "^14.3.0", "@angular/language-service": "^14.3.0", "@fortawesome/fontawesome-free": "^6.4.2", - "@types/node": "^18.18.7", + "@types/node": "^18.18.8", "@types/qrcode": "^1.5.4", "@types/semver": "^7.5.4", "@types/socket.io-client": "^1.4.36", @@ -3644,9 +3644,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.18.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", - "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "version": "18.18.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz", + "integrity": "sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -5319,9 +5319,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001557", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001557.tgz", - "integrity": "sha512-91oR7hLNUP3gG6MLU+n96em322a8Xzes8wWdBKhLgUoiJsAF5irZnxSUCbc+qUZXNnPCfUwLOi9ZCZpkvjQajw==", + "version": "1.0.30001559", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz", + "integrity": "sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==", "funding": [ { "type": "opencollective", @@ -5921,9 +5921,9 @@ } }, "node_modules/core-js-compat": { - "version": "3.33.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.1.tgz", - "integrity": "sha512-6pYKNOgD/j/bkC5xS5IIg6bncid3rfrI42oBH1SQJbsmYPKF7rhzcFzYCcxYMmNQQ0rCEB8WqpW7QHndOggaeQ==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.2.tgz", + "integrity": "sha512-axfo+wxFVxnqf8RvxTzoAlzW4gRoacrHeoFlc9n0x50+7BEyZL/Rt3hicaED1/CEd7I6tPCPVUYcJwCMO5XUYw==", "dev": true, "dependencies": { "browserslist": "^4.22.1" @@ -5934,9 +5934,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.33.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.1.tgz", - "integrity": "sha512-wCXGbLjnsP10PlK/thHSQlOLlLKNEkaWbTzVvHHZ79fZNeN1gUmw2gBlpItxPv/pvqldevEXFh/d5stdNvl6EQ==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.2.tgz", + "integrity": "sha512-a8zeCdyVk7uF2elKIGz67AjcXOxjRbwOLz8SbklEso1V+2DoW4OkAMZN9S9GBgvZIaqQi/OemFX4OiSoQEmg1Q==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -6537,9 +6537,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.569", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz", - "integrity": "sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==" + "version": "1.4.571", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.571.tgz", + "integrity": "sha512-Sc+VtKwKCDj3f/kLBjdyjMpNzoZsU6WuL/wFb6EH8USmHEcebxRXcRrVpOpayxd52tuey4RUDpUsw5OS5LhJqg==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -12297,9 +12297,9 @@ "optional": true }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -13965,9 +13965,9 @@ } }, "node_modules/terser-webpack-plugin/node_modules/terser": { - "version": "5.22.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz", - "integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.23.0.tgz", + "integrity": "sha512-Iyy83LN0uX9ZZLCX4Qbu5JiHiWjOCTwrmM9InWOzVeM++KNWEsqV4YgN9U9E8AlohQ6Gs42ztczlWOG/lwDAMA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", diff --git a/ui/package.json b/ui/package.json index d83a5304f..c9cc3ac20 100644 --- a/ui/package.json +++ b/ui/package.json @@ -69,7 +69,7 @@ "@angular/compiler-cli": "^14.3.0", "@angular/language-service": "^14.3.0", "@fortawesome/fontawesome-free": "^6.4.2", - "@types/node": "^18.18.7", + "@types/node": "^18.18.8", "@types/qrcode": "^1.5.4", "@types/semver": "^7.5.4", "@types/socket.io-client": "^1.4.36", diff --git a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html index 1b85e40ee..310702db3 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html +++ b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html @@ -4,16 +4,21 @@ - \ No newline at end of file + diff --git a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts index 602d95e69..2079df874 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts +++ b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts @@ -30,7 +30,8 @@ export class ManagePluginsModalComponent implements OnInit, OnDestroy { public actionComplete = false; public actionFailed = false; public showReleaseNotes = false; - public updateSelf = false; + public justUpdatedPlugin = false; + public updateToBeta = false; public changeLog: string; public release; @@ -78,10 +79,17 @@ export class ManagePluginsModalComponent implements OnInit, OnDestroy { this.pastTenseVerb = this.translate.instant('plugins.manage.label_uninstalled'); break; case 'Update': - if (this.targetVersion === 'latest') { - this.getReleaseNotes(); - } else { - this.update(); + switch (this.targetVersion) { + case 'latest': + this.updateToBeta = false; + this.getReleaseNotes(); + break; + case 'beta': + this.updateToBeta = true; + this.getReleaseNotes(); + break; + default: + this.update(); } this.presentTenseVerb = this.translate.instant('plugins.manage.label_update'); this.pastTenseVerb = this.translate.instant('plugins.manage.label_updated'); @@ -157,14 +165,7 @@ export class ManagePluginsModalComponent implements OnInit, OnDestroy { termRows: this.term.rows, }).subscribe( (data) => { - if (this.pluginName === 'homebridge-config-ui-x') { - this.updateSelf = true; - if (this.$settings.env.dockerOfflineUpdate && this.targetVersion === 'latest') { - this.$router.navigate(['/platform-tools/docker/restart-container']); - this.activeModal.close(); - return; - } - } + this.justUpdatedPlugin = true; this.$router.navigate(['/plugins']); this.$toastr.success(`${this.pastTenseVerb} ${this.pluginName}`, this.toastSuccess); this.getChangeLog(); diff --git a/ui/src/app/modules/plugins/plugin-card/plugin-card.component.html b/ui/src/app/modules/plugins/plugin-card/plugin-card.component.html index 4641f8b16..b7dc60c01 100644 --- a/ui/src/app/modules/plugins/plugin-card/plugin-card.component.html +++ b/ui/src/app/modules/plugins/plugin-card/plugin-card.component.html @@ -2,16 +2,19 @@