@iobroker/repochecker 4.3.0-alpha.0 → 5.0.0-alpha.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.
@@ -3,7 +3,7 @@
3
3
  This module is a support module for iobroker.repochecker
4
4
 
5
5
  Area checked: Adapter Repository
6
- Numbering : 400 - 499
6
+ Numbering : 4000 - 4999
7
7
 
8
8
  */
9
9
 
@@ -22,7 +22,7 @@ const common = require('./common.js');
22
22
  const config = require('./config.js');
23
23
 
24
24
  async function checkRepository(context) {
25
- console.log('\n[E400 - E499] checkRepository');
25
+ console.log('\n[E4000 - E4999] checking repository');
26
26
 
27
27
  if (context.ioPackageJson && context.ioPackageJson.common && context.ioPackageJson.common.type) {
28
28
  /* TODO: why check type here ? */
@@ -33,15 +33,15 @@ async function checkRepository(context) {
33
33
  let body = response.data;
34
34
  if (!body) {
35
35
  context.errors.push(
36
- '[E400] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist.json',
36
+ '[E4000] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist.json',
37
37
  );
38
38
  } else {
39
39
  context.latestRepo = body;
40
40
  if (!context.latestRepo[context.adapterName]) {
41
- context.warnings.push(`[W401] Cannot find "${context.adapterName}" in latest repository`);
41
+ context.warnings.push(`[W4001] Cannot find "${context.adapterName}" in latest repository`);
42
42
 
43
43
  if (context.adapterName.includes('_')) {
44
- context.errors.push('[E421] Adapter name should use "-" instead of "_"');
44
+ context.errors.push('[E4021] Adapter name should use "-" instead of "_"');
45
45
  } else {
46
46
  context.checks.push('Adapter name does not have "_"');
47
47
  }
@@ -50,7 +50,7 @@ async function checkRepository(context) {
50
50
 
51
51
  if (context.latestRepo[context.adapterName].type !== context.ioPackageJson.common.type) {
52
52
  context.errors.push(
53
- `[E402] Types of adapter in latest repository and in io-package.json are different "${context.latestRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"`,
53
+ `[E4002] Types of adapter in latest repository and in io-package.json are different "${context.latestRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"`,
54
54
  );
55
55
  } else {
56
56
  context.checks.push(
@@ -59,7 +59,7 @@ async function checkRepository(context) {
59
59
  }
60
60
 
61
61
  if (context.latestRepo[context.adapterName].version) {
62
- context.errors.push('[E403] Version set in latest repository');
62
+ context.errors.push('[E4003] Version set in latest repository');
63
63
  } else {
64
64
  context.checks.push('Version not set in latest repository');
65
65
  }
@@ -67,26 +67,26 @@ async function checkRepository(context) {
67
67
  const url = `https://raw.githubusercontent.com/${context.authorName}/ioBroker.${context.adapterName}/${context.branch}/`;
68
68
 
69
69
  if (!context.latestRepo[context.adapterName].icon) {
70
- context.errors.push('[E404] Icon not found in latest repository');
70
+ context.errors.push('[E4004] Icon not found in latest repository');
71
71
  } else {
72
72
  context.checks.push('Icon found in latest repository');
73
73
 
74
74
  if (!context.latestRepo[context.adapterName].icon.startsWith(`${url}admin/`)) {
75
75
  context.errors.push(
76
- `[E405] Icon must be in the following path: ${url}admin/; correct sources-dist.json`,
76
+ `[E4005] Icon must be in the following path: ${url}admin/; correct sources-dist.json`,
77
77
  );
78
78
  } else {
79
79
  context.checks.push('Icon found in latest repository');
80
80
  }
81
81
  }
82
82
  if (!context.latestRepo[context.adapterName].meta) {
83
- context.errors.push('[E406] Meta URL not found in latest repository; correct sources-dist.json');
83
+ context.errors.push('[E4006] Meta URL not found in latest repository; correct sources-dist.json');
84
84
  } else {
85
85
  context.checks.push('Meta URL(latest) found in latest repository');
86
86
 
87
87
  if (context.latestRepo[context.adapterName].meta !== `${url}io-package.json`) {
88
88
  context.errors.push(
89
- `[E407] Meta URL must be equal to ${url}io-package.json; correct sources-dist.json`,
89
+ `[E4007] Meta URL must be equal to ${url}io-package.json; correct sources-dist.json`,
90
90
  );
91
91
  } else {
92
92
  context.checks.push('Meta URL (latest) is OK in latest repository');
@@ -102,14 +102,14 @@ async function checkRepository(context) {
102
102
  body = _response.data;
103
103
  if (!body) {
104
104
  context.errors.push(
105
- '[E420] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist-stable.json',
105
+ '[E4020] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist-stable.json',
106
106
  );
107
107
  } else {
108
108
  context.stableRepo = body;
109
109
  if (context.stableRepo[context.adapterName]) {
110
110
  if (context.stableRepo[context.adapterName].type !== context.ioPackageJson.common.type) {
111
111
  context.errors.push(
112
- `[E422] Types of adapter in stable repository and in io-package.json are different "${context.stableRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"`,
112
+ `[E4022] Types of adapter in stable repository and in io-package.json are different "${context.stableRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"`,
113
113
  );
114
114
  } else {
115
115
  context.checks.push(
@@ -118,13 +118,13 @@ async function checkRepository(context) {
118
118
  }
119
119
 
120
120
  if (!context.latestRepo[context.adapterName]) {
121
- context.errors.push('[E423] Adapter was found in stable repository but not in latest repo');
121
+ context.errors.push('[E4023] Adapter was found in stable repository but not in latest repo');
122
122
  } else {
123
123
  context.checks.push('Adapter was found in stable repository and in latest repo');
124
124
  }
125
125
 
126
126
  if (!context.stableRepo[context.adapterName].version) {
127
- context.errors.push('[E424] No version set in stable repository');
127
+ context.errors.push('[E4024] No version set in stable repository');
128
128
  } else {
129
129
  context.checks.push('Version found in stable repository');
130
130
  }
@@ -132,13 +132,13 @@ async function checkRepository(context) {
132
132
  const url = `https://raw.githubusercontent.com/${context.authorName}/ioBroker.${context.adapterName}/${context.branch}/`;
133
133
 
134
134
  if (!context.stableRepo[context.adapterName].icon) {
135
- context.errors.push('[E425] Icon not found in stable repository');
135
+ context.errors.push('[E4025] Icon not found in stable repository');
136
136
  } else {
137
137
  context.checks.push('Icon found in stable repository');
138
138
 
139
139
  if (!context.stableRepo[context.adapterName].icon.startsWith(`${url}admin/`)) {
140
140
  context.errors.push(
141
- `[E426] Icon must be in the following path: ${url}admin/; correct sources-dist-stable.json`,
141
+ `[E4026] Icon must be in the following path: ${url}admin/; correct sources-dist-stable.json`,
142
142
  );
143
143
  } else {
144
144
  context.checks.push('Icon (stable) found in latest repository');
@@ -146,13 +146,13 @@ async function checkRepository(context) {
146
146
  }
147
147
 
148
148
  if (!context.stableRepo[context.adapterName].meta) {
149
- context.errors.push('[E427] Meta URL not found in latest repository; correct sources-dist.json');
149
+ context.errors.push('[E4027] Meta URL not found in latest repository; correct sources-dist.json');
150
150
  } else {
151
151
  context.checks.push('Meta URL (stable) found in latest repository');
152
152
 
153
153
  if (context.stableRepo[context.adapterName].meta !== `${url}io-package.json`) {
154
154
  context.errors.push(
155
- `[E428] Meta URL must be equal to ${url}io-package.json; correct sources-dist-stable.json`,
155
+ `[E4028] Meta URL must be equal to ${url}io-package.json; correct sources-dist-stable.json`,
156
156
  );
157
157
  } else {
158
158
  context.checks.push('Meta URL (stable) is OK in latest repository');
@@ -164,7 +164,7 @@ async function checkRepository(context) {
164
164
  _response = await axios('http://repo.iobroker.live/sources-dist-latest.json');
165
165
  body = _response.data;
166
166
  if (!body) {
167
- context.errors.push('[E429] Cannot download http://repo.iobroker.live/sources-dist-latest.json');
167
+ context.errors.push('[E4029] Cannot download http://repo.iobroker.live/sources-dist-latest.json');
168
168
  throw 'Cannot download http://repo.iobroker.live/sources-dist-latest.json'; // ABORT to avoid generating unuseable report
169
169
  } else {
170
170
  context.latestRepoLive = body;
@@ -173,7 +173,7 @@ async function checkRepository(context) {
173
173
  _response = await axios('http://repo.iobroker.live/sources-dist.json');
174
174
  body = _response.data;
175
175
  if (!body) {
176
- context.errors.push('[E430] Cannot download http://repo.iobroker.live/sources-dist.json');
176
+ context.errors.push('[E4030] Cannot download http://repo.iobroker.live/sources-dist.json');
177
177
  throw 'Cannot download http://repo.iobroker.live/sources-dist.json'; // ABORT to avoid generating unuseable report
178
178
  } else {
179
179
  context.stableRepoLive = body;
@@ -185,7 +185,7 @@ async function checkRepository(context) {
185
185
  for (const dependency in dependencies) {
186
186
  if (!context.latestRepoLive[dependency]) {
187
187
  context.errors.push(
188
- `[E431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
188
+ `[E4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
189
189
  );
190
190
  } else {
191
191
  const versDependency = dependencies[dependency];
@@ -193,7 +193,7 @@ async function checkRepository(context) {
193
193
  //console.log( `DEBUG: dependency ${dependency} - ${versDependency} - latest ${versRepository}`);
194
194
  if (!versDependency.startsWith('>=')) {
195
195
  context.warnings.push(
196
- `[W432] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
196
+ `[W4032] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
197
197
  );
198
198
  } else {
199
199
  try {
@@ -205,7 +205,7 @@ async function checkRepository(context) {
205
205
  )
206
206
  ) {
207
207
  context.errors.push(
208
- `[E431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
208
+ `[E4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
209
209
  );
210
210
  } else {
211
211
  context.checks.push(
@@ -214,7 +214,7 @@ async function checkRepository(context) {
214
214
  }
215
215
  } catch (e) {
216
216
  context.errors.push(
217
- `[E435] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
217
+ `[E4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
218
218
  );
219
219
  }
220
220
  }
@@ -222,7 +222,7 @@ async function checkRepository(context) {
222
222
 
223
223
  if (!context.stableRepoLive[dependency]) {
224
224
  context.errors.push(
225
- `[E433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
225
+ `[E4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
226
226
  );
227
227
  } else {
228
228
  const versDependency = dependencies[dependency];
@@ -231,7 +231,7 @@ async function checkRepository(context) {
231
231
  if (!versDependency.startsWith('>=')) {
232
232
  // format already checked at latest repository check
233
233
  // context.warnings.push(
234
- // `[W434] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
234
+ // `[W4034] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
235
235
  // );
236
236
  } else {
237
237
  try {
@@ -243,7 +243,7 @@ async function checkRepository(context) {
243
243
  )
244
244
  ) {
245
245
  context.errors.push(
246
- `[E433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
246
+ `[E4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
247
247
  );
248
248
  } else {
249
249
  context.checks.push(
@@ -252,7 +252,7 @@ async function checkRepository(context) {
252
252
  }
253
253
  } catch (e) {
254
254
  context.errors.push(
255
- `[E435] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
255
+ `[E4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
256
256
  );
257
257
  }
258
258
  }
@@ -267,7 +267,7 @@ async function checkRepository(context) {
267
267
  for (const dependency in dependencies) {
268
268
  if (!context.latestRepoLive[dependency]) {
269
269
  context.errors.push(
270
- `[E431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
270
+ `[E4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
271
271
  );
272
272
  } else {
273
273
  const versDependency = dependencies[dependency];
@@ -275,7 +275,7 @@ async function checkRepository(context) {
275
275
  //console.log( `DEBUG: dependency ${dependency} - ${versDependency} - latest ${versRepository}`);
276
276
  if (!versDependency.startsWith('>=')) {
277
277
  context.warnings.push(
278
- `[W432] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
278
+ `[W4032] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
279
279
  );
280
280
  } else {
281
281
  try {
@@ -287,7 +287,7 @@ async function checkRepository(context) {
287
287
  )
288
288
  ) {
289
289
  context.errors.push(
290
- `[E431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
290
+ `[E4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
291
291
  );
292
292
  } else {
293
293
  context.checks.push(
@@ -296,15 +296,15 @@ async function checkRepository(context) {
296
296
  }
297
297
  } catch (e) {
298
298
  context.errors.push(
299
- `[E435] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
299
+ `[E4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
300
300
  );
301
301
  }
302
302
  }
303
303
  }
304
304
 
305
305
  if (!context.stableRepoLive[dependency]) {
306
- context.warnings.push(
307
- `[W433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
306
+ context.errors.push(
307
+ `[E4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
308
308
  );
309
309
  } else {
310
310
  const versDependency = dependencies[dependency];
@@ -312,7 +312,7 @@ async function checkRepository(context) {
312
312
  //console.log( `DEBUG: dependency ${dependency} - ${versDependency} - latest ${versRepository}`);
313
313
  if (!versDependency.startsWith('>=')) {
314
314
  context.warnings.push(
315
- `[W434] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
315
+ `[W4034] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='`,
316
316
  );
317
317
  } else {
318
318
  try {
@@ -324,7 +324,7 @@ async function checkRepository(context) {
324
324
  )
325
325
  ) {
326
326
  context.errors.push(
327
- `[E433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
327
+ `[E4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository`,
328
328
  );
329
329
  } else {
330
330
  context.checks.push(
@@ -333,7 +333,7 @@ async function checkRepository(context) {
333
333
  }
334
334
  } catch (e) {
335
335
  context.errors.push(
336
- `[E435] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
336
+ `[E4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
337
337
  );
338
338
  }
339
339
  }
@@ -362,7 +362,7 @@ async function checkVSCodeSchemas(context) {
362
362
  if (!vscodeSettings) {
363
363
  // File doesn't exist, suggest adding it
364
364
  context.warnings.push(
365
- '[S436] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.',
365
+ '[S4036] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.',
366
366
  );
367
367
  return;
368
368
  }
@@ -374,21 +374,21 @@ async function checkVSCodeSchemas(context) {
374
374
  try {
375
375
  settingsJson = JSON5.parse(vscodeSettings);
376
376
  } catch {
377
- context.errors.push('[E437] .vscode/settings.json file contains invalid JSON.');
377
+ context.errors.push('[E4037] .vscode/settings.json file contains invalid JSON.');
378
378
  return;
379
379
  }
380
380
 
381
381
  // Check if json.schemas exists
382
382
  if (!settingsJson['json.schemas']) {
383
383
  context.warnings.push(
384
- '[S438] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.',
384
+ '[S4038] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.',
385
385
  );
386
386
  return;
387
387
  }
388
388
 
389
389
  const schemas = settingsJson['json.schemas'];
390
390
  if (!Array.isArray(schemas)) {
391
- context.errors.push('[E439] "json.schemas" property in .vscode/settings.json must be an array.');
391
+ context.errors.push('[E4039] "json.schemas" property in .vscode/settings.json must be an array.');
392
392
  return;
393
393
  }
394
394
 
@@ -399,39 +399,46 @@ async function checkVSCodeSchemas(context) {
399
399
 
400
400
  if (!ioPackageSchema) {
401
401
  context.warnings.push(
402
- `[W440] Missing schema definition for "io-package.json" in .vscode/settings.json. Add: {"fileMatch": ["io-package.json"], "url": "${config.schemaUrls['io-package']}"}`,
402
+ `[W4040] Missing schema definition for "io-package.json" in .vscode/settings.json. Add: {"fileMatch": ["io-package.json"], "url": "${config.schemaUrls['io-package']}"}`,
403
403
  );
404
404
  } else {
405
405
  // Check if URL is correct
406
406
  if (ioPackageSchema.url !== config.schemaUrls['io-package']) {
407
407
  context.errors.push(
408
- `[E441] Incorrect schema URL for "io-package.json" in .vscode/settings.json. Expected: "${config.schemaUrls['io-package']}", found: "${ioPackageSchema.url}"`,
408
+ `[E4041] Incorrect schema URL for "io-package.json" in .vscode/settings.json. Expected: "${config.schemaUrls['io-package']}", found: "${ioPackageSchema.url}"`,
409
409
  );
410
410
  } else {
411
411
  context.checks.push('Correct io-package.json schema definition found in .vscode/settings.json');
412
412
  }
413
413
  }
414
414
 
415
+ let usesJsonConfig =
416
+ (context.ioPackageJson.common.adminUI?.config && context.ioPackageJson.common.adminUI?.config === 'json') ||
417
+ (context.ioPackageJson.common.adminUI?.custom && context.ioPackageJson.common.adminUI?.custom === 'json') ||
418
+ (context.ioPackageJson.common.adminUI?.tab && context.ioPackageJson.common.adminUI?.tab === 'json');
419
+
420
+ common.debug('Adapter uses jsonConfig, lets check vscode setup');
421
+
415
422
  // Check for jsonConfig schemas
416
423
  const jsonConfigFiles = ['admin/jsonConfig.json', 'admin/jsonCustom.json', 'admin/jsonTab.json'];
417
424
  const json5ConfigFiles = ['admin/jsonConfig.json5', 'admin/jsonCustom.json5', 'admin/jsonTab.json5'];
418
425
 
419
- // Check if adapter has any json5 files in admin directory
420
-
421
426
  // Find schema that matches jsonConfig files
422
427
  const jsonConfigSchema = schemas.find(
423
428
  schema => schema.fileMatch && jsonConfigFiles.every(file => schema.fileMatch.includes(file)),
424
429
  );
425
430
 
426
431
  if (!jsonConfigSchema) {
427
- context.warnings.push(
428
- `[W442] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}`,
429
- );
432
+ if (usesJsonConfig) {
433
+ context.warnings.push(
434
+ `[W4042] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}`,
435
+ );
436
+ }
430
437
  } else {
431
438
  // Check if URL is correct
432
439
  if (jsonConfigSchema.url !== config.schemaUrls.jsonConfig) {
433
440
  context.errors.push(
434
- `[E443] Incorrect schema URL for jsonConfig files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${jsonConfigSchema.url}"`,
441
+ `[E4043] Incorrect schema URL for jsonConfig files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${jsonConfigSchema.url}"`,
435
442
  );
436
443
  } else {
437
444
  context.checks.push('Correct jsonConfig schema definition found in .vscode/settings.json');
@@ -444,16 +451,16 @@ async function checkVSCodeSchemas(context) {
444
451
  );
445
452
 
446
453
  if (!json5ConfigSchema) {
447
- if (context.cfg.usesJson5) {
454
+ if (usesJsonConfig && context.cfg.usesJson5) {
448
455
  context.warnings.push(
449
- `[W444] Missing schema definition for JSON5 config files in .vscode/settings.json. Adapt: {"fileMatch": ${JSON.stringify(jsonConfigFiles.concat(json5ConfigFiles))}, "url": "${config.schemaUrls.jsonConfig}"}`,
456
+ `[W4044] Missing schema definition for JSON5 config files in .vscode/settings.json. Adapt: {"fileMatch": ${JSON.stringify(jsonConfigFiles.concat(json5ConfigFiles))}, "url": "${config.schemaUrls.jsonConfig}"}`,
450
457
  );
451
458
  }
452
459
  } else {
453
460
  // Check if URL is correct
454
461
  if (json5ConfigSchema.url !== config.schemaUrls.jsonConfig) {
455
462
  context.errors.push(
456
- `[E445] Incorrect schema URL for JSON5 config files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${json5ConfigSchema.url}"`,
463
+ `[E4045] Incorrect schema URL for JSON5 config files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${json5ConfigSchema.url}"`,
457
464
  );
458
465
  } else {
459
466
  context.checks.push('Correct JSON5 config schema definition found in .vscode/settings.json');
@@ -463,10 +470,10 @@ async function checkVSCodeSchemas(context) {
463
470
  // File doesn't exist or cannot be read
464
471
  if (error.code === 'ENOENT' || error.message.includes('404')) {
465
472
  context.warnings.push(
466
- '[S436] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.',
473
+ '[S4036] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.',
467
474
  );
468
475
  } else {
469
- context.warnings.push(`[W446] Could not read .vscode/settings.json file: ${error.message}`);
476
+ context.warnings.push(`[W4046] Could not read .vscode/settings.json file: ${error.message}`);
470
477
  }
471
478
  }
472
479
  }
@@ -476,58 +483,58 @@ exports.checkRepository = checkRepository;
476
483
  // List of error and warnings used at this module
477
484
  // ----------------------------------------------
478
485
 
479
- // [400] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist.json
480
- // [401] Cannot find "${context.adapterName}" in latest repository
481
- // [402] Types of adapter in latest repository and in io-package.json are different "${context.latestRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"
482
- // [403] Version set in latest repository
483
- // [404] Icon not found in latest repository
484
- // [405] Icon must be in the following path: ${url}; correct sources-dist.json
485
- // [406] Meta URL not found in latest repository; correct sources-dist.json
486
- // [407] Meta URL must be equal to ${url}io-package.json; correct sources-dist.json
487
- // [408]
488
- // [409]
489
- // [410]
490
- // [411]
491
- // [412]
492
- // [413]
493
- // [414]
494
- // [415]
495
- // [416]
496
- // [417]
497
- // [418]
498
- // [419]
499
- // [420] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist-stable.json
500
- // [421] Adapter name should use "-" instead of "_"
501
- // [422] Types of adapter in stable repository and in io-package.json are different "${context.stableRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"
502
- // [423] Adapter was found in stable repository but not in latest repo
503
- // [424] No version set in stable repository
504
- // [425] Icon not found in stable repository
505
- // [426] Icon must be in the following path: ${url}; correct sources-dist-stable.json
506
- // [427] Meta URL not found in latest repository; correct sources-dist.json
507
- // [428] Meta URL must be equal to ${url}io-package.json; correct sources-dist-stable.json
508
- // [429] Cannot download http://repo.iobroker.live/sources-dist-latest.json
509
- // [430] Cannot download http://repo.iobroker.live/sources-dist.json
510
- // [431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
511
- // [431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
512
- // [431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
513
- // [431] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
514
- // [432] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
515
- // [432] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
516
- // [433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
517
- // [433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
518
- // [433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
519
- // [433] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
520
- // [434] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
521
- // [434] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
522
- // [435] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}
523
- // [436] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.
524
- // [437] .vscode/settings.json file contains invalid JSON.
525
- // [438] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.
526
- // [439] "json.schemas" property in .vscode/settings.json must be an array.
527
- // [440] Missing schema definition for "io-package.json" in .vscode/settings.json. Add: {"fileMatch": ["io-package.json"], "url": "${config.schemaUrls['io-package']}"}
528
- // [441] Incorrect schema URL for "io-package.json" in .vscode/settings.json. Expected: "${config.schemaUrls['io-package']}", found: "${ioPackageSchema.url}"
529
- // [442] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}
530
- // [443] Incorrect schema URL for jsonConfig files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${jsonConfigSchema.url}"
531
- // [444] Missing schema definition for JSON5 config files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(json5ConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}
532
- // [445] Incorrect schema URL for JSON5 config files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${json5ConfigSchema.url}"
533
- // [446] Could not read .vscode/settings.json file: ${error.message}
486
+ // [4000] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist.json
487
+ // [4001] Cannot find "${context.adapterName}" in latest repository
488
+ // [4002] Types of adapter in latest repository and in io-package.json are different "${context.latestRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"
489
+ // [4003] Version set in latest repository
490
+ // [4004] Icon not found in latest repository
491
+ // [4005] Icon must be in the following path: ${url}; correct sources-dist.json
492
+ // [4006] Meta URL not found in latest repository; correct sources-dist.json
493
+ // [4007] Meta URL must be equal to ${url}io-package.json; correct sources-dist.json
494
+ // [4008]
495
+ // [4009]
496
+ // [4010]
497
+ // [4011]
498
+ // [4012]
499
+ // [4013]
500
+ // [4014]
501
+ // [4015]
502
+ // [4016]
503
+ // [4017]
504
+ // [4018]
505
+ // [4019]
506
+ // [4020] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist-stable.json
507
+ // [4021] Adapter name should use "-" instead of "_"
508
+ // [4022] Types of adapter in stable repository and in io-package.json are different "${context.stableRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"
509
+ // [4023] Adapter was found in stable repository but not in latest repo
510
+ // [4024] No version set in stable repository
511
+ // [4025] Icon not found in stable repository
512
+ // [4026] Icon must be in the following path: ${url}; correct sources-dist-stable.json
513
+ // [4027] Meta URL not found in latest repository; correct sources-dist.json
514
+ // [4028] Meta URL must be equal to ${url}io-package.json; correct sources-dist-stable.json
515
+ // [4029] Cannot download http://repo.iobroker.live/sources-dist-latest.json
516
+ // [4030] Cannot download http://repo.iobroker.live/sources-dist.json
517
+ // [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
518
+ // [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
519
+ // [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
520
+ // [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
521
+ // [4032] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
522
+ // [4032] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
523
+ // [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
524
+ // [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
525
+ // [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
526
+ // [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
527
+ // [4034] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
528
+ // [4034] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
529
+ // [4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}
530
+ // [4036] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.
531
+ // [4037] .vscode/settings.json file contains invalid JSON.
532
+ // [4038] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.
533
+ // [4039] "json.schemas" property in .vscode/settings.json must be an array.
534
+ // [4040] Missing schema definition for "io-package.json" in .vscode/settings.json. Add: {"fileMatch": ["io-package.json"], "url": "${config.schemaUrls['io-package']}"}
535
+ // [4041] Incorrect schema URL for "io-package.json" in .vscode/settings.json. Expected: "${config.schemaUrls['io-package']}", found: "${ioPackageSchema.url}"
536
+ // [4042] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}
537
+ // [4043] Incorrect schema URL for jsonConfig files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${jsonConfigSchema.url}"
538
+ // [4044] Missing schema definition for JSON5 config files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(json5ConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}
539
+ // [4045] Incorrect schema URL for JSON5 config files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${json5ConfigSchema.url}"
540
+ // [4046] Could not read .vscode/settings.json file: ${error.message}