@kronos-integration/service-mqtt 3.3.7 → 3.3.9

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": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -25,20 +25,17 @@
25
25
  ],
26
26
  "license": "BSD-2-Clause",
27
27
  "scripts": {
28
- "prepare": "node --run prepare:typescript",
29
- "prepare:typescript": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext --rootDir src ./src**/*.mjs",
30
28
  "test": "node --run test:ava",
31
29
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
32
30
  "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
33
31
  "docs": "documentation readme --section=API ./src/**/*.mjs",
34
- "lint": "node --run lint:docs && node --run lint:typescript",
35
- "lint:docs": "documentation lint ./src/**/*.mjs",
36
- "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
32
+ "lint": "node --run lint:docs",
33
+ "lint:docs": "documentation lint ./src/**/*.mjs"
37
34
  },
38
35
  "dependencies": {
39
- "@kronos-integration/service": "^13.1.12",
40
- "mqtt": "^5.13.3",
41
- "pacc": "^4.4.0"
36
+ "@kronos-integration/service": "^13.2.5",
37
+ "mqtt": "^5.14.0",
38
+ "pacc": "^4.5.3"
42
39
  },
43
40
  "devDependencies": {
44
41
  "ava": "^6.4.1",
@@ -46,8 +43,7 @@
46
43
  "documentation": "^14.0.3",
47
44
  "got": "^14.4.7",
48
45
  "network-address": "^1.1.2",
49
- "semantic-release": "^24.2.7",
50
- "typescript": "^5.8.3"
46
+ "semantic-release": "^24.2.7"
51
47
  },
52
48
  "engines": {
53
49
  "node": ">=22.17.1"
@@ -59,8 +55,7 @@
59
55
  "template": {
60
56
  "inheritFrom": [
61
57
  "arlac77/template-arlac77-github",
62
- "arlac77/template-kronos-component",
63
- "arlac77/template-typescript"
58
+ "arlac77/template-kronos-component"
64
59
  ]
65
60
  }
66
61
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  prepareAttributesDefinitions,
3
- string_attribute,
3
+ string_attribute_writable,
4
4
  url_attribute,
5
- boolean_attribute,
5
+ boolean_attribute_writable_false,
6
6
  username_attribute,
7
7
  password_attribute,
8
8
  timeout_attribute,
9
- integer_attribute
9
+ integer_attribute_writable
10
10
  } from "pacc";
11
11
  import { Service } from "@kronos-integration/service";
12
12
  import { connect } from "mqtt";
@@ -37,16 +37,16 @@ export class ServiceMQTT extends Service {
37
37
  needsRestart: true
38
38
  },
39
39
  keepalive: {
40
- ...integer_attribute,
40
+ ...integer_attribute_writable,
41
41
  default: 60,
42
42
  isConnectionOption: true
43
43
  },
44
- clean: { ...boolean_attribute, isConnectionOption: true },
45
- clientId: { ...string_attribute, isConnectionOption: true },
44
+ clean: { ...boolean_attribute_writable_false, isConnectionOption: true },
45
+ clientId: { ...string_attribute_writable, isConnectionOption: true },
46
46
  connectTimeout: { ...timeout_attribute, isConnectionOption: true },
47
47
  reconnectPeriod: {
48
- ...integer_attribute,
49
- isConnectionOption: true,
48
+ ...integer_attribute_writable,
49
+ isConnectionOption: true
50
50
  },
51
51
  username: username_attribute,
52
52
  password: password_attribute
@@ -112,8 +112,7 @@ export class ServiceMQTT extends Service {
112
112
  const ep = this.endpoints[topic];
113
113
  if (ep) {
114
114
  ep.send(message);
115
- }
116
- else {
115
+ } else {
117
116
  this.error(`no endpoint for topic ${topic}`);
118
117
  }
119
118
  });
@@ -1,18 +0,0 @@
1
- export { TopicEndpoint };
2
- /**
3
- * MQTT client.
4
- */
5
- export class ServiceMQTT extends Service {
6
- get topics(): any[];
7
- /**
8
- * On demand create TopicEndpoint.
9
- * @param {string} name
10
- * @param {Object|string} definition
11
- * @return {Class} TopicEndpoint if path is present of name starts with '/'
12
- */
13
- endpointFactoryFromConfig(name: string, definition: any | string, ic: any): Class;
14
- client: import("mqtt").MqttClient;
15
- }
16
- export default ServiceMQTT;
17
- import { TopicEndpoint } from "./topic-endpoint.mjs";
18
- import { Service } from "@kronos-integration/service";
@@ -1,6 +0,0 @@
1
- export class TopicEndpoint extends SendEndpoint {
2
- constructor(name: any, owner: any, options: any);
3
- _topic: any;
4
- get topic(): any;
5
- }
6
- import { SendEndpoint } from "@kronos-integration/endpoint";