@iobroker/repochecker 5.19.3 → 5.19.5

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,6 +25,14 @@ Example:
25
25
  Placeholder for the next version (at the beginning of the line):
26
26
  ### **WORK IN PROGRESS**
27
27
  -->
28
+ ### 5.19.5 (2026-06-29)
29
+
30
+ - (mcm1957) false positive related to workflow logs has been fixed
31
+
32
+ ### 5.19.4 (2026-06-29)
33
+
34
+ - (mcm1957) false positives related to objectChecker have been fixed
35
+
28
36
  ### 5.19.3 (2026-06-28)
29
37
 
30
38
  - (mcm1957) false positives for test-and.release workflow logs ans wwwOnly adapters has been fixed
@@ -99,7 +99,7 @@ const EXPECTED_TEST_INTEGRATION_LINES = [
99
99
  'Adapter startup',
100
100
  '✔ The adapter starts',
101
101
  'testing:integration:TestHarness Stopping adapter instance...',
102
- 'testing:integration:TestHarness => giving it 5000ms to terminate',
102
+ 'testing:integration:TestHarness => giving it ', // '...5000ms to terminate',
103
103
  'testing:integration:TestHarness Adapter terminated',
104
104
  'testing:integration:DBConnection Stopping DB instances...',
105
105
  'testing:integration:DBConnection DB instances stopped',
@@ -69,6 +69,7 @@ const STATE_SCHEMA = {
69
69
  'common.dontDelete':{ types: ['boolean'] },
70
70
  'common.color': { types: ['string'] },
71
71
  'common.icon': { types: ['string'] },
72
+ 'common.enums': { types: ['array'] },
72
73
  };
73
74
 
74
75
  const STATE_ROLE_RULES = {
@@ -138,6 +138,42 @@ function parseSerializedValue(value) {
138
138
  }
139
139
  }
140
140
 
141
+ /**
142
+ * Validates the common.enums array.
143
+ */
144
+ function validateEnums(objectId, enums, collector) {
145
+ if (!Array.isArray(enums)) {
146
+ collector.error('E4001', `Object "${objectId}": common.enums must be an array.`);
147
+ return;
148
+ }
149
+ for (let i = 0; i < enums.length; i++) {
150
+ const entry = enums[i];
151
+ const prefix = `Object "${objectId}": common.enums[${i}]`;
152
+ if (!isPlainObject(entry)) {
153
+ collector.error('E4002', `${prefix} must be an object.`);
154
+ continue;
155
+ }
156
+ if (typeof entry._id !== 'string') {
157
+ collector.error('E4003', `${prefix} must have a string "_id".`);
158
+ }
159
+ if (entry.type !== 'enum') {
160
+ collector.error('E4004', `${prefix} must have "type" = "enum".`);
161
+ }
162
+ if (!isPlainObject(entry.common)) {
163
+ collector.error('E4005', `${prefix} must have an object "common".`);
164
+ continue;
165
+ }
166
+ if (entry.common.name === undefined) {
167
+ collector.error('E4006', `${prefix}.common must have a "name".`);
168
+ }
169
+ const allowedCommonKeys = new Set(['name', 'smartName', 'icon', 'color', 'desc']);
170
+ const unknownKeys = Object.keys(entry.common).filter(k => !allowedCommonKeys.has(k));
171
+ if (unknownKeys.length > 0) {
172
+ collector.warning('W4001', `${prefix}.common contains unexpected keys: ${unknownKeys.join(', ')}.`);
173
+ }
174
+ }
175
+ }
176
+
141
177
  function matchesCommonType(value, commonType) {
142
178
  switch (commonType) {
143
179
  case 'mixed':
@@ -508,6 +544,13 @@ function validateObjectDump(objects, adapter, collector) {
508
544
  validateStateCommon(objectId, common, collector, roleRuleMaps);
509
545
  }
510
546
 
547
+ // --- Validate common.enums on all objects ---
548
+ for (const [objectId, objectData] of entries) {
549
+ if (isPlainObject(objectData.common) && objectData.common.enums !== undefined) {
550
+ validateEnums(objectId, objectData.common.enums, collector);
551
+ }
552
+ }
553
+
511
554
  return relevantIds;
512
555
  }
513
556
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.19.3",
2
+ "version": "5.19.5",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",