iobroker.ical 1.16.0 → 1.16.1

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
@@ -31,6 +31,11 @@ Sentry reporting, starting with js-controller 3.0, means that this adapter can u
31
31
  Placeholder for the next version (at the beginning of the line):
32
32
  ### **WORK IN PROGRESS**
33
33
  -->
34
+ ### 1.16.1 (2024-11-01)
35
+ * (jens-maus) fix issue with handling rrule timezones incorrect with latest node-ical (#708).
36
+ * (jens-maus) update node-ical to latest 0.20.1
37
+ * (jens-maus) save cached files to os tmpdir instead.
38
+
34
39
  ### 1.16.0 (2024-10-29)
35
40
  * (cvoelkel76) add checkbox to allow to exactly match a calender event.
36
41
  * (jens-maus) update node-ical to latest 0.20.0
@@ -47,10 +52,6 @@ Sentry reporting, starting with js-controller 3.0, means that this adapter can u
47
52
  ### 1.14.2 (2024-01-29)
48
53
  * (jens-maus) update node-ical to latest 0.17.2
49
54
 
50
- ### 1.14.1 (2024-01-29)
51
- * (klein0r) Create dummy file in files tab
52
- * (klein0r) Fixed recurring events
53
-
54
55
  ## License
55
56
 
56
57
  The MIT License (MIT)
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "ical",
4
- "version": "1.16.0",
4
+ "version": "1.16.1",
5
5
  "news": {
6
+ "1.16.1": {
7
+ "en": "fix issue with handling rrule timezones incorrect with latest node-ical (#708).\nupdate node-ical to latest 0.20.1\nsave cached files to os tmpdir instead.",
8
+ "de": "problem mit dem umgang mit rrule zeitzonen falsch mit neusten node-ical (#708).\nupdate node-ical bis neueste 0.20.1\nspeichern sie cache-dateien auf os tmpdir statt.",
9
+ "ru": "исправить проблему с обработкой часовых поясов правила некорректно с последними узлами (#708).\nобновление узла к последним 0.20.1\nвместо этого сохранить кэшированные файлы в os tmpdir.",
10
+ "pt": "corrigir problema com manipulação rrule fusos horários incorreta com o mais recente node-ical (#708).\natualização node-ical para mais recente 0.20.1\nsalvar arquivos em cache para os tmpdir em vez disso.",
11
+ "nl": "fix probleem met de behandeling rrule tijdzones incorrect met de laatste node-ical (#708).\nnode-ical updaten naar de laatste 0.20.1\nbewaar gecachede bestanden in plaats daarvan in os tmpdir.",
12
+ "fr": "corriger le problème avec la manipulation des fuseaux horaires rrule incorrecte avec le dernier nœud (#708).\nmettre à jour node-ical au dernier 0.20.1\nenregistrer les fichiers mis en cache dans os tmpdir à la place.",
13
+ "it": "risolvere il problema con la gestione di fusi orari non corretto con ultimo nodo-ical (#708).\naggiornamento nodo-ical al più recente 0.20.1\nsalvare i file memorizzati in cache a os tmpdir invece.",
14
+ "es": "solucionar problema con el manejo rrule timezones incorrecto con el último node-ical (#708).\nactualización node-ical al último 0.20.1\nguardar archivos en caché a os tmpdir en su lugar.",
15
+ "pl": "problem z obsługą rrule strefy czasu nieprawidłowy z najnowszym nodeical (# 708).\nupdate node- ical do najnowszej wersji 0.20.1\nzapisać pliki cached do os tmpdir zamiast.",
16
+ "uk": "виправлено проблему з використанням rrule timezones, некоректних з найновішою вершиною (#708).\nоновлення вершини-ical до останньої 0.20.1\nзберегти кешовані файли на os tmpdir замість.",
17
+ "zh-cn": "将处理rrule时区的问题与最新节点错误(# 708).\n将节点更新为最新的0.20.1\n将缓存的文件保存到 os tmpdir ."
18
+ },
6
19
  "1.16.0": {
7
20
  "en": "add checkbox to allow to exactly match a calender event.\nupdate node-ical to latest 0.20.0\nBreaking change: Removed trigger state (subscribe is deprecated in js-controller 6.x)\nResponsive design added",
8
21
  "de": "fügen sie checkbox hinzu, um ein kalenderereignis genau zu vereinbaren.\nupdate node-ical bis neueste 0.20.0\nBruchänderung: Entfernter Triggerzustand (Abonnent wird in js-Controller 6.x abgeschrieben)\nResponsive Design hinzugefügt",
@@ -80,19 +93,6 @@
80
93
  "pl": "Zezwalaj na ustawianie niestandardowych użytkowników http\nDodano opcję użycia zakładki plików do plików kalendarza",
81
94
  "uk": "Дозвольте встановити користувальницький агент\nДодана можливість використовувати вкладку файлів для календарних файлів",
82
95
  "zh-cn": "允许设置自定义 http 用户代理\n为日历文件使用文件标签添加了选项"
83
- },
84
- "1.13.6": {
85
- "en": "Incorrect jsonConfig has been fixed [#602]\nDependencies have been updated",
86
- "de": "Fehler in jsonConfig wurde behoben [#602]\nAbhängigkeiten wurden aktualisiert",
87
- "ru": "Неправильный jsonConfig был исправлен [#602]\nВ зависимости были обновлены",
88
- "pt": "JsonConfig incorreto foi corrigido [#602]\nAs dependências foram atualizadas",
89
- "nl": "Incorrect JsonConfig is gerepareerd\nAfhankelijkheid",
90
- "fr": "Incorrect jsonConfig a été corrigé [#602]\nLes dépendances ont été mises à jour",
91
- "it": "JsonConfig non corretto è stato fissato [#602]\nLe dipendenze sono state aggiornate",
92
- "es": "JsonConfig incorrecto ha sido fijado [#602]\nSe han actualizado las dependencias",
93
- "pl": "Incorrect jsonConfig został ustalony jako #602\nZależności zostały zaktualizowane",
94
- "uk": "[#602]\nОновлено залежність",
95
- "zh-cn": "错误的 json Config已确定[第602号]\n已更新了属地"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/main.js CHANGED
@@ -5,6 +5,7 @@ const crypto = require('node:crypto');
5
5
  const fs = require('node:fs');
6
6
  const path = require('node:path');
7
7
  const https = require('node:https');
8
+ const os = require('node:os');
8
9
 
9
10
  const utils = require('@iobroker/adapter-core');
10
11
  const adapterName = require('./package.json').name.split('.').pop();
@@ -157,7 +158,7 @@ async function getICal(urlOrFile, user, pass, sslignore, calName, cb) {
157
158
  }
158
159
 
159
160
  const calHash = crypto.createHash('md5').update(user + pass + urlOrFile).digest('hex');
160
- const cachedFilename = path.join(__dirname, calHash);
161
+ const cachedFilename = path.join(os.tmpdir(), 'iob-' + calHash + '.ics');
161
162
 
162
163
  axios(options).then(function (response) {
163
164
  if (response.data) {
@@ -283,7 +284,7 @@ async function processData(data, realnow, startpreview, endpreview, now2, calNam
283
284
 
284
285
  // only events with summary and a start date are interesting
285
286
  if ((ev.summary !== undefined) && (ev.type === 'VEVENT') && ev.start && ev.start instanceof Date) {
286
- adapter.log.debug(`ev: ${JSON.stringify(ev)}`);
287
+ adapter.log.debug(`ev[${k}]: ${JSON.stringify(ev)}`);
287
288
  if (!ev.end || !(ev.end instanceof Date)) {
288
289
  ev.end = new Date(ev.start.getTime());
289
290
  if (ev.start.getHours() === 0 && ev.start.getMinutes() === 0 && ev.start.getSeconds() === 0) {
@@ -363,11 +364,11 @@ options: ${JSON.stringify(options)}`
363
364
  // this event will be recognized as a date event
364
365
  ev2.start.setHours(0,0,0,0);
365
366
  } else if (ev.datetype === 'date-time') {
366
- // add a time offset which is relative between
367
- // ev2 and ev because rrule seems to return dates in
368
- // local time only. And if not correctly the exdate
369
- // check later will not work correctly.
370
- ev2.start = addOffset(ev2.start, ev2.start.getTimezoneOffset() - ev.start.getTimezoneOffset());
367
+ // rrule only knows about local time but stores the
368
+ // datetime in zulu (Z) UTC time strings. Thus we need
369
+ // to convert it to local time carrying objects, thus
370
+ // add the ev2.start tz offset
371
+ ev2.start = addOffset(ev2.start, ev2.start.getTimezoneOffset());
371
372
  }
372
373
 
373
374
  // Set end date based on length in ms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.ical",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "Allows read information from google calender and from iCal.",
5
5
  "author": {
6
6
  "name": "bluefox",
@@ -43,7 +43,7 @@
43
43
  "axios": "^1.7.7",
44
44
  "cloneextend": "^0.0.3",
45
45
  "json-schema": "^0.4.0",
46
- "node-ical": "^0.20.0",
46
+ "node-ical": "^0.20.1",
47
47
  "rrule": "2.8.1"
48
48
  },
49
49
  "devDependencies": {
@@ -56,7 +56,7 @@
56
56
  "@types/chai": "^4.3.19",
57
57
  "@types/chai-as-promised": "^7.1.8",
58
58
  "@types/mocha": "^10.0.8",
59
- "@types/node": "^22.7.4",
59
+ "@types/node": "^22.8.6",
60
60
  "@types/proxyquire": "^1.3.31",
61
61
  "@types/sinon": "^17.0.3",
62
62
  "@types/sinon-chai": "^3.2.12",
@@ -65,7 +65,7 @@
65
65
  "chai-string": "^1.5.0",
66
66
  "eslint": "^8.56.0",
67
67
  "luxon": "^3.5.0",
68
- "mocha": "^10.7.3",
68
+ "mocha": "^10.8.2",
69
69
  "proxyquire": "^2.1.3",
70
70
  "sinon": "^19.0.2",
71
71
  "sinon-chai": "^3.7.0",