@kronos-integration/service-mqtt 4.0.11 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/service-mqtt.mjs +10 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/service-mqtt",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@kronos-integration/service": "^15.1.1",
|
|
37
37
|
"mqtt": "^5.14.1",
|
|
38
|
-
"pacc": "^5.
|
|
38
|
+
"pacc": "^5.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"ava": "^6.4.1",
|
package/src/service-mqtt.mjs
CHANGED
|
@@ -50,8 +50,8 @@ export class ServiceMQTT extends Service {
|
|
|
50
50
|
...integer_attribute_writable,
|
|
51
51
|
connectionOption: true
|
|
52
52
|
},
|
|
53
|
-
username:
|
|
54
|
-
password:
|
|
53
|
+
username: username_attribute,
|
|
54
|
+
password: password_attribute
|
|
55
55
|
},
|
|
56
56
|
Service.attributes
|
|
57
57
|
);
|
|
@@ -86,16 +86,14 @@ export class ServiceMQTT extends Service {
|
|
|
86
86
|
async _start() {
|
|
87
87
|
await super._start();
|
|
88
88
|
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const client = connect(this.url, options);
|
|
89
|
+
const client = connect(this.url, {
|
|
90
|
+
...getAttributesJSON(
|
|
91
|
+
this,
|
|
92
|
+
this.attributes,
|
|
93
|
+
(name, attribute) => attribute.connectionOption
|
|
94
|
+
),
|
|
95
|
+
...(await this.getCredentials())
|
|
96
|
+
});
|
|
99
97
|
|
|
100
98
|
this.client = client;
|
|
101
99
|
|