node-red-contrib-homekit-bridged 1.5.0-dev.1 → 1.5.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,15 +11,23 @@ All notable changes to this project will be documented in this file.
11
11
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
12
12
  to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
13
13
 
14
- ## [1.5.0-dev.1]
14
+ ## [1.5.0-dev.4]
15
+
16
+ ### Added
17
+
18
+ - Support for new advertiser [AVAHI](https://github.com/homebridge/HAP-NodeJS/pull/918)
15
19
 
16
20
  ### Fixed
17
21
 
18
22
  - Accessory could not be recovered from NO_RESPONSE using single Characteristic
23
+ - Make unsupported Characteristic error more
24
+ descriptive [#456](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/456)
19
25
 
20
26
  ### Changed
21
27
 
22
28
  - Updated hap-nodejs to [0.9.7](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.7) (bug fixes)
29
+ - Updated hap-nodejs to [0.9.8](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.8) (bug fixes)
30
+ - Updated hap-nodejs to [0.10.0](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.0) (features)
23
31
 
24
32
  ## [1.4.3]
25
33
 
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -42,7 +42,7 @@ module.exports = function (node) {
42
42
  characteristic.props.minValue = -100;
43
43
  }
44
44
  });
45
- return supported;
45
+ return [...new Set(supported)];
46
46
  };
47
47
  return {
48
48
  load: load,
@@ -42,7 +42,7 @@ module.exports = function (node) {
42
42
  characteristic.props.minValue = -100;
43
43
  }
44
44
  });
45
- return supported;
45
+ return [...new Set(supported)];
46
46
  };
47
47
  return {
48
48
  load: load,
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -132,7 +132,7 @@ module.exports = function (node) {
132
132
  Object.keys(msg.payload).map((key) => {
133
133
  var _a, _b;
134
134
  if (node.supported.indexOf(key) < 0) {
135
- log.error(`Instead of ${key} try one of these characteristics: ${node.supported.join(', ')}`);
135
+ log.error(`Instead of '${key}' try one of these characteristics: '${node.supported.join("', '")}'`);
136
136
  }
137
137
  else {
138
138
  const value = (_a = msg.payload) === null || _a === void 0 ? void 0 : _a[key];
@@ -153,7 +153,7 @@ module.exports = function (node) {
153
153
  }
154
154
  }
155
155
  else {
156
- log.error(`Instead of ${key} try one of these characteristics: ${node.supported.join(', ')}`);
156
+ log.error(`Instead of '${key}' try one of these characteristics: '${node.supported.join("', '")}'`);
157
157
  }
158
158
  }
159
159
  else {
@@ -12,6 +12,7 @@
12
12
  <select id="node-config-input-advertiser">
13
13
  <option value="bonjour-hap" selected="selected">BONJOUR</option>
14
14
  <option value="ciao">CIAO</option>
15
+ <option value="avahi">AVAHI</option>
15
16
  </select>
16
17
  </div>
17
18
  <div class="form-row">
@@ -98,7 +99,7 @@
98
99
  <ul>
99
100
  <li><strong>Pin Code</strong>: Specify the Pin for the pairing process.</li>
100
101
  <li><strong>Port</strong>: If you are behind a Firewall, you may want to specify a port. Cannot be 1880 as it is reserved for node-red. Otherwise, leave empty.</li>
101
- <li><strong>Advertiser</strong>: Which MDNS advertiser to use <em>ciao</em> (new, improved but not yet proved) or (good old) <em>bonjour</em>. Default <em>bonjour</em>.</li>
102
+ <li><strong>Advertiser</strong>: Which MDNS advertiser to use <em>ciao</em> (new, improved but not yet proved) or (good old) <em>bonjour</em> or experimental <em>avahi</em>. Default <em>bonjour</em>.</li>
102
103
  <li><strong>Allow Insecure Request</strong>: Should we allow insecure request? Default false.</li>
103
104
  <li><strong>Manufacturer, Model, Serial Number</strong>: Can be anything you want.</li>
104
105
  <li><strong>Firmware Revision</strong>: Should be a version number string in the form of <em>MAJOR.MINOR.REVISION</em> e.g. <em>1.2.0</em>. Other types of strings are ignored and won't be displayed.</li>
@@ -148,7 +149,7 @@
148
149
  value: 'bonjour-hap',
149
150
  required: false,
150
151
  validate: function (value) {
151
- if (value) return value === 'bonjour-hap' || value === 'ciao'
152
+ if (value) return value === 'bonjour-hap' || value === 'ciao' || value === 'avahi'
152
153
  else return true
153
154
  },
154
155
  },
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "node-red-contrib-homekit-bridged",
3
- "version": "1.5.0-dev.1",
3
+ "version": "1.5.0-dev.4",
4
4
  "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
5
  "main": "build/nodes/nrchkb.js",
6
6
  "scripts": {
7
- "build": "yarn clean && tsc",
7
+ "build": "npm run clean && tsc",
8
8
  "clean": "rimraf build/lib build/**/*.js",
9
- "test": "yarn build && mocha -r ts-node/register './src/**/*.test.[tj]s' --exit",
9
+ "test": "npm run build && mocha -r ts-node/register './src/**/*.test.[tj]s' --exit",
10
10
  "prettier": "prettier --write \"**/*.{js,ts}\"",
11
11
  "_postinstall": "husky install",
12
12
  "prepublishOnly": "pinst --disable",
@@ -33,7 +33,8 @@
33
33
  "service": "build/nodes/service.js",
34
34
  "service2": "build/nodes/service2.js",
35
35
  "status": "build/nodes/status.js"
36
- }
36
+ },
37
+ "version": ">=1.3.7"
37
38
  },
38
39
  "author": {
39
40
  "name": "Tadeusz Wyrzykowski",
@@ -47,34 +48,35 @@
47
48
  "homepage": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged#readme",
48
49
  "dependencies": {
49
50
  "@nrchkb/logger": "^1.3.3",
50
- "hap-nodejs": "^0.9.7",
51
+ "hap-nodejs": "0.10.0",
51
52
  "node-persist": "^3.1.0",
52
- "semver": "^7.3.5",
53
+ "semver": "^7.3.7",
53
54
  "uuid": "^8.3.2"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@homebridge/ciao": "^1.1.3",
57
58
  "@node-red/registry": "^1.3.7",
58
- "@types/mocha": "^9.0.0",
59
- "@types/node": "^10.17.50",
59
+ "@types/mocha": "^9.1.0",
60
+ "@types/node": "^10.17.60",
60
61
  "@types/node-persist": "^3.1.2",
61
- "@types/node-red": "^1.1.1",
62
+ "@types/node-red": "^1.2.1",
62
63
  "@types/semver": "^7.3.9",
63
- "@types/uuid": "^8.3.1",
64
- "@typescript-eslint/eslint-plugin": "^5.3.1",
65
- "@typescript-eslint/parser": "^5.3.1",
64
+ "@types/uuid": "^8.3.4",
65
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
66
+ "@typescript-eslint/parser": "^5.19.0",
66
67
  "babel-eslint": "^10.1.0",
67
- "eslint": "^8.2.0",
68
- "eslint-config-prettier": "^8.3.0",
68
+ "eslint": "^8.13.0",
69
+ "eslint-config-prettier": "^8.5.0",
69
70
  "eslint-plugin-prettier": "^4.0.0",
70
71
  "husky": "^7.0.4",
71
- "mocha": "^9.1.3",
72
- "node-red": "^1.3.7",
72
+ "mocha": "^9.2.2",
73
+ "node-red": "1.3.7",
73
74
  "node-red-node-test-helper": "^0.2.7",
74
75
  "pinst": "^2.1.6",
75
- "prettier": "^2.4.1",
76
- "ts-node": "^10.4.0",
77
- "typescript": "^4.4.4"
76
+ "prettier": "^2.6.2",
77
+ "rimraf": "^3.0.2",
78
+ "ts-node": "^10.7.0",
79
+ "typescript": "^4.6.3"
78
80
  },
79
81
  "engines": {
80
82
  "node": ">=10.22.1"