@iobroker/repochecker 2.1.11 → 2.1.13
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 +6 -0
- package/doc/issues.json +488 -0
- package/doc/readme.js +151 -0
- package/index.js +62 -5
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -20,6 +20,12 @@ Branch (`master/main/dev`) is optional.
|
|
|
20
20
|
-->
|
|
21
21
|
|
|
22
22
|
## Changelog
|
|
23
|
+
### 2.1.13 (2024-01-02)
|
|
24
|
+
* (bluefox) Corrected rule W156: adminUI.config === 'none' is allowed
|
|
25
|
+
|
|
26
|
+
### 2.1.12 (2023-09-21)
|
|
27
|
+
* (bluefox) Added check of using '_' in adapter name
|
|
28
|
+
|
|
23
29
|
### 2.1.11 (2023-09-05)
|
|
24
30
|
* (bluefox) Added check of iobroker.js-controller in dependencies
|
|
25
31
|
|
package/doc/issues.json
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
{
|
|
2
|
+
"E001": {
|
|
3
|
+
"_comment": "all texts can be string or object with language translations",
|
|
4
|
+
"title": {
|
|
5
|
+
"en": "Cannot parse `package.json`",
|
|
6
|
+
"de": "Kann `package.json` nicht parsen",
|
|
7
|
+
"ru": "Не удается разобрать `package.json`",
|
|
8
|
+
"pt": "Não é possível analisar o `package.json`",
|
|
9
|
+
"nl": "Kan `package.json` niet parsen",
|
|
10
|
+
"fr": "Impossible d'analyser `package.json`",
|
|
11
|
+
"it": "Impossibile analizzare `package.json`",
|
|
12
|
+
"es": "No se puede analizar `package.json`",
|
|
13
|
+
"pl": "Nie można przeanalizować `package.json`",
|
|
14
|
+
"uk": "Не вдається розібрати`package.json`",
|
|
15
|
+
"zh-cn": "无法解析`package.json`"
|
|
16
|
+
},
|
|
17
|
+
"explanation": {
|
|
18
|
+
"en": "Some problem parsing the `package.json` occurred. See error messages added for details.",
|
|
19
|
+
"de": "Beim Parsen der `package.json` ist ein Fehler aufgetreten. Details sind in den Fehlermeldungen zu finden.",
|
|
20
|
+
"ru": "При разборе `package.json` произошла ошибка. См. Добавленные сообщения об ошибках для получения дополнительной информации.",
|
|
21
|
+
"pt": "Ocorreu algum problema ao analisar o `package.json`. Consulte as mensagens de erro adicionadas para obter detalhes.",
|
|
22
|
+
"nl": "Er is een probleem opgetreden bij het parsen van `package.json`. Zie foutberichten voor details.",
|
|
23
|
+
"fr": "Un problème d'analyse du `package.json` s'est produit. Voir les messages d'erreur ajoutés pour plus de détails.",
|
|
24
|
+
"it": "Si è verificato un problema durante l'analisi di `package.json`. Vedi i messaggi di errore aggiunti per i dettagli.",
|
|
25
|
+
"es": "Se produjo algún problema al analizar el `package.json`. Consulte los mensajes de error agregados para obtener detalles.",
|
|
26
|
+
"pl": "Wystąpił problem z analizą `package.json`. Zobacz dodane komunikaty o błędach, aby uzyskać szczegółowe informacje.",
|
|
27
|
+
"uk": "Під час розбору `package.json` сталася помилка. Див. Додані повідомлення про помилки для отримання додаткової інформації.",
|
|
28
|
+
"zh-cn": "解析`package.json`时出现问题。有关详细信息,请参见添加的错误消息。"
|
|
29
|
+
},
|
|
30
|
+
"resolving": {
|
|
31
|
+
"en": "Correct the file `package.json` so that it becomes a valid json file.",
|
|
32
|
+
"de": "Korrigiere die Datei `package.json`, sodass sie eine valide json-Datei wird.",
|
|
33
|
+
"ru": "Исправьте файл `package.json`, чтобы он стал допустимым файлом json.",
|
|
34
|
+
"pt": "Corrija o arquivo `package.json` para que ele se torne um arquivo json válido.",
|
|
35
|
+
"nl": "Corrigeer het bestand `package.json` zodat het een geldig json-bestand wordt.",
|
|
36
|
+
"fr": "Corrigez le fichier `package.json` pour qu'il devienne un fichier json valide.",
|
|
37
|
+
"it": "Correggi il file `package.json` in modo che diventi un file json valido.",
|
|
38
|
+
"es": "Corrija el archivo `package.json` para que se convierta en un archivo json válido.",
|
|
39
|
+
"pl": "Popraw plik `package.json`, aby stał się prawidłowym plikiem json.",
|
|
40
|
+
"uk": "Виправте файл `package.json`, щоб він став дійсним файлом json.",
|
|
41
|
+
"zh-cn": "更正`package.json`文件,使其成为有效的json文件。"
|
|
42
|
+
},
|
|
43
|
+
"notes": ""
|
|
44
|
+
},
|
|
45
|
+
"E002": {
|
|
46
|
+
"title": {
|
|
47
|
+
"en": "No `ioBroker.` found in the name of the repository",
|
|
48
|
+
"de": "Kein `ioBroker.` im Namen des Repository gefunden",
|
|
49
|
+
"ru": "В имени репозитория не найдено `ioBroker.`",
|
|
50
|
+
"pt": "Nenhum `ioBroker.` encontrado no nome do repositório",
|
|
51
|
+
"nl": "Geen `ioBroker.` gevonden in de naam van het repository",
|
|
52
|
+
"fr": "Aucun `ioBroker.` trouvé dans le nom du référentiel",
|
|
53
|
+
"it": "Nessun `ioBroker.` trovato nel nome del repository",
|
|
54
|
+
"es": "No se encontró `ioBroker.` en el nombre del repositorio",
|
|
55
|
+
"pl": "Nie znaleziono `ioBroker.` w nazwie repozytorium",
|
|
56
|
+
"uk": "В імені репозиторію не знайдено `ioBroker.`",
|
|
57
|
+
"zh-cn": "存储库名称中未找到`ioBroker.`"
|
|
58
|
+
},
|
|
59
|
+
"explanation": "The name of the repository must start with `ioBroker.` ioBroker must be written with an capital `B`",
|
|
60
|
+
"resolving": "Correct the name of the repository by renaming it to meet standards",
|
|
61
|
+
"notes": ""
|
|
62
|
+
},
|
|
63
|
+
"E003": {
|
|
64
|
+
"title": "Repository must have name ioBroker.adaptername, but now io`b`roker is in lowercase",
|
|
65
|
+
"explanation": "The name of the repository must be ioBroker.. ioBroker must be written with an capital B",
|
|
66
|
+
"resolving": "Correct the name of the repository by renaming it to meet standards"
|
|
67
|
+
},
|
|
68
|
+
"E004": {
|
|
69
|
+
"title": "No adapter name found in URL"
|
|
70
|
+
},
|
|
71
|
+
"E005": {
|
|
72
|
+
"title": "Adapter name must be lowercase"
|
|
73
|
+
},
|
|
74
|
+
"E006": {
|
|
75
|
+
"title": "Invalid characters found in adapter name. Only lowercase chars, digits, `-` and `_` are allowed"
|
|
76
|
+
},
|
|
77
|
+
"E007": {
|
|
78
|
+
"title": "Cannot find author repo in the URL"
|
|
79
|
+
},
|
|
80
|
+
"E009": {
|
|
81
|
+
"title": "No version found in the package.json"
|
|
82
|
+
},
|
|
83
|
+
"E010": {
|
|
84
|
+
"title": "No description found in the package.json"
|
|
85
|
+
},
|
|
86
|
+
"E013": {
|
|
87
|
+
"title": "No author found in the package.json"
|
|
88
|
+
},
|
|
89
|
+
"E014": {
|
|
90
|
+
"title": "NPM information found in package.json. Please remove all attributes starting with `_`"
|
|
91
|
+
},
|
|
92
|
+
"E015": {
|
|
93
|
+
"title": "No license found in package.json"
|
|
94
|
+
},
|
|
95
|
+
"E016": {
|
|
96
|
+
"title": "No SPDX license found in package.json. Please use one of listed here: https://spdx.org/licenses/"
|
|
97
|
+
},
|
|
98
|
+
"E017": {
|
|
99
|
+
"title": "No repository found in the package.json"
|
|
100
|
+
},
|
|
101
|
+
"E018": {
|
|
102
|
+
"title": "Invalid repository type in package.json. It should be git"
|
|
103
|
+
},
|
|
104
|
+
"E019": {
|
|
105
|
+
"title": "Invalid repository URL in package.json."
|
|
106
|
+
},
|
|
107
|
+
"E020": {
|
|
108
|
+
"title": "Name of adapter in package.json must be lowercase"
|
|
109
|
+
},
|
|
110
|
+
"E021": {
|
|
111
|
+
"title": "`licenses` in package.json are deprecated. Please use only `license`: `NAME` field."
|
|
112
|
+
},
|
|
113
|
+
"E022": {
|
|
114
|
+
"title": "Adapter name is reserved!"
|
|
115
|
+
},
|
|
116
|
+
"E023": {
|
|
117
|
+
"title": "Do not include `npm` as dependency!"
|
|
118
|
+
},
|
|
119
|
+
"E024": {
|
|
120
|
+
"title": "Adapter name may not start with '_'"
|
|
121
|
+
},
|
|
122
|
+
"E025": {
|
|
123
|
+
"title": "Do not include `iobroker.js-controller` as dependency!"
|
|
124
|
+
},
|
|
125
|
+
"E100": {
|
|
126
|
+
"title": "Cannot parse io-package.json"
|
|
127
|
+
},
|
|
128
|
+
"E101": {
|
|
129
|
+
"title": "io-package.json must have at least empty `native` attribute"
|
|
130
|
+
},
|
|
131
|
+
"E102": {
|
|
132
|
+
"title": "io-package.json must have common object"
|
|
133
|
+
},
|
|
134
|
+
"E103": {
|
|
135
|
+
"title": "`common.name` in io-package.json is invalid"
|
|
136
|
+
},
|
|
137
|
+
"E104": {
|
|
138
|
+
"title": "No `common.titleLang` found in io-package.json"
|
|
139
|
+
},
|
|
140
|
+
"E105": {
|
|
141
|
+
"title": "`common.titleLang` must be an object"
|
|
142
|
+
},
|
|
143
|
+
"E106": {
|
|
144
|
+
"title": "`common.titleLang` should not contain word `adapter` in the name. It is clear, that this is adapter"
|
|
145
|
+
},
|
|
146
|
+
"E107": {
|
|
147
|
+
"title": "No `common.version` found in io-package.json"
|
|
148
|
+
},
|
|
149
|
+
"E108": {
|
|
150
|
+
"title": "No `common.desc` found in io-package.json"
|
|
151
|
+
},
|
|
152
|
+
"E109": {
|
|
153
|
+
"title": "`common.desc` in io-package.json should be an object for many languages"
|
|
154
|
+
},
|
|
155
|
+
"E110": {
|
|
156
|
+
"title": "Icon not found in the io-package.json"
|
|
157
|
+
},
|
|
158
|
+
"E111": {
|
|
159
|
+
"title": "extIcon not found in the io-package.json"
|
|
160
|
+
},
|
|
161
|
+
"E112": {
|
|
162
|
+
"title": "extIcon must be the same as an icon but with github path"
|
|
163
|
+
},
|
|
164
|
+
"E114": {
|
|
165
|
+
"title": "No adapter are allowed in the repo without admin support (set `common.noConfig = true` and `common.adminUI.config = none` if adapter has no configuration)"
|
|
166
|
+
},
|
|
167
|
+
"E115": {
|
|
168
|
+
"title": "No license found in io-package.json"
|
|
169
|
+
},
|
|
170
|
+
"E116": {
|
|
171
|
+
"title": "No SPDX license found. Please use one of listed here: https://spdx.org/licenses/"
|
|
172
|
+
},
|
|
173
|
+
"E117": {
|
|
174
|
+
"title": "Licenses in package.json and in io-package.json are different"
|
|
175
|
+
},
|
|
176
|
+
"E118": {
|
|
177
|
+
"title": "Versions in package.json and in io-package.json are different"
|
|
178
|
+
},
|
|
179
|
+
"E119": {
|
|
180
|
+
"title": "No type found in io-package.json"
|
|
181
|
+
},
|
|
182
|
+
"E120": {
|
|
183
|
+
"title": "Unknown type found in io-package.json"
|
|
184
|
+
},
|
|
185
|
+
"E121": {
|
|
186
|
+
"title": "No authors found in io-package.json"
|
|
187
|
+
},
|
|
188
|
+
"E122": {
|
|
189
|
+
"title": "authors must be an Array in io-package.json"
|
|
190
|
+
},
|
|
191
|
+
"E123": {
|
|
192
|
+
"title": "Authors may not be empty in io-package.json"
|
|
193
|
+
},
|
|
194
|
+
"E124": {
|
|
195
|
+
"title": "Main file not found under URL"
|
|
196
|
+
},
|
|
197
|
+
"E125": {
|
|
198
|
+
"title": "External icon not found under URL"
|
|
199
|
+
},
|
|
200
|
+
"E130": {
|
|
201
|
+
"title": "No `common.news` found in io-package.json"
|
|
202
|
+
},
|
|
203
|
+
"E140": {
|
|
204
|
+
"title": "width and height of logo are not equal"
|
|
205
|
+
},
|
|
206
|
+
"E141": {
|
|
207
|
+
"title": "logo is too small. It must be greater or equal than 32x32"
|
|
208
|
+
},
|
|
209
|
+
"E142": {
|
|
210
|
+
"title": "logo is too big. It must be less or equal than 512x512"
|
|
211
|
+
},
|
|
212
|
+
"E143": {
|
|
213
|
+
"title": "No main found in the package.json"
|
|
214
|
+
},
|
|
215
|
+
"E144": {
|
|
216
|
+
"title": "common.installedFrom field found in io-package.json. Must be removed."
|
|
217
|
+
},
|
|
218
|
+
"E145": {
|
|
219
|
+
"title": "No `common.news` found for actual version"
|
|
220
|
+
},
|
|
221
|
+
"E146": {
|
|
222
|
+
"title": "instanceObjects must be an Array in io-package.json"
|
|
223
|
+
},
|
|
224
|
+
"E147": {
|
|
225
|
+
"title": "instanceObject type has an invalid type"
|
|
226
|
+
},
|
|
227
|
+
"E148": {
|
|
228
|
+
"title": "instanceObject common.type has an invalid type! Expected `string`"
|
|
229
|
+
},
|
|
230
|
+
"E149": {
|
|
231
|
+
"title": "instanceObject common.type has an invalid value"
|
|
232
|
+
},
|
|
233
|
+
"E150": {
|
|
234
|
+
"title": "No common.connectionType found in io-package.json"
|
|
235
|
+
},
|
|
236
|
+
"E151": {
|
|
237
|
+
"title": "common.connectionType type has an invalid value"
|
|
238
|
+
},
|
|
239
|
+
"E152": {
|
|
240
|
+
"title": "No common.dataSource found in io-package.json"
|
|
241
|
+
},
|
|
242
|
+
"E153": {
|
|
243
|
+
"title": "common.dependencies must contain {`js-controller`: `>=1.5.8`} or later"
|
|
244
|
+
},
|
|
245
|
+
"E154": {
|
|
246
|
+
"title": "common.dependencies must contain [{`js-controller`: `>=2.0.0`}] or later"
|
|
247
|
+
},
|
|
248
|
+
"E155": {
|
|
249
|
+
"title": "Invalid tier value. Only 1, 2 or 3 are allowed!"
|
|
250
|
+
},
|
|
251
|
+
"E157": {
|
|
252
|
+
"title": "common.protectedNative requires dependency {`js-controller`: `>=2.0.2`} or later"
|
|
253
|
+
},
|
|
254
|
+
"E158": {
|
|
255
|
+
"title": "common.encryptedNative requires dependency {`js-controller`: `>=3.0.3`} or later"
|
|
256
|
+
},
|
|
257
|
+
"E159": {
|
|
258
|
+
"title": "common.dependencies `js-controller` dependency should always allow future versions (>=x.x.x)"
|
|
259
|
+
},
|
|
260
|
+
"E160": {
|
|
261
|
+
"title": "`admin` is not allowed in common.dependencies"
|
|
262
|
+
},
|
|
263
|
+
"E161": {
|
|
264
|
+
"title": "`js-controller` is not allowed in common.globalDependencies"
|
|
265
|
+
},
|
|
266
|
+
"E162": {
|
|
267
|
+
"title": "onlyWWW should have common.mode `none` in io-package.json"
|
|
268
|
+
},
|
|
269
|
+
"E163": {
|
|
270
|
+
"title": "common.mode requires JavaScript file for `main` in package.json"
|
|
271
|
+
},
|
|
272
|
+
"E165": {
|
|
273
|
+
"title": "Node mode found in package.json"
|
|
274
|
+
},
|
|
275
|
+
"E166": {
|
|
276
|
+
"title": "Unknown type found in io-package.json"
|
|
277
|
+
},
|
|
278
|
+
"E167": {
|
|
279
|
+
"title": "schedule adapters must have common.schedule property in io-package.json"
|
|
280
|
+
},
|
|
281
|
+
"E168": {
|
|
282
|
+
"title": "common.notifications requires dependency {`js-controller`: `>=3.2.0`} or later"
|
|
283
|
+
},
|
|
284
|
+
"E169": {
|
|
285
|
+
"title": "`common.keywords` must be an array in the io-package.json"
|
|
286
|
+
},
|
|
287
|
+
"E200": {
|
|
288
|
+
"title": "Not found on npm. Please publish"
|
|
289
|
+
},
|
|
290
|
+
"E201": {
|
|
291
|
+
"title": "Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: `npm owner add bluefox iobroker.adapterName`"
|
|
292
|
+
},
|
|
293
|
+
"E300": {
|
|
294
|
+
"title": "Not found on travis. Please setup travis or use github actions (preferred)"
|
|
295
|
+
},
|
|
296
|
+
"E301": {
|
|
297
|
+
"title": "Tests on Travis-ci.org are broken. Please fix."
|
|
298
|
+
},
|
|
299
|
+
"E400": {
|
|
300
|
+
"title": "Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist.json"
|
|
301
|
+
},
|
|
302
|
+
"E402": {
|
|
303
|
+
"title": "Types of adapter in latest repository and in io-package.json are different"
|
|
304
|
+
},
|
|
305
|
+
"E403": {
|
|
306
|
+
"title": "Version set in latest repository"
|
|
307
|
+
},
|
|
308
|
+
"E404": {
|
|
309
|
+
"title": "Icon not found in latest repository"
|
|
310
|
+
},
|
|
311
|
+
"E405": {
|
|
312
|
+
"title": "Icon (latest) must be in the following path: ${url}"
|
|
313
|
+
},
|
|
314
|
+
"E406": {
|
|
315
|
+
"title": "Meta URL (latest) not found in latest repository"
|
|
316
|
+
},
|
|
317
|
+
"E407": {
|
|
318
|
+
"title": "Meta URL (latest) must be equal to ${url}io-package.json"
|
|
319
|
+
},
|
|
320
|
+
"E420": {
|
|
321
|
+
"title": "Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist-stable.json"
|
|
322
|
+
},
|
|
323
|
+
"E422": {
|
|
324
|
+
"title": "Types of adapter in stable repository and in io-package.json are different"
|
|
325
|
+
},
|
|
326
|
+
"E423": {
|
|
327
|
+
"title": "Adapter was found in stable repository but not in latest repo"
|
|
328
|
+
},
|
|
329
|
+
"E424": {
|
|
330
|
+
"title": "No version set in stable repository"
|
|
331
|
+
},
|
|
332
|
+
"E425": {
|
|
333
|
+
"title": "Icon not found in stable repository"
|
|
334
|
+
},
|
|
335
|
+
"E426": {
|
|
336
|
+
"title": "Icon (stable) must be in the following path"
|
|
337
|
+
},
|
|
338
|
+
"E427": {
|
|
339
|
+
"title": "Meta URL (stable) not found in latest repository"
|
|
340
|
+
},
|
|
341
|
+
"E428": {
|
|
342
|
+
"title": "Meta URL (stable) is invalid"
|
|
343
|
+
},
|
|
344
|
+
"E429": {
|
|
345
|
+
"title": "Adapter name should use `-` instead of `_`"
|
|
346
|
+
},
|
|
347
|
+
"E500": {
|
|
348
|
+
"title": "node_modules found in repo. Please delete it"
|
|
349
|
+
},
|
|
350
|
+
"E501": {
|
|
351
|
+
"title": "Cannot get zip on GitHub"
|
|
352
|
+
},
|
|
353
|
+
"E502": {
|
|
354
|
+
"title": "`admin/img/info-big.png` not found, but selectID.js used in index_m.html "
|
|
355
|
+
},
|
|
356
|
+
"E503": {
|
|
357
|
+
"title": "`iob_npm.done` found in repo! Remove that file"
|
|
358
|
+
},
|
|
359
|
+
"E504": {
|
|
360
|
+
"title": "setInterval found in main, but no clearInterval detected"
|
|
361
|
+
},
|
|
362
|
+
"E505": {
|
|
363
|
+
"title": "setTimeout found in main, but no clearTimeout detected"
|
|
364
|
+
},
|
|
365
|
+
"E506": {
|
|
366
|
+
"title": "More non translated in german or russian words found in admin/words.js. You can use https://translator.iobroker.in/ for translations"
|
|
367
|
+
},
|
|
368
|
+
"E507": {
|
|
369
|
+
"title": "Cannot parse `admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}`: ${e}"
|
|
370
|
+
},
|
|
371
|
+
"E508": {
|
|
372
|
+
"title": "`admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}` not found, but admin support is declared"
|
|
373
|
+
},
|
|
374
|
+
"E509": {
|
|
375
|
+
"title": "Cannot parse `admin/i18n/${lang}/translations.json`"
|
|
376
|
+
},
|
|
377
|
+
"E510": {
|
|
378
|
+
"title": "`/admin/i18n/${lang}/translations.json` or `admin/i18n/${lang}.json` not found, but admin support is declared"
|
|
379
|
+
},
|
|
380
|
+
"E511": {
|
|
381
|
+
"title": "Cannot parse `admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}`"
|
|
382
|
+
},
|
|
383
|
+
"E512": {
|
|
384
|
+
"title": "`admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}` not found, but custom support is declared"
|
|
385
|
+
},
|
|
386
|
+
"E514": {
|
|
387
|
+
"title": "`admin/blockly.js` not found, but blockly support is declared"
|
|
388
|
+
},
|
|
389
|
+
"E515": {
|
|
390
|
+
"title": "JavaScript-Rules support is declared, but no location in property url defined"
|
|
391
|
+
},
|
|
392
|
+
"E516": {
|
|
393
|
+
"title": "`${context.ioPackageJson.common.javascriptRules.url}` not found, but JavaScript-Rules support is declared"
|
|
394
|
+
},
|
|
395
|
+
"E518": {
|
|
396
|
+
"title": "`@alcalzone/release-script` is used, but `.releaseconfig.json` not found"
|
|
397
|
+
},
|
|
398
|
+
"E519": {
|
|
399
|
+
"title": "`${context.packageJson.main}` found in package.json, but not found as file"
|
|
400
|
+
},
|
|
401
|
+
"E601": {
|
|
402
|
+
"title": "No README.md found"
|
|
403
|
+
},
|
|
404
|
+
"E603": {
|
|
405
|
+
"title": "NO `## Changelog` found in README.md"
|
|
406
|
+
},
|
|
407
|
+
"E604": {
|
|
408
|
+
"title": "No `## License` found in README.md"
|
|
409
|
+
},
|
|
410
|
+
"E605": {
|
|
411
|
+
"title": "No actual year found in copyright. Please add `Copyright (c) XXXX-YYYY Author` at the end of README.md"
|
|
412
|
+
},
|
|
413
|
+
"E606": {
|
|
414
|
+
"title": "Current adapter version ${context.packageJson.version} not found in README.md"
|
|
415
|
+
},
|
|
416
|
+
"E701": {
|
|
417
|
+
"title": "NO LICENSE file found"
|
|
418
|
+
},
|
|
419
|
+
"E801": {
|
|
420
|
+
"title": "No repository about text found. Please go to GitHub, press the settings button beside the about title and add the description."
|
|
421
|
+
},
|
|
422
|
+
"E802": {
|
|
423
|
+
"title": "No topics found in the repository. Please go to GitHub, press the settings button beside the about title and add some topics."
|
|
424
|
+
},
|
|
425
|
+
"E803": {
|
|
426
|
+
"title": "Archived repositories are not allowed."
|
|
427
|
+
},
|
|
428
|
+
"E804": {
|
|
429
|
+
"title": "node_modules not found in "
|
|
430
|
+
},
|
|
431
|
+
"E902": {
|
|
432
|
+
"title": "node_modules not found in .npmignore"
|
|
433
|
+
},
|
|
434
|
+
"E903": {
|
|
435
|
+
"title": "iob_npm.done not found in .gitignore"
|
|
436
|
+
},
|
|
437
|
+
"W105": {
|
|
438
|
+
"title": "`common.titleLang` should be translated into all supported languages"
|
|
439
|
+
},
|
|
440
|
+
"W109": {
|
|
441
|
+
"title": "`common.desc` should be translated into all supported languages"
|
|
442
|
+
},
|
|
443
|
+
"W113": {
|
|
444
|
+
"title": "Adapter should support compact mode"
|
|
445
|
+
},
|
|
446
|
+
"W145": {
|
|
447
|
+
"title": "Each `common.news` should be translated into all supported languages"
|
|
448
|
+
},
|
|
449
|
+
"W156": {
|
|
450
|
+
"title": "Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI"
|
|
451
|
+
},
|
|
452
|
+
"W164": {
|
|
453
|
+
"title": "Adapters without config `common.noConfig = true` should also set `common.adminUI.config = none`"
|
|
454
|
+
},
|
|
455
|
+
"W170": {
|
|
456
|
+
"title": "`common.keywords` should not contain `iobroker`, `adapter`, `smart home` in io-package.json"
|
|
457
|
+
},
|
|
458
|
+
"W171": {
|
|
459
|
+
"title": "`common.title` is deprecated in io-package.json"
|
|
460
|
+
},
|
|
461
|
+
"W172": {
|
|
462
|
+
"title": "`common.localLink` in io-package.json is deprecated. Please define object `common.localLinks`: { `_default`: `...` }"
|
|
463
|
+
},
|
|
464
|
+
"W302": {
|
|
465
|
+
"title": "Use github actions instead of travis-ci"
|
|
466
|
+
},
|
|
467
|
+
"W400": {
|
|
468
|
+
"title": "Cannot find adapter in latest repository"
|
|
469
|
+
},
|
|
470
|
+
"W504": {
|
|
471
|
+
"title": "setInterval found in main, but no clearInterval detected"
|
|
472
|
+
},
|
|
473
|
+
"W505": {
|
|
474
|
+
"title": "setTimeout found in main, but no clearTimeout detected"
|
|
475
|
+
},
|
|
476
|
+
"W513": {
|
|
477
|
+
"title": "`gulpfile.js` found in repo! Think about migrating to @iobroker/adapter-dev package"
|
|
478
|
+
},
|
|
479
|
+
"W515": {
|
|
480
|
+
"title": "Why you decided to disable i18n support?"
|
|
481
|
+
},
|
|
482
|
+
"W801": {
|
|
483
|
+
"title": ".npmignore not found"
|
|
484
|
+
},
|
|
485
|
+
"W901": {
|
|
486
|
+
"title": ".gitignore not found"
|
|
487
|
+
}
|
|
488
|
+
}
|
package/doc/readme.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const issues = require('./issues');
|
|
3
|
+
const languages = ['en'];
|
|
4
|
+
|
|
5
|
+
// try to extract error description from index.js
|
|
6
|
+
function extractFromIndex() {
|
|
7
|
+
let added = false;
|
|
8
|
+
const lines = fs.readFileSync(`${__dirname}/../index.js`, {encoding: 'utf8'}).split('\n');
|
|
9
|
+
for (let i = 0; i < lines.length; i++) {
|
|
10
|
+
const m = lines[i].match(/`(\[[EW]\d\d\d] [^`]+)`/) || lines[i].match(/'(\[[EW]\d\d\d] [^`]+)'/) || lines[i].match(/"(\[[EW]\d\d\d] [^`]+)"/);
|
|
11
|
+
if (m) {
|
|
12
|
+
const parts = m[1].match(/\[([EW]\d\d\d)] (.+)/);
|
|
13
|
+
if (parts) {
|
|
14
|
+
console.log(parts[1], parts[2]);
|
|
15
|
+
if (!issues[parts[1]]) {
|
|
16
|
+
// cut off the last part
|
|
17
|
+
parts[2] = parts[2].replace(/"/g, '`');
|
|
18
|
+
issues[parts[1]] = {
|
|
19
|
+
title: parts[2],
|
|
20
|
+
};
|
|
21
|
+
added = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (added) {
|
|
27
|
+
// sort issues
|
|
28
|
+
const newIssues = {};
|
|
29
|
+
const keys = Object.keys(issues).sort();
|
|
30
|
+
keys.forEach(key => newIssues[key] = issues[key]);
|
|
31
|
+
|
|
32
|
+
fs.writeFileSync(`${__dirname}/issues.json`, JSON.stringify(newIssues, null, 2));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
extractFromIndex();
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
const explanationTitle = {
|
|
41
|
+
en: 'Explanation',
|
|
42
|
+
de: 'Erklärung',
|
|
43
|
+
ru: 'Объяснение',
|
|
44
|
+
fr: 'Explication',
|
|
45
|
+
nl: 'Uitleg',
|
|
46
|
+
'pt-pt': 'Explicação',
|
|
47
|
+
it: 'Spiegazione',
|
|
48
|
+
es: 'Explicación',
|
|
49
|
+
uk: 'Пояснення',
|
|
50
|
+
pl: 'Wyjaśnienie',
|
|
51
|
+
'zh-cn': '解释',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const stepsTitle = {
|
|
55
|
+
en: 'Required step to resolve the problem',
|
|
56
|
+
de: 'Erforderlicher Schritt zur Behebung des Problems',
|
|
57
|
+
ru: 'Необходимый шаг для устранения проблемы',
|
|
58
|
+
fr: 'Étape requise pour résoudre le problème',
|
|
59
|
+
nl: 'Vereiste stap om het probleem op te lossen',
|
|
60
|
+
'pt-pt': 'Etapa necessária para resolver o problema',
|
|
61
|
+
it: 'Passaggio richiesto per risolvere il problema',
|
|
62
|
+
es: 'Paso requerido para resolver el problema',
|
|
63
|
+
uk: 'Необхідний крок для вирішення проблеми',
|
|
64
|
+
pl: 'Wymagany krok do rozwiązania problemu',
|
|
65
|
+
'zh-cn': '解决问题所需的步骤',
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const notesTitle = {
|
|
69
|
+
en: 'Technical notes',
|
|
70
|
+
de: 'Technische Notizen',
|
|
71
|
+
ru: 'Технические заметки',
|
|
72
|
+
fr: 'Notes techniques',
|
|
73
|
+
nl: 'Technische notities',
|
|
74
|
+
'pt-pt': 'Notas técnicas',
|
|
75
|
+
it: 'Note tecniche',
|
|
76
|
+
es: 'Notas técnicas',
|
|
77
|
+
uk: 'Технічні примітки',
|
|
78
|
+
pl: 'Notatki techniczne',
|
|
79
|
+
'zh-cn': '技术说明',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
// try to find possible languages
|
|
84
|
+
Object.keys(issues).forEach(issue => {
|
|
85
|
+
const entry = issues[issue];
|
|
86
|
+
if (entry.title && typeof entry.title === 'object') {
|
|
87
|
+
const langs = Object.keys(entry.title);
|
|
88
|
+
langs.forEach(lang => !languages.includes(lang) && languages.push(lang));
|
|
89
|
+
}
|
|
90
|
+
if (entry.explanation && typeof entry.explanation === 'object') {
|
|
91
|
+
const langs = Object.keys(entry.explanation);
|
|
92
|
+
langs.forEach(lang => !languages.includes(lang) && languages.push(lang));
|
|
93
|
+
}
|
|
94
|
+
if (entry.resolving && typeof entry.resolving === 'object') {
|
|
95
|
+
const langs = Object.keys(entry.resolving);
|
|
96
|
+
langs.forEach(lang => !languages.includes(lang) && languages.push(lang));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
function getText(text, lang) {
|
|
101
|
+
if (typeof text === 'object') {
|
|
102
|
+
if (text[lang]) {
|
|
103
|
+
return text[lang];
|
|
104
|
+
} else {
|
|
105
|
+
return text.en;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return text;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
languages.forEach(lang => {
|
|
112
|
+
// generate one language file for each language
|
|
113
|
+
const lines = [];
|
|
114
|
+
const content = [
|
|
115
|
+
'# Explanation of repo checker issues',
|
|
116
|
+
'## Content',
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
Object.keys(issues).forEach(issue => {
|
|
120
|
+
const entry = issues[issue];
|
|
121
|
+
const title = `[${issue}] ${getText(entry.title, lang)}`;
|
|
122
|
+
const explanation = getText(entry.explanation, lang);
|
|
123
|
+
const resolving = getText(entry.resolving, lang);
|
|
124
|
+
const note = getText(entry.note, lang);
|
|
125
|
+
|
|
126
|
+
// link => e001-cannot-parse-packetjson
|
|
127
|
+
content.push(`- [${issue} ${getText(entry.title, lang)}](#${title.toLowerCase()
|
|
128
|
+
.replace(/\s/g, '-')
|
|
129
|
+
.replace(/\[/g, '')
|
|
130
|
+
.replace(/]/g, '')
|
|
131
|
+
.replace(/[^-\w\d]/g, '')
|
|
132
|
+
})`);
|
|
133
|
+
lines.push(`### ${title}`);
|
|
134
|
+
if (explanation) {
|
|
135
|
+
lines.push(`#### ${getText(explanationTitle, lang)}`);
|
|
136
|
+
lines.push(explanation);
|
|
137
|
+
}
|
|
138
|
+
if (resolving) {
|
|
139
|
+
lines.push(`#### ${getText(stepsTitle, lang)}`);
|
|
140
|
+
lines.push(resolving);
|
|
141
|
+
}
|
|
142
|
+
if (note) {
|
|
143
|
+
lines.push(`#### ${getText(notesTitle, lang)}`);
|
|
144
|
+
lines.push(note);
|
|
145
|
+
}
|
|
146
|
+
lines.push('');
|
|
147
|
+
});
|
|
148
|
+
content.push('');
|
|
149
|
+
content.push('## Issues');
|
|
150
|
+
fs.writeFileSync(`${__dirname}/issues_${lang}.md`, `${content.join('\n')}\n${lines.join('\n')}\n`, {encoding: 'utf8'});
|
|
151
|
+
});
|
package/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const sizeOf = require('image-size');
|
|
|
20
20
|
const axios = require('axios');
|
|
21
21
|
const JSON5 = require('json5');
|
|
22
22
|
const compareVersions = require('compare-versions');
|
|
23
|
+
const issues = require('./doc/issues');
|
|
23
24
|
|
|
24
25
|
const version = require('./package.json').version;
|
|
25
26
|
const recommendedJsControllerVersion = '5.0.11';
|
|
@@ -169,7 +170,7 @@ function checkPackageJson(context) {
|
|
|
169
170
|
context.authorName = n[1];
|
|
170
171
|
}
|
|
171
172
|
|
|
172
|
-
if (context.packageJson.name !==
|
|
173
|
+
if (context.packageJson.name !== `iobroker.${adapterName.toLowerCase()}`) {
|
|
173
174
|
context.errors.push(`[E020] Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}". Now is "${packageJson.name}"`);
|
|
174
175
|
} else {
|
|
175
176
|
context.checks.push(`Name of adapter in package.json must be lowercase and be equal to "iobroker.${adapterName.toLowerCase()}".`);
|
|
@@ -859,7 +860,7 @@ function checkIOPackageJson(context) {
|
|
|
859
860
|
context.checks.push('"common.materialize" or "common.adminUI.config" found in io-package.json');
|
|
860
861
|
}
|
|
861
862
|
|
|
862
|
-
if (!(context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.config
|
|
863
|
+
if (!context.ioPackageJson.common.adminUI || (context.ioPackageJson.common.adminUI.config !== 'json' && context.ioPackageJson.common.adminUI.config !== 'none')) {
|
|
863
864
|
context.warnings.push('[W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI');
|
|
864
865
|
}
|
|
865
866
|
} else {
|
|
@@ -1270,6 +1271,12 @@ function checkRepo(context) {
|
|
|
1270
1271
|
context.latestRepo = body;
|
|
1271
1272
|
if (!context.latestRepo[context.adapterName]) {
|
|
1272
1273
|
context.warnings.push(`[W400] Cannot find "${context.adapterName}" in latest repository`);
|
|
1274
|
+
|
|
1275
|
+
if (context.adapterName.includes('_')) {
|
|
1276
|
+
context.errors.push('[E429] Adapter name should use "-" instead of "_"');
|
|
1277
|
+
} else {
|
|
1278
|
+
context.checks.push('Adapter name does not have "_"');
|
|
1279
|
+
}
|
|
1273
1280
|
} else {
|
|
1274
1281
|
context.checks.push('Adapter found in latest repository');
|
|
1275
1282
|
|
|
@@ -1370,7 +1377,7 @@ function checkRepo(context) {
|
|
|
1370
1377
|
} else {
|
|
1371
1378
|
return Promise.resolve(context);
|
|
1372
1379
|
}
|
|
1373
|
-
// max number is
|
|
1380
|
+
// max number is E429
|
|
1374
1381
|
}
|
|
1375
1382
|
|
|
1376
1383
|
function extractWords(words) {
|
|
@@ -1958,6 +1965,7 @@ function check(request, ctx, callback) {
|
|
|
1958
1965
|
result: 'Errors found',
|
|
1959
1966
|
checks: context.checks,
|
|
1960
1967
|
errors: context.errors,
|
|
1968
|
+
issues,
|
|
1961
1969
|
warnings: context.warnings,
|
|
1962
1970
|
version,
|
|
1963
1971
|
hasTravis: context.hasTravis,
|
|
@@ -1967,6 +1975,17 @@ function check(request, ctx, callback) {
|
|
|
1967
1975
|
}
|
|
1968
1976
|
}
|
|
1969
1977
|
|
|
1978
|
+
function getText(text, lang) {
|
|
1979
|
+
if (typeof text === 'object') {
|
|
1980
|
+
if (text[lang]) {
|
|
1981
|
+
return text[lang];
|
|
1982
|
+
} else {
|
|
1983
|
+
return text.en;
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
return text;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1970
1989
|
if (typeof module !== 'undefined' && module.parent) {
|
|
1971
1990
|
exports.handler = check;
|
|
1972
1991
|
} else {
|
|
@@ -1994,10 +2013,48 @@ if (typeof module !== 'undefined' && module.parent) {
|
|
|
1994
2013
|
console.log(context.result);
|
|
1995
2014
|
|
|
1996
2015
|
if (context.errors.length) {
|
|
1997
|
-
console.
|
|
2016
|
+
console.log('\n\nErrors:');
|
|
2017
|
+
context.errors.forEach(err => {
|
|
2018
|
+
const issue = err.substring(1, 5);
|
|
2019
|
+
if (issues[issue]) {
|
|
2020
|
+
if (issues[issue].title) {
|
|
2021
|
+
console.error(getText(issues[issue].title, 'en'));
|
|
2022
|
+
}
|
|
2023
|
+
if (issues[issue].explanation) {
|
|
2024
|
+
console.error(getText(issues[issue].explanation, 'en'));
|
|
2025
|
+
}
|
|
2026
|
+
if (issues[issue].resolving) {
|
|
2027
|
+
console.error(getText(issues[issue].resolving, 'en'));
|
|
2028
|
+
}
|
|
2029
|
+
if (issues[issue].notes) {
|
|
2030
|
+
console.error(getText(issues[issue].notes, 'en'));
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
console.error(err);
|
|
2035
|
+
});
|
|
1998
2036
|
}
|
|
1999
2037
|
if (context.warnings.length) {
|
|
2000
|
-
console.
|
|
2038
|
+
console.log('\nWarnings:');
|
|
2039
|
+
context.warnings.forEach(err => {
|
|
2040
|
+
const issue = err.substring(1, 5);
|
|
2041
|
+
if (issues[issue]) {
|
|
2042
|
+
if (issues[issue].title) {
|
|
2043
|
+
console.warn(getText(issues[issue].title, 'en'));
|
|
2044
|
+
}
|
|
2045
|
+
if (issues[issue].explanation) {
|
|
2046
|
+
console.warn(getText(issues[issue].explanation, 'en'));
|
|
2047
|
+
}
|
|
2048
|
+
if (issues[issue].resolving) {
|
|
2049
|
+
console.warn(getText(issues[issue].resolving, 'en'));
|
|
2050
|
+
}
|
|
2051
|
+
if (issues[issue].notes) {
|
|
2052
|
+
console.warn(getText(issues[issue].notes, 'en'));
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
console.warn(err);
|
|
2057
|
+
});
|
|
2001
2058
|
}
|
|
2002
2059
|
});
|
|
2003
2060
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.13",
|
|
3
3
|
"name": "@iobroker/repochecker",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"axios": "^1.
|
|
5
|
+
"axios": "^1.6.3",
|
|
6
6
|
"compare-versions": "^6.1.0",
|
|
7
|
-
"image-size": "^1.0
|
|
7
|
+
"image-size": "^1.1.0",
|
|
8
8
|
"unzipper": "^0.10.14",
|
|
9
9
|
"json5": "^2.2.3"
|
|
10
10
|
},
|
|
@@ -12,15 +12,17 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@alcalzone/release-script": "^3.
|
|
16
|
-
"eslint": "^8.
|
|
15
|
+
"@alcalzone/release-script": "^3.7.0",
|
|
16
|
+
"eslint": "^8.56.0"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
|
-
"index.js"
|
|
19
|
+
"index.js",
|
|
20
|
+
"doc/issues.json"
|
|
20
21
|
],
|
|
21
22
|
"main": "index.js",
|
|
22
23
|
"bin": "index.js",
|
|
23
24
|
"scripts": {
|
|
25
|
+
"prepublishOnly": "node doc/readme.js",
|
|
24
26
|
"start": "node index.js",
|
|
25
27
|
"lint": "eslint",
|
|
26
28
|
"release": "release-script",
|