hap-nodejs 1.0.0-alpha.10 → 1.0.0-alpha.12

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.
@@ -11,7 +11,7 @@ function checkName(displayName, name, value) {
11
11
  var validHK = /^[a-zA-Z0-9\s'-.]+$/; // Ensure only letters, numbers, spaces, apostrophes, or dashes
12
12
  var startWith = /^[a-zA-Z0-9]/; // Ensure only letters or numbers are at the beginning of the string
13
13
  var endWith = /[a-zA-Z0-9]$/; // Ensure only letters or numbers are at the end of the string
14
- if (!validHK.test(value) || !startWith.test(value) || !endWith.test(value)) {
14
+ if (typeof value !== "string" || !validHK.test(value) || !startWith.test(value) || !endWith.test(value)) {
15
15
  console.warn("HAP-NodeJS WARNING: The accessory '" + displayName + "' is getting published with the characteristic '" +
16
16
  name + "'" + " not following HomeKit naming rules ('" + value + "'). " +
17
17
  "Use only alphanumeric, space, and apostrophe characters, start and end with an alphabetic or numeric character, and don't include emojis. " +
@@ -1 +1 @@
1
- {"version":3,"file":"checkName.js","sourceRoot":"","sources":["../../../src/lib/util/checkName.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAGH,8BAWC;AAZD,iHAAiH;AACjH,SAAgB,SAAS,CAAC,WAAmB,EAAE,IAAY,EAAE,KAAU;IACrE,IAAM,OAAO,GAAG,qBAAqB,CAAC,CAAG,+DAA+D;IACxG,IAAM,SAAS,GAAG,cAAc,CAAC,CAAO,oEAAoE;IAC5G,IAAM,OAAO,GAAG,cAAc,CAAC,CAAS,8DAA8D;IAEtG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3E,OAAO,CAAC,IAAI,CAAC,qCAAqC,GAAG,WAAW,GAAG,kDAAkD;YACnH,IAAI,GAAG,GAAG,GAAG,wCAAwC,GAAG,KAAK,GAAG,MAAM;YACtE,4IAA4I;YAC5I,mHAAmH,CAAC,CAAC;IACzH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"checkName.js","sourceRoot":"","sources":["../../../src/lib/util/checkName.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAGH,8BAWC;AAZD,iHAAiH;AACjH,SAAgB,SAAS,CAAC,WAAmB,EAAE,IAAY,EAAE,KAAU;IACrE,IAAM,OAAO,GAAG,qBAAqB,CAAC,CAAG,+DAA+D;IACxG,IAAM,SAAS,GAAG,cAAc,CAAC,CAAQ,oEAAoE;IAC7G,IAAM,OAAO,GAAG,cAAc,CAAC,CAAU,8DAA8D;IAEvG,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACxG,OAAO,CAAC,IAAI,CAAC,qCAAqC,GAAG,WAAW,GAAG,kDAAkD;YACnH,IAAI,GAAG,GAAG,GAAG,wCAAwC,GAAG,KAAK,GAAG,MAAM;YACtE,4IAA4I;YAC5I,mHAAmH,CAAC,CAAC;IACzH,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hap-nodejs",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.12",
4
4
  "description": "HAP-NodeJS is a Node.js implementation of HomeKit Accessory Server.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",