node-opcua-local-discovery-server 2.115.0 → 2.117.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.
|
@@ -30,14 +30,13 @@ const debugLog = make_debugLog("LDS");
|
|
|
30
30
|
|
|
31
31
|
async function getIpAddresses() {
|
|
32
32
|
const ipAddresses = [];
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const networkInterfaces = os.networkInterfaces();
|
|
34
|
+
for (const [interfaceName, interfaces] of Object.entries(networkInterfaces)) {
|
|
35
35
|
let alias = 0;
|
|
36
|
-
|
|
37
|
-
interfaces[interfaceName].forEach((iFace) => {
|
|
36
|
+
for (const iFace of interfaces) {
|
|
38
37
|
if ("IPv4" !== iFace.family || iFace.internal !== false) {
|
|
39
38
|
// skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses
|
|
40
|
-
|
|
39
|
+
continue;
|
|
41
40
|
}
|
|
42
41
|
if (alias >= 1) {
|
|
43
42
|
// this single interface has multiple ipv4 addresses
|
|
@@ -51,8 +50,8 @@ async function getIpAddresses() {
|
|
|
51
50
|
ipAddresses.push(iFace.address);
|
|
52
51
|
}
|
|
53
52
|
++alias;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
56
55
|
return ipAddresses;
|
|
57
56
|
}
|
|
58
57
|
const applicationUri = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-local-discovery-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.117.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module local-discovery-server",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lds": "./bin/local-discovery-server.js",
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"env-paths": "2.2.1",
|
|
31
|
-
"node-opcua": "2.
|
|
31
|
+
"node-opcua": "2.117.0",
|
|
32
|
+
"node-opcua-debug": "2.117.0",
|
|
32
33
|
"vorpal": "^1.12.0",
|
|
33
34
|
"vorpal-repl": "^1.1.8",
|
|
34
35
|
"yargs": "15.4.1"
|
|
35
36
|
},
|
|
36
37
|
"homepage": "http://node-opcua.github.io/",
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "99ed7589a203923985c25be8907b36485c798bbe",
|
|
38
39
|
"files": []
|
|
39
40
|
}
|