node-opcua-client 2.97.0 → 2.98.1

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.
Files changed (78) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +49 -49
  2. package/dist/alarms_and_conditions/client_alarm.js +109 -109
  3. package/dist/alarms_and_conditions/client_alarm_list.d.ts +25 -25
  4. package/dist/alarms_and_conditions/client_alarm_list.js +97 -97
  5. package/dist/alarms_and_conditions/client_alarm_tools.d.ts +4 -4
  6. package/dist/alarms_and_conditions/client_alarm_tools.js +156 -156
  7. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +18 -18
  8. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +192 -192
  9. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +9 -9
  10. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +72 -72
  11. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js.map +1 -1
  12. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +3 -3
  13. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +118 -118
  14. package/dist/alarms_and_conditions/client_tools.d.ts +7 -7
  15. package/dist/alarms_and_conditions/client_tools.js +179 -179
  16. package/dist/client_base.d.ts +277 -277
  17. package/dist/client_base.js +14 -14
  18. package/dist/client_base.js.map +1 -1
  19. package/dist/client_monitored_item.d.ts +21 -21
  20. package/dist/client_monitored_item.js +11 -11
  21. package/dist/client_monitored_item_base.d.ts +39 -39
  22. package/dist/client_monitored_item_base.js +2 -2
  23. package/dist/client_monitored_item_group.d.ts +21 -21
  24. package/dist/client_monitored_item_group.js +13 -13
  25. package/dist/client_monitored_item_toolbox.d.ts +15 -15
  26. package/dist/client_monitored_item_toolbox.js +116 -116
  27. package/dist/client_session.d.ts +529 -529
  28. package/dist/client_session.js +10 -10
  29. package/dist/client_session_keepalive_manager.d.ts +34 -34
  30. package/dist/client_session_keepalive_manager.js +149 -149
  31. package/dist/client_subscription.d.ts +241 -241
  32. package/dist/client_subscription.js +14 -14
  33. package/dist/client_subscription.js.map +1 -1
  34. package/dist/client_utils.d.ts +22 -22
  35. package/dist/client_utils.js +87 -87
  36. package/dist/common.d.ts +17 -17
  37. package/dist/common.js +5 -5
  38. package/dist/index.d.ts +56 -56
  39. package/dist/index.js +94 -94
  40. package/dist/opcua_client.d.ts +118 -118
  41. package/dist/opcua_client.js +33 -33
  42. package/dist/private/client_base_impl.d.ts +160 -160
  43. package/dist/private/client_base_impl.js +1348 -1348
  44. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  45. package/dist/private/client_monitored_item_base_impl.js +4 -4
  46. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  47. package/dist/private/client_monitored_item_group_impl.js +159 -159
  48. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  49. package/dist/private/client_monitored_item_impl.js +304 -304
  50. package/dist/private/client_publish_engine.d.ts +62 -62
  51. package/dist/private/client_publish_engine.js +408 -408
  52. package/dist/private/client_publish_engine.js.map +1 -1
  53. package/dist/private/client_session_impl.d.ts +631 -631
  54. package/dist/private/client_session_impl.js +1348 -1348
  55. package/dist/private/client_subscription_impl.d.ts +93 -93
  56. package/dist/private/client_subscription_impl.js +763 -763
  57. package/dist/private/i_private_client.d.ts +21 -21
  58. package/dist/private/i_private_client.js +2 -2
  59. package/dist/private/opcua_client_impl.d.ts +166 -166
  60. package/dist/private/opcua_client_impl.js +1000 -1000
  61. package/dist/private/opcua_client_impl.js.map +1 -1
  62. package/dist/private/performance.d.ts +1 -1
  63. package/dist/private/performance.js +18 -18
  64. package/dist/reconnection.d.ts +9 -9
  65. package/dist/reconnection.js +381 -381
  66. package/dist/tools/findservers.d.ts +20 -20
  67. package/dist/tools/findservers.js +61 -61
  68. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  69. package/dist/tools/read_history_server_capabilities.js +98 -98
  70. package/dist/user_identity_info.d.ts +1 -1
  71. package/dist/user_identity_info.js +2 -2
  72. package/dist/verify.d.ts +5 -5
  73. package/dist/verify.js +134 -134
  74. package/package.json +49 -45
  75. package/source/alarms_and_conditions/client_alarm_tools_dump_event.ts +1 -1
  76. package/.nycrc.json +0 -14
  77. package/test_helpers/create_certificates.js +0 -1
  78. package/typedoc.js +0 -20
package/dist/verify.js CHANGED
@@ -1,135 +1,135 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.performCertificateSanityCheck = exports.verifyIsOPCUAValidCertificate = void 0;
13
- const node_opcua_crypto_1 = require("node-opcua-crypto");
14
- const node_opcua_debug_1 = require("node-opcua-debug");
15
- const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
16
- const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
17
- const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
18
- const warningLog = (0, node_opcua_debug_1.make_warningLog)(__filename);
19
- function verifyIsOPCUAValidCertificate(certificate, certificateFile, type, applicationUri) {
20
- var _a, _b, _c, _d, _e;
21
- const certificateInfo = (0, node_opcua_crypto_1.exploreCertificate)(certificate);
22
- const now = new Date();
23
- if (certificateInfo.tbsCertificate.validity.notBefore.getTime() > now.getTime()) {
24
- // check that certificate is active
25
- // certificate is not active yet
26
- warningLog(`[NODE-OPCUA-W02] The certificate is not active yet\n` +
27
- `notBefore ${certificateInfo.tbsCertificate.validity.notBefore.toISOString()}\n` +
28
- `certificateFile ${certificateFile}`);
29
- }
30
- // check that certificate has not expired
31
- if (certificateInfo.tbsCertificate.validity.notAfter.getTime() <= now.getTime()) {
32
- // certificate is obsolete
33
- warningLog(`[NODE-OPCUA-W03] The certificate has expired\n` +
34
- `Please regenerate a valid certificate\n` +
35
- `notAfter = ${certificateInfo.tbsCertificate.validity.notAfter.toISOString()}\n` +
36
- `certificateFile= ${certificateFile}`);
37
- }
38
- else {
39
- const tenDays = 10 * 24 * 60 * 60 * 1000;
40
- if (certificateInfo.tbsCertificate.validity.notAfter.getTime() <= now.getTime() + tenDays) {
41
- // certificate is going to expired very soon
42
- warningLog(`[NODE-OPCUA-W05] The certificate is about to expire in less than 10 days.\n` +
43
- `Please regenerate a valid certificate as soon as possible\n` +
44
- `notAfter = ${certificateInfo.tbsCertificate.validity.notAfter.toISOString()}\n` +
45
- `certificateFile= ${certificateFile}\n`);
46
- }
47
- }
48
- // check that server certificate matches Application URI
49
- const uniformResourceIdentifier = (_c = (_b = (_a = certificateInfo === null || certificateInfo === void 0 ? void 0 : certificateInfo.tbsCertificate) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.subjectAltName) === null || _c === void 0 ? void 0 : _c.uniformResourceIdentifier;
50
- if (!uniformResourceIdentifier) {
51
- warningLog(`[NODE-OPCUA-W14] The certificate subjectAltName uniformResourceIdentifier is missing.\n` +
52
- `Please regenerate a specific certificate with a uniformResourceIdentifier that matches your ${type} applicationUri\n` +
53
- `applicationUri = ${applicationUri}\n` +
54
- `certificateFile = ${certificateFile}\n`);
55
- return;
56
- }
57
- else if (uniformResourceIdentifier[0] !== applicationUri) {
58
- warningLog(`[NODE-OPCUA-W06] The certificate subjectAltName does not match the ${type} applicationUri\n` +
59
- `Please regenerate a specific certificate that matches your ${type} applicationUri\n` +
60
- `certificate subjectAltName = ${uniformResourceIdentifier[0]}\n` +
61
- `${type} applicationUri = ${applicationUri}\n` +
62
- `certificateFile = ${certificateFile}\n`);
63
- }
64
- const keyUsage = (_d = certificateInfo.tbsCertificate.extensions) === null || _d === void 0 ? void 0 : _d.keyUsage;
65
- if (!keyUsage) {
66
- warningLog(`[NODE-OPCUA-W15] The certificate keyUsage is missing\n` + `certificateFile = ${certificateFile}`);
67
- }
68
- else {
69
- // spec says that certificate shall include digitalSignature, nonRepudiation, keyEncipherment and dataEncipherment.
70
- // Other key uses are allowed.
71
- if (!keyUsage.digitalSignature || !keyUsage.nonRepudiation || !keyUsage.keyEncipherment || !keyUsage.dataEncipherment) {
72
- warningLog(`[NODE-OPCUA-W16] The certificate keyUsage must include digitalSignature, nonRepudiation, keyEncipherment and dataEncipherment.\n` +
73
- `see https://reference.opcfoundation.org/v104/Core/docs/Part6/6.2.2/\n` +
74
- `certificateFile = ${certificateFile}`);
75
- }
76
- }
77
- const extKeyUsage = (_e = certificateInfo.tbsCertificate.extensions) === null || _e === void 0 ? void 0 : _e.extKeyUsage;
78
- if (!extKeyUsage) {
79
- warningLog(`[NODE-OPCUA-W17] The certificate extKeyUsage is missing\n` + `certificateFile = ${certificateFile}`);
80
- }
81
- else {
82
- // spec says that certificate shall include digitalSignature, nonRepudiation, keyEncipherment and dataEncipherment.
83
- // Other key uses are allowed.
84
- if (!extKeyUsage.clientAuth && !extKeyUsage.serverAuth) {
85
- warningLog(`[NODE-OPCUA-W18] The certificate extKeyUsage must include clientAuth and/or serverAuth.\n` +
86
- `see https://reference.opcfoundation.org/v104/Core/docs/Part6/6.2.2/\n` +
87
- `certificateFile = ${certificateFile}`);
88
- }
89
- }
90
- const keyLengthInBits = certificateInfo.tbsCertificate.subjectPublicKeyInfo.keyLength * 8;
91
- if (keyLengthInBits < 1024) {
92
- errorLog(`[NODE-OPCUA-W19] The public key length shall be greater than or equal to 1024 bits. key length is ${keyLengthInBits}.\n` +
93
- `see https://reference.opcfoundation.org/v104/GDS/docs/7.6.3/\n` +
94
- `certificateFile = ${certificateFile}`);
95
- }
96
- else if (keyLengthInBits < 2048) {
97
- warningLog(`[NODE-OPCUA-W23] key lengths less than 2048 are considered insecure. key length is ${keyLengthInBits}\n` +
98
- `see https://reference.opcfoundation.org/v104/Core/docs/Part2/6.8/\n` +
99
- `certificateFile = ${certificateFile}`);
100
- }
101
- }
102
- exports.verifyIsOPCUAValidCertificate = verifyIsOPCUAValidCertificate;
103
- function performCertificateSanityCheck(serverOrClient, certificateManager, applicationUri) {
104
- return __awaiter(this, void 0, void 0, function* () {
105
- // verify that certificate is matching private key, and inform the developper if not
106
- const certificate = this.getCertificate();
107
- const privateKey = this.getPrivateKey();
108
- //
109
- if (!(0, node_opcua_crypto_1.publicKeyAndPrivateKeyMatches)(certificate, privateKey)) {
110
- errorLog("[NODE-OPCUA-E01] Configuration error : the certificate and the private key do not match !");
111
- errorLog(" please check the configuration of the OPCUA Server");
112
- errorLog(" privateKey= ", this.privateKeyFile);
113
- errorLog(" certificateManager.privateKey= ", certificateManager.privateKey);
114
- errorLog(" certificateFile= ", this.certificateFile);
115
- throw new Error("[NODE-OPCUA-E01] Configuration error : the certificate and the private key do not match ! please fix your configuration");
116
- }
117
- // verify that the certificate provided has the right key length ( at least 2048)
118
- const privateKeyInfo = (0, node_opcua_crypto_1.explorePrivateKey)(privateKey);
119
- const keyLengthInBits = privateKeyInfo.modulus.length * 8;
120
- if (keyLengthInBits <= 1024) {
121
- warningLog(`[NODE-OPCUA-W04] The public/private key pair uses a key length which is equal or lower than 1024 bits. ( key length was ${keyLengthInBits} )\n` +
122
- `OPCUA version 1.04 requires that security key length are greater or equal to 2048 bits.\n` +
123
- `The ${serverOrClient} is operating at risk. `);
124
- }
125
- // verify that the certificate has a valid date and has expected extensions fields such as DNS and IP.
126
- const status1 = yield certificateManager.trustCertificate(certificate);
127
- const status = yield certificateManager.verifyCertificateAsync(certificate);
128
- if (status !== "Good") {
129
- warningLog("[NODE-OPCUA-W04] Warning: the certificate status is = ", status, " file = ", this.certificateFile);
130
- }
131
- verifyIsOPCUAValidCertificate(certificate, this.certificateFile, serverOrClient, applicationUri);
132
- });
133
- }
134
- exports.performCertificateSanityCheck = performCertificateSanityCheck;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.performCertificateSanityCheck = exports.verifyIsOPCUAValidCertificate = void 0;
13
+ const node_opcua_crypto_1 = require("node-opcua-crypto");
14
+ const node_opcua_debug_1 = require("node-opcua-debug");
15
+ const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
16
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
17
+ const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
18
+ const warningLog = (0, node_opcua_debug_1.make_warningLog)(__filename);
19
+ function verifyIsOPCUAValidCertificate(certificate, certificateFile, type, applicationUri) {
20
+ var _a, _b, _c, _d, _e;
21
+ const certificateInfo = (0, node_opcua_crypto_1.exploreCertificate)(certificate);
22
+ const now = new Date();
23
+ if (certificateInfo.tbsCertificate.validity.notBefore.getTime() > now.getTime()) {
24
+ // check that certificate is active
25
+ // certificate is not active yet
26
+ warningLog(`[NODE-OPCUA-W02] The certificate is not active yet\n` +
27
+ `notBefore ${certificateInfo.tbsCertificate.validity.notBefore.toISOString()}\n` +
28
+ `certificateFile ${certificateFile}`);
29
+ }
30
+ // check that certificate has not expired
31
+ if (certificateInfo.tbsCertificate.validity.notAfter.getTime() <= now.getTime()) {
32
+ // certificate is obsolete
33
+ warningLog(`[NODE-OPCUA-W03] The certificate has expired\n` +
34
+ `Please regenerate a valid certificate\n` +
35
+ `notAfter = ${certificateInfo.tbsCertificate.validity.notAfter.toISOString()}\n` +
36
+ `certificateFile= ${certificateFile}`);
37
+ }
38
+ else {
39
+ const tenDays = 10 * 24 * 60 * 60 * 1000;
40
+ if (certificateInfo.tbsCertificate.validity.notAfter.getTime() <= now.getTime() + tenDays) {
41
+ // certificate is going to expired very soon
42
+ warningLog(`[NODE-OPCUA-W05] The certificate is about to expire in less than 10 days.\n` +
43
+ `Please regenerate a valid certificate as soon as possible\n` +
44
+ `notAfter = ${certificateInfo.tbsCertificate.validity.notAfter.toISOString()}\n` +
45
+ `certificateFile= ${certificateFile}\n`);
46
+ }
47
+ }
48
+ // check that server certificate matches Application URI
49
+ const uniformResourceIdentifier = (_c = (_b = (_a = certificateInfo === null || certificateInfo === void 0 ? void 0 : certificateInfo.tbsCertificate) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.subjectAltName) === null || _c === void 0 ? void 0 : _c.uniformResourceIdentifier;
50
+ if (!uniformResourceIdentifier) {
51
+ warningLog(`[NODE-OPCUA-W14] The certificate subjectAltName uniformResourceIdentifier is missing.\n` +
52
+ `Please regenerate a specific certificate with a uniformResourceIdentifier that matches your ${type} applicationUri\n` +
53
+ `applicationUri = ${applicationUri}\n` +
54
+ `certificateFile = ${certificateFile}\n`);
55
+ return;
56
+ }
57
+ else if (uniformResourceIdentifier[0] !== applicationUri) {
58
+ warningLog(`[NODE-OPCUA-W06] The certificate subjectAltName does not match the ${type} applicationUri\n` +
59
+ `Please regenerate a specific certificate that matches your ${type} applicationUri\n` +
60
+ `certificate subjectAltName = ${uniformResourceIdentifier[0]}\n` +
61
+ `${type} applicationUri = ${applicationUri}\n` +
62
+ `certificateFile = ${certificateFile}\n`);
63
+ }
64
+ const keyUsage = (_d = certificateInfo.tbsCertificate.extensions) === null || _d === void 0 ? void 0 : _d.keyUsage;
65
+ if (!keyUsage) {
66
+ warningLog(`[NODE-OPCUA-W15] The certificate keyUsage is missing\n` + `certificateFile = ${certificateFile}`);
67
+ }
68
+ else {
69
+ // spec says that certificate shall include digitalSignature, nonRepudiation, keyEncipherment and dataEncipherment.
70
+ // Other key uses are allowed.
71
+ if (!keyUsage.digitalSignature || !keyUsage.nonRepudiation || !keyUsage.keyEncipherment || !keyUsage.dataEncipherment) {
72
+ warningLog(`[NODE-OPCUA-W16] The certificate keyUsage must include digitalSignature, nonRepudiation, keyEncipherment and dataEncipherment.\n` +
73
+ `see https://reference.opcfoundation.org/v104/Core/docs/Part6/6.2.2/\n` +
74
+ `certificateFile = ${certificateFile}`);
75
+ }
76
+ }
77
+ const extKeyUsage = (_e = certificateInfo.tbsCertificate.extensions) === null || _e === void 0 ? void 0 : _e.extKeyUsage;
78
+ if (!extKeyUsage) {
79
+ warningLog(`[NODE-OPCUA-W17] The certificate extKeyUsage is missing\n` + `certificateFile = ${certificateFile}`);
80
+ }
81
+ else {
82
+ // spec says that certificate shall include digitalSignature, nonRepudiation, keyEncipherment and dataEncipherment.
83
+ // Other key uses are allowed.
84
+ if (!extKeyUsage.clientAuth && !extKeyUsage.serverAuth) {
85
+ warningLog(`[NODE-OPCUA-W18] The certificate extKeyUsage must include clientAuth and/or serverAuth.\n` +
86
+ `see https://reference.opcfoundation.org/v104/Core/docs/Part6/6.2.2/\n` +
87
+ `certificateFile = ${certificateFile}`);
88
+ }
89
+ }
90
+ const keyLengthInBits = certificateInfo.tbsCertificate.subjectPublicKeyInfo.keyLength * 8;
91
+ if (keyLengthInBits < 1024) {
92
+ errorLog(`[NODE-OPCUA-W19] The public key length shall be greater than or equal to 1024 bits. key length is ${keyLengthInBits}.\n` +
93
+ `see https://reference.opcfoundation.org/v104/GDS/docs/7.6.3/\n` +
94
+ `certificateFile = ${certificateFile}`);
95
+ }
96
+ else if (keyLengthInBits < 2048) {
97
+ warningLog(`[NODE-OPCUA-W23] key lengths less than 2048 are considered insecure. key length is ${keyLengthInBits}\n` +
98
+ `see https://reference.opcfoundation.org/v104/Core/docs/Part2/6.8/\n` +
99
+ `certificateFile = ${certificateFile}`);
100
+ }
101
+ }
102
+ exports.verifyIsOPCUAValidCertificate = verifyIsOPCUAValidCertificate;
103
+ function performCertificateSanityCheck(serverOrClient, certificateManager, applicationUri) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ // verify that certificate is matching private key, and inform the developper if not
106
+ const certificate = this.getCertificate();
107
+ const privateKey = this.getPrivateKey();
108
+ //
109
+ if (!(0, node_opcua_crypto_1.publicKeyAndPrivateKeyMatches)(certificate, privateKey)) {
110
+ errorLog("[NODE-OPCUA-E01] Configuration error : the certificate and the private key do not match !");
111
+ errorLog(" please check the configuration of the OPCUA Server");
112
+ errorLog(" privateKey= ", this.privateKeyFile);
113
+ errorLog(" certificateManager.privateKey= ", certificateManager.privateKey);
114
+ errorLog(" certificateFile= ", this.certificateFile);
115
+ throw new Error("[NODE-OPCUA-E01] Configuration error : the certificate and the private key do not match ! please fix your configuration");
116
+ }
117
+ // verify that the certificate provided has the right key length ( at least 2048)
118
+ const privateKeyInfo = (0, node_opcua_crypto_1.explorePrivateKey)(privateKey);
119
+ const keyLengthInBits = privateKeyInfo.modulus.length * 8;
120
+ if (keyLengthInBits <= 1024) {
121
+ warningLog(`[NODE-OPCUA-W04] The public/private key pair uses a key length which is equal or lower than 1024 bits. ( key length was ${keyLengthInBits} )\n` +
122
+ `OPCUA version 1.04 requires that security key length are greater or equal to 2048 bits.\n` +
123
+ `The ${serverOrClient} is operating at risk. `);
124
+ }
125
+ // verify that the certificate has a valid date and has expected extensions fields such as DNS and IP.
126
+ const status1 = yield certificateManager.trustCertificate(certificate);
127
+ const status = yield certificateManager.verifyCertificateAsync(certificate);
128
+ if (status !== "Good") {
129
+ warningLog("[NODE-OPCUA-W04] Warning: the certificate status is = ", status, " file = ", this.certificateFile);
130
+ }
131
+ verifyIsOPCUAValidCertificate(certificate, this.certificateFile, serverOrClient, applicationUri);
132
+ });
133
+ }
134
+ exports.performCertificateSanityCheck = performCertificateSanityCheck;
135
135
  //# sourceMappingURL=verify.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-opcua-client",
3
- "version": "2.97.0",
4
- "description": "pure nodejs OPCUA SDK - module -client",
3
+ "version": "2.98.1",
4
+ "description": "pure nodejs OPCUA SDK - module client",
5
5
  "scripts": {
6
6
  "clean": "npx rimraf node_modules dist *.tsbuildinfo certificates",
7
7
  "test": "mocha",
@@ -19,44 +19,44 @@
19
19
  "async": "^3.2.4",
20
20
  "callbackify": "^1.1.0",
21
21
  "chalk": "4.1.2",
22
- "node-opcua-assert": "2.88.0",
23
- "node-opcua-basic-types": "2.97.0",
24
- "node-opcua-buffer-utils": "2.90.1",
25
- "node-opcua-certificate-manager": "2.92.0",
26
- "node-opcua-client-dynamic-extension-object": "2.97.0",
27
- "node-opcua-common": "2.97.0",
28
- "node-opcua-constants": "2.88.0",
22
+ "node-opcua-assert": "2.98.1",
23
+ "node-opcua-basic-types": "2.98.1",
24
+ "node-opcua-buffer-utils": "2.98.1",
25
+ "node-opcua-certificate-manager": "2.98.1",
26
+ "node-opcua-client-dynamic-extension-object": "2.98.1",
27
+ "node-opcua-common": "2.98.1",
28
+ "node-opcua-constants": "2.98.1",
29
29
  "node-opcua-crypto": "^2.1.2",
30
- "node-opcua-data-model": "2.97.0",
31
- "node-opcua-data-value": "2.97.0",
32
- "node-opcua-date-time": "2.90.1",
33
- "node-opcua-debug": "2.90.1",
34
- "node-opcua-extension-object": "2.97.0",
35
- "node-opcua-hostname": "2.88.0",
36
- "node-opcua-nodeid": "2.97.0",
37
- "node-opcua-object-registry": "2.90.1",
30
+ "node-opcua-data-model": "2.98.1",
31
+ "node-opcua-data-value": "2.98.1",
32
+ "node-opcua-date-time": "2.98.1",
33
+ "node-opcua-debug": "2.98.1",
34
+ "node-opcua-extension-object": "2.98.1",
35
+ "node-opcua-hostname": "2.98.1",
36
+ "node-opcua-nodeid": "2.98.1",
37
+ "node-opcua-object-registry": "2.98.1",
38
38
  "node-opcua-pki": "^3.0.2",
39
- "node-opcua-pseudo-session": "2.97.0",
40
- "node-opcua-schemas": "2.97.0",
41
- "node-opcua-secure-channel": "2.97.0",
42
- "node-opcua-service-browse": "2.97.0",
43
- "node-opcua-service-call": "2.97.0",
44
- "node-opcua-service-discovery": "2.97.0",
45
- "node-opcua-service-endpoints": "2.97.0",
46
- "node-opcua-service-filter": "2.97.0",
47
- "node-opcua-service-history": "2.97.0",
48
- "node-opcua-service-query": "2.97.0",
49
- "node-opcua-service-read": "2.97.0",
50
- "node-opcua-service-register-node": "2.97.0",
51
- "node-opcua-service-secure-channel": "2.97.0",
52
- "node-opcua-service-session": "2.97.0",
53
- "node-opcua-service-subscription": "2.97.0",
54
- "node-opcua-service-translate-browse-path": "2.97.0",
55
- "node-opcua-service-write": "2.97.0",
56
- "node-opcua-status-code": "2.90.1",
57
- "node-opcua-types": "2.97.0",
58
- "node-opcua-utils": "2.90.1",
59
- "node-opcua-variant": "2.97.0",
39
+ "node-opcua-pseudo-session": "2.98.1",
40
+ "node-opcua-schemas": "2.98.1",
41
+ "node-opcua-secure-channel": "2.98.1",
42
+ "node-opcua-service-browse": "2.98.1",
43
+ "node-opcua-service-call": "2.98.1",
44
+ "node-opcua-service-discovery": "2.98.1",
45
+ "node-opcua-service-endpoints": "2.98.1",
46
+ "node-opcua-service-filter": "2.98.1",
47
+ "node-opcua-service-history": "2.98.1",
48
+ "node-opcua-service-query": "2.98.1",
49
+ "node-opcua-service-read": "2.98.1",
50
+ "node-opcua-service-register-node": "2.98.1",
51
+ "node-opcua-service-secure-channel": "2.98.1",
52
+ "node-opcua-service-session": "2.98.1",
53
+ "node-opcua-service-subscription": "2.98.1",
54
+ "node-opcua-service-translate-browse-path": "2.98.1",
55
+ "node-opcua-service-write": "2.98.1",
56
+ "node-opcua-status-code": "2.98.1",
57
+ "node-opcua-types": "2.98.1",
58
+ "node-opcua-utils": "2.98.1",
59
+ "node-opcua-variant": "2.98.1",
60
60
  "once": "^1.4.0",
61
61
  "thenify": "^3.3.1"
62
62
  },
@@ -64,13 +64,13 @@
64
64
  "@types/underscore": "^1.11.4",
65
65
  "dequeue": "^1.0.5",
66
66
  "mocha": "^10.2.0",
67
- "node-opcua-address-space": "2.97.0",
68
- "node-opcua-binary-stream": "2.90.1",
69
- "node-opcua-factory": "2.97.0",
70
- "node-opcua-leak-detector": "2.90.1",
71
- "node-opcua-nodesets": "2.96.0",
67
+ "node-opcua-address-space": "2.98.1",
68
+ "node-opcua-binary-stream": "2.98.1",
69
+ "node-opcua-factory": "2.98.1",
70
+ "node-opcua-leak-detector": "2.98.1",
71
+ "node-opcua-nodesets": "2.98.1",
72
72
  "should": "^13.2.3",
73
- "sinon": "^15.0.1",
73
+ "sinon": "^15.0.3",
74
74
  "underscore": "^1.13.6"
75
75
  },
76
76
  "eslintConfig": {
@@ -93,5 +93,9 @@
93
93
  "internet of things"
94
94
  ],
95
95
  "homepage": "http://node-opcua.github.io/",
96
- "gitHead": "19c96bda0810d2dec73dd1c2427546be40908646"
96
+ "gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c",
97
+ "files": [
98
+ "dist",
99
+ "source"
100
+ ]
97
101
  }
@@ -24,7 +24,7 @@ export async function dumpEvent(session: IBasicSession, fields: string[], eventF
24
24
  }
25
25
  }
26
26
  function w(str: string, l: number): string {
27
- return str.padEnd(l, " ").substring(0, l);
27
+ return (str || "").toString().padEnd(l, " ").substring(0, l);
28
28
  }
29
29
  async function __dumpEvent1(_session: IBasicSession, _fields: any, variant: VariantLike, index: number) {
30
30
  if (variant.dataType === DataType.Null) {
package/.nycrc.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "@istanbuljs/nyc-config-typescript",
3
- "all": true,
4
- "__check-coverage": true,
5
- "excludeNodeModules": false,
6
- "include": [
7
- "dist/**/*.js",
8
- "source/**/*.ts"
9
- ],
10
- "reporter": [
11
- "text",
12
- "lcov"
13
- ]
14
- }
@@ -1 +0,0 @@
1
- require("node-opcua-pki/bin/crypto_create_CA");
package/typedoc.js DELETED
@@ -1,20 +0,0 @@
1
- // (e.g. typedoc --options ./typedoc.js ./src), then you can set an array of exclude paths in the configuration:
2
- // typedoc.js:
3
-
4
- module.exports = {
5
- src: [ "./source/index.ts" ],
6
- out: "./out1/",
7
-
8
- readme: "./documentation/readme.md",
9
- includes: "./documentation",
10
- exclude: ["*/@types/**"],
11
- mode: "file",
12
- //xx excludeExternals: true,
13
- excludeNotExported: true,
14
- excludePrivate: true,
15
- includeDeclarations: true,
16
- moduleResolution: "node",
17
- theme: "default",
18
- logger: "console"
19
- };
20
-