Skip to content

Commit

Permalink
v4.1.0 (#10)
Browse files Browse the repository at this point in the history
* Add avahi + update deps

* Update routing.js

* CL + AV + Regex

* AV
  • Loading branch information
marcus-j-davies authored Sep 25, 2022
1 parent bc30851 commit ba7f8d4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 13 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
Binary file added core/accessories/Icons/AV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed core/accessories/Icons/TV.png
Binary file not shown.
4 changes: 2 additions & 2 deletions core/accessories/Types.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ const Types = {
]
},
TELEVISION: {
Label: 'Smart TV',
Icon: 'TV.png',
Label: 'AV Device',
Icon: 'AV.png',
SupportsRouting: true,
Class: TV,
Actions: [],
Expand Down
7 changes: 3 additions & 4 deletions core/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const { spawnSync } = require('child_process');
const { dependencies } = require('../package.json');

let RootPath;

const Routes = {};

const setPath = function (Path) {
Expand All @@ -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');

Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion haprouter_config.json.default
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"advertiser": "ciao",
"advertiser": "avahi",
"interface": "ALL",
"bridgeEnabled": true,
"loginUsername": "admin",
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -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",
Expand All @@ -50,7 +50,7 @@
"node": ">=14.14.0"
},
"devDependencies": {
"eslint": "^8.18.0",
"eslint": "^8.24.0",
"prettier": "^2.7.1"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions ui/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<select id="CFG_Advertiser">
<option value="bonjour-hap">BONJOUR-HAP (Legacy)</option>
<option value="ciao">CIAO</option>
<option value="avahi">AVAHI</option>
</select>
<script> $("#CFG_Advertiser").val("{{Config.advertiser}}")</script>
</td>
Expand Down

0 comments on commit ba7f8d4

Please sign in to comment.