@iobroker/repochecker 5.13.0 → 5.13.1
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/M1000_IOPackageJson.js +24 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,10 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.13.1 (2026-05-24)
|
|
29
|
+
|
|
30
|
+
- (mcm1957) Some flase positives have been fixed.
|
|
31
|
+
|
|
28
32
|
### 5.13.0 (2026-05-22)
|
|
29
33
|
|
|
30
34
|
- (@copilot) Ignored `/www`, `/template`, and `/templates` during source dependency scanning, ignored `native.webInstance` for extension adapters in native checks, and updated `[W1130]` array default validation to require a JSON-stringified array. Related to [#881].
|
|
@@ -1010,20 +1010,20 @@ async function checkIOPackageJson(context) {
|
|
|
1010
1010
|
|
|
1011
1011
|
instanceObjects.forEach((instanceObject, index) => {
|
|
1012
1012
|
if (!instanceObject || typeof instanceObject !== 'object' || Array.isArray(instanceObject)) {
|
|
1013
|
-
context.warnings.push(`[W1118] instanceObject[${index}] must be an object`);
|
|
1013
|
+
context.warnings.push(`[W1118] io-package.json: instanceObject[${index}] must be an object`);
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
1017
1017
|
if (
|
|
1018
|
-
instanceObject._id === undefined ||
|
|
1018
|
+
(instanceObject._id === undefined ||
|
|
1019
1019
|
typeof instanceObject._id !== 'string' ||
|
|
1020
|
-
!instanceObject._id.trim()
|
|
1020
|
+
!instanceObject._id.trim()) && (instanceObject.type !== 'meta')
|
|
1021
1021
|
) {
|
|
1022
|
-
context.warnings.push(`[W1119] instanceObject[${index}] must define non-empty string "_id"`);
|
|
1022
|
+
context.warnings.push(`[W1119] io-package.json: instanceObject[${index}] must define non-empty string "_id"`);
|
|
1023
1023
|
}
|
|
1024
1024
|
|
|
1025
1025
|
if (instanceObject.type !== undefined && !instanceObjectValidTypes.includes(instanceObject.type)) {
|
|
1026
|
-
context.warnings.push(`[W1047] instanceObject type has an invalid type: ${instanceObject.type}`);
|
|
1026
|
+
context.warnings.push(`[W1047] io-package.json: instanceObject type has an invalid type: ${instanceObject.type}`);
|
|
1027
1027
|
}
|
|
1028
1028
|
|
|
1029
1029
|
if (instanceObject.type !== 'state') {
|
|
@@ -1036,32 +1036,32 @@ async function checkIOPackageJson(context) {
|
|
|
1036
1036
|
Array.isArray(instanceObject.common)
|
|
1037
1037
|
) {
|
|
1038
1038
|
context.warnings.push(
|
|
1039
|
-
`[W1120] instanceObject "${instanceObject._id || index}" with type "state" must have "common" object`,
|
|
1039
|
+
`[W1120] io-package.json: instanceObject "${instanceObject._id || index}" with type "state" must have "common" object`,
|
|
1040
1040
|
);
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
1044
|
if (typeof instanceObject.common.type !== 'string') {
|
|
1045
1045
|
context.warnings.push(
|
|
1046
|
-
`[W1048] instanceObject common.type has an invalid type! Expected "string", received "${typeof instanceObject.common.type}"`,
|
|
1046
|
+
`[W1048] io-package.json: instanceObject common.type has an invalid type! Expected "string", received "${typeof instanceObject.common.type}"`,
|
|
1047
1047
|
);
|
|
1048
1048
|
} else if (!instanceObjectStateTypes.includes(instanceObject.common.type)) {
|
|
1049
1049
|
context.warnings.push(
|
|
1050
|
-
`[W1049] instanceObject common.type has an invalid value: ${instanceObject.common.type}`,
|
|
1050
|
+
`[W1049] io-package.json: instanceObject common.type has an invalid value: ${instanceObject.common.type}`,
|
|
1051
1051
|
);
|
|
1052
1052
|
}
|
|
1053
1053
|
|
|
1054
1054
|
['min', 'max', 'step'].forEach(key => {
|
|
1055
1055
|
if (instanceObject.common[key] !== undefined && typeof instanceObject.common[key] !== 'number') {
|
|
1056
1056
|
context.warnings.push(
|
|
1057
|
-
`[W1121] instanceObject "${instanceObject._id || index}" common.${key} must be a number`,
|
|
1057
|
+
`[W1121] io-package.json: instanceObject "${instanceObject._id || index}" common.${key} must be a number`,
|
|
1058
1058
|
);
|
|
1059
1059
|
}
|
|
1060
1060
|
});
|
|
1061
1061
|
|
|
1062
1062
|
if (instanceObject.common.unit !== undefined && typeof instanceObject.common.unit !== 'string') {
|
|
1063
1063
|
context.warnings.push(
|
|
1064
|
-
`[W1122] instanceObject "${instanceObject._id || index}" common.unit must be a string`,
|
|
1064
|
+
`[W1122] io-package.json: instanceObject "${instanceObject._id || index}" common.unit must be a string`,
|
|
1065
1065
|
);
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
@@ -1073,23 +1073,23 @@ async function checkIOPackageJson(context) {
|
|
|
1073
1073
|
Array.isArray(instanceObject.common.desc))
|
|
1074
1074
|
) {
|
|
1075
1075
|
context.warnings.push(
|
|
1076
|
-
`[W1123] instanceObject "${instanceObject._id || index}" common.desc must be a string or object`,
|
|
1076
|
+
`[W1123] io-package.json: instanceObject "${instanceObject._id || index}" common.desc must be a string or object`,
|
|
1077
1077
|
);
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
if (typeof instanceObject.common.read !== 'boolean') {
|
|
1081
1081
|
context.warnings.push(
|
|
1082
|
-
`[W1124] instanceObject "${instanceObject._id || index}" common.read is mandatory and must be boolean`,
|
|
1082
|
+
`[W1124] io-package.json: instanceObject "${instanceObject._id || index}" common.read is mandatory and must be boolean`,
|
|
1083
1083
|
);
|
|
1084
1084
|
}
|
|
1085
1085
|
if (typeof instanceObject.common.write !== 'boolean') {
|
|
1086
1086
|
context.warnings.push(
|
|
1087
|
-
`[W1125] instanceObject "${instanceObject._id || index}" common.write is mandatory and must be boolean`,
|
|
1087
|
+
`[W1125] io-package.json: instanceObject "${instanceObject._id || index}" common.write is mandatory and must be boolean`,
|
|
1088
1088
|
);
|
|
1089
1089
|
}
|
|
1090
1090
|
if (typeof instanceObject.common.role !== 'string' || !instanceObject.common.role.trim()) {
|
|
1091
1091
|
context.warnings.push(
|
|
1092
|
-
`[W1126] instanceObject "${instanceObject._id || index}" common.role is mandatory and must be a non-empty string`,
|
|
1092
|
+
`[W1126] io-package.json: instanceObject "${instanceObject._id || index}" common.role is mandatory and must be a non-empty string`,
|
|
1093
1093
|
);
|
|
1094
1094
|
}
|
|
1095
1095
|
if (
|
|
@@ -1098,19 +1098,19 @@ async function checkIOPackageJson(context) {
|
|
|
1098
1098
|
typeof instanceObject.common.states !== 'string')
|
|
1099
1099
|
) {
|
|
1100
1100
|
context.warnings.push(
|
|
1101
|
-
`[W1127] instanceObject "${instanceObject._id || index}" common.states must be number or string`,
|
|
1101
|
+
`[W1127] io-package.json: instanceObject "${instanceObject._id || index}" common.states must be number or string`,
|
|
1102
1102
|
);
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
1105
|
if (instanceObject.common.defAck !== undefined && typeof instanceObject.common.defAck !== 'boolean') {
|
|
1106
1106
|
context.warnings.push(
|
|
1107
|
-
`[W1128] instanceObject "${instanceObject._id || index}" common.defAck must be boolean`,
|
|
1107
|
+
`[W1128] io-package.json: instanceObject "${instanceObject._id || index}" common.defAck must be boolean`,
|
|
1108
1108
|
);
|
|
1109
1109
|
}
|
|
1110
1110
|
|
|
1111
1111
|
if (instanceObject.common.expert !== undefined && typeof instanceObject.common.expert !== 'boolean') {
|
|
1112
1112
|
context.warnings.push(
|
|
1113
|
-
`[W1136] instanceObject "${instanceObject._id || index}" common.expert must be boolean`,
|
|
1113
|
+
`[W1136] io-package.json: instanceObject "${instanceObject._id || index}" common.expert must be boolean`,
|
|
1114
1114
|
);
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
@@ -1119,7 +1119,7 @@ async function checkIOPackageJson(context) {
|
|
|
1119
1119
|
typeof instanceObject.common.workingID !== 'string'
|
|
1120
1120
|
) {
|
|
1121
1121
|
context.warnings.push(
|
|
1122
|
-
`[W1129] instanceObject "${instanceObject._id || index}" common.workingID must be string`,
|
|
1122
|
+
`[W1129] io-package.json: instanceObject "${instanceObject._id || index}" common.workingID must be string`,
|
|
1123
1123
|
);
|
|
1124
1124
|
}
|
|
1125
1125
|
if (
|
|
@@ -1127,14 +1127,14 @@ async function checkIOPackageJson(context) {
|
|
|
1127
1127
|
!doesValueMatchStateType(instanceObject.common.def, instanceObject.common.type)
|
|
1128
1128
|
) {
|
|
1129
1129
|
context.warnings.push(
|
|
1130
|
-
`[W1130] instanceObject "${instanceObject._id || index}" common.def must match common.type "${instanceObject.common.type}"`,
|
|
1130
|
+
`[W1130] io-package.json: instanceObject "${instanceObject._id || index}" common.def must match common.type "${instanceObject.common.type}"`,
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
1134
|
Object.keys(instanceObject.common).forEach(commonKey => {
|
|
1135
1135
|
if (!validStateCommonKeys.has(commonKey)) {
|
|
1136
1136
|
context.warnings.push(
|
|
1137
|
-
`[W1131] instanceObject "${instanceObject._id || index}" has unsupported common.${commonKey} attribute`,
|
|
1137
|
+
`[W1131] io-package.json: instanceObject "${instanceObject._id || index}" has unsupported common.${commonKey} attribute`,
|
|
1138
1138
|
);
|
|
1139
1139
|
}
|
|
1140
1140
|
});
|
|
@@ -1144,7 +1144,7 @@ async function checkIOPackageJson(context) {
|
|
|
1144
1144
|
const roleDefinition = stateRoleDefinitions[roleForLookup];
|
|
1145
1145
|
if (!roleDefinition) {
|
|
1146
1146
|
context.warnings.push(
|
|
1147
|
-
`[W1132] instanceObject "${instanceObject._id || index}" common.role "${instanceObject.common.role}" is not a known ioBroker state role`,
|
|
1147
|
+
`[W1132] io-package.json: instanceObject "${instanceObject._id || index}" common.role "${instanceObject.common.role}" is not a known ioBroker state role`,
|
|
1148
1148
|
);
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
@@ -1155,7 +1155,7 @@ async function checkIOPackageJson(context) {
|
|
|
1155
1155
|
!roleDefinition.types.includes(instanceObject.common.type)
|
|
1156
1156
|
) {
|
|
1157
1157
|
context.warnings.push(
|
|
1158
|
-
`[W1133] instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.type to be one of [${roleDefinition.types.join(', ')}], but found "${instanceObject.common.type}"`,
|
|
1158
|
+
`[W1133] io-package.json: instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.type to be one of [${roleDefinition.types.join(', ')}], but found "${instanceObject.common.type}"`,
|
|
1159
1159
|
);
|
|
1160
1160
|
}
|
|
1161
1161
|
if (
|
|
@@ -1164,7 +1164,7 @@ async function checkIOPackageJson(context) {
|
|
|
1164
1164
|
instanceObject.common.read !== roleDefinition.read
|
|
1165
1165
|
) {
|
|
1166
1166
|
context.warnings.push(
|
|
1167
|
-
`[W1134] instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.read=${roleDefinition.read}`,
|
|
1167
|
+
`[W1134] io-package.json: instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.read=${roleDefinition.read}`,
|
|
1168
1168
|
);
|
|
1169
1169
|
}
|
|
1170
1170
|
if (
|
|
@@ -1173,7 +1173,7 @@ async function checkIOPackageJson(context) {
|
|
|
1173
1173
|
instanceObject.common.write !== roleDefinition.write
|
|
1174
1174
|
) {
|
|
1175
1175
|
context.warnings.push(
|
|
1176
|
-
`[W1135] instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.write=${roleDefinition.write}`,
|
|
1176
|
+
`[W1135] io-package.json: instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.write=${roleDefinition.write}`,
|
|
1177
1177
|
);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
package/package.json
CHANGED