iobroker.zigbee 3.0.5 → 3.1.4

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": "iobroker.zigbee",
3
- "version": "3.0.5",
3
+ "version": "3.1.4",
4
4
  "author": {
5
5
  "name": "Kirov Ilya",
6
6
  "email": "kirovilya@gmail.com"
@@ -21,15 +21,15 @@
21
21
  "serialport": "^13.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@iobroker/adapter-core": "^3.2.3",
24
+ "@iobroker/adapter-core": "^3.3.2",
25
25
  "@iobroker/dm-utils": "^1.0.10",
26
26
  "humanize-duration": "^3.33.0",
27
27
  "tar": "^7.4.3",
28
28
  "ajv": "^8.17.1",
29
29
  "uri-js": "^4.4.1",
30
- "typescript": "^5.8.3",
31
- "zigbee-herdsman": "4.4.1",
32
- "zigbee-herdsman-converters": "24.8.0"
30
+ "typescript": "^5.9.2",
31
+ "zigbee-herdsman": "^6.0.0",
32
+ "zigbee-herdsman-converters": "25.31.0"
33
33
  },
34
34
  "description": "Zigbee devices",
35
35
  "devDependencies": {
@@ -37,17 +37,14 @@
37
37
  "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
38
38
  "@alcalzone/release-script-plugin-license": "^3.7.0",
39
39
  "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
40
- "@iobroker/testing": "^5.0.4",
40
+ "@iobroker/testing": "^5.1.0",
41
41
  "chai": "^5.2.1",
42
42
  "chai-as-promised": "^7.1.1",
43
43
  "eslint": "^9.30.0",
44
44
  "eslint-config-prettier": "^9.1.0",
45
- "eslint-plugin-prettier": "^5.5.3",
46
- "gulp": "^4.0.2",
47
- "gulp-jsdoc3": "^3.0.0",
48
- "gulp-replace": "^1.1.4",
45
+ "eslint-plugin-prettier": "^5.5.4",
49
46
  "mixin-deep": "^2.0.1",
50
- "mocha": "^11.1.0",
47
+ "mocha": "^11.7.1",
51
48
  "@iobroker/dev-server": "^0.7.8"
52
49
  },
53
50
  "homepage": "https://github.com/ioBroker/ioBroker.zigbee",
package/lib/tools.js DELETED
@@ -1,55 +0,0 @@
1
- 'use strict';
2
-
3
- const axios = require('axios');
4
-
5
- /**
6
- * Tests whether the given variable is a real object and not an Array
7
- * @param {any} it The variable to test
8
- * @returns {it is Record<string, any>}
9
- */
10
- function isObject(it) {
11
- // This is necessary because:
12
- // typeof null === 'object'
13
- // typeof [] === 'object'
14
- // [] instanceof Object === true
15
- return Object.prototype.toString.call(it) === '[object Object]';
16
- }
17
-
18
- /**
19
- * Tests whether the given variable is really an Array
20
- * @param {any} it The variable to test
21
- * @returns {it is any[]}
22
- */
23
- function isArray(it) {
24
- if (Array.isArray != null)
25
- return Array.isArray(it);
26
- return Object.prototype.toString.call(it) === '[object Array]';
27
- }
28
-
29
- /**
30
- * Translates text using the Google Translate API
31
- * @param {string} text The text to translate
32
- * @param {string} targetLang The target languate
33
- * @returns {Promise<string>}
34
- */
35
- async function translateText(text, targetLang) {
36
- if (targetLang === 'en')
37
- return text;
38
- try {
39
- const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`;
40
- const response = await axios({url, timeout: 5000});
41
- if (isArray(response.data)) {
42
- // we got a valid response
43
- return response.data[0][0][0];
44
- }
45
- throw new Error('Invalid response for translate request');
46
- } catch (e) {
47
- throw new Error(`Could not translate to "${targetLang}": ${e}`);
48
- }
49
- }
50
-
51
- module.exports = {
52
- isArray,
53
- isObject,
54
- translateText
55
- };