@iobroker/repochecker 4.2.1-alpha.0 → 5.0.0-alpha.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/README.md +5 -1
- package/doc/issues.json +0 -6
- package/index.js +36 -36
- package/lib/{M000_PackageJson.js → M0000_PackageJson.js} +202 -146
- package/lib/{M100_IOPackageJson.js → M1000_IOPackageJson.js} +241 -239
- package/lib/{M250_Npm.js → M2000_Npm.js} +18 -18
- package/lib/{M300_Testing.js → M3000_Testing.js} +8 -8
- package/lib/{M400_Repository.js → M4000_Repository.js} +104 -104
- package/lib/{M500_Code.js → M5000_Code.js} +89 -85
- package/lib/{M500__JsonConfig.js → M5500__JsonConfig.js} +30 -30
- package/lib/{M600_Readme.js → M6000_Readme.js} +19 -19
- package/lib/{M700_License.js → M7000_License.js} +12 -12
- package/lib/{M800_Github.js → M8000_Github.js} +12 -12
- package/lib/{M900_GitNpmIgnore.js → M9000_GitNpmIgnore.js} +25 -25
- package/package.json +1 -1
|
@@ -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 :
|
|
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[
|
|
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
|
-
'[
|
|
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(`[
|
|
41
|
+
context.warnings.push(`[W4001] Cannot find "${context.adapterName}" in latest repository`);
|
|
42
42
|
|
|
43
43
|
if (context.adapterName.includes('_')) {
|
|
44
|
-
context.errors.push('[
|
|
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
|
-
`[
|
|
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('[
|
|
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('[
|
|
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
|
-
`[
|
|
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('[
|
|
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
|
-
`[
|
|
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
|
-
'[
|
|
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
|
-
`[
|
|
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('[
|
|
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('[
|
|
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('[
|
|
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
|
-
`[
|
|
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('[
|
|
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
|
-
`[
|
|
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('[
|
|
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('[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
// `[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
290
|
+
`[E4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository`,
|
|
291
291
|
);
|
|
292
292
|
} else {
|
|
293
293
|
context.checks.push(
|
|
@@ -296,7 +296,7 @@ async function checkRepository(context) {
|
|
|
296
296
|
}
|
|
297
297
|
} catch (e) {
|
|
298
298
|
context.errors.push(
|
|
299
|
-
`[
|
|
299
|
+
`[E4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}`,
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
@@ -304,7 +304,7 @@ async function checkRepository(context) {
|
|
|
304
304
|
|
|
305
305
|
if (!context.stableRepoLive[dependency]) {
|
|
306
306
|
context.warnings.push(
|
|
307
|
-
`[
|
|
307
|
+
`[W4033] 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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
`[
|
|
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
|
-
'[
|
|
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('[
|
|
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
|
-
'[
|
|
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('[
|
|
391
|
+
context.errors.push('[E4039] "json.schemas" property in .vscode/settings.json must be an array.');
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
394
|
|
|
@@ -399,13 +399,13 @@ async function checkVSCodeSchemas(context) {
|
|
|
399
399
|
|
|
400
400
|
if (!ioPackageSchema) {
|
|
401
401
|
context.warnings.push(
|
|
402
|
-
`[
|
|
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
|
-
`[
|
|
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');
|
|
@@ -425,13 +425,13 @@ async function checkVSCodeSchemas(context) {
|
|
|
425
425
|
|
|
426
426
|
if (!jsonConfigSchema) {
|
|
427
427
|
context.warnings.push(
|
|
428
|
-
`[
|
|
428
|
+
`[W4042] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}`,
|
|
429
429
|
);
|
|
430
430
|
} else {
|
|
431
431
|
// Check if URL is correct
|
|
432
432
|
if (jsonConfigSchema.url !== config.schemaUrls.jsonConfig) {
|
|
433
433
|
context.errors.push(
|
|
434
|
-
`[
|
|
434
|
+
`[E4043] Incorrect schema URL for jsonConfig files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${jsonConfigSchema.url}"`,
|
|
435
435
|
);
|
|
436
436
|
} else {
|
|
437
437
|
context.checks.push('Correct jsonConfig schema definition found in .vscode/settings.json');
|
|
@@ -446,14 +446,14 @@ async function checkVSCodeSchemas(context) {
|
|
|
446
446
|
if (!json5ConfigSchema) {
|
|
447
447
|
if (context.cfg.usesJson5) {
|
|
448
448
|
context.warnings.push(
|
|
449
|
-
`[
|
|
449
|
+
`[W4044] Missing schema definition for JSON5 config files in .vscode/settings.json. Adapt: {"fileMatch": ${JSON.stringify(jsonConfigFiles.concat(json5ConfigFiles))}, "url": "${config.schemaUrls.jsonConfig}"}`,
|
|
450
450
|
);
|
|
451
451
|
}
|
|
452
452
|
} else {
|
|
453
453
|
// Check if URL is correct
|
|
454
454
|
if (json5ConfigSchema.url !== config.schemaUrls.jsonConfig) {
|
|
455
455
|
context.errors.push(
|
|
456
|
-
`[
|
|
456
|
+
`[E4045] Incorrect schema URL for JSON5 config files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${json5ConfigSchema.url}"`,
|
|
457
457
|
);
|
|
458
458
|
} else {
|
|
459
459
|
context.checks.push('Correct JSON5 config schema definition found in .vscode/settings.json');
|
|
@@ -463,10 +463,10 @@ async function checkVSCodeSchemas(context) {
|
|
|
463
463
|
// File doesn't exist or cannot be read
|
|
464
464
|
if (error.code === 'ENOENT' || error.message.includes('404')) {
|
|
465
465
|
context.warnings.push(
|
|
466
|
-
'[
|
|
466
|
+
'[S4036] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.',
|
|
467
467
|
);
|
|
468
468
|
} else {
|
|
469
|
-
context.warnings.push(`[
|
|
469
|
+
context.warnings.push(`[W4046] Could not read .vscode/settings.json file: ${error.message}`);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
}
|
|
@@ -476,58 +476,58 @@ exports.checkRepository = checkRepository;
|
|
|
476
476
|
// List of error and warnings used at this module
|
|
477
477
|
// ----------------------------------------------
|
|
478
478
|
|
|
479
|
-
// [
|
|
480
|
-
// [
|
|
481
|
-
// [
|
|
482
|
-
// [
|
|
483
|
-
// [
|
|
484
|
-
// [
|
|
485
|
-
// [
|
|
486
|
-
// [
|
|
487
|
-
// [
|
|
488
|
-
// [
|
|
489
|
-
// [
|
|
490
|
-
// [
|
|
491
|
-
// [
|
|
492
|
-
// [
|
|
493
|
-
// [
|
|
494
|
-
// [
|
|
495
|
-
// [
|
|
496
|
-
// [
|
|
497
|
-
// [
|
|
498
|
-
// [
|
|
499
|
-
// [
|
|
500
|
-
// [
|
|
501
|
-
// [
|
|
502
|
-
// [
|
|
503
|
-
// [
|
|
504
|
-
// [
|
|
505
|
-
// [
|
|
506
|
-
// [
|
|
507
|
-
// [
|
|
508
|
-
// [
|
|
509
|
-
// [
|
|
510
|
-
// [
|
|
511
|
-
// [
|
|
512
|
-
// [
|
|
513
|
-
// [
|
|
514
|
-
// [
|
|
515
|
-
// [
|
|
516
|
-
// [
|
|
517
|
-
// [
|
|
518
|
-
// [
|
|
519
|
-
// [
|
|
520
|
-
// [
|
|
521
|
-
// [
|
|
522
|
-
// [
|
|
523
|
-
// [
|
|
524
|
-
// [
|
|
525
|
-
// [
|
|
526
|
-
// [
|
|
527
|
-
// [
|
|
528
|
-
// [
|
|
529
|
-
// [
|
|
530
|
-
// [
|
|
531
|
-
// [
|
|
532
|
-
// [
|
|
533
|
-
// [
|
|
479
|
+
// [4000] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist.json
|
|
480
|
+
// [4001] Cannot find "${context.adapterName}" in latest repository
|
|
481
|
+
// [4002] Types of adapter in latest repository and in io-package.json are different "${context.latestRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"
|
|
482
|
+
// [4003] Version set in latest repository
|
|
483
|
+
// [4004] Icon not found in latest repository
|
|
484
|
+
// [4005] Icon must be in the following path: ${url}; correct sources-dist.json
|
|
485
|
+
// [4006] Meta URL not found in latest repository; correct sources-dist.json
|
|
486
|
+
// [4007] Meta URL must be equal to ${url}io-package.json; correct sources-dist.json
|
|
487
|
+
// [4008]
|
|
488
|
+
// [4009]
|
|
489
|
+
// [4010]
|
|
490
|
+
// [4011]
|
|
491
|
+
// [4012]
|
|
492
|
+
// [4013]
|
|
493
|
+
// [4014]
|
|
494
|
+
// [4015]
|
|
495
|
+
// [4016]
|
|
496
|
+
// [4017]
|
|
497
|
+
// [4018]
|
|
498
|
+
// [4019]
|
|
499
|
+
// [4020] Cannot download https://raw.githubusercontent.com/ioBroker/ioBroker.repositories/master/sources-dist-stable.json
|
|
500
|
+
// [4021] Adapter name should use "-" instead of "_"
|
|
501
|
+
// [4022] Types of adapter in stable repository and in io-package.json are different "${context.stableRepo[context.adapterName].type}" !== "${context.ioPackageJson.common.type}"
|
|
502
|
+
// [4023] Adapter was found in stable repository but not in latest repo
|
|
503
|
+
// [4024] No version set in stable repository
|
|
504
|
+
// [4025] Icon not found in stable repository
|
|
505
|
+
// [4026] Icon must be in the following path: ${url}; correct sources-dist-stable.json
|
|
506
|
+
// [4027] Meta URL not found in latest repository; correct sources-dist.json
|
|
507
|
+
// [4028] Meta URL must be equal to ${url}io-package.json; correct sources-dist-stable.json
|
|
508
|
+
// [4029] Cannot download http://repo.iobroker.live/sources-dist-latest.json
|
|
509
|
+
// [4030] Cannot download http://repo.iobroker.live/sources-dist.json
|
|
510
|
+
// [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
|
|
511
|
+
// [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
|
|
512
|
+
// [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
|
|
513
|
+
// [4031] Dependency '${dependency}':'${dependencies[dependency]}' not available at latest repository
|
|
514
|
+
// [4032] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
|
|
515
|
+
// [4032] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
|
|
516
|
+
// [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
|
|
517
|
+
// [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
|
|
518
|
+
// [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
|
|
519
|
+
// [4033] Dependency '${dependency}':'${dependencies[dependency]}' not available at stable repository
|
|
520
|
+
// [4034] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
|
|
521
|
+
// [4034] Dependency '${dependency}':'${dependencies[dependency]}' should specify '>='
|
|
522
|
+
// [4035] Dependency '${dependency}':'${dependencies[dependency]}' cannot be parsed - ${e}
|
|
523
|
+
// [4036] Consider adding .vscode/settings.json file with JSON schema definitions for better development experience with Visual Studio Code.
|
|
524
|
+
// [4037] .vscode/settings.json file contains invalid JSON.
|
|
525
|
+
// [4038] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.
|
|
526
|
+
// [4039] "json.schemas" property in .vscode/settings.json must be an array.
|
|
527
|
+
// [4040] Missing schema definition for "io-package.json" in .vscode/settings.json. Add: {"fileMatch": ["io-package.json"], "url": "${config.schemaUrls['io-package']}"}
|
|
528
|
+
// [4041] Incorrect schema URL for "io-package.json" in .vscode/settings.json. Expected: "${config.schemaUrls['io-package']}", found: "${ioPackageSchema.url}"
|
|
529
|
+
// [4042] Missing schema definition for jsonConfig files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(jsonConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}
|
|
530
|
+
// [4043] Incorrect schema URL for jsonConfig files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${jsonConfigSchema.url}"
|
|
531
|
+
// [4044] Missing schema definition for JSON5 config files in .vscode/settings.json. Add: {"fileMatch": ${JSON.stringify(json5ConfigFiles)}, "url": "${config.schemaUrls.jsonConfig}"}
|
|
532
|
+
// [4045] Incorrect schema URL for JSON5 config files in .vscode/settings.json. Expected: "${config.schemaUrls.jsonConfig}", found: "${json5ConfigSchema.url}"
|
|
533
|
+
// [4046] Could not read .vscode/settings.json file: ${error.message}
|