node-opcua-server-discovery 2.111.0 → 2.113.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/dist/mdns_responder.js +6 -9
- package/dist/mdns_responder.js.map +1 -1
- package/package.json +11 -11
- package/source/mdns_responder.ts +10 -11
package/dist/mdns_responder.js
CHANGED
|
@@ -27,9 +27,8 @@ class MDNSResponder {
|
|
|
27
27
|
return index;
|
|
28
28
|
};
|
|
29
29
|
const addService = (service) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
30
|
+
// istanbul ignore next
|
|
31
|
+
doDebug && debugLog("adding server ", service.name, "port =", service.port);
|
|
33
32
|
// example:
|
|
34
33
|
// {
|
|
35
34
|
// addresses: [ '172.18.207.145', 'fe80::d4e3:352c:9f8b:d0db' ],
|
|
@@ -88,15 +87,13 @@ class MDNSResponder {
|
|
|
88
87
|
this.lastUpdateDate = new Date();
|
|
89
88
|
};
|
|
90
89
|
this.browser.on("up", (service) => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
90
|
+
// istanbul ignore next
|
|
91
|
+
doDebug && debugLog("MDNSResponder : service is up with ", (0, node_opcua_service_discovery_1.serviceToString)(service));
|
|
94
92
|
addService(service);
|
|
95
93
|
});
|
|
96
94
|
this.browser.on("down", (service) => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
95
|
+
// istanbul ignore next
|
|
96
|
+
doDebug && debugLog("MDNSResponder : service is down with ", (0, node_opcua_service_discovery_1.serviceToString)(service));
|
|
100
97
|
removeService(service);
|
|
101
98
|
});
|
|
102
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdns_responder.js","sourceRoot":"","sources":["../source/mdns_responder.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,uEAAqE;AACrE,uDAAiE;AACjE,2EAA4D;AAC5D,+
|
|
1
|
+
{"version":3,"file":"mdns_responder.js","sourceRo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AAxHD,sCAwHC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-server-discovery",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.113.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module server-discovery",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -b",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"chalk": "4.1.2",
|
|
14
14
|
"env-paths": "2.2.1",
|
|
15
15
|
"node-opcua-assert": "2.105.0",
|
|
16
|
-
"node-opcua-basic-types": "2.
|
|
17
|
-
"node-opcua-certificate-manager": "2.
|
|
18
|
-
"node-opcua-common": "2.
|
|
19
|
-
"node-opcua-debug": "2.
|
|
16
|
+
"node-opcua-basic-types": "2.113.0",
|
|
17
|
+
"node-opcua-certificate-manager": "2.113.0",
|
|
18
|
+
"node-opcua-common": "2.113.0",
|
|
19
|
+
"node-opcua-debug": "2.113.0",
|
|
20
20
|
"node-opcua-hostname": "2.105.0",
|
|
21
|
-
"node-opcua-object-registry": "2.
|
|
22
|
-
"node-opcua-secure-channel": "2.
|
|
23
|
-
"node-opcua-server": "2.
|
|
24
|
-
"node-opcua-service-discovery": "2.
|
|
25
|
-
"node-opcua-service-endpoints": "2.
|
|
21
|
+
"node-opcua-object-registry": "2.113.0",
|
|
22
|
+
"node-opcua-secure-channel": "2.113.0",
|
|
23
|
+
"node-opcua-server": "2.113.0",
|
|
24
|
+
"node-opcua-service-discovery": "2.113.0",
|
|
25
|
+
"node-opcua-service-endpoints": "2.113.0",
|
|
26
26
|
"node-opcua-status-code": "2.110.0",
|
|
27
27
|
"sterfive-bonjour-service": "1.1.4",
|
|
28
28
|
"thenify": "^3.3.1"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"internet of things"
|
|
43
43
|
],
|
|
44
44
|
"homepage": "http://node-opcua.github.io/",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "36db335391fedd39726990a1b37f7768da16466a",
|
|
46
46
|
"files": [
|
|
47
47
|
"dist",
|
|
48
48
|
"source"
|
package/source/mdns_responder.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Service, Bonjour, Browser } from "sterfive-bonjour-service";
|
|
5
5
|
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
6
6
|
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
7
|
-
import {
|
|
7
|
+
import { ServerOnNetwork, serviceToString } from "node-opcua-service-discovery";
|
|
8
8
|
|
|
9
9
|
const debugLog = make_debugLog(__filename);
|
|
10
10
|
const doDebug = checkDebugFlag(__filename) || true;
|
|
@@ -28,7 +28,7 @@ export class MDNSResponder {
|
|
|
28
28
|
|
|
29
29
|
this.registeredServers = [];
|
|
30
30
|
|
|
31
|
-
this.multicastDNS = new Bonjour();
|
|
31
|
+
this.multicastDNS = new Bonjour();
|
|
32
32
|
this.recordId = 0;
|
|
33
33
|
|
|
34
34
|
this.browser = this.multicastDNS.find({
|
|
@@ -42,9 +42,9 @@ export class MDNSResponder {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const addService = (service: Service) => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
// istanbul ignore next
|
|
46
|
+
doDebug && debugLog("adding server ", service.name, "port =", service.port);
|
|
47
|
+
|
|
48
48
|
// example:
|
|
49
49
|
// {
|
|
50
50
|
// addresses: [ '172.18.207.145', 'fe80::d4e3:352c:9f8b:d0db' ],
|
|
@@ -113,16 +113,15 @@ export class MDNSResponder {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
this.browser.on("up", (service: Service) => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
116
|
+
// istanbul ignore next
|
|
117
|
+
doDebug && debugLog("MDNSResponder : service is up with ", serviceToString(service));
|
|
119
118
|
addService(service);
|
|
120
119
|
});
|
|
121
120
|
|
|
122
121
|
this.browser.on("down", (service: Service) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
// istanbul ignore next
|
|
123
|
+
doDebug && debugLog("MDNSResponder : service is down with ", serviceToString(service));
|
|
124
|
+
|
|
126
125
|
removeService(service);
|
|
127
126
|
});
|
|
128
127
|
}
|