@iobroker/repochecker 3.2.1 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,19 +33,25 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
33
33
  -->
34
34
 
35
35
  ## Changelog
36
- ### 3.2.1 (2024-11-01)
36
+ ### 3.2.3 (2025-01-11)
37
+ - (mcm1957) An error is issued if js-controller dependency is missing.
38
+ - (mcm1957) Required js-controller has been increased to 5.0.19.
39
+ - (mcm1957) Recommended js-controller version is omitted if identical to required one.
40
+
41
+ ### 3.2.2 (2024-11-01)
42
+ - (mcm1957) Link to open issues has been corrected.
43
+ - (mcm1957) Component name added to resonsive check issues.
37
44
 
45
+ ### 3.2.1 (2024-11-01)
38
46
  - (mcm1957) Size checking for "divider" and "staticImage" supended.
39
47
 
40
48
  ### 3.2.0 (2024-11-01)
41
-
42
49
  - (oweitman) Script has been extended to use optionally local data for checking.
43
50
  - (mcm1957) Warning if i18n is not used has been fixed [#324].
44
51
  - (mcm1957) Check for importent issues has been added.
45
52
  - (mcm1957) Checking of jsonConfig (initially) added.
46
53
 
47
54
  ### 3.1.4 (2024-10-26)
48
-
49
55
  - (mcm1957) linter has been activated and issues reported have been fixed.
50
56
  - (mcm1957) Blacklist for package/dependencies has been extended.
51
57
  - (mcm1957) Recommend adapter-core 3.2.2 now.
@@ -53,15 +59,12 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
53
59
  - (mcm1957) Abort processing if iobroker.live not reachable. [#321]
54
60
 
55
61
  ### 3.1.3 (2024-10-11)
56
-
57
62
  - (mcm1957) Checker no longer crash id no npm package exists.
58
63
 
59
64
  ### 3.1.2 (2024-10-04)
60
-
61
65
  - (mcm1957) Require node 18 minimum as engines clause.
62
66
 
63
67
  ### 3.1.1 (2024-10-04)
64
-
65
68
  - (mcm1957) "[E166] 'common.mode: extension' is unknown" has been fixed [#308]
66
69
  - (mcm1957) "[E904] file iob_npm.done found in repository, but not found in .gitignore" removed as covered by [E503]. [#309]
67
70
  - (mcm1957) "[E500] node_modules found" has been retricted to adapetr root. [#297]
@@ -69,27 +72,22 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
69
72
  - (mcm1957) Change "[W113] Adapter should support compact mode" text and honor common.compact set to false. [#300]
70
73
 
71
74
  ### 3.1.0 (2024-09-29)
72
-
73
75
  - (mcm1957) "@iobroker/plugin-sentry" blacklisted as dependency [#301]
74
76
  - (mcm1957) Accept .ts files as main file too. [#303]
75
77
  - (mcm1957) [E405] and [E426] incorrect path has been corrected. [#299]
76
78
 
77
79
  ### 3.0.7 (2024-09-19)
78
-
79
80
  - (mcm1957) "[W523] 'package-lock.json"'not found in repo!" reduced to suggestion. [#298]
80
81
 
81
82
  ### 3.0.6 (2024-09-13)
82
-
83
83
  - (mcm1957) "[E124] Main file not found" no longer raised if common.nogit is set
84
84
  - (mcm1957) 'Text of "common.main" is deprecated' has been adapted. [#266]
85
85
  - (mcm1957) Ignore errors caused by complex .gitignor/.npmignore. [#288]
86
86
 
87
87
  ### 3.0.5 (2024-09-13)
88
-
89
88
  - (mcm1957) '@iobroker/dev-server' is valid as dev-dependency. [#260]
90
89
 
91
90
  ### 3.0.4 (2024-09-12)
92
-
93
91
  - (mcm1957) Abort with incorrect dependency definition fixed [#287]
94
92
  - (mcm1957) Improve handling of malformed dependency definitions [#284]
95
93
  - (mcm1957) Improve handling of malformed .releaseconfig.json files [#283]
@@ -99,34 +97,28 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
99
97
  - (mcm1957) Do no longer require a js-controller dependecy for wwwOnly adapters. [#250]
100
98
 
101
99
  ### 3.0.3 (2024-09-12)
102
-
103
100
  - (mcm1957) Check for iob_npm.done at .npmignore has been removed [#294]
104
101
 
105
102
  ### 3.0.2 (2024-09-11)
106
-
107
103
  - (mcm1957) Handling of missing LICENSE file corrected. [#282]
108
104
  - (mcm1957) [W126] Missing mandatory translation is error now. [#293]
109
105
  - (mcm1957) Record repochcker version used for tests.
110
106
  - (mcm1957) Record github commit-sha of last commit used for tests.
111
107
 
112
108
  ### 3.0.0 (2024-09-10)
113
-
114
109
  - (mcm1957) Error and warning numbering has been reviewed and duplicates removed.
115
110
  - (mcm1957) index.js has been split into seperated modules.
116
111
 
117
112
  ### 2.10.0 (2024-08-19)
118
-
119
113
  - (mcm1957) Suggestions ([Sxxx] have been added).
120
114
 
121
115
  ### 2.9.1 (2024-08-12)
122
-
123
116
  - (mcm1957) E162 - correct dependency check for js-controller. [#267].
124
117
  - (mcm1957) E605 - copyright year range including whitespaces is now accepted. [#269].
125
118
  - (mcm1957) E016 - missing vaiableexpansion has been added. [#263].
126
119
  - (mcm1957) E114 - typo at error message has been fixed [#261].
127
120
 
128
121
  ### 2.9.0 (2024-07-29)
129
-
130
122
  - (mcm1957) Adapt text if sources-dist(-stable).json need a correction [#97].
131
123
  - (mcm1957) Missing "common.mode" error text corrected [#249].
132
124
  - (mcm1957) Files "iob" and "iobroker" are disallowed now [#248].
@@ -134,12 +126,10 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
134
126
  - (mcm1957) Text of E114 (missing adminUI) adapted.
135
127
 
136
128
  ### 2.8.1 (2024-07-28)
137
-
138
129
  - (mcm1957) Check of js-controller version has been corrected [#247].
139
130
  - (mcm1957) Honor '>' at dependency checks too [#246].
140
131
 
141
132
  ### 2.8.0 (2024-07-28)
142
-
143
133
  - (mcm1957) Copyright year check has been fixed for single year entries.
144
134
  - (mcm1957) js-controller version check added [#233].
145
135
  - (mcm1957) Check for fixed version dependencies and for github dependencies [#233].
@@ -149,15 +139,12 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
149
139
  - (mcm1957) "common.noConfig" must match "common.adminUI" setting [#170].
150
140
 
151
141
  ### 2.7.2 (2024-07-26)
152
-
153
142
  - (mcm1957) package-lock.json check fixed.
154
143
 
155
144
  ### 2.7.1 (2024-07-26)
156
-
157
145
  - (mcm1957) Reduce setTimeout/setInterval error to warning temporary.
158
146
 
159
147
  ### 2.7.0 (2024-07-26)
160
-
161
148
  - (mcm1957) Some non trivial keywords related to adapter are enforced now [#234].
162
149
  - (mcm1957) Severity if [E105] / [W105] has been corrected [#204].
163
150
  - (mcm1957) Disallow 'globalDependencies' at package.json [#204].
@@ -171,36 +158,29 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
171
158
  - (mcm1957) Copyright year now honors commit year and npm publish year too [#237].
172
159
 
173
160
  ### 2.6.1 (2024-06-24)
174
-
175
161
  - (mcm1957) Check "[W156] Adapter should support admin 5 UI (jsonConfig)" checks for reactUi now.
176
162
 
177
163
  ### 2.6.0 (2024-06-24)
178
-
179
164
  - (mcm1957) Check has been aded to ensure keywords and common.keywords are present. [#200]
180
165
  - (mcm1957) Detection of react has been added, gulpfile.js is accepted for react based UIs now. [#223]
181
166
 
182
167
  ### 2.5.1 (2024-06-24)
183
-
184
168
  - (mcm1957) Suggestion to update dependencies to recommended version added.
185
169
  - (mcm1957) Adapter-core recommended set to 3.1.6 [#220]
186
170
 
187
171
  ### 2.5.0 (2024-05-30)
188
-
189
172
  - (mcm1957) Check to ensure that dependency revisions are available at repository added. [#180]
190
173
 
191
174
  ### 2.4.0 (2024-05-30)
192
-
193
175
  - (mcm1957) Add check to protect sensitive data. [#195]
194
176
  - (mcm1957) Add check to verify that dependencies and globalDepencies are of type array. [#90]
195
177
 
196
178
  ### 2.3.1 (2024-05-07)
197
-
198
179
  - (mcm1957) Reduce number of missing translation warnings.
199
180
  - (mcm1957) Seperate between required and recommended translations.
200
181
  - (mcm1957) Log missing translations in detail.
201
182
 
202
183
  ### 2.3.0 (2024-05-07)
203
-
204
184
  - (mcm1957) Elements marked as deprectaed added to blacklist.
205
185
  - (mcm1957) Blacklist added to block elements at package.json and io-package.json.
206
186
  - (mcm1957) Error [E000] will be raised now if repository cannot be accessed at all [#194].
@@ -209,16 +189,13 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
209
189
  - (mcm1957) Raise an error if version at package.json is lower than latest release at npmjs [#192]
210
190
 
211
191
  ### 2.2.3 (2024-03-29)
212
-
213
192
  - (mcm1957) Checking of license has been improved
214
193
 
215
194
  ### 2.2.2 (2024-03-29)
216
-
217
195
  - (mcm1957) Checking of adapter-core has been fixed
218
196
  - (mcm1957) Load all potential interesting files, fixes [#149]
219
197
 
220
198
  ### 2.2.1 (2024-03-26)
221
-
222
199
  - (mcm1957) Added check that own adapter is not listed at common.restartAdapters
223
200
  - (mcm1957) Added check of version strings at common.news
224
201
  - (mcm1957) Added check for recommended node version (node 18 for now)
@@ -227,51 +204,40 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
227
204
  - (mcm1957) Added check for adapter-core version (>= 3.0.6)
228
205
 
229
206
  ### 2.2.0 (2024-03-24)
230
-
231
207
  - (klein0r) Added check for licenseInformation
232
208
  - (klein0r) Added check for deprecated license
233
209
  - (klein0r) Added check for required attribute common.tier
234
210
  - (klein0r) Added check for disallowed attribute common.automaticUpgrade
235
211
 
236
212
  ### 2.1.13 (2024-01-02)
237
-
238
213
  - (bluefox) Corrected rule W156: adminUI.config === 'none' is allowed
239
214
 
240
215
  ### 2.1.12 (2023-09-21)
241
-
242
216
  - (bluefox) Added check of using '\_' in adapter name
243
217
 
244
218
  ### 2.1.11 (2023-09-05)
245
-
246
219
  - (bluefox) Added check of iobroker.js-controller in dependencies
247
220
 
248
221
  ### 2.1.7 (2023-08-14)
249
-
250
222
  - (mcm57) Update index.js - fix typo in error message (packet.json)
251
223
  - (mcm57) Update index.js - renumber E504/1 to 519 - fixes #112
252
224
 
253
225
  ### 2.1.6 (2022-12-08)
254
-
255
226
  - (bluefox) added better error logging
256
227
 
257
228
  ### 2.1.5 (2022-12-07)
258
-
259
229
  - (bluefox) added check of `.releaseconfig.json` file
260
230
 
261
231
  ### 2.1.4 (2022-08-19)
262
-
263
232
  - (bluefox) Added check for adapter name: it may not start with '\_'
264
233
 
265
234
  ### 2.1.2 (2022-07-14)
266
-
267
235
  - (bluefox) Fixed some errors
268
236
 
269
237
  ### 2.1.0 (2022-05-26)
270
-
271
238
  - (bluefox) Added support for jsonConfig.json5 and jsonCustom.json5
272
239
 
273
240
  ### 2.0.5 (2022-05-22)
274
-
275
241
  - (bluefox) Made it possible to run with npx
276
242
 
277
243
  ## License
@@ -28,7 +28,7 @@ async function getIOPackageJson(context) {
28
28
  }
29
29
 
30
30
  const recommendedJsControllerVersion = '5.0.19';
31
- let requiredJsControllerVersion = '4.0.24';
31
+ let requiredJsControllerVersion = '5.0.19';
32
32
 
33
33
  const blacklistIOPackageJson = {
34
34
  installedFrom: {
@@ -519,15 +519,28 @@ async function checkIOPackageJson(context) {
519
519
  }
520
520
  } else {
521
521
  if (!context.ioPackageJson.common.onlyWWW) {
522
- context.errors.push(`[E162] js-controller dependency missing. js-controller ${requiredJsControllerVersion} is required as minimum, ${recommendedJsControllerVersion} is recommended. Please add to dependencies at io-package.json.`);
522
+ if (requiredJsControllerVersion !== recommendedJsControllerVersion) {
523
+ context.errors.push(`[E162] js-controller dependency missing. js-controller ${requiredJsControllerVersion} is required as minimum, ${recommendedJsControllerVersion} is recommended. Please add to dependencies at io-package.json.`);
524
+ } else {
525
+ context.errors.push(`[E162] js-controller dependency missing. js-controller ${requiredJsControllerVersion} is required as minimum. Please add to dependencies at io-package.json.`);
526
+ }
523
527
  }
524
528
  }
525
529
  }
530
+ } else {
531
+ if (!context.ioPackageJson.common.onlyWWW) {
532
+ context.errors.push(`[E185] "common.dependencies" must be an array at io-package.json`);
533
+ if (requiredJsControllerVersion !== recommendedJsControllerVersion) {
534
+ context.errors.push(`[E162] js-controller dependency missing. js-controller ${requiredJsControllerVersion} is required as minimum, ${recommendedJsControllerVersion} is recommended. Please add to dependencies at io-package.json.`);
535
+ } else {
536
+ context.errors.push(`[E162] js-controller dependency missing. js-controller ${requiredJsControllerVersion} is required as minimum. Please add to dependencies at io-package.json.`);
537
+ }
538
+ }
526
539
  }
527
540
 
528
541
  /*
529
542
  increase dependency as required by addition features
530
- */
543
+ */
531
544
  if (context.ioPackageJson && context.ioPackageJson.common && context.ioPackageJson.common.supportedMessges) {
532
545
  requiredJsControllerVersion = common.maxVersion(requiredJsControllerVersion, '5.0.18');
533
546
  }
@@ -537,7 +550,11 @@ async function checkIOPackageJson(context) {
537
550
 
538
551
 
539
552
  if (currentJsControllerVersion && compareVersions.compare(requiredJsControllerVersion, currentJsControllerVersion, '>')) {
540
- context.errors.push(`[E157] js-controller ${currentJsControllerVersion} listed as dependency but ${requiredJsControllerVersion} is required as minimum, ${recommendedJsControllerVersion} is recommended. Please update dependency at io-package.json.`);
553
+ if (requiredJsControllerVersion !== recommendedJsControllerVersion) {
554
+ context.errors.push(`[E157] js-controller ${currentJsControllerVersion} listed as dependency but ${requiredJsControllerVersion} is required as minimum, ${recommendedJsControllerVersion} is recommended. Please update dependency at io-package.json.`);
555
+ } else {
556
+ context.errors.push(`[E157] js-controller ${currentJsControllerVersion} listed as dependency but ${requiredJsControllerVersion} is required as minimum. Please update dependency at io-package.json.`);
557
+ }
541
558
  } else if (currentJsControllerVersion && compareVersions.compare(recommendedJsControllerVersion, currentJsControllerVersion, '>')) {
542
559
  context.warnings.push(`[W156] js-controller ${currentJsControllerVersion} listed as dependency but ${recommendedJsControllerVersion} is recommended. Please consider updating dependency at io-package.json.`);
543
560
  }
@@ -553,7 +570,6 @@ async function checkIOPackageJson(context) {
553
570
  context.errors.push(`[E161] "js-controller" is not allowed in common.globalDependencies`);
554
571
  }
555
572
  }
556
-
557
573
  }
558
574
 
559
575
 
@@ -20,6 +20,7 @@
20
20
  const common = require('./common.js');
21
21
 
22
22
  let responsiveErrorLimit = 5;
23
+ let responsiveWarningLimit = 5;
23
24
 
24
25
  const stdAttributes = [
25
26
  'xl',
@@ -130,297 +131,310 @@ function handleResponsiveError(context, msg) {
130
131
  }
131
132
  }
132
133
 
133
- function chk_responsive (context, path, jsonConfig){
134
+ function handleResponsiveWarning(context, msg) {
135
+ if (responsiveWarningLimit) {
136
+ context.warnings.push(`${msg}`);
137
+ responsiveWarningLimit--;
138
+ if (responsiveWarningLimit === 0) {
139
+ context.warnings.push(`[W510] responsive check: maximum issues reached, please fix reported ones and recheck`);
140
+ }
141
+ }
142
+ }
143
+
144
+ function chk_responsive (context, path, jsonConfig, component, opts){
134
145
  common.debug(`chk_responsive ${path}`);
135
- const missing = [];
136
- if (!jsonConfig.xs) missing.push('xs');
137
- if (!jsonConfig.sm) missing.push('sm');
138
- if (!jsonConfig.md) missing.push('md');
139
- if (!jsonConfig.lg) missing.push('lg');
140
- if (!jsonConfig.xl) missing.push('xl');
141
- if (missing.length) {
142
- handleResponsiveError(context, `[E507] responsive check: missing size attributes [${missing.join(',')}] at ${path}`);
146
+
147
+ if (!opts || !opts.sizesOptional) {
148
+ const missing = [];
149
+ if (!jsonConfig.xs) missing.push('xs');
150
+ if (!jsonConfig.sm) missing.push('sm');
151
+ if (!jsonConfig.md) missing.push('md');
152
+ if (!jsonConfig.lg) missing.push('lg');
153
+ if (!jsonConfig.xl) missing.push('xl');
154
+ if (missing.length) {
155
+ handleResponsiveError(context, `[E507] missing size attributes [${missing.join(',')}] for ${component} at ${path}`);
156
+ }
143
157
  }
144
158
 
145
159
  if ( jsonConfig.xs && jsonConfig.xs != 12) {
146
- handleResponsiveError(context, `[E508] responsive check: attribute "xs" should specify a value of "12" at ${path}`);
160
+ handleResponsiveWarning(context, `[W508] attribute "xs" for ${component} should specify a value of "12" at ${path}`);
147
161
  }
148
162
 
149
163
  let ii = 12;
150
164
  if (jsonConfig.xs) ii = jsonConfig.xs;
151
165
  if (jsonConfig.sm && jsonConfig.sm > ii ) {
152
- handleResponsiveError(context, `[E509] responsive check: "sm" value (${jsonConfig.sm}) greater then value for smaller displays`);
166
+ handleResponsiveError(context, `[E509] "sm" value (${jsonConfig.sm}) for ${component} greater then value for smaller displays`);
153
167
  } else {
154
168
  ii = jsonConfig.sm;
155
169
  }
156
170
  if (jsonConfig.md && jsonConfig.md > ii ) {
157
- handleResponsiveError(context, `[E509] responsive check: "md" value (${jsonConfig.md}) greater then value for smaller displays`);
171
+ handleResponsiveError(context, `[E509] "md" value (${jsonConfig.md}) for ${component} greater then value for smaller displays`);
158
172
  } else {
159
173
  ii = jsonConfig.md;
160
174
  }
161
175
  if (jsonConfig.lg && jsonConfig.lg > ii ) {
162
- handleResponsiveError(context, `[E509] responsive check: "lg" value (${jsonConfig.lg}) greater then value for smaller displays`);
176
+ handleResponsiveError(context, `[E509] "lg" value (${jsonConfig.lg}) for ${component} greater then value for smaller displays`);
163
177
  } else {
164
178
  ii = jsonConfig.lg;
165
179
  }
166
180
  if (jsonConfig.xl && jsonConfig.xl > ii ) {
167
- handleResponsiveError(context, `[E509] responsive check: "xl" value (${jsonConfig.xl}) greater then value for smaller displays`);
181
+ handleResponsiveError(context, `[E509] "xl" value (${jsonConfig.xl}) for ${component} greater then value for smaller displays`);
168
182
  }
169
183
  }
170
184
 
171
185
  function check_accordion (context, path, jsonConfig, inTable){
172
186
  common.debug(`check_accordion ${path}`);
173
- chk_responsive(context, path, jsonConfig);
187
+ chk_responsive(context, path, jsonConfig, 'accordion');
174
188
  }
175
189
 
176
190
  function check_alive(context, path, jsonConfig, inTable){
177
191
  common.debug(`check_alive ${path}`);
178
- chk_responsive(context, path, jsonConfig);
192
+ chk_responsive(context, path, jsonConfig, 'alive');
179
193
  }
180
194
 
181
195
  function check_autocomplete(context, path, jsonConfig, inTable){
182
196
  common.debug(`check_autocomplete ${path}`);
183
- chk_responsive(context, path, jsonConfig);
197
+ chk_responsive(context, path, jsonConfig, 'autocomplete');
184
198
  }
185
199
 
186
200
  function check_autocompleteSendTo(context, path, jsonConfig, inTable){
187
201
  common.debug(`check_autocompleteSendTo ${path}`);
188
- chk_responsive(context, path, jsonConfig);
202
+ chk_responsive(context, path, jsonConfig, 'autocompleteSendTo');
189
203
  }
190
204
 
191
205
  function check_certificate(context, path, jsonConfig, inTable){
192
206
  common.debug(`check_certificate ${path}`);
193
- chk_responsive(context, path, jsonConfig);
207
+ chk_responsive(context, path, jsonConfig, 'certificate');
194
208
  }
195
209
 
196
210
  function check_certificates(context, path, jsonConfig, inTable){
197
211
  common.debug(`check_certificates ${path}`);
198
- chk_responsive(context, path, jsonConfig);
212
+ chk_responsive(context, path, jsonConfig, 'certificates');
199
213
  }
200
214
 
201
215
  function check_certificateCollection(context, path, jsonConfig, inTable){
202
216
  common.debug(`check_certificateCollection ${path}`);
203
- chk_responsive(context, path, jsonConfig);
217
+ chk_responsive(context, path, jsonConfig, 'certificateCollection');
204
218
  }
205
219
 
206
220
  function check_checkbox(context, path, jsonConfig, inTable){
207
221
  common.debug(`check_checkbox ${path}`);
208
- chk_responsive(context, path, jsonConfig);
222
+ chk_responsive(context, path, jsonConfig, 'checkbox');
209
223
  }
210
224
 
211
225
  function check_checkLicense(context, path, jsonConfig, inTable){
212
226
  common.debug(`check_checkLicense ${path}`);
213
- chk_responsive(context, path, jsonConfig);
227
+ chk_responsive(context, path, jsonConfig, 'checkLicense');
214
228
  }
215
229
 
216
230
  function check_chips(context, path, jsonConfig, inTable){
217
231
  common.debug(`check_chips ${path}`);
218
- chk_responsive(context, path, jsonConfig);
232
+ chk_responsive(context, path, jsonConfig, 'chips');
219
233
  }
220
234
 
221
235
  function check_color(context, path, jsonConfig, inTable){
222
236
  common.debug(`check_color ${path}`);
223
- chk_responsive(context, path, jsonConfig);
237
+ chk_responsive(context, path, jsonConfig, 'color');
224
238
  }
225
239
 
226
240
  function check_coordinates(context, path, jsonConfig, inTable){
227
241
  common.debug(`check_coordinates ${path}`);
228
- chk_responsive(context, path, jsonConfig);
242
+ chk_responsive(context, path, jsonConfig, 'coordinates');
229
243
  }
230
244
 
231
245
  function check_cron(context, path, jsonConfig, inTable){
232
246
  common.debug(`check_staticText ${path}`);
233
- chk_responsive(context, path, jsonConfig);
247
+ chk_responsive(context, path, jsonConfig, 'cron');
234
248
  }
235
249
 
236
250
  function check_custom(context, path, jsonConfig, inTable){
237
251
  common.debug(`check_custom ${path}`);
238
- chk_responsive(context, path, jsonConfig);
252
+ chk_responsive(context, path, jsonConfig, 'custom', {sizesOptional:true});
239
253
  }
240
254
 
241
255
  function check_datePicker(context, path, jsonConfig, inTable){
242
256
  common.debug(`check_datePicker ${path}`);
243
- chk_responsive(context, path, jsonConfig);
257
+ chk_responsive(context, path, jsonConfig, 'datePicker');
244
258
  }
245
259
 
246
260
  function check_deviceManager(context, path, jsonConfig, inTable){
247
261
  common.debug(`check_deviceManager ${path}`);
248
- chk_responsive(context, path, jsonConfig);
262
+ chk_responsive(context, path, jsonConfig, 'deviceManager', {sizesOptional:true});
249
263
  }
250
264
 
251
265
  function check_divider(context, path, jsonConfig, inTable){
252
266
  common.debug(`check_divider ${path}`);
253
- // chk_responsive(context, path, jsonConfig); // TODO - sizes optional
267
+ chk_responsive(context, path, jsonConfig, 'divider', {sizesOptional:true});
254
268
  }
255
269
 
256
270
  function check_file(context, path, jsonConfig, inTable){
257
271
  common.debug(`check_file ${path}`);
258
- chk_responsive(context, path, jsonConfig);
272
+ chk_responsive(context, path, jsonConfig, 'file');
259
273
  }
260
274
 
261
275
  function check_fileSelector(context, path, jsonConfig, inTable){
262
276
  common.debug(`check_fileSelector ${path}`);
263
- chk_responsive(context, path, jsonConfig);
277
+ chk_responsive(context, path, jsonConfig, 'fileSelector');
264
278
  }
265
279
 
266
280
  function check_func(context, path, jsonConfig, inTable){
267
281
  common.debug(`check_func ${path}`);
268
- chk_responsive(context, path, jsonConfig);
282
+ chk_responsive(context, path, jsonConfig, 'func');
269
283
  }
270
284
 
271
285
  function check_header(context, path, jsonConfig, inTable){
272
286
  common.debug(`check_header ${path}`);
273
- // chk_responsive(context, path, jsonConfig); // must be discussed
287
+ chk_responsive(context, path, jsonConfig, 'header', {sizesOptional:true});
274
288
  }
275
289
 
276
290
  function check_image(context, path, jsonConfig, inTable){
277
291
  common.debug(`check_image ${path}`);
278
- chk_responsive(context, path, jsonConfig);
292
+ chk_responsive(context, path, jsonConfig, 'image');
279
293
  }
280
294
 
281
295
  function check_imageSendTo(context, path, jsonConfig, inTable){
282
296
  common.debug(`check_imageSendTo ${path}`);
283
- chk_responsive(context, path, jsonConfig);
297
+ chk_responsive(context, path, jsonConfig, 'imageSendTo');
284
298
  }
285
299
 
286
300
  function check_instance(context, path, jsonConfig, inTable){
287
301
  common.debug(`check_instance ${path}`);
288
- chk_responsive(context, path, jsonConfig);
302
+ chk_responsive(context, path, jsonConfig, 'instance');
289
303
  }
290
304
 
291
305
  function check_interface(context, path, jsonConfig, inTable){
292
306
  common.debug(`check_interface ${path}`);
293
- chk_responsive(context, path, jsonConfig);
307
+ chk_responsive(context, path, jsonConfig, 'interface');
294
308
  }
295
309
 
296
310
  function check_ip(context, path, jsonConfig, inTable){
297
311
  common.debug(`check_ip ${path}`);
298
- chk_responsive(context, path, jsonConfig);
312
+ chk_responsive(context, path, jsonConfig, 'ip');
299
313
  }
300
314
 
301
315
  function check_jsonEditor(context, path, jsonConfig, inTable){
302
316
  common.debug(`check_jsonEditor ${path}`);
303
- chk_responsive(context, path, jsonConfig);
317
+ chk_responsive(context, path, jsonConfig, 'jsonEditor');
304
318
  }
305
319
 
306
320
  function check_language(context, path, jsonConfig, inTable){
307
321
  common.debug(`check_language ${path}`);
308
- chk_responsive(context, path, jsonConfig);
322
+ chk_responsive(context, path, jsonConfig, 'language');
309
323
  }
310
324
 
311
325
  function check_license(context, path, jsonConfig, inTable){
312
326
  common.debug(`check_license ${path}`);
313
- chk_responsive(context, path, jsonConfig);
327
+ chk_responsive(context, path, jsonConfig, 'license');
314
328
  }
315
329
 
316
330
  function check_number(context, path, jsonConfig, inTable){
317
331
  common.debug(`check_number ${path}`);
318
- chk_responsive(context, path, jsonConfig);
332
+ chk_responsive(context, path, jsonConfig, 'number');
319
333
  }
320
334
 
321
335
  function check_objectId(context, path, jsonConfig, inTable){
322
336
  common.debug(`check_objectId ${path}`);
323
- chk_responsive(context, path, jsonConfig);
337
+ chk_responsive(context, path, jsonConfig, 'objectId');
324
338
  }
325
339
 
326
340
  function check_password(context, path, jsonConfig, inTable){
327
341
  common.debug(`check_password ${path}`);
328
- chk_responsive(context, path, jsonConfig);
342
+ chk_responsive(context, path, jsonConfig, 'password');
329
343
  }
330
344
 
331
345
  function check_pattern(context, path, jsonConfig, inTable){
332
346
  common.debug(`check_pattern ${path}`);
333
- chk_responsive(context, path, jsonConfig);
347
+ chk_responsive(context, path, jsonConfig, 'pattern');
334
348
  }
335
349
 
336
350
  function check_port(context, path, jsonConfig, inTable){
337
351
  common.debug(`check_port ${path}`);
338
- chk_responsive(context, path, jsonConfig);
352
+ chk_responsive(context, path, jsonConfig, 'port');
339
353
  }
340
354
 
341
355
  function check_qrCode(context, path, jsonConfig, inTable){
342
356
  common.debug(`check_qrCode ${path}`);
343
- chk_responsive(context, path, jsonConfig);
357
+ chk_responsive(context, path, jsonConfig, 'qrCode');
344
358
  }
345
359
 
346
360
  function check_room(context, path, jsonConfig, inTable){
347
361
  common.debug(`check_room ${path}`);
348
- chk_responsive(context, path, jsonConfig);
362
+ chk_responsive(context, path, jsonConfig, 'room');
349
363
  }
350
364
 
351
365
  function check_select(context, path, jsonConfig, inTable){
352
366
  common.debug(`check_select ${path}`);
353
- chk_responsive(context, path, jsonConfig);
367
+ chk_responsive(context, path, jsonConfig, 'select');
354
368
  }
355
369
 
356
370
  function check_selectSendTo(context, path, jsonConfig, inTable){
357
371
  common.debug(`check_selectSendTo ${path}`);
358
- chk_responsive(context, path, jsonConfig);
372
+ chk_responsive(context, path, jsonConfig, 'selectSendTo');
359
373
  }
360
374
 
361
375
  function check_sendTo(context, path, jsonConfig, inTable){
362
376
  common.debug(`check_sendTo ${path}`);
363
- chk_responsive(context, path, jsonConfig);
377
+ chk_responsive(context, path, jsonConfig, 'sendTo');
364
378
  }
365
379
 
366
380
  function check_setState(context, path, jsonConfig, inTable){
367
381
  common.debug(`check_setState ${path}`);
368
- chk_responsive(context, path, jsonConfig);
382
+ chk_responsive(context, path, jsonConfig, 'setState');
369
383
  }
370
384
 
371
385
  function check_slider(context, path, jsonConfig, inTable){
372
386
  common.debug(`check_slider ${path}`);
373
- chk_responsive(context, path, jsonConfig);
387
+ chk_responsive(context, path, jsonConfig, 'slider');
374
388
  }
375
389
 
376
390
  function check_state(context, path, jsonConfig, inTable){
377
391
  common.debug(`check_state ${path}`);
378
- chk_responsive(context, path, jsonConfig);
392
+ chk_responsive(context, path, jsonConfig, 'state');
379
393
  }
380
394
 
381
395
  function check_staticImage(context, path, jsonConfig, inTable){
382
396
  common.debug(`check_staticImage ${path}`);
383
- // chk_responsive(context, path, jsonConfig); // TODO sizes optional
397
+ chk_responsive(context, path, jsonConfig, 'staticImage', {sizesOptional:true});
384
398
  }
385
399
 
386
400
  function check_staticLink(context, path, jsonConfig, inTable){
387
401
  common.debug(`check_staticLink ${path}`);
388
- chk_responsive(context, path, jsonConfig);
402
+ chk_responsive(context, path, jsonConfig, 'staticLink');
389
403
  }
390
404
 
391
405
  function check_staticText(context, path, jsonConfig, inTable){
392
406
  common.debug(`check_staticText ${path}`);
393
- chk_responsive(context, path, jsonConfig);
407
+ chk_responsive(context, path, jsonConfig, 'staticText');
394
408
  }
395
409
 
396
410
  function check_table(context, path, jsonConfig, inTable){
397
411
  common.debug(`check_table ${path}`);
398
- chk_responsive(context, path, jsonConfig);
412
+ chk_responsive(context, path, jsonConfig, 'table');
399
413
  }
400
414
 
401
415
  function check_text(context, path, jsonConfig, inTable){
402
416
  common.debug(`check_text ${path}`);
403
- chk_responsive(context, path, jsonConfig);
417
+ chk_responsive(context, path, jsonConfig, 'text');
404
418
  }
405
419
 
406
420
  function check_textSendTo(context, path, jsonConfig, inTable){
407
421
  common.debug(`check_textSendTo ${path}`);
408
- chk_responsive(context, path, jsonConfig);
422
+ chk_responsive(context, path, jsonConfig, 'testSendTo');
409
423
  }
410
424
 
411
425
  function check_timePicker(context, path, jsonConfig, inTable){
412
426
  common.debug(`check_timePicker ${path}`);
413
- chk_responsive(context, path, jsonConfig);
427
+ chk_responsive(context, path, jsonConfig, 'timePicker');
414
428
  }
415
429
 
416
430
  function check_user(context, path, jsonConfig, inTable){
417
431
  common.debug(`check_user ${path}`);
418
- chk_responsive(context, path, jsonConfig);
432
+ chk_responsive(context, path, jsonConfig, 'user');
419
433
  }
420
434
 
421
435
  function check_uuid(context, path, jsonConfig, inTable){
422
436
  common.debug(`check_uuid ${path}`);
423
- chk_responsive(context, path, jsonConfig);
437
+ chk_responsive(context, path, jsonConfig, 'uuid');
424
438
  }
425
439
 
426
440
 
@@ -461,6 +475,9 @@ function checkPanel(context, path, jsonConfig, isRoot) {
461
475
  'label',
462
476
  ];
463
477
 
478
+ //console.log('on PANEL entry');
479
+ //console.log(jsonConfig);
480
+
464
481
  const validAttributes = stdAttributes.concat(myAttributes).concat(isRoot?rootAttributes:[]);
465
482
 
466
483
  for (const key in jsonConfig) {
@@ -472,7 +489,7 @@ function checkPanel(context, path, jsonConfig, isRoot) {
472
489
 
473
490
  if (key === 'type') {
474
491
  if (jsonConfig[key] !== 'panel') {
475
- console.log( `INTERNAL ERROR: unexpected type ${jsonConfig[key]} encounterd while scanning "panel"`);
492
+ console.log( `INTERNAL ERROR: unexpected type ${jsonConfig[key]} encountered while scanning "panel"`);
476
493
  return;
477
494
  }
478
495
  }
@@ -485,7 +502,12 @@ function checkPanel(context, path, jsonConfig, isRoot) {
485
502
  context.errors.push(`[E502] no type specified at ${path}`);
486
503
  }
487
504
 
488
- checkComponent(context, `${path}/${subkey}`, jsonConfig['items'][subkey]);
505
+ if (type === 'panel') {
506
+ common.debug(`nested panel detected at ${path}/${subkey}`);
507
+ checkPanel(context, `${path}/${subkey}/items`, jsonConfig[key][subkey]);
508
+ } else {
509
+ checkComponent(context, `${path}/${subkey}`, jsonConfig['items'][subkey]);
510
+ }
489
511
  }
490
512
  }
491
513
  }
@@ -78,7 +78,7 @@ async function checkGithubRepo(context) {
78
78
  for (const issue of issues){
79
79
  if (issue.pull_request) continue;
80
80
  if (issuesToWatch.includes(issue.title)) {
81
- context.errors.push(`[E804] Please process issue [${issue.number}] "${issue.title}."`);
81
+ context.errors.push(`[E804] Please process issue [[#${issue.number}] "${issue.title}"](${context.githubUrlOriginal}/issues/${issue.number})`);
82
82
  }
83
83
  }
84
84
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "3.2.1",
2
+ "version": "3.2.3",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
- "axios": "^1.7.7",
5
+ "axios": "^1.7.9",
6
6
  "compare-versions": "^6.1.1",
7
- "image-size": "^1.1.1",
7
+ "image-size": "^1.2.0",
8
8
  "unzipper": "^0.12.3",
9
9
  "json5": "^2.2.3"
10
10
  },