@kronos-integration/service-mqtt 3.3.8 → 3.3.10

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.
@@ -18,7 +18,7 @@ jobs:
18
18
  os:
19
19
  - ubuntu-latest
20
20
  node-version:
21
- - 22.17.1
21
+ - 22.18.0
22
22
  - 24.4.1
23
23
  steps:
24
24
  - name: checkout
@@ -63,7 +63,7 @@ jobs:
63
63
  - name: prepare node
64
64
  uses: actions/setup-node@v4.4.0
65
65
  with:
66
- node-version: 22.17.1
66
+ node-version: 22.18.0
67
67
  cache: npm
68
68
  cache-dependency-path: package-lock.json
69
69
  - name: install
@@ -23,7 +23,7 @@ jobs:
23
23
  - name: prepare node
24
24
  uses: actions/setup-node@v4.4.0
25
25
  with:
26
- node-version: 22.17.1
26
+ node-version: 22.18.0
27
27
  cache: npm
28
28
  - name: install
29
29
  run: npm ci
@@ -11,7 +11,7 @@ jobs:
11
11
  strategy:
12
12
  matrix:
13
13
  node-version:
14
- - 22.17.1
14
+ - 22.18.0
15
15
  browser:
16
16
  - chrome
17
17
  steps:
@@ -14,7 +14,7 @@ jobs:
14
14
  - name: prepare node
15
15
  uses: actions/setup-node@v4.4.0
16
16
  with:
17
- node-version: 22.17.1
17
+ node-version: 22.18.0
18
18
  - name: install
19
19
  run: npm ci
20
20
  - name: run docs
package/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  [![License](https://img.shields.io/badge/License-0BSD-blue.svg)](https://spdx.org/licenses/0BSD.html)
2
- [![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\&label\&labelColor=blue\&color=555555)](https://typescriptlang.org)
3
2
  [![GitHub Issues](https://img.shields.io/github/issues/Kronos-Integration/service-mqtt.svg?style=flat-square)](https://github.com/Kronos-Integration/service-mqtt/issues)
4
3
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FKronos-Integration%2Fservice-mqtt%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/Kronos-Integration/service-mqtt/goto)
5
4
  [![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-mqtt",
3
- "version": "3.3.8",
3
+ "version": "3.3.10",
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.14",
40
- "mqtt": "^5.13.3",
41
- "pacc": "^4.4.0"
36
+ "@kronos-integration/service": "^13.2.7",
37
+ "mqtt": "^5.14.0",
38
+ "pacc": "^4.6.0"
42
39
  },
43
40
  "devDependencies": {
44
41
  "ava": "^6.4.1",
@@ -46,11 +43,10 @@
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
- "node": ">=22.17.1"
49
+ "node": ">=22.18.0"
54
50
  },
55
51
  "repository": {
56
52
  "type": "git",
@@ -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";