@iobroker/repochecker 3.5.2 → 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 +4 -0
- package/lib/M100_IOPackageJson.js +42 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,10 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
|
|
|
33
33
|
-->
|
|
34
34
|
|
|
35
35
|
## Changelog
|
|
36
|
+
### 3.5.3 (2025-02-21)
|
|
37
|
+
|
|
38
|
+
- (mcm1957) Crash has been fixed if protectedNative/encryptedNative is not an array. [#385]
|
|
39
|
+
|
|
36
40
|
### 3.5.2 (2025-02-19)
|
|
37
41
|
|
|
38
42
|
- (mcm1957) Incorrect admin suggestion for very olf html adapters corrected. [#383]
|
|
@@ -163,34 +163,48 @@ async function checkIOPackageJson(context) {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
context.
|
|
177
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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) {
|
|
@@ -1144,4 +1158,8 @@ exports.checkIOPackageJson = checkIOPackageJson;
|
|
|
1144
1158
|
// [193] Encrypted native "${encrypted}" not listed at "protectedNative" in io-package.json
|
|
1145
1159
|
// [194] Protected native "${protected}" not listed at "encryptedNative" in io-package.json
|
|
1146
1160
|
// [195] Protected or encrypted element "${protected}" not listed as "native" in io-package.json
|
|
1147
|
-
// [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