@kronos-integration/service-mqtt 4.0.10 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-mqtt",
3
- "version": "4.0.10",
3
+ "version": "4.0.12",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -33,9 +33,9 @@
33
33
  "lint:docs": "documentation lint ./src/**/*.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@kronos-integration/service": "^15.0.2",
36
+ "@kronos-integration/service": "^15.1.1",
37
37
  "mqtt": "^5.14.1",
38
- "pacc": "^5.0.0"
38
+ "pacc": "^5.2.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "ava": "^6.4.1",
@@ -50,8 +50,8 @@ export class ServiceMQTT extends Service {
50
50
  ...integer_attribute_writable,
51
51
  connectionOption: true
52
52
  },
53
- username: { ...username_attribute, credential: true },
54
- password: { ...password_attribute, credential: true }
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 options = getAttributesJSON(
90
- this,
91
- this.attributes,
92
- (name, attribute) => attribute.connectionOption
93
- );
94
-
95
- options.username = await this.getCredential("username");
96
- options.password = await this.getCredential("password");
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