iobroker.ical 1.13.6 → 1.14.0
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/LICENSE +1 -1
- package/README.md +5 -4
- package/admin/i18n/de/translations.json +3 -1
- package/admin/i18n/en/translations.json +3 -1
- package/admin/i18n/es/translations.json +3 -1
- package/admin/i18n/fr/translations.json +3 -1
- package/admin/i18n/it/translations.json +3 -1
- package/admin/i18n/nl/translations.json +3 -1
- package/admin/i18n/pl/translations.json +3 -1
- package/admin/i18n/pt/translations.json +3 -1
- package/admin/i18n/ru/translations.json +3 -1
- package/admin/i18n/uk/translations.json +3 -1
- package/admin/i18n/zh-cn/translations.json +3 -1
- package/admin/jsonConfig.json +16 -0
- package/admin/words.js +2 -0
- package/io-package.json +39 -16
- package/main.js +16 -2
- package/package.json +7 -7
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014-
|
|
3
|
+
Copyright (c) 2014-2024, bluefox <dogafox@gmail.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -32,6 +32,10 @@ Sentry reporting, starting with js-controller 3.0, means that this adapter can u
|
|
|
32
32
|
Placeholder for the next version (at the beginning of the line):
|
|
33
33
|
### **WORK IN PROGRESS**
|
|
34
34
|
-->
|
|
35
|
+
### 1.14.0 (2024-01-07)
|
|
36
|
+
* (klein0r) Allow to set custom http user agent
|
|
37
|
+
* (klein0r) Added option to use files tab for calendar files
|
|
38
|
+
|
|
35
39
|
### 1.13.6 (2023-12-25)
|
|
36
40
|
* (mcm1957) Incorrect jsonConfig has been fixed [#602]
|
|
37
41
|
* (mcm1957) Dependencies have been updated
|
|
@@ -49,14 +53,11 @@ Sentry reporting, starting with js-controller 3.0, means that this adapter can u
|
|
|
49
53
|
* (klein0r) Dropped Admin 4 UI
|
|
50
54
|
* (klein0r) Added Ukrainian language
|
|
51
55
|
|
|
52
|
-
### 1.13.2 (2022-08-29)
|
|
53
|
-
* (Apollon77) fix strange log messages by downgrading RRule again
|
|
54
|
-
|
|
55
56
|
## License
|
|
56
57
|
|
|
57
58
|
The MIT License (MIT)
|
|
58
59
|
|
|
59
|
-
Copyright (c) 2014-
|
|
60
|
+
Copyright (c) 2014-2024, bluefox <dogafox@gmail.com>
|
|
60
61
|
|
|
61
62
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
62
63
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Nombre de usuario",
|
|
31
31
|
"Options": "Opciones",
|
|
32
32
|
"Set ID": "Pon la identificacion",
|
|
33
|
-
"Set Ack": "Establecer acuse de recibo"
|
|
33
|
+
"Set Ack": "Establecer acuse de recibo",
|
|
34
|
+
"Use custom user agent": "Utilice un agente de usuario personalizado",
|
|
35
|
+
"User agent HTTP header": "Encabezado HTTP del agente de usuario"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Nom d'utilisateur",
|
|
31
31
|
"Options": "Choix",
|
|
32
32
|
"Set ID": "Définir l'identifiant",
|
|
33
|
-
"Set Ack": "Confirmer"
|
|
33
|
+
"Set Ack": "Confirmer",
|
|
34
|
+
"Use custom user agent": "Utiliser un agent utilisateur personnalisé",
|
|
35
|
+
"User agent HTTP header": "En-tête HTTP de l'agent utilisateur"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Nome utente",
|
|
31
31
|
"Options": "Opzioni",
|
|
32
32
|
"Set ID": "Imposta l'ID",
|
|
33
|
-
"Set Ack": "Imposta Rispondi"
|
|
33
|
+
"Set Ack": "Imposta Rispondi",
|
|
34
|
+
"Use custom user agent": "Utilizza l'agente utente personalizzato",
|
|
35
|
+
"User agent HTTP header": "Intestazione HTTP dell'agente utente"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Gebruikersnaam",
|
|
31
31
|
"Options": "Opties",
|
|
32
32
|
"Set ID": "ID instellen",
|
|
33
|
-
"Set Ack": "Set Ack"
|
|
33
|
+
"Set Ack": "Set Ack",
|
|
34
|
+
"Use custom user agent": "Gebruik een aangepaste user-agent",
|
|
35
|
+
"User agent HTTP header": "HTTP-header van gebruikersagent"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Nazwa Użytkownika",
|
|
31
31
|
"Options": "Opcje",
|
|
32
32
|
"Set ID": "Ustaw ID",
|
|
33
|
-
"Set Ack": "Ustaw Potwierdź"
|
|
33
|
+
"Set Ack": "Ustaw Potwierdź",
|
|
34
|
+
"Use custom user agent": "Użyj niestandardowego klienta użytkownika",
|
|
35
|
+
"User agent HTTP header": "Nagłówek HTTP agenta użytkownika"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Nome de usuário",
|
|
31
31
|
"Options": "Opções",
|
|
32
32
|
"Set ID": "Definir ID",
|
|
33
|
-
"Set Ack": "Definir confirmação"
|
|
33
|
+
"Set Ack": "Definir confirmação",
|
|
34
|
+
"Use custom user agent": "Use agente de usuário personalizado",
|
|
35
|
+
"User agent HTTP header": "Cabeçalho HTTP do agente do usuário"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Имя пользователя",
|
|
31
31
|
"Options": "Опции",
|
|
32
32
|
"Set ID": "Установить идентификатор",
|
|
33
|
-
"Set Ack": "Установить подтверждение"
|
|
33
|
+
"Set Ack": "Установить подтверждение",
|
|
34
|
+
"Use custom user agent": "Использовать собственный пользовательский агент",
|
|
35
|
+
"User agent HTTP header": "HTTP-заголовок пользовательского агента"
|
|
34
36
|
}
|
|
@@ -30,5 +30,7 @@
|
|
|
30
30
|
"user": "Ім'я користувача",
|
|
31
31
|
"Options": "Опції",
|
|
32
32
|
"Set ID": "Встановити ID",
|
|
33
|
-
"Set Ack": "Установити Ack"
|
|
33
|
+
"Set Ack": "Установити Ack",
|
|
34
|
+
"Use custom user agent": "Використовуйте спеціальний агент користувача",
|
|
35
|
+
"User agent HTTP header": "HTTP-заголовок агента користувача"
|
|
34
36
|
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -340,6 +340,22 @@
|
|
|
340
340
|
"default": false
|
|
341
341
|
}
|
|
342
342
|
]
|
|
343
|
+
},
|
|
344
|
+
"customUserAgentEnabled": {
|
|
345
|
+
"type": "checkbox",
|
|
346
|
+
"newLine": true,
|
|
347
|
+
"sm": 12,
|
|
348
|
+
"md": 4,
|
|
349
|
+
"lg": 4,
|
|
350
|
+
"label": "Use custom user agent"
|
|
351
|
+
},
|
|
352
|
+
"customUserAgent": {
|
|
353
|
+
"hidden": "!data.customUserAgentEnabled",
|
|
354
|
+
"type": "text",
|
|
355
|
+
"sm": 12,
|
|
356
|
+
"md": 8,
|
|
357
|
+
"lg": 8,
|
|
358
|
+
"label": "User agent HTTP header"
|
|
343
359
|
}
|
|
344
360
|
}
|
|
345
361
|
},
|
package/admin/words.js
CHANGED
|
@@ -40,4 +40,6 @@ systemDictionary = {
|
|
|
40
40
|
"Options": { "en": "Options", "de": "Optionen", "ru": "Опции", "pt": "Opções", "nl": "Opties", "fr": "Choix", "it": "Opzioni", "es": "Opciones", "pl": "Opcje", "uk": "Опції", "zh-cn": "选项"},
|
|
41
41
|
"Set ID": { "en": "Set ID", "de": "ID festlegen", "ru": "Установить идентификатор", "pt": "Definir ID", "nl": "ID instellen", "fr": "Définir l'identifiant", "it": "Imposta l'ID", "es": "Pon la identificacion", "pl": "Ustaw ID", "uk": "Встановити ID", "zh-cn": "设置名称"},
|
|
42
42
|
"Set Ack": { "en": "Set Ack", "de": "Bestätigen", "ru": "Установить подтверждение", "pt": "Definir confirmação", "nl": "Set Ack", "fr": "Confirmer", "it": "Imposta Rispondi", "es": "Establecer acuse de recibo", "pl": "Ustaw Potwierdź", "uk": "Установити Ack", "zh-cn": "设置确认"},
|
|
43
|
+
"Use custom user agent": { "en": "Use custom user agent", "de": "Benutzerdefinierter User-Agent", "ru": "Использовать собственный пользовательский агент", "pt": "Use agente de usuário personalizado", "nl": "Gebruik een aangepaste user-agent", "fr": "Utiliser un agent utilisateur personnalisé", "it": "Utilizza l'agente utente personalizzato", "es": "Utilice un agente de usuario personalizado", "pl": "Użyj niestandardowego klienta użytkownika", "uk": "Використовуйте спеціальний агент користувача", "zh-cn": "使用自定义用户代理"},
|
|
44
|
+
"User agent HTTP header": { "en": "User agent HTTP header", "de": "User-Agent HTTP-Header", "ru": "HTTP-заголовок пользовательского агента", "pt": "Cabeçalho HTTP do agente do usuário", "nl": "HTTP-header van gebruikersagent", "fr": "En-tête HTTP de l'agent utilisateur", "it": "Intestazione HTTP dell'agente utente", "es": "Encabezado HTTP del agente de usuario", "pl": "Nagłówek HTTP agenta użytkownika", "uk": "HTTP-заголовок агента користувача", "zh-cn": "用户代理 HTTP 标头"},
|
|
43
45
|
};
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "ical",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.14.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.14.0": {
|
|
7
|
+
"en": "Allow to set custom http user agent\nAdded option to use files tab for calendar files",
|
|
8
|
+
"de": "Erlauben Sie, benutzerdefinierte http-Benutzer-Agent\nOption hinzugefügt, um Dateien Tab für Kalenderdateien zu verwenden",
|
|
9
|
+
"ru": "Разрешить настроить пользовательский\nДобавлена возможность использования вкладки файлов для календарных файлов",
|
|
10
|
+
"pt": "Permitir definir agente de usuário http personalizado\nOpção adicionada para usar a guia de arquivos para arquivos de calendário",
|
|
11
|
+
"nl": "Aangepaste http-gebruikeragent instellen\nToegevoegd optie om bestanden te gebruiken tabblad voor agendabestanden",
|
|
12
|
+
"fr": "Permettre de définir un agent utilisateur http personnalisé\nAjout d'une option pour utiliser l'onglet fichiers pour les fichiers calendrier",
|
|
13
|
+
"it": "Consentire di impostare personalizzato http user agent\nAggiunta opzione per utilizzare scheda file per i file del calendario",
|
|
14
|
+
"es": "Permitir establecer un agente de usuario http personalizado\nOpción adicional para usar la pestaña de archivos para archivos de calendario",
|
|
15
|
+
"pl": "Zezwalaj na ustawianie niestandardowych użytkowników http\nDodano opcję użycia zakładki plików do plików kalendarza",
|
|
16
|
+
"uk": "Дозвольте встановити користувальницький агент\nДодана можливість використовувати вкладку файлів для календарних файлів",
|
|
17
|
+
"zh-cn": "允许设置自定义 http 用户代理\n为日历文件使用文件标签添加了选项"
|
|
18
|
+
},
|
|
6
19
|
"1.13.6": {
|
|
7
20
|
"en": "Incorrect jsonConfig has been fixed [#602]\nDependencies have been updated",
|
|
8
21
|
"de": "Fehler in jsonConfig wurde behoben [#602]\nAbhängigkeiten wurden aktualisiert",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Zmiennikowa biblioteka",
|
|
81
94
|
"uk": "Змінена бібліотека запитів",
|
|
82
95
|
"zh-cn": "更改要求图书馆"
|
|
83
|
-
},
|
|
84
|
-
"1.13.0": {
|
|
85
|
-
"en": "Added Admin 5 UI\nTranslated all object names",
|
|
86
|
-
"de": "Admin 5 UI\nAlle Objektnamen übersetzt",
|
|
87
|
-
"ru": "Добавлено Admin 5 UI\nПереведено все названия объектов",
|
|
88
|
-
"pt": "Adicionado administrador 5 UI\nTraduzido todos os nomes de objetos",
|
|
89
|
-
"nl": "Admin 5 UI\nVertaald alle objectnamen",
|
|
90
|
-
"fr": "Ajout d'Admin 5 UI\nTranslated all object names",
|
|
91
|
-
"it": "Aggiunto 5 UI\nTradotto tutti i nomi degli oggetti",
|
|
92
|
-
"es": "Admin 5 UI\nTraducir todos los nombres de objetos",
|
|
93
|
-
"pl": "Admin 5\nPrzetłumaczył wszystkie nazwy obiektowe",
|
|
94
|
-
"uk": "Додано інтерфейс адміністратора 5\nПерекладено всі назви об'єктів",
|
|
95
|
-
"zh-cn": "增删5 UI\n所有物体的名称"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"title": "iCal Calendar",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
},
|
|
164
164
|
"dependencies": [
|
|
165
165
|
{
|
|
166
|
-
"js-controller": ">=
|
|
166
|
+
"js-controller": ">=3.3.22"
|
|
167
167
|
}
|
|
168
168
|
],
|
|
169
169
|
"globalDependencies": [
|
|
@@ -195,10 +195,12 @@
|
|
|
195
195
|
"pass": "",
|
|
196
196
|
"sslignore": false,
|
|
197
197
|
"color": "#FF0000",
|
|
198
|
-
"filter": "
|
|
198
|
+
"filter": "",
|
|
199
199
|
"filterregex": false
|
|
200
200
|
}
|
|
201
201
|
],
|
|
202
|
+
"customUserAgentEnabled": false,
|
|
203
|
+
"customUserAgent": "Mozilla/5.0 (X11; Linux i686; rv:109.0) Gecko/20100101 Firefox/121.0",
|
|
202
204
|
"events": [
|
|
203
205
|
{
|
|
204
206
|
"name": "Vacation",
|
|
@@ -212,6 +214,27 @@
|
|
|
212
214
|
]
|
|
213
215
|
},
|
|
214
216
|
"instanceObjects": [
|
|
217
|
+
{
|
|
218
|
+
"_id": "",
|
|
219
|
+
"type": "meta",
|
|
220
|
+
"common": {
|
|
221
|
+
"name": {
|
|
222
|
+
"en": "Meta storage for user files",
|
|
223
|
+
"de": "Meta-Speicher für Benutzerdateien",
|
|
224
|
+
"ru": "Meta Storage для файлов пользователей",
|
|
225
|
+
"pt": "Meta de armazenamento para arquivos de usuário",
|
|
226
|
+
"nl": "Meta opslag voor gebruikersbestanden",
|
|
227
|
+
"fr": "Stockage Meta pour les fichiers utilisateur",
|
|
228
|
+
"it": "Meta storage per i file utente",
|
|
229
|
+
"es": "Meta almacenamiento para archivos de usuario",
|
|
230
|
+
"pl": "Meta storage for user files",
|
|
231
|
+
"uk": "Зберігання мета для файлів користувачів",
|
|
232
|
+
"zh-cn": "用户档案的储存"
|
|
233
|
+
},
|
|
234
|
+
"type": "meta.user"
|
|
235
|
+
},
|
|
236
|
+
"native": {}
|
|
237
|
+
},
|
|
215
238
|
{
|
|
216
239
|
"_id": "events",
|
|
217
240
|
"type": "channel",
|
package/main.js
CHANGED
|
@@ -157,10 +157,18 @@ Date.prototype.compare = function(b) {
|
|
|
157
157
|
);
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
function getICal(urlOrFile, user, pass, sslignore, calName, cb) {
|
|
160
|
+
async function getICal(urlOrFile, user, pass, sslignore, calName, cb) {
|
|
161
161
|
// Is it file or URL
|
|
162
162
|
if (!urlOrFile.match(/^https?:\/\//)) {
|
|
163
|
-
|
|
163
|
+
const ioFileExists = await adapter.fileExistsAsync(adapter.namespace, urlOrFile);
|
|
164
|
+
if (ioFileExists) {
|
|
165
|
+
try {
|
|
166
|
+
const ioFile = await adapter.readFileAsync(adapter.namespace, urlOrFile);
|
|
167
|
+
cb(null, ioFile.file.toString());
|
|
168
|
+
} catch (e) {
|
|
169
|
+
cb && cb(`Cannot read ioBroker file "${urlOrFile}": ${e}`);
|
|
170
|
+
}
|
|
171
|
+
} else if (!fs.existsSync(urlOrFile)) {
|
|
164
172
|
cb && cb(`File does not exist: "${urlOrFile}"`);
|
|
165
173
|
} else {
|
|
166
174
|
try {
|
|
@@ -178,6 +186,12 @@ function getICal(urlOrFile, user, pass, sslignore, calName, cb) {
|
|
|
178
186
|
url: urlOrFile
|
|
179
187
|
};
|
|
180
188
|
|
|
189
|
+
if (adapter.config.customUserAgentEnabled && adapter.config.customUserAgent) {
|
|
190
|
+
options.headers = {
|
|
191
|
+
'User-Agent': adapter.config.customUserAgent
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
181
195
|
if (sslignore === 'ignore' || sslignore === 'true' || sslignore === true) {
|
|
182
196
|
options.httpsAgent = new https.Agent({
|
|
183
197
|
rejectUnauthorized: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.ical",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Allows read information from google calender and from iCal.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@iobroker/adapter-core": "^3.0.4",
|
|
43
|
-
"axios": "1.6.
|
|
43
|
+
"axios": "1.6.5",
|
|
44
44
|
"cloneextend": "^0.0.3",
|
|
45
45
|
"json-schema": "^0.4.0",
|
|
46
46
|
"node-ical": "^0.17.1",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
54
54
|
"@iobroker/adapter-dev": "^1.2.0",
|
|
55
55
|
"@iobroker/testing": "^4.1.0",
|
|
56
|
-
"@types/chai": "^4.3.
|
|
57
|
-
"@types/chai-as-promised": "^7.1.
|
|
58
|
-
"@types/mocha": "^10.0.
|
|
59
|
-
"@types/node": "^20.10.
|
|
56
|
+
"@types/chai": "^4.3.11",
|
|
57
|
+
"@types/chai-as-promised": "^7.1.8",
|
|
58
|
+
"@types/mocha": "^10.0.6",
|
|
59
|
+
"@types/node": "^20.10.6",
|
|
60
60
|
"@types/proxyquire": "^1.3.31",
|
|
61
61
|
"@types/sinon": "^17.0.2",
|
|
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.4.4",
|
|
68
|
-
"mocha": "^10.
|
|
68
|
+
"mocha": "^10.2.0",
|
|
69
69
|
"proxyquire": "^2.1.3",
|
|
70
70
|
"sinon": "^17.0.1",
|
|
71
71
|
"sinon-chai": "^3.7.0",
|