diff --git a/package-lock.json b/package-lock.json index aeb9867799..908e608622 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,8 +37,8 @@ "mysql2": "2.3.3", "nanoid": "3.3.4", "node-fetch": "2.6.7", - "node-opcua": "2.74.0", "node-opcua-certificate-manager": "2.74.0", + "node-opcua-client": "2.74.0", "object-path": "0.11.8", "papaparse": "5.3.2", "pg": "8.7.3", @@ -7585,14 +7585,6 @@ "node": ">= 0.8" } }, - "node_modules/dequeue": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/dequeue/-/dequeue-1.0.5.tgz", - "integrity": "sha512-2FIVJZTaWhUj0Y2uKmDAasTP6ZwFWRjkRc01MYN5jFm96iIzkYyNzGADfJ13C5W7CTN7XO9mBYDcVB68eNybBA==", - "engines": { - "node": "*" - } - }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -10138,14 +10130,6 @@ "node": ">=10.17.0" } }, - "node_modules/humanize": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/humanize/-/humanize-0.0.9.tgz", - "integrity": "sha512-bvZZ7vXpr1RKoImjuQ45hJb5OvE2oJafHysiD/AL3nkqTZH2hFCjQ3YZfCd63FefDitbJze/ispUPP0gfDsT2Q==", - "engines": { - "node": "*" - } - }, "node_modules/humanize-duration": { "version": "3.27.2", "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.27.2.tgz", @@ -14164,341 +14148,6 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node_modules/node-opcua": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua/-/node-opcua-2.74.0.tgz", - "integrity": "sha512-Z0fsIDWv1NrOmsWL5d2IwXT8+F1Nw5+jeOYE8i/BfkWGGi1TMzqn3IGNq4UyERyiRvCo7KjYpGVqLNa3FWZR2A==", - "dependencies": { - "chalk": "4.1.2", - "node-opcua-address-space": "2.74.0", - "node-opcua-address-space-for-conformance-testing": "2.74.0", - "node-opcua-aggregates": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-client": "2.74.0", - "node-opcua-client-crawler": "2.74.0", - "node-opcua-client-proxy": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-crypto": "^1.11.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodesets": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-packet-analyzer": "2.74.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-server": "2.74.0", - "node-opcua-server-discovery": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-node-management": "2.74.0", - "node-opcua-service-query": "2.74.0", - "node-opcua-service-read": "2.74.0", - "node-opcua-service-register-node": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-service-session": "2.74.0", - "node-opcua-service-subscription": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-transport": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "node-opcua-vendor-diagnostic": "2.74.0", - "semver": "^7.3.7" - }, - "engines": { - "node": ">=8.10" - }, - "funding": { - "url": "https://github.com/sponsors/erossignon" - } - }, - "node_modules/node-opcua-address-space": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-address-space/-/node-opcua-address-space-2.74.0.tgz", - "integrity": "sha512-k/v5VIAnkR4qd6EDkOT1Pi62HzoF1EwdHGPIC8TsGDg4k86JSsMquhYjWptm5WlpUOnR7dR4RAZCq3QWWAsWsA==", - "dependencies": { - "@types/lodash": "4.14.182", - "async": "^3.2.4", - "chalk": "4.1.2", - "dequeue": "^1.0.5", - "lodash": "4.17.21", - "node-opcua-address-space-base": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodeset-ua": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-schemas": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "node-opcua-xml2json": "2.74.0", - "semver": "^7.3.7", - "set-prototype-of": "^1.0.0", - "thenify": "^3.3.1", - "xml-writer": "^1.7.0" - }, - "engines": { - "node": ">=6.10" - } - }, - "node_modules/node-opcua-address-space-base": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-address-space-base/-/node-opcua-address-space-base-2.74.0.tgz", - "integrity": "sha512-Af22QjmedgN1v6wJfFZlRijZOrEzWc3eTGsmSe7czlQARyh5hw2eqnCK+sbKuovcasRNx8H/+vySF/ojtdZjkg==", - "dependencies": { - "@types/lodash": "4.14.182", - "async": "^3.2.4", - "chalk": "4.1.2", - "dequeue": "^1.0.5", - "lodash": "4.17.21", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-schemas": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "node-opcua-xml2json": "2.74.0", - "set-prototype-of": "^1.0.0", - "thenify": "^3.3.1", - "xml-writer": "^1.7.0" - }, - "engines": { - "node": ">=6.10" - } - }, - "node_modules/node-opcua-address-space-base/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/node-opcua-address-space-base/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/node-opcua-address-space-base/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/node-opcua-address-space-base/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/node-opcua-address-space-base/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-opcua-address-space-base/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-opcua-address-space-for-conformance-testing": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-address-space-for-conformance-testing/-/node-opcua-address-space-for-conformance-testing-2.74.0.tgz", - "integrity": "sha512-PHaL470g4/t4LDLqkvzc19FCLDnamscN8PsQe/Y2AXAmP4CgWan9/Fds+rLALXdVHZnxLwUpyG/x/4owvKKKSQ==", - "dependencies": { - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node_modules/node-opcua-address-space/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/node-opcua-address-space/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/node-opcua-address-space/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/node-opcua-address-space/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/node-opcua-address-space/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-opcua-address-space/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-opcua-address-space/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-opcua-aggregates": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-aggregates/-/node-opcua-aggregates-2.74.0.tgz", - "integrity": "sha512-ii0ZeBx3+SF+s9AC1LuF3s6HFFic4zp0lJcBxKu+6EfIZ8HP0Kj5DtbPLFzn3Xi+qNMCfpuUdyWx0HFhhjQATg==", - "dependencies": { - "@types/async": "^3.2.13", - "node-opcua-address-space": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodesets": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, "node_modules/node-opcua-assert": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-assert/-/node-opcua-assert-2.74.0.tgz", @@ -14838,28 +14487,6 @@ "underscore": "^1.13.4" } }, - "node_modules/node-opcua-client-crawler": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-client-crawler/-/node-opcua-client-crawler-2.74.0.tgz", - "integrity": "sha512-SLUjAHO9/3BO0e60JHeJ8wYoXiGn9gs5MqZ9CaTvYWAPRK6+a5k5yoxsOXbgoaJV8YQEEhX2C5DeLfa7oZfHGg==", - "dependencies": { - "@types/underscore": "^1.11.4", - "async": "^3.2.4", - "node-opcua-assert": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "underscore": "^1.13.4" - } - }, "node_modules/node-opcua-client-dynamic-extension-object": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-client-dynamic-extension-object/-/node-opcua-client-dynamic-extension-object-2.74.0.tgz", @@ -14948,30 +14575,6 @@ "node": ">=8" } }, - "node_modules/node-opcua-client-proxy": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-client-proxy/-/node-opcua-client-proxy-2.74.0.tgz", - "integrity": "sha512-e0jstVWNLqXlD5LYMuibOFLQthyjRC6sXraIeERpWeeyJkkSaV2TImqFjWbizcCFsyR6BVqV29Yrdvw/cRNZ3w==", - "dependencies": { - "async": "^3.2.4", - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-read": "2.74.0", - "node-opcua-service-subscription": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, "node_modules/node-opcua-client/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -15133,20 +14736,6 @@ "node": ">=8" } }, - "node_modules/node-opcua-data-access": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-data-access/-/node-opcua-data-access-2.74.0.tgz", - "integrity": "sha512-FwzcaOhi1E09pMchyQO60vJRN9Yg9nUTROzICWQ77zt1ELswEE0ee4RmGPADJdro46MgIyheCsq8s49smZC+kQ==", - "dependencies": { - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-types": "2.74.0" - } - }, "node_modules/node-opcua-data-model": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-data-model/-/node-opcua-data-model-2.74.0.tgz", @@ -15623,26 +15212,6 @@ "node": ">=8" } }, - "node_modules/node-opcua-nodeset-ua": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-nodeset-ua/-/node-opcua-nodeset-ua-2.74.0.tgz", - "integrity": "sha512-5g64Wy1lqvHGMohROB/w2qKtC748nc1aG2kIuduz9IGX/Rm2zyhtKucitsxtjB7OCiPmvUdRSe8IY5sAQm8bVw==", - "dependencies": { - "node-opcua-address-space-base": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node_modules/node-opcua-nodesets": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-nodesets/-/node-opcua-nodesets-2.74.0.tgz", - "integrity": "sha512-CLqR43YFB/kKAHnwGi5wfHTuWmzwLrZL4E94unDd66NJSnkXG+o1mIoC9xCYgAWkiv4KseHrr5mWRnWySsxHPg==" - }, "node_modules/node-opcua-numeric-range": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-numeric-range/-/node-opcua-numeric-range-2.74.0.tgz", @@ -15972,86 +15541,6 @@ "node": ">=8" } }, - "node_modules/node-opcua-server": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-server/-/node-opcua-server-2.74.0.tgz", - "integrity": "sha512-nkA4vPWrSd3Y/CDEjNb4PEweuaJJEltkX49AV+GOw3qpX5MjZrYa81kG3YmnjB0HjWF84t/i1EAc8K8epEDGOg==", - "dependencies": { - "@ster5/global-mutex": "^1.2.0", - "@types/underscore": "^1.11.4", - "async": "^3.2.4", - "dequeue": "^1.0.5", - "lodash": "4.17.21", - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-client": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-crypto": "^1.11.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-extension-object": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodeset-ua": "2.74.0", - "node-opcua-nodesets": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pki": "^2.17.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-node-management": "2.74.0", - "node-opcua-service-query": "2.74.0", - "node-opcua-service-read": "2.74.0", - "node-opcua-service-register-node": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-service-session": "2.74.0", - "node-opcua-service-subscription": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-transport": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node_modules/node-opcua-server-discovery": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-server-discovery/-/node-opcua-server-discovery-2.74.0.tgz", - "integrity": "sha512-dCuTbNsVmq4UU+pQo1a7nD7U7+sjNY8xjXkQqOZ4yTN6qybU5/fwH5aYM87V53ppTBon1D/xg305kV8XSfFJtg==", - "dependencies": { - "@types/bonjour": "^3.5.10", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pki": "^2.17.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-server": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-status-code": "2.74.0", - "sterfive-bonjour-service": "1.1.4" - } - }, "node_modules/node-opcua-service-browse": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-service-browse/-/node-opcua-service-browse-2.74.0.tgz", @@ -16155,22 +15644,6 @@ "node-opcua-types": "2.74.0" } }, - "node_modules/node-opcua-service-node-management": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-service-node-management/-/node-opcua-service-node-management-2.74.0.tgz", - "integrity": "sha512-kaDDaux3kNqpFNTB8HBTeek3Exk9LKijMXc7jfaHQ8Xb4iwBbLd5dGLI3hBNa4SOI4PI4lQvTqRnk6l6KSm0tg==", - "dependencies": { - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-extension-object": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-types": "2.74.0" - } - }, "node_modules/node-opcua-service-query": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-service-query/-/node-opcua-service-query-2.74.0.tgz", @@ -16515,20 +15988,6 @@ "node-opcua-utils": "2.74.0" } }, - "node_modules/node-opcua-vendor-diagnostic": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-vendor-diagnostic/-/node-opcua-vendor-diagnostic-2.74.0.tgz", - "integrity": "sha512-xfTqiO5PwrDJQiCXy0LuwDOziIPDoKd2UphBHxia1gHWxvgWwQ0UbM8wzWIr6qjccfQSaKcJS67oBnPtZAPO8g==", - "dependencies": { - "humanize": "0.0.9", - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-server": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, "node_modules/node-opcua-xml2json": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-xml2json/-/node-opcua-xml2json-2.74.0.tgz", @@ -16542,84 +16001,6 @@ "xml-writer": "^1.7.0" } }, - "node_modules/node-opcua/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/node-opcua/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/node-opcua/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/node-opcua/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/node-opcua/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-opcua/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-opcua/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", @@ -19216,11 +18597,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, - "node_modules/set-prototype-of": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-prototype-of/-/set-prototype-of-1.0.0.tgz", - "integrity": "sha512-OeTRSF+prexqa0ZOjfYR2pdGG/9nyzoXhsDj9M/0R8cgK1r9SkiQiqGdQQcObmnalKVPaTLrF8P71OacYqcYGw==" - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -27098,11 +26474,6 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" }, - "dequeue": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/dequeue/-/dequeue-1.0.5.tgz", - "integrity": "sha512-2FIVJZTaWhUj0Y2uKmDAasTP6ZwFWRjkRc01MYN5jFm96iIzkYyNzGADfJ13C5W7CTN7XO9mBYDcVB68eNybBA==" - }, "destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -29018,11 +28389,6 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, - "humanize": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/humanize/-/humanize-0.0.9.tgz", - "integrity": "sha512-bvZZ7vXpr1RKoImjuQ45hJb5OvE2oJafHysiD/AL3nkqTZH2hFCjQ3YZfCd63FefDitbJze/ispUPP0gfDsT2Q==" - }, "humanize-duration": { "version": "3.27.2", "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.27.2.tgz", @@ -32051,345 +31417,13 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node-opcua": { + "node-opcua-assert": { "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua/-/node-opcua-2.74.0.tgz", - "integrity": "sha512-Z0fsIDWv1NrOmsWL5d2IwXT8+F1Nw5+jeOYE8i/BfkWGGi1TMzqn3IGNq4UyERyiRvCo7KjYpGVqLNa3FWZR2A==", + "resolved": "https://registry.npmjs.org/node-opcua-assert/-/node-opcua-assert-2.74.0.tgz", + "integrity": "sha512-J6C1SeBINGJFtqVPxH1p/s2UCKUhn3D5iguJIab+rialwGWj56VfcHjpE/Z82ebcps/zKvDVBTsHDLXa6QieXg==", "requires": { - "chalk": "4.1.2", - "node-opcua-address-space": "2.74.0", - "node-opcua-address-space-for-conformance-testing": "2.74.0", - "node-opcua-aggregates": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-client": "2.74.0", - "node-opcua-client-crawler": "2.74.0", - "node-opcua-client-proxy": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-crypto": "^1.11.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodesets": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-packet-analyzer": "2.74.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-server": "2.74.0", - "node-opcua-server-discovery": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-node-management": "2.74.0", - "node-opcua-service-query": "2.74.0", - "node-opcua-service-read": "2.74.0", - "node-opcua-service-register-node": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-service-session": "2.74.0", - "node-opcua-service-subscription": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-transport": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "node-opcua-vendor-diagnostic": "2.74.0", - "semver": "^7.3.7" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "node-opcua-address-space": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-address-space/-/node-opcua-address-space-2.74.0.tgz", - "integrity": "sha512-k/v5VIAnkR4qd6EDkOT1Pi62HzoF1EwdHGPIC8TsGDg4k86JSsMquhYjWptm5WlpUOnR7dR4RAZCq3QWWAsWsA==", - "requires": { - "@types/lodash": "4.14.182", - "async": "^3.2.4", - "chalk": "4.1.2", - "dequeue": "^1.0.5", - "lodash": "4.17.21", - "node-opcua-address-space-base": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodeset-ua": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-schemas": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "node-opcua-xml2json": "2.74.0", - "semver": "^7.3.7", - "set-prototype-of": "^1.0.0", - "thenify": "^3.3.1", - "xml-writer": "^1.7.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "node-opcua-address-space-base": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-address-space-base/-/node-opcua-address-space-base-2.74.0.tgz", - "integrity": "sha512-Af22QjmedgN1v6wJfFZlRijZOrEzWc3eTGsmSe7czlQARyh5hw2eqnCK+sbKuovcasRNx8H/+vySF/ojtdZjkg==", - "requires": { - "@types/lodash": "4.14.182", - "async": "^3.2.4", - "chalk": "4.1.2", - "dequeue": "^1.0.5", - "lodash": "4.17.21", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-schemas": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "node-opcua-xml2json": "2.74.0", - "set-prototype-of": "^1.0.0", - "thenify": "^3.3.1", - "xml-writer": "^1.7.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "node-opcua-address-space-for-conformance-testing": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-address-space-for-conformance-testing/-/node-opcua-address-space-for-conformance-testing-2.74.0.tgz", - "integrity": "sha512-PHaL470g4/t4LDLqkvzc19FCLDnamscN8PsQe/Y2AXAmP4CgWan9/Fds+rLALXdVHZnxLwUpyG/x/4owvKKKSQ==", - "requires": { - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node-opcua-aggregates": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-aggregates/-/node-opcua-aggregates-2.74.0.tgz", - "integrity": "sha512-ii0ZeBx3+SF+s9AC1LuF3s6HFFic4zp0lJcBxKu+6EfIZ8HP0Kj5DtbPLFzn3Xi+qNMCfpuUdyWx0HFhhjQATg==", - "requires": { - "@types/async": "^3.2.13", - "node-opcua-address-space": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodesets": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node-opcua-assert": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-assert/-/node-opcua-assert-2.74.0.tgz", - "integrity": "sha512-J6C1SeBINGJFtqVPxH1p/s2UCKUhn3D5iguJIab+rialwGWj56VfcHjpE/Z82ebcps/zKvDVBTsHDLXa6QieXg==", - "requires": { - "better-assert": "^1.0.2", - "chalk": "4.1.2" + "better-assert": "^1.0.2", + "chalk": "4.1.2" }, "dependencies": { "ansi-styles": { @@ -32603,220 +31637,174 @@ } } }, - "node-opcua-client": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-client/-/node-opcua-client-2.74.0.tgz", - "integrity": "sha512-1WbZPC/WjxZSw8O2bOFDubO5Q3TH/uOAFop07csysMpE0+iU+kOGaVSlDI0fTcDkeyVpg2Ensin3CkvDhy2NsA==", - "requires": { - "@ster5/global-mutex": "^1.2.0", - "@types/async": "^3.2.13", - "@types/once": "^1.4.0", - "@types/underscore": "^1.11.4", - "async": "^3.2.4", - "callbackify": "^1.1.0", - "chalk": "4.1.2", - "delayed": "^2.0.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-buffer-utils": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-crypto": "^1.11.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-extension-object": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pki": "^2.17.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-schemas": "2.74.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-query": "2.74.0", - "node-opcua-service-read": "2.74.0", - "node-opcua-service-register-node": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-service-session": "2.74.0", - "node-opcua-service-subscription": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "once": "^1.4.0", - "thenify": "^3.3.1", - "underscore": "^1.13.4" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "node-opcua-client-crawler": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-client-crawler/-/node-opcua-client-crawler-2.74.0.tgz", - "integrity": "sha512-SLUjAHO9/3BO0e60JHeJ8wYoXiGn9gs5MqZ9CaTvYWAPRK6+a5k5yoxsOXbgoaJV8YQEEhX2C5DeLfa7oZfHGg==", - "requires": { - "@types/underscore": "^1.11.4", - "async": "^3.2.4", - "node-opcua-assert": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0", - "underscore": "^1.13.4" - } - }, - "node-opcua-client-dynamic-extension-object": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-client-dynamic-extension-object/-/node-opcua-client-dynamic-extension-object-2.74.0.tgz", - "integrity": "sha512-BK+f+7JLSj93lM/Svh8YSFNvr3ONcFvSDyycLGYxvcMK6VL+4UIDQ2C3eyNzWRqNEr4bogsUzpu942Z+UeH2BA==", - "requires": { - "chalk": "4.1.2", - "node-opcua-assert": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-extension-object": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-pseudo-session": "2.74.0", - "node-opcua-schemas": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-variant": "2.74.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "node-opcua-client-proxy": { + "node-opcua-client": { "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-client-proxy/-/node-opcua-client-proxy-2.74.0.tgz", - "integrity": "sha512-e0jstVWNLqXlD5LYMuibOFLQthyjRC6sXraIeERpWeeyJkkSaV2TImqFjWbizcCFsyR6BVqV29Yrdvw/cRNZ3w==", + "resolved": "https://registry.npmjs.org/node-opcua-client/-/node-opcua-client-2.74.0.tgz", + "integrity": "sha512-1WbZPC/WjxZSw8O2bOFDubO5Q3TH/uOAFop07csysMpE0+iU+kOGaVSlDI0fTcDkeyVpg2Ensin3CkvDhy2NsA==", "requires": { + "@ster5/global-mutex": "^1.2.0", + "@types/async": "^3.2.13", + "@types/once": "^1.4.0", + "@types/underscore": "^1.11.4", "async": "^3.2.4", - "node-opcua-address-space": "2.74.0", + "callbackify": "^1.1.0", + "chalk": "4.1.2", + "delayed": "^2.0.0", "node-opcua-assert": "2.74.0", + "node-opcua-basic-types": "2.74.0", + "node-opcua-buffer-utils": "2.74.0", + "node-opcua-certificate-manager": "2.74.0", + "node-opcua-client-dynamic-extension-object": "2.74.0", + "node-opcua-common": "2.74.0", "node-opcua-constants": "2.74.0", + "node-opcua-crypto": "^1.11.0", "node-opcua-data-model": "2.74.0", "node-opcua-data-value": "2.74.0", + "node-opcua-date-time": "2.74.0", "node-opcua-debug": "2.74.0", + "node-opcua-extension-object": "2.74.0", + "node-opcua-hostname": "2.74.0", "node-opcua-nodeid": "2.74.0", + "node-opcua-object-registry": "2.74.0", + "node-opcua-pki": "^2.17.0", "node-opcua-pseudo-session": "2.74.0", + "node-opcua-schemas": "2.74.0", + "node-opcua-secure-channel": "2.74.0", "node-opcua-service-browse": "2.74.0", "node-opcua-service-call": "2.74.0", + "node-opcua-service-discovery": "2.74.0", + "node-opcua-service-endpoints": "2.74.0", + "node-opcua-service-filter": "2.74.0", + "node-opcua-service-history": "2.74.0", + "node-opcua-service-query": "2.74.0", "node-opcua-service-read": "2.74.0", + "node-opcua-service-register-node": "2.74.0", + "node-opcua-service-secure-channel": "2.74.0", + "node-opcua-service-session": "2.74.0", "node-opcua-service-subscription": "2.74.0", + "node-opcua-service-translate-browse-path": "2.74.0", "node-opcua-service-write": "2.74.0", "node-opcua-status-code": "2.74.0", + "node-opcua-types": "2.74.0", "node-opcua-utils": "2.74.0", + "node-opcua-variant": "2.74.0", + "once": "^1.4.0", + "thenify": "^3.3.1", + "underscore": "^1.13.4" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "node-opcua-client-dynamic-extension-object": { + "version": "2.74.0", + "resolved": "https://registry.npmjs.org/node-opcua-client-dynamic-extension-object/-/node-opcua-client-dynamic-extension-object-2.74.0.tgz", + "integrity": "sha512-BK+f+7JLSj93lM/Svh8YSFNvr3ONcFvSDyycLGYxvcMK6VL+4UIDQ2C3eyNzWRqNEr4bogsUzpu942Z+UeH2BA==", + "requires": { + "chalk": "4.1.2", + "node-opcua-assert": "2.74.0", + "node-opcua-binary-stream": "2.74.0", + "node-opcua-constants": "2.74.0", + "node-opcua-data-model": "2.74.0", + "node-opcua-data-value": "2.74.0", + "node-opcua-debug": "2.74.0", + "node-opcua-extension-object": "2.74.0", + "node-opcua-factory": "2.74.0", + "node-opcua-nodeid": "2.74.0", + "node-opcua-pseudo-session": "2.74.0", + "node-opcua-schemas": "2.74.0", + "node-opcua-service-browse": "2.74.0", + "node-opcua-service-translate-browse-path": "2.74.0", + "node-opcua-status-code": "2.74.0", + "node-opcua-types": "2.74.0", "node-opcua-variant": "2.74.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } } }, "node-opcua-common": { @@ -32897,20 +31885,6 @@ } } }, - "node-opcua-data-access": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-data-access/-/node-opcua-data-access-2.74.0.tgz", - "integrity": "sha512-FwzcaOhi1E09pMchyQO60vJRN9Yg9nUTROzICWQ77zt1ELswEE0ee4RmGPADJdro46MgIyheCsq8s49smZC+kQ==", - "requires": { - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-types": "2.74.0" - } - }, "node-opcua-data-model": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-data-model/-/node-opcua-data-model-2.74.0.tgz", @@ -33294,26 +32268,6 @@ } } }, - "node-opcua-nodeset-ua": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-nodeset-ua/-/node-opcua-nodeset-ua-2.74.0.tgz", - "integrity": "sha512-5g64Wy1lqvHGMohROB/w2qKtC748nc1aG2kIuduz9IGX/Rm2zyhtKucitsxtjB7OCiPmvUdRSe8IY5sAQm8bVw==", - "requires": { - "node-opcua-address-space-base": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node-opcua-nodesets": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-nodesets/-/node-opcua-nodesets-2.74.0.tgz", - "integrity": "sha512-CLqR43YFB/kKAHnwGi5wfHTuWmzwLrZL4E94unDd66NJSnkXG+o1mIoC9xCYgAWkiv4KseHrr5mWRnWySsxHPg==" - }, "node-opcua-numeric-range": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-numeric-range/-/node-opcua-numeric-range-2.74.0.tgz", @@ -33583,86 +32537,6 @@ } } }, - "node-opcua-server": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-server/-/node-opcua-server-2.74.0.tgz", - "integrity": "sha512-nkA4vPWrSd3Y/CDEjNb4PEweuaJJEltkX49AV+GOw3qpX5MjZrYa81kG3YmnjB0HjWF84t/i1EAc8K8epEDGOg==", - "requires": { - "@ster5/global-mutex": "^1.2.0", - "@types/underscore": "^1.11.4", - "async": "^3.2.4", - "dequeue": "^1.0.5", - "lodash": "4.17.21", - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-client": "2.74.0", - "node-opcua-client-dynamic-extension-object": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-crypto": "^1.11.0", - "node-opcua-data-access": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-data-value": "2.74.0", - "node-opcua-date-time": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-enum": "2.74.0", - "node-opcua-extension-object": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-nodeset-ua": "2.74.0", - "node-opcua-nodesets": "2.74.0", - "node-opcua-numeric-range": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pki": "^2.17.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-service-browse": "2.74.0", - "node-opcua-service-call": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-service-filter": "2.74.0", - "node-opcua-service-history": "2.74.0", - "node-opcua-service-node-management": "2.74.0", - "node-opcua-service-query": "2.74.0", - "node-opcua-service-read": "2.74.0", - "node-opcua-service-register-node": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-service-session": "2.74.0", - "node-opcua-service-subscription": "2.74.0", - "node-opcua-service-translate-browse-path": "2.74.0", - "node-opcua-service-write": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-transport": "2.74.0", - "node-opcua-types": "2.74.0", - "node-opcua-utils": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, - "node-opcua-server-discovery": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-server-discovery/-/node-opcua-server-discovery-2.74.0.tgz", - "integrity": "sha512-dCuTbNsVmq4UU+pQo1a7nD7U7+sjNY8xjXkQqOZ4yTN6qybU5/fwH5aYM87V53ppTBon1D/xg305kV8XSfFJtg==", - "requires": { - "@types/bonjour": "^3.5.10", - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-certificate-manager": "2.74.0", - "node-opcua-common": "2.74.0", - "node-opcua-debug": "2.74.0", - "node-opcua-hostname": "2.74.0", - "node-opcua-object-registry": "2.74.0", - "node-opcua-pki": "^2.17.0", - "node-opcua-secure-channel": "2.74.0", - "node-opcua-server": "2.74.0", - "node-opcua-service-discovery": "2.74.0", - "node-opcua-service-endpoints": "2.74.0", - "node-opcua-status-code": "2.74.0", - "sterfive-bonjour-service": "1.1.4" - } - }, "node-opcua-service-browse": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-service-browse/-/node-opcua-service-browse-2.74.0.tgz", @@ -33766,22 +32640,6 @@ "node-opcua-types": "2.74.0" } }, - "node-opcua-service-node-management": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-service-node-management/-/node-opcua-service-node-management-2.74.0.tgz", - "integrity": "sha512-kaDDaux3kNqpFNTB8HBTeek3Exk9LKijMXc7jfaHQ8Xb4iwBbLd5dGLI3hBNa4SOI4PI4lQvTqRnk6l6KSm0tg==", - "requires": { - "node-opcua-assert": "2.74.0", - "node-opcua-basic-types": "2.74.0", - "node-opcua-binary-stream": "2.74.0", - "node-opcua-data-model": "2.74.0", - "node-opcua-extension-object": "2.74.0", - "node-opcua-factory": "2.74.0", - "node-opcua-nodeid": "2.74.0", - "node-opcua-service-secure-channel": "2.74.0", - "node-opcua-types": "2.74.0" - } - }, "node-opcua-service-query": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-service-query/-/node-opcua-service-query-2.74.0.tgz", @@ -34088,20 +32946,6 @@ "node-opcua-utils": "2.74.0" } }, - "node-opcua-vendor-diagnostic": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/node-opcua-vendor-diagnostic/-/node-opcua-vendor-diagnostic-2.74.0.tgz", - "integrity": "sha512-xfTqiO5PwrDJQiCXy0LuwDOziIPDoKd2UphBHxia1gHWxvgWwQ0UbM8wzWIr6qjccfQSaKcJS67oBnPtZAPO8g==", - "requires": { - "humanize": "0.0.9", - "node-opcua-address-space": "2.74.0", - "node-opcua-assert": "2.74.0", - "node-opcua-constants": "2.74.0", - "node-opcua-server": "2.74.0", - "node-opcua-status-code": "2.74.0", - "node-opcua-variant": "2.74.0" - } - }, "node-opcua-xml2json": { "version": "2.74.0", "resolved": "https://registry.npmjs.org/node-opcua-xml2json/-/node-opcua-xml2json-2.74.0.tgz", @@ -36092,11 +34936,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, - "set-prototype-of": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-prototype-of/-/set-prototype-of-1.0.0.tgz", - "integrity": "sha512-OeTRSF+prexqa0ZOjfYR2pdGG/9nyzoXhsDj9M/0R8cgK1r9SkiQiqGdQQcObmnalKVPaTLrF8P71OacYqcYGw==" - }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", diff --git a/package.json b/package.json index 3ea065a74e..92504bad19 100644 --- a/package.json +++ b/package.json @@ -72,8 +72,8 @@ "mysql2": "2.3.3", "nanoid": "3.3.4", "node-fetch": "2.6.7", - "node-opcua": "2.74.0", "node-opcua-certificate-manager": "2.74.0", + "node-opcua-client": "2.74.0", "object-path": "0.11.8", "papaparse": "5.3.2", "pg": "8.7.3", diff --git a/src/engine/OIBusEngine.class.js b/src/engine/OIBusEngine.class.js index 66975f41ab..bb4315d374 100644 --- a/src/engine/OIBusEngine.class.js +++ b/src/engine/OIBusEngine.class.js @@ -263,7 +263,7 @@ class OIBusEngine extends BaseEngine { }) => { if (scanMode !== 'listen') { const job = timexe(cronTime, () => { - // on each scan, activate each protocols + // on each scan, activate each protocol this.scanLists[scanMode].forEach(async (id) => { await this.activeProtocols[id].onScan(scanMode) }) diff --git a/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.js b/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.js index e9c2cd4e76..47dae13f71 100644 --- a/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.js +++ b/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.js @@ -1,4 +1,9 @@ -const Opcua = require('node-opcua') +const { + OPCUAClient, + MessageSecurityMode, + SecurityPolicy, + UserTokenType, +} = require('node-opcua-client') const { OPCUACertificateManager } = require('node-opcua-certificate-manager') const ProtocolHandler = require('../../ProtocolHandler.class') const { initOpcuaCertificateFolders } = require('../opcua.service') @@ -54,6 +59,7 @@ class OPCUA_DA extends ProtocolHandler { */ async connect() { await super.connect() + await this.session?.close() // close the session if it already exists await this.connectToOpcuaServer() } @@ -61,7 +67,10 @@ class OPCUA_DA extends ProtocolHandler { await super.init() await initOpcuaCertificateFolders(this.encryptionService.certsFolder) if (!this.clientCertificateManager) { - this.clientCertificateManager = new OPCUACertificateManager({ rootFolder: `${this.encryptionService.certsFolder}/opcua` }) + this.clientCertificateManager = new OPCUACertificateManager({ + rootFolder: `${this.encryptionService.certsFolder}/opcua`, + automaticallyAcceptUnknownCertificate: true, + }) // Set the state to the CertificateManager to 2 (Initialized) to avoid a call to openssl // It is useful for offline instances of OIBus where downloading openssl is not possible this.clientCertificateManager.state = 2 @@ -131,8 +140,8 @@ class OPCUA_DA extends ProtocolHandler { } if (this.connected) { - await this.session.close() - await this.client.disconnect() + await this.session?.close() + this.session = null } await super.disconnect() } @@ -147,7 +156,7 @@ class OPCUA_DA extends ProtocolHandler { return } - this.subscription = Opcua.ClientSubscription.create(this.session, { + this.subscription = ClientSubscription.create(this.session, { requestedPublishingInterval: 150, requestedLifetimeCount: 10 * 60 * 10, requestedMaxKeepAliveCount: 10, @@ -156,18 +165,18 @@ class OPCUA_DA extends ProtocolHandler { priority: 6, }) nodesToMonitor.forEach((nodeToMonitor) => { - const monitoredItem = Opcua.ClientMonitoredItem.create( + const monitoredItem = ClientMonitoredItem.create( this.subscription, { nodeId: nodeToMonitor, - attributeId: Opcua.AttributeIds.Value, + attributeId: AttributeIds.Value, }, { samplingInterval: 2, discardOldest: true, queueSize: 1, }, - Opcua.TimestampsToReturn.Neither, + TimestampsToReturn.Neither, ) monitoredItem.on('changed', (dataValue) => this.manageDataValues([dataValue], nodesToMonitor)) @@ -194,38 +203,37 @@ class OPCUA_DA extends ProtocolHandler { const options = { applicationName: 'OIBus', connectionStrategy, - securityMode: Opcua.MessageSecurityMode[this.securityMode], - securityPolicy: Opcua.SecurityPolicy[this.securityPolicy], + securityMode: MessageSecurityMode[this.securityMode], + securityPolicy: SecurityPolicy[this.securityPolicy], endpointMustExist: false, keepSessionAlive: this.keepSessionAlive, + keepPendingSessionsOnDisconnect: false, clientName: this.clientName, // the id of the connector clientCertificateManager: this.clientCertificateManager, } - this.client = Opcua.OPCUAClient.create(options) - await this.client.connect(this.url) - let userIdentity = null + let userIdentity if (this.certificate.privateKey && this.certificate.cert) { userIdentity = { - type: Opcua.UserTokenType.Certificate, + type: UserTokenType.Certificate, certificateData: this.certificate.cert, privateKey: Buffer.from(this.certificate.privateKey, 'utf-8').toString(), } } else if (this.username) { userIdentity = { - type: Opcua.UserTokenType.UserName, + type: UserTokenType.UserName, userName: this.username, password: this.encryptionService.decryptText(this.password), } + } else { + userIdentity = { type: UserTokenType.Anonymous } } - this.session = await this.client.createSession(userIdentity) + this.session = await OPCUAClient.createSession(this.url, userIdentity, options) this.connected = true - this.logger.info('OPCUA_DA Connected') + this.logger.info(`OPCUA_DA ${this.dataSource.name} connected`) this.updateStatusDataStream({ 'Connected at': new Date().toISOString() }) } catch (error) { this.logger.error(error) - if (this.reconnectTimeout) { - clearTimeout(this.reconnectTimeout) - } + await this.disconnect() this.reconnectTimeout = setTimeout(this.connectToOpcuaServer.bind(this), this.retryInterval) } } diff --git a/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.spec.js b/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.spec.js index 95a313e2cb..1974a4f08d 100644 --- a/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.spec.js +++ b/src/south/OPCUA/OPCUA_DA/OPCUA_DA.class.spec.js @@ -1,14 +1,14 @@ -const Opcua = require('node-opcua') +const Opcua = require('node-opcua-client') const OPCUA_DA = require('./OPCUA_DA.class') const { defaultConfig: config } = require('../../../../tests/testConfig') const EncryptionService = require('../../../services/EncryptionService.class') // Mock node-opcua -jest.mock('node-opcua', () => ({ - OPCUAClient: { create: jest.fn() }, +jest.mock('node-opcua-client', () => ({ + OPCUAClient: { createSession: jest.fn() }, MessageSecurityMode: { None: 1 }, SecurityPolicy: { None: 'http://opcfoundation.org/UA/SecurityPolicy#None' }, - UserTokenType: { UserName: 1, Certificate: 2 }, + UserTokenType: { Anonymous: 0, UserName: 1, Certificate: 2 }, })) jest.mock('node-opcua-certificate-manager', () => ({ OPCUACertificateManager: jest.fn(() => ({})) })) @@ -70,18 +70,8 @@ beforeEach(async () => { describe('OPCUA-DA south', () => { it('should be properly initialized', () => { - expect(opcuaSouth.url) - .toEqual(opcuaConfig.OPCUA_DA.url) - expect(opcuaSouth.retryInterval) - .toEqual(opcuaConfig.OPCUA_DA.retryInterval) - }) - - it('should properly connect and set lastCompletedAt from database', async () => { - opcuaSouth.connectToOpcuaServer = jest.fn() - await opcuaSouth.connect() - - expect(opcuaSouth.connectToOpcuaServer) - .toHaveBeenCalledTimes(1) + expect(opcuaSouth.url).toEqual(opcuaConfig.OPCUA_DA.url) + expect(opcuaSouth.retryInterval).toEqual(opcuaConfig.OPCUA_DA.retryInterval) }) it('should properly connect to OPC UA server without password', async () => { @@ -97,25 +87,16 @@ describe('OPCUA-DA south', () => { securityPolicy: Opcua.SecurityPolicy.None, endpointMustExist: false, keepSessionAlive: false, + keepPendingSessionsOnDisconnect: false, clientCertificateManager: { state: 2 }, } - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn().mockReturnValue({}), - createSession: jest.fn().mockReturnValue({}), - }) + const expectedUserIdentity = { type: 0 } await opcuaSouth.connect() - expect(Opcua.OPCUAClient.create) - .toBeCalledWith(expectedOptions) - expect(opcuaSouth.client.connect) - .toBeCalledWith(opcuaConfig.OPCUA_DA.url) - expect(opcuaSouth.client.createSession) - .toBeCalledTimes(1) - expect(opcuaSouth.connected) - .toBeTruthy() - expect(setTimeoutSpy) - .not - .toBeCalled() + expect(Opcua.OPCUAClient.createSession).toBeCalledTimes(1) + expect(Opcua.OPCUAClient.createSession).toBeCalledWith(opcuaSouth.url, expectedUserIdentity, expectedOptions) + expect(opcuaSouth.connected).toBeTruthy() + expect(setTimeoutSpy).not.toBeCalled() }) it('should properly connect to OPC UA server with password', async () => { @@ -131,12 +112,9 @@ describe('OPCUA-DA south', () => { securityPolicy: Opcua.SecurityPolicy.None, endpointMustExist: false, keepSessionAlive: false, + keepPendingSessionsOnDisconnect: false, clientCertificateManager: { state: 2 }, } - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - }) opcuaSouth.username = 'username' opcuaSouth.password = 'password' @@ -149,52 +127,21 @@ describe('OPCUA-DA south', () => { userName: 'username', password: 'password', } - expect(Opcua.OPCUAClient.create) - .toBeCalledWith(expectedOptions) - expect(opcuaSouth.client.connect) - .toBeCalledWith(opcuaConfig.OPCUA_DA.url) - expect(opcuaSouth.client.createSession) - .toBeCalledWith(expectedUserIdentity) - expect(opcuaSouth.connected) - .toBeTruthy() - expect(setTimeoutSpy) - .not - .toBeCalled() + expect(Opcua.OPCUAClient.createSession).toBeCalledWith(opcuaSouth.url, expectedUserIdentity, expectedOptions) + expect(opcuaSouth.connected).toBeTruthy() + expect(setTimeoutSpy).not.toBeCalled() }) it('should properly retry connection to OPC UA server', async () => { const setTimeoutSpy = jest.spyOn(global, 'setTimeout') - const expectedOptions = { - applicationName: 'OIBus', - clientName: 'myConnectorId', - connectionStrategy: { - initialDelay: 1000, - maxRetry: 1, - }, - securityMode: Opcua.MessageSecurityMode.None, - securityPolicy: Opcua.SecurityPolicy.None, - endpointMustExist: false, - keepSessionAlive: false, - clientCertificateManager: { state: 2 }, - } - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(() => Promise.reject()), - createSession: jest.fn(), - }) + Opcua.OPCUAClient.createSession.mockReturnValue(new Promise((resolve, reject) => { + reject(new Error('test')) + })) await opcuaSouth.connect() - expect(Opcua.OPCUAClient.create) - .toBeCalledWith(expectedOptions) - expect(opcuaSouth.client.connect) - .toBeCalledWith(opcuaConfig.OPCUA_DA.url) - expect(opcuaSouth.client.createSession) - .not - .toBeCalled() - expect(opcuaSouth.connected) - .toBeFalsy() - expect(setTimeoutSpy) - .toHaveBeenLastCalledWith(expect.any(Function), opcuaConfig.OPCUA_DA.retryInterval) + expect(opcuaSouth.connected).toBeFalsy() + expect(setTimeoutSpy).toHaveBeenLastCalledWith(expect.any(Function), opcuaConfig.OPCUA_DA.retryInterval) }) it('should quit onScan if not connected', async () => { @@ -203,9 +150,7 @@ describe('OPCUA-DA south', () => { opcuaSouth.session = { readHistoryValue: jest.fn() } await opcuaSouth.lastPointQuery(opcuaConfig.points[0].scanMode) - expect(opcuaSouth.session.readHistoryValue) - .not - .toBeCalled() + expect(opcuaSouth.session.readHistoryValue).not.toBeCalled() }) it('should quit onScan if scanMode has no points to read', async () => { @@ -225,9 +170,7 @@ describe('OPCUA-DA south', () => { opcuaSouthTest.session = { readVariableValue: jest.fn() } await opcuaSouthTest.lastPointQuery(opcuaConfig.points[0].scanMode) - expect(opcuaSouthTest.session.readVariableValue) - .not - .toBeCalled() + expect(opcuaSouthTest.session.readVariableValue).not.toBeCalled() }) it('should properly call readVariableValue() and addValues()', async () => { @@ -246,67 +189,46 @@ describe('OPCUA-DA south', () => { opcuaSouth.addValues = jest.fn() await opcuaSouth.lastPointQuery(opcuaConfig.points[0].scanMode) - expect(opcuaSouth.session.readVariableValue) - .toBeCalledWith(['ns=3;s=Random']) - expect(opcuaSouth.addValues) - .toBeCalledWith([ - { - data: { - quality: JSON.stringify({ value: 0 }), - value: 666, - }, - pointId: 'Random', - timestamp: new Date(nowDateString).toISOString(), + expect(opcuaSouth.session.readVariableValue).toBeCalledWith(['ns=3;s=Random']) + expect(opcuaSouth.addValues).toBeCalledWith([ + { + data: { + quality: JSON.stringify({ value: 0 }), + value: 666, }, - ]) + pointId: 'Random', + timestamp: new Date(nowDateString).toISOString(), + }, + ]) global.Date = RealDate }) it('should properly disconnect when trying to connect', async () => { const clearTimeoutSpy = jest.spyOn(global, 'clearTimeout') - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - disconnect: jest.fn(), - }) await opcuaSouth.connect() opcuaSouth.reconnectTimeout = true opcuaSouth.connected = false - opcuaSouth.session = { close: jest.fn() } + const close = jest.fn() + opcuaSouth.session = { close } await opcuaSouth.disconnect() - expect(clearTimeoutSpy) - .toBeCalled() - expect(opcuaSouth.session.close) - .not - .toBeCalled() - expect(opcuaSouth.client.disconnect) - .not - .toBeCalled() + expect(clearTimeoutSpy).toBeCalled() + expect(close).not.toBeCalled() }) it('should properly disconnect when connected', async () => { const clearTimeoutSpy = jest.spyOn(global, 'clearTimeout') - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - disconnect: jest.fn(), - }) await opcuaSouth.connect() opcuaSouth.reconnectTimeout = false opcuaSouth.connected = true - opcuaSouth.session = { close: jest.fn() } + const close = jest.fn() + opcuaSouth.session = { close } await opcuaSouth.disconnect() - expect(clearTimeoutSpy) - .not - .toBeCalled() - expect(opcuaSouth.session.close) - .toBeCalled() - expect(opcuaSouth.client.disconnect) - .toBeCalled() + expect(clearTimeoutSpy).not.toBeCalled() + expect(close).toBeCalled() }) }) diff --git a/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.js b/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.js index 45ee4f06e0..bab5b95c7e 100644 --- a/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.js +++ b/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.js @@ -1,5 +1,17 @@ -const Opcua = require('node-opcua') +const { + OPCUAClient, + MessageSecurityMode, + SecurityPolicy, + TimestampsToReturn, + StatusCodes, + UserTokenType, + ReadProcessedDetails, + ReadRawModifiedDetails, + HistoryReadRequest, + AggregateFunction, +} = require('node-opcua-client') const { OPCUACertificateManager } = require('node-opcua-certificate-manager') + const ProtocolHandler = require('../../ProtocolHandler.class') const { initOpcuaCertificateFolders, MAX_NUMBER_OF_NODE_TO_LOG } = require('../opcua.service') @@ -68,6 +80,7 @@ class OPCUA_HA extends ProtocolHandler { */ async connect() { await super.connect() + await this.session?.close() // close the session if it already exists await this.connectToOpcuaServer() } @@ -75,7 +88,10 @@ class OPCUA_HA extends ProtocolHandler { await super.init() await initOpcuaCertificateFolders(this.encryptionService.certsFolder) if (!this.clientCertificateManager) { - this.clientCertificateManager = new OPCUACertificateManager({ rootFolder: `${this.encryptionService.certsFolder}/opcua` }) + this.clientCertificateManager = new OPCUACertificateManager({ + rootFolder: `${this.encryptionService.certsFolder}/opcua`, + automaticallyAcceptUnknownCertificate: true, + }) // Set the state to the CertificateManager to 2 (Initialized) to avoid a call to openssl // It is useful for offline instances of OIBus where downloading openssl is not possible this.clientCertificateManager.state = 2 @@ -149,14 +165,14 @@ class OPCUA_HA extends ProtocolHandler { } // we use the same aggregate for all nodes (OPCUA allows to have a different one for each) const aggregateType = Array(nodesToRead.length).fill(options.aggregateFn) - historyReadDetails = new Opcua.ReadProcessedDetails({ + historyReadDetails = new ReadProcessedDetails({ aggregateType, endTime, processingInterval: options.processingInterval, startTime, }) } else { - historyReadDetails = new Opcua.ReadRawModifiedDetails({ + historyReadDetails = new ReadRawModifiedDetails({ endTime, isReadModified: false, numValuesPerNode, @@ -164,16 +180,16 @@ class OPCUA_HA extends ProtocolHandler { startTime, }) } - const request = new Opcua.HistoryReadRequest({ + const request = new HistoryReadRequest({ historyReadDetails, nodesToRead, releaseContinuationPoints: false, - timestampsToReturn: Opcua.TimestampsToReturn.Both, + timestampsToReturn: TimestampsToReturn.Both, }) if (options?.timeout) request.requestHeader.timeoutHint = options.timeout // eslint-disable-next-line no-await-in-loop const response = await this.session.performMessageTransaction(request) - if (response?.responseHeader.serviceResult.isNot(Opcua.StatusCodes.Good)) { + if (response?.responseHeader.serviceResult.isNot(StatusCodes.Good)) { this.logger.error(new Error(response.responseHeader.serviceResult.toString())) } if (response?.results) { @@ -213,11 +229,11 @@ class OPCUA_HA extends ProtocolHandler { indexRange: undefined, nodeId: node.nodeId, })) - const response = await this.session.performMessageTransaction(new Opcua.HistoryReadRequest({ + const response = await this.session.performMessageTransaction(new HistoryReadRequest({ historyReadDetails, nodesToRead, releaseContinuationPoints: true, - timestampsToReturn: Opcua.TimestampsToReturn.Both, + timestampsToReturn: TimestampsToReturn.Both, })) if (response.responseHeader.serviceResult._value !== 0) { @@ -226,7 +242,7 @@ class OPCUA_HA extends ProtocolHandler { Object.keys(logs).forEach((statusCode) => { switch (statusCode) { - case Opcua.StatusCodes.BadIndexRangeNoData: // No data exists for the requested time range or event filter. + case StatusCodes.BadIndexRangeNoData: // No data exists for the requested time range or event filter. default: if (logs[statusCode].affectedNodes.length > MAX_NUMBER_OF_NODE_TO_LOG) { this.logger.debug(`${logs[statusCode].description} (${statusCode}): [${ @@ -283,16 +299,16 @@ class OPCUA_HA extends ProtocolHandler { } switch (scanGroup.aggregate) { case 'Average': - options.aggregateFn = Opcua.AggregateFunction.Average + options.aggregateFn = AggregateFunction.Average break case 'Minimum': - options.aggregateFn = Opcua.AggregateFunction.Minimum + options.aggregateFn = AggregateFunction.Minimum break case 'Maximum': - options.aggregateFn = Opcua.AggregateFunction.Maximum + options.aggregateFn = AggregateFunction.Maximum break case 'Count': - options.aggregateFn = Opcua.AggregateFunction.Count + options.aggregateFn = AggregateFunction.Count break case 'Raw': break @@ -382,8 +398,8 @@ class OPCUA_HA extends ProtocolHandler { } if (this.connected) { - await this.session.close() - await this.client.disconnect() + await this.session?.close() + this.session = null } await super.disconnect() } @@ -402,40 +418,38 @@ class OPCUA_HA extends ProtocolHandler { const options = { applicationName: 'OIBus', connectionStrategy, - securityMode: Opcua.MessageSecurityMode[this.securityMode], - securityPolicy: Opcua.SecurityPolicy[this.securityPolicy], + securityMode: MessageSecurityMode[this.securityMode], + securityPolicy: SecurityPolicy[this.securityPolicy], endpointMustExist: false, keepSessionAlive: this.keepSessionAlive, + keepPendingSessionsOnDisconnect: false, clientName: this.clientName, // the id of the connector clientCertificateManager: this.clientCertificateManager, } - this.client = Opcua.OPCUAClient.create(options) - await this.client.connect(this.url) - let userIdentity = null + let userIdentity if (this.certificate.privateKey && this.certificate.cert) { userIdentity = { - type: Opcua.UserTokenType.Certificate, + type: UserTokenType.Certificate, certificateData: this.certificate.cert, - privateKey: Buffer.from(this.certificate.privateKey, 'utf-8') - .toString(), + privateKey: Buffer.from(this.certificate.privateKey, 'utf-8').toString(), } } else if (this.username) { userIdentity = { - type: Opcua.UserTokenType.UserName, + type: UserTokenType.UserName, userName: this.username, password: this.encryptionService.decryptText(this.password), } + } else { + userIdentity = { type: UserTokenType.Anonymous } } - this.session = await this.client.createSession(userIdentity) + this.session = await OPCUAClient.createSession(this.url, userIdentity, options) this.connected = true - this.logger.info('OPCUA_HA Connected') + this.logger.info(`OPCUA_HA ${this.dataSource.name} connected`) this.updateStatusDataStream({ 'Connected at': new Date().toISOString() }) } catch (error) { this.logger.error(error) - if (this.reconnectTimeout) { - clearTimeout(this.reconnectTimeout) - } + await this.disconnect() this.reconnectTimeout = setTimeout(this.connectToOpcuaServer.bind(this), this.retryInterval) } } diff --git a/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.spec.js b/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.spec.js index ffd47c168c..b83e25061c 100644 --- a/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.spec.js +++ b/src/south/OPCUA/OPCUA_HA/OPCUA_HA.class.spec.js @@ -1,4 +1,4 @@ -const Opcua = require('node-opcua') +const Opcua = require('node-opcua-client') const OPCUA_HA = require('./OPCUA_HA.class') const { defaultConfig: config } = require('../../../../tests/testConfig') @@ -7,11 +7,11 @@ const databaseService = require('../../../services/database.service') const EncryptionService = require('../../../services/EncryptionService.class') // Mock node-opcua -jest.mock('node-opcua', () => ({ - OPCUAClient: { create: jest.fn() }, +jest.mock('node-opcua-client', () => ({ + OPCUAClient: { createSession: jest.fn() }, MessageSecurityMode: { None: 1 }, SecurityPolicy: { None: 'http://opcfoundation.org/UA/SecurityPolicy#None' }, - UserTokenType: { UserName: 1, Certificate: 2 }, + UserTokenType: { Anonymous: 0, UserName: 1, Certificate: 2 }, })) jest.mock('node-opcua-certificate-manager', () => ({ OPCUACertificateManager: jest.fn(() => ({})) })) @@ -93,14 +93,10 @@ beforeEach(async () => { describe('OPCUA-HA south', () => { it('should be properly initialized', () => { - expect(opcuaSouth.url) - .toEqual(opcuaConfig.OPCUA_HA.url) - expect(opcuaSouth.retryInterval) - .toEqual(opcuaConfig.OPCUA_HA.retryInterval) - expect(opcuaSouth.maxReadInterval) - .toEqual(opcuaConfig.OPCUA_HA.maxReadInterval) - expect(opcuaSouth.reconnectTimeout) - .toBeNull() + expect(opcuaSouth.url).toEqual(opcuaConfig.OPCUA_HA.url) + expect(opcuaSouth.retryInterval).toEqual(opcuaConfig.OPCUA_HA.retryInterval) + expect(opcuaSouth.maxReadInterval).toEqual(opcuaConfig.OPCUA_HA.maxReadInterval) + expect(opcuaSouth.reconnectTimeout).toBeNull() }) it('should properly connect and set lastCompletedAt from database', async () => { @@ -108,21 +104,14 @@ describe('OPCUA-HA south', () => { opcuaSouth.connectToOpcuaServer = jest.fn() await opcuaSouth.connect() - expect(opcuaSouth.scanGroups) - .toEqual(opcuaScanGroups) - expect(Object.keys(opcuaSouth.lastCompletedAt)) - .toEqual([opcuaConfig.OPCUA_HA.scanGroups[0].scanMode]) - expect(Object.keys(opcuaSouth.ongoingReads)) - .toEqual([opcuaConfig.OPCUA_HA.scanGroups[0].scanMode]) - - expect(databaseService.createConfigDatabase) - .toBeCalledWith(`${config.engine.caching.cacheFolder}/${opcuaConfig.id}.db`) - expect(databaseService.getConfig) - .toHaveBeenCalledTimes(2) - expect(opcuaSouth.lastCompletedAt.every10Second) - .toEqual(new Date('2020-04-23T11:09:01.001Z')) - expect(opcuaSouth.connectToOpcuaServer) - .toHaveBeenCalledTimes(1) + expect(opcuaSouth.scanGroups).toEqual(opcuaScanGroups) + expect(Object.keys(opcuaSouth.lastCompletedAt)).toEqual([opcuaConfig.OPCUA_HA.scanGroups[0].scanMode]) + expect(Object.keys(opcuaSouth.ongoingReads)).toEqual([opcuaConfig.OPCUA_HA.scanGroups[0].scanMode]) + + expect(databaseService.createConfigDatabase).toBeCalledWith(`${config.engine.caching.cacheFolder}/${opcuaConfig.id}.db`) + expect(databaseService.getConfig).toHaveBeenCalledTimes(2) + expect(opcuaSouth.lastCompletedAt.every10Second).toEqual(new Date('2020-04-23T11:09:01.001Z')) + expect(opcuaSouth.connectToOpcuaServer).toHaveBeenCalledTimes(1) }) it('should properly connect and set lastCompletedAt from config file', async () => { @@ -130,14 +119,10 @@ describe('OPCUA-HA south', () => { opcuaSouth.connectToOpcuaServer = jest.fn() await opcuaSouth.connect() - expect(databaseService.createConfigDatabase) - .toBeCalledWith(`${config.engine.caching.cacheFolder}/${opcuaConfig.id}.db`) - expect(databaseService.getConfig) - .toHaveBeenCalledTimes(2) - expect(opcuaSouth.lastCompletedAt.every10Second) - .toEqual(new Date(opcuaConfig.startTime)) - expect(opcuaSouth.connectToOpcuaServer) - .toHaveBeenCalledTimes(1) + expect(databaseService.createConfigDatabase).toBeCalledWith(`${config.engine.caching.cacheFolder}/${opcuaConfig.id}.db`) + expect(databaseService.getConfig).toHaveBeenCalledTimes(2) + expect(opcuaSouth.lastCompletedAt.every10Second).toEqual(new Date(opcuaConfig.startTime)) + expect(opcuaSouth.connectToOpcuaServer).toHaveBeenCalledTimes(1) }) it('should properly connect and set lastCompletedAt now', async () => { @@ -150,15 +135,10 @@ describe('OPCUA-HA south', () => { opcuaSouthWithoutStartTime.connectToOpcuaServer = jest.fn() await opcuaSouthWithoutStartTime.connect() - expect(databaseService.createConfigDatabase) - .toBeCalledWith(`${config.engine.caching.cacheFolder}/${opcuaConfig.id}.db`) - expect(databaseService.getConfig) - .toHaveBeenCalledTimes(2) - expect(opcuaSouthWithoutStartTime.lastCompletedAt.every10Second) - .not - .toEqual(new Date(opcuaConfig.originalStartTime).getTime()) - expect(opcuaSouthWithoutStartTime.connectToOpcuaServer) - .toHaveBeenCalledTimes(1) + expect(databaseService.createConfigDatabase).toBeCalledWith(`${config.engine.caching.cacheFolder}/${opcuaConfig.id}.db`) + expect(databaseService.getConfig).toHaveBeenCalledTimes(2) + expect(opcuaSouthWithoutStartTime.lastCompletedAt.every10Second).not.toEqual(new Date(opcuaConfig.originalStartTime).getTime()) + expect(opcuaSouthWithoutStartTime.connectToOpcuaServer).toHaveBeenCalledTimes(1) }) it('should properly connect to OPC UA server without password', async () => { @@ -174,26 +154,16 @@ describe('OPCUA-HA south', () => { securityPolicy: Opcua.SecurityPolicy.None, endpointMustExist: false, keepSessionAlive: false, + keepPendingSessionsOnDisconnect: false, clientCertificateManager: { state: 2 }, } - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - }) + const expectedUserIdentity = { type: 0 } await opcuaSouth.connect() - expect(Opcua.OPCUAClient.create) - .toBeCalledWith(expectedOptions) - expect(opcuaSouth.client.connect) - .toBeCalledWith(opcuaConfig.OPCUA_HA.url) - expect(opcuaSouth.client.createSession) - .toBeCalledTimes(1) - expect(opcuaSouth.connected) - .toBeTruthy() - expect(setTimeoutSpy) - .not - .toBeCalled() + expect(opcuaSouth.connected).toBeTruthy() + expect(Opcua.OPCUAClient.createSession).toBeCalledWith(opcuaSouth.url, expectedUserIdentity, expectedOptions) + expect(setTimeoutSpy).not.toBeCalled() }) it('should properly connect to OPC UA server with password', async () => { @@ -209,12 +179,9 @@ describe('OPCUA-HA south', () => { securityPolicy: Opcua.SecurityPolicy.None, endpointMustExist: false, keepSessionAlive: false, + keepPendingSessionsOnDisconnect: false, clientCertificateManager: { state: 2 }, } - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - }) opcuaSouth.username = 'username' opcuaSouth.password = 'password' @@ -227,52 +194,21 @@ describe('OPCUA-HA south', () => { userName: 'username', password: 'password', } - expect(Opcua.OPCUAClient.create) - .toBeCalledWith(expectedOptions) - expect(opcuaSouth.client.connect) - .toBeCalledWith(opcuaConfig.OPCUA_HA.url) - expect(opcuaSouth.client.createSession) - .toBeCalledWith(expectedUserIdentity) - expect(opcuaSouth.connected) - .toBeTruthy() - expect(setTimeoutSpy) - .not - .toBeCalled() + expect(Opcua.OPCUAClient.createSession).toBeCalledWith(opcuaSouth.url, expectedUserIdentity, expectedOptions) + expect(opcuaSouth.connected).toBeTruthy() + expect(setTimeoutSpy).not.toBeCalled() }) it('should properly retry connection to OPC UA server', async () => { const setTimeoutSpy = jest.spyOn(global, 'setTimeout') - const expectedOptions = { - applicationName: 'OIBus', - clientName: 'myConnectorId', - connectionStrategy: { - initialDelay: 1000, - maxRetry: 1, - }, - securityMode: Opcua.MessageSecurityMode.None, - securityPolicy: Opcua.SecurityPolicy.None, - endpointMustExist: false, - keepSessionAlive: false, - clientCertificateManager: { state: 2 }, - } - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(() => Promise.reject()), - createSession: jest.fn(), - }) + Opcua.OPCUAClient.createSession.mockReturnValue(new Promise((resolve, reject) => { + reject(new Error('test')) + })) await opcuaSouth.connect() - expect(Opcua.OPCUAClient.create) - .toBeCalledWith(expectedOptions) - expect(opcuaSouth.client.connect) - .toBeCalledWith(opcuaConfig.OPCUA_HA.url) - expect(opcuaSouth.client.createSession) - .not - .toBeCalled() - expect(opcuaSouth.connected) - .toBeFalsy() - expect(setTimeoutSpy) - .toHaveBeenLastCalledWith(expect.any(Function), opcuaConfig.OPCUA_HA.retryInterval) + expect(opcuaSouth.connected).toBeFalsy() + expect(setTimeoutSpy).toHaveBeenLastCalledWith(expect.any(Function), opcuaConfig.OPCUA_HA.retryInterval) }) it('should quit onScan if not connected', async () => { @@ -283,9 +219,7 @@ describe('OPCUA-HA south', () => { opcuaSouth.session = { readHistoryValue: jest.fn() } await opcuaSouth.historyQueryHandler(opcuaConfig.OPCUA_HA.scanGroups[0].scanMode) - expect(opcuaSouth.session.readHistoryValue) - .not - .toBeCalled() + expect(opcuaSouth.session.readHistoryValue).not.toBeCalled() }) it('should quit onScan if previous read did not complete', async () => { @@ -297,9 +231,7 @@ describe('OPCUA-HA south', () => { opcuaSouth.session = { readHistoryValue: jest.fn() } await opcuaSouth.historyQueryHandler(opcuaConfig.OPCUA_HA.scanGroups[0].scanMode) - expect(opcuaSouth.session.readHistoryValue) - .not - .toBeCalled() + expect(opcuaSouth.session.readHistoryValue).not.toBeCalled() }) it('should quit onScan if scan group has no points to read', async () => { @@ -319,9 +251,7 @@ describe('OPCUA-HA south', () => { opcuaSouthWithoutPointsScanMode.session = { readHistoryValue: jest.fn() } await opcuaSouthWithoutPointsScanMode.historyQueryHandler(opcuaConfig.OPCUA_HA.scanGroups[0].scanMode) - expect(opcuaSouthWithoutPointsScanMode.session.readHistoryValue) - .not - .toBeCalled() + expect(opcuaSouthWithoutPointsScanMode.session.readHistoryValue).not.toBeCalled() }) it('should in onScan call readHistoryValue once if maxReadInterval is bigger than the read interval', async () => { @@ -367,22 +297,16 @@ describe('OPCUA-HA south', () => { quality: '{"value":0}', }, } - expect(opcuaSouth.readHistoryValue) - .toBeCalledTimes(1) - expect(opcuaSouth.readHistoryValue) - .toBeCalledWith([opcuaConfig.points[0]], startDate, nowDate, { numValuesPerNode: 1000, timeout: 600000 }) - expect(opcuaSouth.addValues) - .toBeCalledTimes(1) - expect(opcuaSouth.addValues) - .toBeCalledWith([expectedValue]) - expect(databaseService.upsertConfig) - .toBeCalledWith( - 'configDatabase', - `lastCompletedAt-${opcuaConfig.OPCUA_HA.scanGroups[0].scanMode}`, - new Date(sampleDate.getTime() + 1).toISOString(), - ) - expect(opcuaSouth.ongoingReads[opcuaConfig.OPCUA_HA.scanGroups[0].scanMode]) - .toBeFalsy() + expect(opcuaSouth.readHistoryValue).toBeCalledTimes(1) + expect(opcuaSouth.readHistoryValue).toBeCalledWith([opcuaConfig.points[0]], startDate, nowDate, { numValuesPerNode: 1000, timeout: 600000 }) + expect(opcuaSouth.addValues).toBeCalledTimes(1) + expect(opcuaSouth.addValues).toBeCalledWith([expectedValue]) + expect(databaseService.upsertConfig).toBeCalledWith( + 'configDatabase', + `lastCompletedAt-${opcuaConfig.OPCUA_HA.scanGroups[0].scanMode}`, + new Date(sampleDate.getTime() + 1).toISOString(), + ) + expect(opcuaSouth.ongoingReads[opcuaConfig.OPCUA_HA.scanGroups[0].scanMode]).toBeFalsy() expect(opcuaSouth.delay).not.toBeCalled() }) @@ -404,8 +328,7 @@ describe('OPCUA-HA south', () => { await opcuaSouth.historyQueryHandler(opcuaConfig.OPCUA_HA.scanGroups[0].scanMode) - expect(opcuaSouth.readHistoryValue) - .toBeCalledTimes(3) + expect(opcuaSouth.readHistoryValue).toBeCalledTimes(3) expect(opcuaSouth.delay).toBeCalledTimes(2) expect(opcuaSouth.delay.mock.calls).toEqual([[200], [200]]) }) @@ -424,18 +347,11 @@ describe('OPCUA-HA south', () => { await opcuaSouth.historyQueryHandler(opcuaConfig.OPCUA_HA.scanGroups[0].scanMode) - expect(opcuaSouth.readHistoryValue) - .toBeCalledTimes(1) - expect(opcuaSouth.logger.error) - .toHaveBeenCalledWith('Received 0 data values, requested 1 nodes') + expect(opcuaSouth.readHistoryValue).toBeCalledTimes(1) + expect(opcuaSouth.logger.error).toHaveBeenCalledWith('Received 0 data values, requested 1 nodes') }) it('should onScan catch errors', async () => { - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - disconnect: jest.fn(), - }) await opcuaSouth.connect() opcuaSouth.connected = true opcuaSouth.ongoingReads[opcuaConfig.OPCUA_HA.scanGroups[0].scanMode] = false @@ -444,56 +360,35 @@ describe('OPCUA-HA south', () => { opcuaSouth.session = { close: jest.fn() } await opcuaSouth.historyQueryHandler(opcuaConfig.OPCUA_HA.scanGroups[0].scanMode) - expect(opcuaSouth.readHistoryValue) - .toBeCalled() - expect(opcuaSouth.logger.error) - .toHaveBeenCalled() + expect(opcuaSouth.readHistoryValue).toBeCalled() + expect(opcuaSouth.logger.error).toHaveBeenCalled() }) it('should properly disconnect when trying to connect', async () => { const clearTimeoutSpy = jest.spyOn(global, 'clearTimeout') - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - disconnect: jest.fn(), - }) await opcuaSouth.connect() opcuaSouth.reconnectTimeout = true opcuaSouth.connected = false - opcuaSouth.session = { close: jest.fn() } + const close = jest.fn() + opcuaSouth.session = { close } await opcuaSouth.disconnect() - expect(clearTimeoutSpy) - .toBeCalled() - expect(opcuaSouth.session.close) - .not - .toBeCalled() - expect(opcuaSouth.client.disconnect) - .not - .toBeCalled() + expect(clearTimeoutSpy).toBeCalled() + expect(close).not.toBeCalled() }) it('should properly disconnect when connected', async () => { const clearTimeoutSpy = jest.spyOn(global, 'clearTimeout') - Opcua.OPCUAClient.create.mockReturnValue({ - connect: jest.fn(), - createSession: jest.fn(), - disconnect: jest.fn(), - }) await opcuaSouth.connect() opcuaSouth.reconnectTimeout = false opcuaSouth.connected = true - opcuaSouth.session = { close: jest.fn() } + const close = jest.fn() + opcuaSouth.session = { close } await opcuaSouth.disconnect() - expect(clearTimeoutSpy) - .not - .toBeCalled() - expect(opcuaSouth.session.close) - .toBeCalled() - expect(opcuaSouth.client.disconnect) - .toBeCalled() + expect(clearTimeoutSpy).not.toBeCalled() + expect(close).toBeCalled() }) }) diff --git a/tests/csv/archived/fichier.csv b/tests/csv/archived/fichier.csv deleted file mode 100644 index 2fa04741a0..0000000000 --- a/tests/csv/archived/fichier.csv +++ /dev/null @@ -1,3 +0,0 @@ -timeStamp,sensor1-value,sensor1-quality,sensor3,sensor4 -"01/10/18 11:01 ","34.6530599","90.7057566","10.1564125","32.5156548" -"01/10/18 11:15 ","7.44583695","75.7873194","81.9485416","99.9999999" \ No newline at end of file