@iobroker/repochecker 5.18.6 → 5.18.8
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 +9 -0
- package/lib/M6000_Readme.js +5 -1
- package/lib/objectStructure.js +31 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,15 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.18.8 (2026-06-21)
|
|
29
|
+
|
|
30
|
+
- (mcm1957) Sentry text check has been adapted
|
|
31
|
+
- (mcm1957) Fixed validation of serialized default values for array, object, mixed, json, and file states
|
|
32
|
+
|
|
33
|
+
### 5.18.7 (2026-06-10)
|
|
34
|
+
|
|
35
|
+
- (mcm1957) Detection of github install guide extended
|
|
36
|
+
|
|
28
37
|
### 5.18.6 (2026-06-10)
|
|
29
38
|
|
|
30
39
|
- (mcm1957) Support role definitions containing wildcards
|
package/lib/M6000_Readme.js
CHANGED
|
@@ -84,7 +84,7 @@ const GERMAN_WORD_DETECTION_LIMIT = 3;
|
|
|
84
84
|
|
|
85
85
|
// Keep this text in sync with the exact README wording required for adapters using the Sentry plugin.
|
|
86
86
|
const SENTRY_NOTICE_TEXT_1 =
|
|
87
|
-
'
|
|
87
|
+
'This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.';
|
|
88
88
|
const SENTRY_NOTICE_TEXT_2 =
|
|
89
89
|
'This adapter uses the service `Sentry.io` to automatically report exceptions and code errors';
|
|
90
90
|
const SENTRY_NOTICE_TEXT_3 =
|
|
@@ -617,6 +617,10 @@ async function checkReadme(context) {
|
|
|
617
617
|
`(?:^|\\n)[^\\n]*(?:iobroker|iob)\\s+url\\s+(?:https?:\\/\\/github\\.com\\/)?${ownerAdapterPattern}`,
|
|
618
618
|
'i',
|
|
619
619
|
).test(data) ||
|
|
620
|
+
// Install from custom URL
|
|
621
|
+
new RegExp(`install\\s+from\\s+custom\\s+url`, 'i').test(data) ||
|
|
622
|
+
// Installation via Github Cat possible.
|
|
623
|
+
new RegExp(`installation\\s+via\\s+github`, 'i').test(data) ||
|
|
620
624
|
// iobroker/iob npm install commands with owner/repo GitHub shorthand
|
|
621
625
|
new RegExp(`(?:^|\\n)[^\\n]*(?:iobroker|iob)\\s+npm\\s+install\\s+${ownerAdapterPattern}`, 'i').test(
|
|
622
626
|
data,
|
package/lib/objectStructure.js
CHANGED
|
@@ -121,22 +121,46 @@ function validateI18n(value, fieldPath) {
|
|
|
121
121
|
return { errors, warnings };
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Validates a JSON-serialized value and returns the parsed result when valid.
|
|
126
|
+
*
|
|
127
|
+
* @param {*} value
|
|
128
|
+
* @returns {object}
|
|
129
|
+
*/
|
|
130
|
+
function parseSerializedValue(value) {
|
|
131
|
+
if (typeof value !== 'string') {
|
|
132
|
+
return { ok: false };
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
return { ok: true, parsed: JSON.parse(value) };
|
|
136
|
+
} catch {
|
|
137
|
+
return { ok: false };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
124
141
|
function matchesCommonType(value, commonType) {
|
|
125
142
|
switch (commonType) {
|
|
126
143
|
case 'mixed':
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
144
|
+
case 'json':
|
|
145
|
+
return parseSerializedValue(value).ok;
|
|
146
|
+
case 'array': {
|
|
147
|
+
const { ok, parsed } = parseSerializedValue(value);
|
|
148
|
+
return ok && Array.isArray(parsed);
|
|
149
|
+
}
|
|
130
150
|
case 'boolean':
|
|
131
151
|
return typeof value === 'boolean';
|
|
132
152
|
case 'number':
|
|
133
153
|
return typeof value === 'number' && Number.isFinite(value);
|
|
134
|
-
case 'object':
|
|
135
|
-
return isPlainObject(value);
|
|
136
154
|
case 'string':
|
|
137
|
-
case 'file':
|
|
138
|
-
case 'json':
|
|
139
155
|
return typeof value === 'string';
|
|
156
|
+
case 'file': {
|
|
157
|
+
const { ok, parsed } = parseSerializedValue(value);
|
|
158
|
+
return ok && typeof parsed === 'string';
|
|
159
|
+
}
|
|
160
|
+
case 'object': {
|
|
161
|
+
const { ok, parsed } = parseSerializedValue(value);
|
|
162
|
+
return ok && isPlainObject(parsed);
|
|
163
|
+
}
|
|
140
164
|
case 'multistate':
|
|
141
165
|
return ['string', 'number', 'boolean'].includes(typeof value);
|
|
142
166
|
default:
|
package/package.json
CHANGED