bonjour-hap 3.7.3 → 3.8.0
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/README.md +13 -5
- package/lib/Registry.js +2 -2
- package/lib/Server.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://homebridge.io"><img src="https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png" height="140"></a>
|
|
3
|
+
</p>
|
|
4
|
+
<span align="center">
|
|
5
|
+
|
|
1
6
|
# bonjour-hap
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
<a href="https://www.npmjs.com/package/bonjour-hap"><img title="npm version" src="https://badgen.net/npm/v/bonjour-hap" ></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/bonjour-hap/v/beta"><img title="npm version beta" src="https://badgen.net/npm/v/bonjour-hap/beta" ></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/bonjour-hap"><img title="npm downloads" src="https://badgen.net/npm/dt/bonjour-hap" ></a>
|
|
11
|
+
<a href="https://github.com/homebridge/bonjour/actions/workflows/build.yml"><img title="Node Build" src="https://github.com/homebridge/bonjour/actions/workflows/build.yml/badge.svg" ></a>
|
|
12
|
+
<a href='https://coveralls.io/github/homebridge/bonjour?branch=latest'><img src='https://coveralls.io/repos/github/homebridge/bonjour/badge.svg?branch=latest' alt='Coverage Status' /></a>
|
|
13
|
+
|
|
14
|
+
</span>
|
|
7
15
|
|
|
8
16
|
A Bonjour/Zeroconf protocol implementation in pure JavaScript. Publish
|
|
9
17
|
services on the local network or discover existing services using
|
package/lib/Registry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const flatten = require('array-flatten')
|
|
3
|
+
const flatten = require('array-flatten').flatten
|
|
4
4
|
const Service = require('./Service.js')
|
|
5
5
|
const Prober = require('./Prober.js')
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ Registry.prototype = {
|
|
|
45
45
|
return service._activated // ignore services not currently starting or started
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
const records = flatten
|
|
48
|
+
const records = flatten(services.map(function (service) {
|
|
49
49
|
service.deactivate()
|
|
50
50
|
const records = service._records(true)
|
|
51
51
|
records.forEach(function (record) {
|
package/lib/Server.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const multicastdns = require('multicast-dns')
|
|
4
4
|
const dnsEqual = require('./utils/dnsEqual')
|
|
5
|
-
const flatten = require('array-flatten')
|
|
5
|
+
const flatten = require('array-flatten').flatten
|
|
6
6
|
const helpers = require('./helpers.js')
|
|
7
7
|
|
|
8
8
|
const Server = function (opts) {
|
|
@@ -22,7 +22,7 @@ Server.prototype = {
|
|
|
22
22
|
|
|
23
23
|
// generate the answers section
|
|
24
24
|
const answers = type === 'ANY'
|
|
25
|
-
? flatten
|
|
25
|
+
? flatten(Object.keys(this.registry).map(this._recordsFor.bind(this, name)), 1)
|
|
26
26
|
: this._recordsFor(name, type)
|
|
27
27
|
|
|
28
28
|
if (answers.length === 0) return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bonjour-hap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "A Bonjour/Zeroconf implementation in pure JavaScript (for HAP)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"array-flatten": "^
|
|
43
|
+
"array-flatten": "^3.0.0",
|
|
44
44
|
"deep-equal": "^2.2.3",
|
|
45
45
|
"multicast-dns": "^7.2.5",
|
|
46
46
|
"multicast-dns-service-types": "^1.1.0"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"after-all": "^2.0.2",
|
|
50
50
|
"standard": "^17.1.0",
|
|
51
51
|
"tape": "^5.8.1",
|
|
52
|
-
"nyc": "^
|
|
52
|
+
"nyc": "^17.0.0",
|
|
53
53
|
"rimraf": "^5.0.7"
|
|
54
54
|
}
|
|
55
55
|
}
|