homebridge-lib 5.6.1-0 → 5.6.3
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/lib/OptionParser.js +1 -1
- package/lib/Platform.js +1 -4
- package/lib/SystemInfo.js +5 -3
- package/package.json +3 -3
package/lib/OptionParser.js
CHANGED
|
@@ -56,7 +56,7 @@ class OptionParser extends events.EventEmitter {
|
|
|
56
56
|
static get patterns () {
|
|
57
57
|
return Object.freeze({
|
|
58
58
|
_host: /^(?:\[(.+)\]|([^:]+))(?::([0-9]{1,5}))?$/,
|
|
59
|
-
hostname: /^[a-zA-
|
|
59
|
+
hostname: /^[a-zA-Z0-9](:?[a-zA-Z0-9-]*[a-zA-Z0-9])*(:?\.[a-zA-Z0-9](:?[a-zA-Z0-9-]*[a-zA-Z0-9])*)*$/,
|
|
60
60
|
int: /^\s*([+-]?)([0-9]+(?:\.0*)?)\s*$/,
|
|
61
61
|
intBin: /^\s*([+-]?)(?:0[bB])([01]+)\s*$/,
|
|
62
62
|
intOct: /^\s*([+-]?)(?:0[oO])([0-8]+)\s*$/,
|
package/lib/Platform.js
CHANGED
|
@@ -101,10 +101,7 @@ class Platform extends homebridgeLib.Delegate {
|
|
|
101
101
|
my: Object.freeze(my.Characteristics)
|
|
102
102
|
})
|
|
103
103
|
}
|
|
104
|
-
context[Platform.name] = {
|
|
105
|
-
packageJson: packageJson,
|
|
106
|
-
platformName: platformName
|
|
107
|
-
}
|
|
104
|
+
context[Platform.name] = { packageJson, platformName }
|
|
108
105
|
homebridge.registerPlatform(
|
|
109
106
|
packageJson.name, platformName, Platform, true
|
|
110
107
|
)
|
package/lib/SystemInfo.js
CHANGED
|
@@ -293,10 +293,12 @@ class SystemInfo extends events.EventEmitter {
|
|
|
293
293
|
'plutil', '-p',
|
|
294
294
|
process.env.HOME + '/Library/Preferences/com.apple.SystemProfiler.plist'
|
|
295
295
|
)
|
|
296
|
-
const regexp = RegExp(
|
|
296
|
+
const regexp = RegExp(
|
|
297
|
+
'"(' + id.slice(-4) + '|' + id.slice(-3) + ').*" => "(.*)"'
|
|
298
|
+
)
|
|
297
299
|
const a = regexp.exec(text)
|
|
298
|
-
if (a
|
|
299
|
-
prettyName = a[
|
|
300
|
+
if (a != null) {
|
|
301
|
+
prettyName = a[2]
|
|
300
302
|
}
|
|
301
303
|
} else { // Apple silicon
|
|
302
304
|
text = await this.execShell('ioreg -l | grep product-description')
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Library for homebridge plugins",
|
|
4
4
|
"author": "Erik Baauw",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "5.6.
|
|
6
|
+
"version": "5.6.3",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"homekit",
|
|
9
9
|
"homebridge"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"upnp": "cli/upnp.js"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"homebridge": "^1.
|
|
25
|
-
"node": "^16.
|
|
24
|
+
"homebridge": "^1.5.0",
|
|
25
|
+
"node": "^16.16.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@homebridge/plugin-ui-utils": "~0.0.19",
|