node-opcua-server 2.62.4 → 2.63.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/base_server.d.ts +1 -1
- package/dist/base_server.js.map +1 -1
- package/dist/node_sampler.js +3 -3
- package/dist/node_sampler.js.map +1 -1
- package/dist/opcua_server.d.ts +1 -1
- package/dist/opcua_server.js.map +1 -1
- package/dist/register_server_manager.js +9 -1
- package/dist/register_server_manager.js.map +1 -1
- package/dist/server_end_point.js +5 -3
- package/dist/server_end_point.js.map +1 -1
- package/dist/server_engine.js +18 -4
- package/dist/server_engine.js.map +1 -1
- package/package.json +50 -51
- package/source/base_server.ts +2 -1
- package/source/node_sampler.ts +1 -1
- package/source/opcua_server.ts +1 -1
- package/source/register_server_manager.ts +10 -1
- package/source/server_end_point.ts +5 -3
- package/source/server_engine.ts +21 -4
- package/.mocharc.yml +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.63.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -server",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -b",
|
|
@@ -12,61 +12,60 @@
|
|
|
12
12
|
"main": "./dist/index.js",
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ster5/global-mutex": "^1.
|
|
16
|
-
"@types/underscore": "^1.11.
|
|
17
|
-
"async": "^3.2.
|
|
15
|
+
"@ster5/global-mutex": "^1.2.0",
|
|
16
|
+
"@types/underscore": "^1.11.4",
|
|
17
|
+
"async": "^3.2.3",
|
|
18
18
|
"bonjour": "^3.5.0",
|
|
19
|
-
"browser-process-hrtime": "^1.0.0",
|
|
20
19
|
"dequeue": "^1.0.5",
|
|
21
20
|
"lodash": "4.17.21",
|
|
22
|
-
"node-opcua-address-space": "2.
|
|
23
|
-
"node-opcua-assert": "2.
|
|
24
|
-
"node-opcua-basic-types": "2.
|
|
25
|
-
"node-opcua-certificate-manager": "2.
|
|
26
|
-
"node-opcua-client": "2.
|
|
27
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
28
|
-
"node-opcua-common": "2.
|
|
29
|
-
"node-opcua-constants": "2.
|
|
30
|
-
"node-opcua-crypto": "^1.7.
|
|
31
|
-
"node-opcua-data-model": "2.
|
|
32
|
-
"node-opcua-data-value": "2.
|
|
33
|
-
"node-opcua-date-time": "2.
|
|
34
|
-
"node-opcua-debug": "2.
|
|
35
|
-
"node-opcua-enum": "2.
|
|
36
|
-
"node-opcua-extension-object": "2.
|
|
37
|
-
"node-opcua-factory": "2.
|
|
38
|
-
"node-opcua-hostname": "2.
|
|
39
|
-
"node-opcua-nodeid": "2.
|
|
40
|
-
"node-opcua-nodesets": "2.
|
|
41
|
-
"node-opcua-numeric-range": "2.
|
|
42
|
-
"node-opcua-object-registry": "2.
|
|
43
|
-
"node-opcua-pki": "^2.
|
|
44
|
-
"node-opcua-secure-channel": "2.
|
|
45
|
-
"node-opcua-service-browse": "2.
|
|
46
|
-
"node-opcua-service-call": "2.
|
|
47
|
-
"node-opcua-service-discovery": "2.
|
|
48
|
-
"node-opcua-service-endpoints": "2.
|
|
49
|
-
"node-opcua-service-filter": "2.
|
|
50
|
-
"node-opcua-service-history": "2.
|
|
51
|
-
"node-opcua-service-node-management": "2.
|
|
52
|
-
"node-opcua-service-query": "2.
|
|
53
|
-
"node-opcua-service-read": "2.
|
|
54
|
-
"node-opcua-service-register-node": "2.
|
|
55
|
-
"node-opcua-service-secure-channel": "2.
|
|
56
|
-
"node-opcua-service-session": "2.
|
|
57
|
-
"node-opcua-service-subscription": "2.
|
|
58
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
59
|
-
"node-opcua-service-write": "2.
|
|
60
|
-
"node-opcua-status-code": "2.
|
|
61
|
-
"node-opcua-types": "2.
|
|
62
|
-
"node-opcua-utils": "2.
|
|
63
|
-
"node-opcua-variant": "2.
|
|
21
|
+
"node-opcua-address-space": "2.63.0",
|
|
22
|
+
"node-opcua-assert": "2.63.0",
|
|
23
|
+
"node-opcua-basic-types": "2.63.0",
|
|
24
|
+
"node-opcua-certificate-manager": "2.63.0",
|
|
25
|
+
"node-opcua-client": "2.63.0",
|
|
26
|
+
"node-opcua-client-dynamic-extension-object": "2.63.0",
|
|
27
|
+
"node-opcua-common": "2.63.0",
|
|
28
|
+
"node-opcua-constants": "2.62.7",
|
|
29
|
+
"node-opcua-crypto": "^1.7.5",
|
|
30
|
+
"node-opcua-data-model": "2.63.0",
|
|
31
|
+
"node-opcua-data-value": "2.63.0",
|
|
32
|
+
"node-opcua-date-time": "2.63.0",
|
|
33
|
+
"node-opcua-debug": "2.63.0",
|
|
34
|
+
"node-opcua-enum": "2.63.0",
|
|
35
|
+
"node-opcua-extension-object": "2.63.0",
|
|
36
|
+
"node-opcua-factory": "2.63.0",
|
|
37
|
+
"node-opcua-hostname": "2.63.0",
|
|
38
|
+
"node-opcua-nodeid": "2.63.0",
|
|
39
|
+
"node-opcua-nodesets": "2.63.0",
|
|
40
|
+
"node-opcua-numeric-range": "2.63.0",
|
|
41
|
+
"node-opcua-object-registry": "2.63.0",
|
|
42
|
+
"node-opcua-pki": "^2.13.0",
|
|
43
|
+
"node-opcua-secure-channel": "2.63.0",
|
|
44
|
+
"node-opcua-service-browse": "2.63.0",
|
|
45
|
+
"node-opcua-service-call": "2.63.0",
|
|
46
|
+
"node-opcua-service-discovery": "2.63.0",
|
|
47
|
+
"node-opcua-service-endpoints": "2.63.0",
|
|
48
|
+
"node-opcua-service-filter": "2.63.0",
|
|
49
|
+
"node-opcua-service-history": "2.63.0",
|
|
50
|
+
"node-opcua-service-node-management": "2.63.0",
|
|
51
|
+
"node-opcua-service-query": "2.63.0",
|
|
52
|
+
"node-opcua-service-read": "2.63.0",
|
|
53
|
+
"node-opcua-service-register-node": "2.63.0",
|
|
54
|
+
"node-opcua-service-secure-channel": "2.63.0",
|
|
55
|
+
"node-opcua-service-session": "2.63.0",
|
|
56
|
+
"node-opcua-service-subscription": "2.63.0",
|
|
57
|
+
"node-opcua-service-translate-browse-path": "2.63.0",
|
|
58
|
+
"node-opcua-service-write": "2.63.0",
|
|
59
|
+
"node-opcua-status-code": "2.63.0",
|
|
60
|
+
"node-opcua-types": "2.63.0",
|
|
61
|
+
"node-opcua-utils": "2.63.0",
|
|
62
|
+
"node-opcua-variant": "2.63.0"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
|
-
"node-opcua-data-access": "2.
|
|
67
|
-
"node-opcua-leak-detector": "2.
|
|
65
|
+
"node-opcua-data-access": "2.63.0",
|
|
66
|
+
"node-opcua-leak-detector": "2.63.0",
|
|
68
67
|
"node-opcua-test-helpers": "2.42.0",
|
|
69
|
-
"node-opcua-transport": "2.
|
|
68
|
+
"node-opcua-transport": "2.63.0",
|
|
70
69
|
"should": "^13.2.3",
|
|
71
70
|
"sinon": "^12.0.1"
|
|
72
71
|
},
|
|
@@ -85,5 +84,5 @@
|
|
|
85
84
|
"internet of things"
|
|
86
85
|
],
|
|
87
86
|
"homepage": "http://node-opcua.github.io/",
|
|
88
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "df4335584455009c6caa21ed6a2fa42caa9104ed"
|
|
89
88
|
}
|
package/source/base_server.ts
CHANGED
|
@@ -209,7 +209,8 @@ export class OPCUABaseServer extends OPCUASecureObject {
|
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
|
|
213
|
+
public async initializeCM(): Promise<void> {
|
|
213
214
|
await this.serverCertificateManager.initialize();
|
|
214
215
|
await this.createDefaultCertificate();
|
|
215
216
|
debugLog("privateKey = ", this.privateKeyFile, this.serverCertificateManager.privateKey);
|
package/source/node_sampler.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
5
|
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
6
|
-
import hrtime
|
|
6
|
+
import { hrtime } from "node-opcua-utils";
|
|
7
7
|
|
|
8
8
|
const debugLog = make_debugLog(__filename);
|
|
9
9
|
const doDebug = checkDebugFlag(__filename);
|
package/source/opcua_server.ts
CHANGED
|
@@ -3530,7 +3530,7 @@ export class OPCUAServer extends OPCUABaseServer {
|
|
|
3530
3530
|
return endPoint;
|
|
3531
3531
|
}
|
|
3532
3532
|
|
|
3533
|
-
|
|
3533
|
+
public async initializeCM(): Promise<void> {
|
|
3534
3534
|
await super.initializeCM();
|
|
3535
3535
|
await this.userCertificateManager.initialize();
|
|
3536
3536
|
}
|
|
@@ -321,6 +321,12 @@ export class RegisterServerManager extends EventEmitter implements IRegisterServ
|
|
|
321
321
|
this.server = null;
|
|
322
322
|
debugLog("RegisterServerManager#dispose", this.state.toString());
|
|
323
323
|
assert(this.state === RegisterServerManagerStatus.INACTIVE);
|
|
324
|
+
|
|
325
|
+
if (this._registrationTimerId) {
|
|
326
|
+
clearTimeout(this._registrationTimerId);
|
|
327
|
+
this._registrationTimerId = null;
|
|
328
|
+
}
|
|
329
|
+
|
|
324
330
|
assert(this._registrationTimerId === null, "stop has not been called");
|
|
325
331
|
this.removeAllListeners();
|
|
326
332
|
}
|
|
@@ -631,7 +637,10 @@ export class RegisterServerManager extends EventEmitter implements IRegisterServ
|
|
|
631
637
|
warningLog(`Warning the server is already in the ${RegisterServerManagerStatus[theStatus]} state`);
|
|
632
638
|
return outer_callback();
|
|
633
639
|
}
|
|
634
|
-
|
|
640
|
+
if (!(this.state === RegisterServerManagerStatus.INITIALIZING || this.state === RegisterServerManagerStatus.WAITING)) {
|
|
641
|
+
warningLog("Warning : cannot register server - wrong state " , RegisterServerManagerStatus[this.state]);
|
|
642
|
+
return outer_callback();
|
|
643
|
+
};
|
|
635
644
|
|
|
636
645
|
this._setState(theStatus);
|
|
637
646
|
|
|
@@ -893,10 +893,12 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
|
|
|
893
893
|
});
|
|
894
894
|
if (unused_channels.length === 0) {
|
|
895
895
|
// all channels are in used , we cannot get any
|
|
896
|
-
errorLog("All
|
|
896
|
+
errorLog("All channels are in used ! let cancel some");
|
|
897
897
|
// istanbul ignore next
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
if (doDebug) {
|
|
899
|
+
console.log(" - all channels are used !!!!");
|
|
900
|
+
dumpChannelInfo(this.getChannels());
|
|
901
|
+
}
|
|
900
902
|
setTimeout(deny_connection, 10);
|
|
901
903
|
return;
|
|
902
904
|
}
|
package/source/server_engine.ts
CHANGED
|
@@ -340,11 +340,28 @@ export class ServerEngine extends EventEmitter {
|
|
|
340
340
|
|
|
341
341
|
// --------------------------------------------------- ServerCapabilities
|
|
342
342
|
options.serverCapabilities = options.serverCapabilities || {};
|
|
343
|
+
|
|
344
|
+
// https://profiles.opcfoundation.org/profile
|
|
343
345
|
options.serverCapabilities.serverProfileArray = options.serverCapabilities.serverProfileArray || [
|
|
344
|
-
"Standard UA Server Profile",
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
"
|
|
346
|
+
"http://opcfoundation.org/UA-Profile/Server/Standard", // Standard UA Server Profile",
|
|
347
|
+
"http://opcfoundation.org/UA-Profile/Server/DataAccess",
|
|
348
|
+
"http://opcfoundation.org/UA-Profile/Server/Events",
|
|
349
|
+
"http://opcfoundation.org/UA-Profile/Client/HistoricalAccess",
|
|
350
|
+
"http://opcfoundation.org/UA-Profile/Server/Methods",
|
|
351
|
+
"http://opcfoundation.org/UA-Profile/Server/StandardEventSubscription",
|
|
352
|
+
"http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary",
|
|
353
|
+
"http://opcfoundation.org/UA-Profile/Server/FileAccess",
|
|
354
|
+
"http://opcfoundation.org/UA-Profile/Server/StateMachine"
|
|
355
|
+
// "http://opcfoundation.org/UA-Profile/Transport/wss-uajson",
|
|
356
|
+
// "http://opcfoundation.org/UA-Profile/Transport/wss-uasc-uabinary"
|
|
357
|
+
// "http://opcfoundation.org/UA-Profile/Server/DurableSubscription"
|
|
358
|
+
|
|
359
|
+
// "http://opcfoundation.org/UA-Profile/Server/ReverseConnect",
|
|
360
|
+
// "http://opcfoundation.org/UAProfile/Server/NodeManagement",
|
|
361
|
+
|
|
362
|
+
// "Embedded UA Server Profile",
|
|
363
|
+
// "Micro Embedded Device Server Profile",
|
|
364
|
+
// "Nano Embedded Device Server Profile"
|
|
348
365
|
];
|
|
349
366
|
options.serverCapabilities.localeIdArray = options.serverCapabilities.localeIdArray || ["en-EN", "fr-FR"];
|
|
350
367
|
|