iobroker.gotify-ws 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -65,6 +65,10 @@ You can then configure a notification service of your choice for forwarding.
65
65
  ---
66
66
  <!-- ### **WORK IN PROGRESS** -->
67
67
  ## Changelog
68
+ ### 0.1.3 (2024-07-17)
69
+ * (simatec) Fix Test & Release
70
+ * (simatec) Fix Timeout
71
+
68
72
  ### 0.1.2 (2024-06-26)
69
73
  * (simatec) Fix io-package
70
74
  * (simatec) Notification-Manager added
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "gotify-ws",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "news": {
6
+ "0.1.3": {
7
+ "en": "Fix Test & Release\nFix Timeout",
8
+ "de": "Test und Release\nTimeout reparieren",
9
+ "ru": "Fix Test & Release\nВремя ожидания",
10
+ "pt": "Teste de Fix & Release\nFix Timeout",
11
+ "nl": "Repareren Test & Release\nTijdslimiet herstellen",
12
+ "fr": "Correction du test et de la libération\nCorrection du délai",
13
+ "it": "Prova di correzione e rilascio\nRisolto il timeout",
14
+ "es": "Reparación de prueba\nCorrección de tiempo",
15
+ "pl": "Napraw test i wydaj\nPopraw czas",
16
+ "uk": "Тестування та реліз\nВиправлення часу",
17
+ "zh-cn": "修复测试和释放\n修正超时"
18
+ },
6
19
  "0.1.2": {
7
20
  "en": "(simatec) Fix io-package\n(simatec) Notification-Manager added",
8
21
  "de": "(simatec)\n(simatec) Notification-Manager hinzugefügt",
package/main.js CHANGED
@@ -33,22 +33,22 @@ class GotifyWs extends utils.Adapter {
33
33
  systemLang = sysLang.common.language;
34
34
  }
35
35
 
36
- this.setState('info.connection', false, true);
36
+ await this.setStateAsync('info.connection', false, true);
37
37
  this.connectWebSocket();
38
38
  }
39
39
 
40
40
  /**
41
41
  * @param {() => void} callback
42
42
  */
43
- onUnload(callback) {
44
- this.setState('info.connection', false, true);
43
+ async onUnload(callback) {
44
+ await this.setStateAsync('info.connection', false, true);
45
45
 
46
46
  try {
47
47
  if (ws) {
48
48
  stop = true;
49
49
  ws.close();
50
50
  ws.terminate();
51
- clearTimeout(timer);
51
+ this.clearTimeout(timer);
52
52
  timer = null;
53
53
  }
54
54
  callback();
@@ -191,7 +191,7 @@ class GotifyWs extends utils.Adapter {
191
191
  this.setState('info.connection', false, true);
192
192
  this.log.info('WebSocket closed');
193
193
  if (stop === false) {
194
- timer = setTimeout(this.connectWebSocket, 5000);
194
+ timer = this.setTimeout(this.connectWebSocket, 5000);
195
195
  }
196
196
  });
197
197
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.gotify-ws",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Gotify web socket for connection to various notification systems",
5
5
  "author": {
6
6
  "name": "simatec",
@@ -28,12 +28,12 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@iobroker/adapter-core": "^3.1.6",
31
- "ws": "^8.17.1",
31
+ "ws": "^8.18.0",
32
32
  "axios": "^1.7.2"
33
33
  },
34
34
  "devDependencies": {
35
- "@alcalzone/release-script": "^3.7.0",
36
- "@alcalzone/release-script-plugin-iobroker": "^3.7.1",
35
+ "@alcalzone/release-script": "^3.7.3",
36
+ "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
37
37
  "@alcalzone/release-script-plugin-license": "^3.7.0",
38
38
  "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
39
39
  "@iobroker/adapter-dev": "^1.3.0",
@@ -41,19 +41,19 @@
41
41
  "@tsconfig/node20": "^20.1.4",
42
42
  "@types/chai": "^4.3.16",
43
43
  "@types/chai-as-promised": "^7.1.8",
44
- "@types/mocha": "^10.0.6",
45
- "@types/node": "^20.14.5",
44
+ "@types/mocha": "^10.0.7",
45
+ "@types/node": "^20.14.11",
46
46
  "@types/proxyquire": "^1.3.31",
47
47
  "@types/sinon": "^17.0.3",
48
48
  "@types/sinon-chai": "^3.2.12",
49
49
  "chai": "^4.3.10",
50
50
  "chai-as-promised": "^7.1.2",
51
- "eslint": "^9.5.0",
52
- "mocha": "^10.4.0",
51
+ "eslint": "^9.7.0",
52
+ "mocha": "^10.6.0",
53
53
  "proxyquire": "^2.1.3",
54
54
  "sinon": "^18.0.0",
55
55
  "sinon-chai": "^3.7.0",
56
- "typescript": "~5.4.5"
56
+ "typescript": "~5.5.3"
57
57
  },
58
58
  "main": "main.js",
59
59
  "files": [
@@ -74,7 +74,9 @@
74
74
  "release-patch": "release-script patch --yes",
75
75
  "release-minor": "release-script minor --yes",
76
76
  "release-major": "release-script major --yes",
77
- "translate": "translate-adapter"
77
+ "translate": "translate-adapter",
78
+ "dev-server-run": "dev-server run gotify-ws",
79
+ "dev-server-watch": "dev-server watch gotify-ws"
78
80
  },
79
81
  "bugs": {
80
82
  "url": "https://github.com/simatec/ioBroker.gotify-ws/issues"