@iobroker/repochecker 3.5.1 → 3.5.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,7 +33,14 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
33
33
  -->
34
34
 
35
35
  ## Changelog
36
- ### 3.5.1 (2025-02-19)
36
+ ### 3.5.3 (2025-02-21)
37
+
38
+ - (mcm1957) Crash has been fixed if protectedNative/encryptedNative is not an array. [#385]
39
+
40
+ ### 3.5.2 (2025-02-19)
41
+
42
+ - (mcm1957) Incorrect admin suggestion for very olf html adapters corrected. [#383]
43
+ - (mcm1957) Errors during parsing if icon improved. [#381]
37
44
  - (mcm1957) Crash if protectedNative or encryptedNative is missing. [#382]
38
45
 
39
46
  ### 3.5.0 (2025-02-18)
@@ -163,34 +163,48 @@ async function checkIOPackageJson(context) {
163
163
  }
164
164
  }
165
165
 
166
- for (const key of context.ioPackageJson.encryptedNative || []) {
167
- if (!(context.ioPackageJson.protectedNative && context.ioPackageJson.protectedNative.includes(key))) {
168
- context.warnings.push(
169
- `[W193] Encrypted native "${key}" should be listed at "protectedNative" in io-package.json`,
170
- );
166
+ let valid = true;
167
+ if (context.ioPackageJson.encryptedNative && !Array.isArray(context.ioPackageJson.encryptedNative)) {
168
+ context.errors.push(`[E198] "encryptedNative" must be an array at io-package.json`);
169
+ valid = false;
170
+ };
171
+
172
+ if (context.ioPackageJson.protectedNative && !Array.isArray(context.ioPackageJson.protectedNative)) {
173
+ context.errors.push(`[E199] "protectedNative" must be an array at io-package.json`);
174
+ valid = false;
175
+ };
176
+
177
+ if (valid) {
178
+ for (const key of context.ioPackageJson.encryptedNative || []) {
179
+ if (!(context.ioPackageJson.protectedNative && context.ioPackageJson.protectedNative.includes(key))) {
180
+ context.warnings.push(
181
+ `[W193] Encrypted native "${key}" should be listed at "protectedNative" in io-package.json`,
182
+ );
183
+ }
171
184
  }
172
- }
173
185
 
174
- for (const key of context.ioPackageJson.protectedNative || []) {
175
- if (!(context.ioPackageJson.encryptedNative && context.ioPackageJson.encryptedNative.includes(key))) {
176
- context.warnings.push(
177
- `[S194] Consider adding protected native "${key}" to "encryptedNative" in io-package.json`,
178
- );
186
+ for (const key of context.ioPackageJson.protectedNative || []) {
187
+ console.log('juhu2a');
188
+ if (!(context.ioPackageJson.encryptedNative && context.ioPackageJson.encryptedNative.includes(key))) {
189
+ context.warnings.push(
190
+ `[S194] Consider adding protected native "${key}" to "encryptedNative" in io-package.json`,
191
+ );
192
+ }
179
193
  }
180
- }
181
194
 
182
- for (const key of [
183
- ...new Set([
184
- ...(context.ioPackageJson.protectedNative || []),
185
- ...(context.ioPackageJson.encryptedNative || []),
186
- ]),
187
- ]) {
188
- if (context.ioPackageJson.native[key] === undefined) {
189
- context.warnings.push(
190
- `[W195] Protected or encrypted element "${key}" should be listed at "native" in io-package.json`,
191
- );
195
+ for (const key of [
196
+ ...new Set([
197
+ ...(context.ioPackageJson.protectedNative || []),
198
+ ...(context.ioPackageJson.encryptedNative || []),
199
+ ]),
200
+ ]) {
201
+ if (context.ioPackageJson.native[key] === undefined) {
202
+ context.warnings.push(
203
+ `[W195] Protected or encrypted element "${key}" should be listed at "native" in io-package.json`,
204
+ );
205
+ }
192
206
  }
193
- }
207
+ } // if (valid)
194
208
  }
195
209
 
196
210
  if (!context.ioPackageJson.common) {
@@ -784,11 +798,18 @@ async function checkIOPackageJson(context) {
784
798
 
785
799
  // check admin dependency
786
800
  let requireAdmin =
801
+ // some config is present and does not state 'none'
787
802
  context.ioPackageJson.common.materialize ||
788
803
  context.ioPackageJson.common.materializeTab ||
789
804
  (context.ioPackageJson.common.adminUI?.config && context.ioPackageJson.common.adminUI?.config !== 'none') ||
790
805
  (context.ioPackageJson.common.adminUI?.custom && context.ioPackageJson.common.adminUI?.custom !== 'none') ||
791
- (context.ioPackageJson.common.adminUI?.tab && context.ioPackageJson.common.adminUI?.tab !== 'none');
806
+ (context.ioPackageJson.common.adminUI?.tab && context.ioPackageJson.common.adminUI?.tab !== 'none') ||
807
+ // or its pure old html without any setting
808
+ (!context.ioPackageJson.common.materialize &&
809
+ !context.ioPackageJson.common.materializeTab &&
810
+ !context.ioPackageJson.common.adminUI?.config &&
811
+ !context.ioPackageJson.common.adminUI?.custom &&
812
+ !context.ioPackageJson.common.adminUI?.tab);
792
813
  common.debug(`admin dependency is ${requireAdmin ? '' : 'not'}required`);
793
814
 
794
815
  if (context.cfg.hasJsonConfig) {
@@ -1137,4 +1158,8 @@ exports.checkIOPackageJson = checkIOPackageJson;
1137
1158
  // [193] Encrypted native "${encrypted}" not listed at "protectedNative" in io-package.json
1138
1159
  // [194] Protected native "${protected}" not listed at "encryptedNative" in io-package.json
1139
1160
  // [195] Protected or encrypted element "${protected}" not listed as "native" in io-package.json
1140
- // [196] "common.supportCustoms" requires "common.adminUI.custom" to be defined`
1161
+ // [196] "common.supportCustoms" requires "common.adminUI.custom" to be defined
1162
+ // [197] External icon ${context.ioPackageJson.common.extIcon} cannot be parsed
1163
+ // [198] "common.encryptedNative" must be an array at io-package.json
1164
+ // [199] "common.protectedNative" must be an array at io-package.json
1165
+
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.5.1",
2
+ "version": "3.5.3",
3
3
  "name": "@iobroker/repochecker",
4
4
  "devDependencies": {
5
5
  "@alcalzone/release-script": "^3.8.0",