From ba7f8d472fe28d74a011a6f6d9e390e3d0338392 Mon Sep 17 00:00:00 2001 From: Marcus Davies <55892693+marcus-j-davies@users.noreply.github.com> Date: Sun, 25 Sep 2022 11:57:40 +0100 Subject: [PATCH] v4.1.0 (#10) * Add avahi + update deps * Update routing.js * CL + AV + Regex * AV --- CHANGELOG.md | 14 ++++++++++++++ core/accessories/Icons/AV.png | Bin 0 -> 1150 bytes core/accessories/Icons/TV.png | Bin 1833 -> 0 bytes core/accessories/Types.js | 4 ++-- core/routing.js | 7 +++---- haprouter_config.json.default | 2 +- package.json | 12 ++++++------ ui/settings.html | 1 + 8 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 core/accessories/Icons/AV.png delete mode 100755 core/accessories/Icons/TV.png diff --git a/CHANGELOG.md b/CHANGELOG.md index fc427b2..a6d873c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ + - **4.1.0** + + - **Fixes** + - Fix incorrect regex expression for module search + + - **New Features** + - Add Avahi advertiser + + - **Changes** + - Bump various dependencies + - Make Avahi default advertiser + - Renamed **Smart TV** to **AV Device** + - Replaced **AV Device** icon + - **4.0.0** - **Breaking Changes** diff --git a/core/accessories/Icons/AV.png b/core/accessories/Icons/AV.png new file mode 100644 index 0000000000000000000000000000000000000000..738200c9d13a30640755d4b4ab25390f9a89c665 GIT binary patch literal 1150 zcmV-^1cCdBP)*#Q zkeNyuOLP(4MC@HeQbJdfX#`!wT0(>bU07mL=9MkzMwXdmW@>Bu>*77*j%Q}i%+5LL zUd#`MIrF^F`<(ZG-sk-~15KJVY0~5p5Q+$*b^r^3`+&(n8*l{J4{Qf^h7kITxYq?i z9iw)s{}}mCJ*@VqCmi4hb$%W37OG#Vf2hZ5d=9DasMqEdF-_f{G<3JRL>-&*xlMhe zOjMV8*&y-O+890R_-X;is_hw{kobMA_NgzFY#E}jOP;jqV^zwpS5Gx4M0Has&{Xwf z2T~-9_meua)w@y+x>0>XU8gQk+sevDs!L7vT2i($h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!4 zz@2YlJ%E#-YB-7^u;4kMnRoMI4jgMhVMK7Ra39DZX5$$MB|HUL&1SpEJ6Sixr0j*s zs5QkrmoUzqtJY~kGO%eR^ktm^3oS#IPOBr-TD_Xk<`M>y(36C5ww55Zp#+0$corC1 zrvHzxOf+hO9yS}9%1SaX27;#0nCF1yp;c(Qn zgvU-O^b6VG$%j`69==21B76%04qiPXykjPQe6I{aB381nE5o{hAhW8y)fZ>4&YFBY zY5U2>%H&p|N#C#_q4}$<7X32z^rlPB^1sqNckZ`s+){XTQC82f#?cR7;5L`+sn~Qr z{@i!bWmMzmElkHB#*S<6cLa8v35?B;D|qd*pU;2PKIseL@U@z%Gl^4oG<8`faW{#S zyyNCN)Nt$a*s3XfJNir1mAe~O?8)+{XEm?t+bsyqyS5!vpRZ?%qAumoTW3sq zsm*ZDU-@2o#@4^v8FkG4)y+$OtZwM>$IhOjo;e3UUfbR<>*_x>c+<=~`x0WxkCt~v zO*p)Eb^MIJ%b+5w_RyGLY5StHCwv3HW$v5Py6)8LDf%s`8|zl2osF&Ev8g78ijPa{ zx;b#M?Rq_(S-=0n$a|SpW<`UJ%%Mxx8ZU$-E`s{5kDz`-7IF z(=AeQx23;N`KUw*sRa^(jGmx85y-YrCPU*!t7U$!Yvrw<2-Oko_!qkxmx=?4S7Tb& zFRpp>hbU}smu}qR!XrhoRfWA&tZC8or4!ArF?I11#8=~&4{X_XVqszFx`Dg9J1t}C zh!2mApQ@n4UmpC@&mG!~8>*Ll*_ZTvI-|c*d*#y`iTm#aPLH*AFOEFY>wfrcgk#kD cSM(q`BeG@Iwcd`rPUQ<{P06q{Brjd{FJCc>0ssI2 diff --git a/core/accessories/Types.js b/core/accessories/Types.js index 4671391..372c054 100644 --- a/core/accessories/Types.js +++ b/core/accessories/Types.js @@ -129,8 +129,8 @@ const Types = { ] }, TELEVISION: { - Label: 'Smart TV', - Icon: 'TV.png', + Label: 'AV Device', + Icon: 'AV.png', SupportsRouting: true, Class: TV, Actions: [], diff --git a/core/routing.js b/core/routing.js index e6af402..78c2eca 100644 --- a/core/routing.js +++ b/core/routing.js @@ -4,7 +4,6 @@ const { spawnSync } = require('child_process'); const { dependencies } = require('../package.json'); let RootPath; - const Routes = {}; const setPath = function (Path) { @@ -19,8 +18,8 @@ const setPath = function (Path) { const loadModules = function () { loadStockModules(); - const RegexScope = new RegExp('@.*/haprouter-route-.*'); - const Regex = new RegExp('haprouter-route-.*'); + const RegexScope = new RegExp(/^@.*\/haprouter-route-.*$/); + const Regex = new RegExp(/^haprouter-route-.*$/); const LockPath = PATH.join(RootPath, 'package-lock.json'); @@ -59,7 +58,7 @@ const loadModules = function () { }; const loadStockModules = function () { - const RegexScope = new RegExp('@.*/haprouter-route-.*'); + const RegexScope = new RegExp(/^@.*\/haprouter-route-.*$/); const RPKGS = Object.keys(dependencies) .filter((D) => RegexScope.test(D)) diff --git a/haprouter_config.json.default b/haprouter_config.json.default index 4b6fa3c..5ea7c4c 100644 --- a/haprouter_config.json.default +++ b/haprouter_config.json.default @@ -1,5 +1,5 @@ { - "advertiser": "ciao", + "advertiser": "avahi", "interface": "ALL", "bridgeEnabled": true, "loginUsername": "admin", diff --git a/package.json b/package.json index e5eba7e..cdb135d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hap-router", - "version": "4.0.0", + "version": "4.1.0", "description": "A Middleware HAP Router for bringing HomeKit functionality to your Home Automation.", "main": "HAPRouter.js", "keywords": [ @@ -29,15 +29,15 @@ "events": "^3.3.0", "express": "^4.18.1", "express-basic-auth": "^1.2.1", - "hap-nodejs": "^0.10.2", + "hap-nodejs": "^0.10.4", "ip": "^1.1.8", "mqtt": "^4.3.7", "handlebars": "^4.7.7", "readline": "^1.3.0", - "qrcode": "^1.5.0", + "qrcode": "^1.5.1", "bcrypt": "^5.0.1", - "express-rate-limit": "^6.4.0", - "ws": "^8.8.0", + "express-rate-limit": "^6.6.0", + "ws": "^8.9.0", "@marcus-j-davies/haprouter-route-http": "^4.0.0", "@marcus-j-davies/haprouter-route-udp": "^4.0.0", "@marcus-j-davies/haprouter-route-websocket": "^4.0.0", @@ -50,7 +50,7 @@ "node": ">=14.14.0" }, "devDependencies": { - "eslint": "^8.18.0", + "eslint": "^8.24.0", "prettier": "^2.7.1" }, "repository": { diff --git a/ui/settings.html b/ui/settings.html index bcbea60..30bd884 100644 --- a/ui/settings.html +++ b/ui/settings.html @@ -54,6 +54,7 @@