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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-server",
3
- "version": "2.62.4",
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.1.1",
16
- "@types/underscore": "^1.11.3",
17
- "async": "^3.2.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.62.4",
23
- "node-opcua-assert": "2.55.0",
24
- "node-opcua-basic-types": "2.62.4",
25
- "node-opcua-certificate-manager": "2.62.4",
26
- "node-opcua-client": "2.62.4",
27
- "node-opcua-client-dynamic-extension-object": "2.62.4",
28
- "node-opcua-common": "2.62.4",
29
- "node-opcua-constants": "2.52.0",
30
- "node-opcua-crypto": "^1.7.4",
31
- "node-opcua-data-model": "2.62.4",
32
- "node-opcua-data-value": "2.62.4",
33
- "node-opcua-date-time": "2.62.4",
34
- "node-opcua-debug": "2.62.4",
35
- "node-opcua-enum": "2.55.0",
36
- "node-opcua-extension-object": "2.62.4",
37
- "node-opcua-factory": "2.62.4",
38
- "node-opcua-hostname": "2.55.0",
39
- "node-opcua-nodeid": "2.62.4",
40
- "node-opcua-nodesets": "2.57.0",
41
- "node-opcua-numeric-range": "2.62.4",
42
- "node-opcua-object-registry": "2.62.4",
43
- "node-opcua-pki": "^2.12.1",
44
- "node-opcua-secure-channel": "2.62.4",
45
- "node-opcua-service-browse": "2.62.4",
46
- "node-opcua-service-call": "2.62.4",
47
- "node-opcua-service-discovery": "2.62.4",
48
- "node-opcua-service-endpoints": "2.62.4",
49
- "node-opcua-service-filter": "2.62.4",
50
- "node-opcua-service-history": "2.62.4",
51
- "node-opcua-service-node-management": "2.62.4",
52
- "node-opcua-service-query": "2.62.4",
53
- "node-opcua-service-read": "2.62.4",
54
- "node-opcua-service-register-node": "2.62.4",
55
- "node-opcua-service-secure-channel": "2.62.4",
56
- "node-opcua-service-session": "2.62.4",
57
- "node-opcua-service-subscription": "2.62.4",
58
- "node-opcua-service-translate-browse-path": "2.62.4",
59
- "node-opcua-service-write": "2.62.4",
60
- "node-opcua-status-code": "2.56.0",
61
- "node-opcua-types": "2.62.4",
62
- "node-opcua-utils": "2.60.0",
63
- "node-opcua-variant": "2.62.4"
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.62.4",
67
- "node-opcua-leak-detector": "2.62.4",
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.62.4",
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": "b4cb2b2e4ce2b141614dbcb02a3e385c747ac1a1"
87
+ "gitHead": "df4335584455009c6caa21ed6a2fa42caa9104ed"
89
88
  }
@@ -209,7 +209,8 @@ export class OPCUABaseServer extends OPCUASecureObject {
209
209
  }
210
210
  });
211
211
  }
212
- protected async initializeCM(): Promise<void> {
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);
@@ -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 = require("browser-process-hrtime");
6
+ import { hrtime } from "node-opcua-utils";
7
7
 
8
8
  const debugLog = make_debugLog(__filename);
9
9
  const doDebug = checkDebugFlag(__filename);
@@ -3530,7 +3530,7 @@ export class OPCUAServer extends OPCUABaseServer {
3530
3530
  return endPoint;
3531
3531
  }
3532
3532
 
3533
- protected async initializeCM(): Promise<void> {
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
- assert(this.state === RegisterServerManagerStatus.INITIALIZING || this.state === RegisterServerManagerStatus.WAITING);
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 Channel are in used ! let cancel this one");
896
+ errorLog("All channels are in used ! let cancel some");
897
897
  // istanbul ignore next
898
- console.log(" - all channel are used !!!!");
899
- dumpChannelInfo(this.getChannels());
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
  }
@@ -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
- "Embedded UA Server Profile",
346
- "Micro Embedded Device Server Profile",
347
- "Nano Embedded Device Server Profile"
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
 
package/.mocharc.yml DELETED
@@ -1,10 +0,0 @@
1
- require:
2
- - ../../node_modules/source-map-support/register
3
- - ../../node_modules/ts-node/register
4
- - ../../node_modules/should
5
- timeout: 60000
6
- extension:
7
- - ts
8
- - js
9
- bail: true
10
- parallel: true