@iobroker/repochecker 5.18.1 → 5.18.2

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
@@ -25,7 +25,7 @@ Example:
25
25
  Placeholder for the next version (at the beginning of the line):
26
26
  ### **WORK IN PROGRESS**
27
27
  -->
28
- ### 5.18.1 (2026-06-05)
28
+ ### 5.18.2 (2026-06-05)
29
29
 
30
30
  - (mcm1957) Support for objectStructure check added
31
31
 
@@ -9,6 +9,8 @@ const ROOT_OBJECT_SCHEMA = {
9
9
  ts: { type: 'number', optional: true },
10
10
  acl: { type: 'object', optional: true },
11
11
  user: { type: 'string', optional: true },
12
+ ack: { type: 'boolean', optional: true },
13
+ val: { optional: true, matchesCommonType: true },
12
14
  };
13
15
 
14
16
  const ALLOWED_OBJECT_TYPES = new Set([
@@ -338,12 +338,21 @@ function validateObjectDump(objects, adapter, collector) {
338
338
  continue;
339
339
  }
340
340
  const actualType = getValueType(objectData[schemaKey]);
341
- if (actualType !== descriptor.type) {
341
+ if (descriptor.type && actualType !== descriptor.type) {
342
342
  collector.error(
343
343
  'E3005',
344
344
  `Object "${objectId}": key "${schemaKey}" must be type ${descriptor.type}, got ${actualType}.`,
345
345
  );
346
346
  }
347
+ if (descriptor.matchesCommonType) {
348
+ const commonType = objectData.common && objectData.common.type;
349
+ if (commonType && !matchesCommonType(objectData[schemaKey], commonType)) {
350
+ collector.error(
351
+ 'E3005',
352
+ `Object "${objectId}": key "${schemaKey}" must match common.type "${commonType}".`,
353
+ );
354
+ }
355
+ }
347
356
  }
348
357
 
349
358
  // --- No extra root keys ---
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.18.1",
2
+ "version": "5.18.2",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",