@iobroker/repochecker 2.1.3 → 2.1.4
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 +1 -1
- package/index.js +21 -23
- package/package.json +1 -1
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -1156,7 +1156,7 @@ function checkNpm(context) {
|
|
|
1156
1156
|
// bug in NPM some modules could be accessed via normal web page, but not by API
|
|
1157
1157
|
if (!body) {
|
|
1158
1158
|
try {
|
|
1159
|
-
const _response = await axios(
|
|
1159
|
+
const _response = await axios(`https://www.npmjs.com/package/iobroker.${context.adapterName}`);
|
|
1160
1160
|
if (!_response.data) {
|
|
1161
1161
|
context.errors.push('[E200] Not found on npm. Please publish');
|
|
1162
1162
|
return context;
|
|
@@ -1174,30 +1174,28 @@ function checkNpm(context) {
|
|
|
1174
1174
|
context.errors.push('[E200] Not found on npm. Please publish');
|
|
1175
1175
|
return context;
|
|
1176
1176
|
}
|
|
1177
|
-
}
|
|
1178
|
-
context.checks.push('Adapter found on npm');
|
|
1179
|
-
|
|
1180
|
-
if (!body ||
|
|
1181
|
-
!body.collected ||
|
|
1182
|
-
!body.collected.metadata ||
|
|
1183
|
-
!body.collected.metadata.maintainers ||
|
|
1184
|
-
!body.collected.metadata.maintainers.length ||
|
|
1185
|
-
!body.collected.metadata.maintainers.find(user => user.username === 'bluefox' || user.username === 'iobluefox')) {
|
|
1186
|
-
context.errors.push(`[E201] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`);
|
|
1187
1177
|
} else {
|
|
1188
|
-
context.checks.push('
|
|
1189
|
-
|
|
1178
|
+
context.checks.push('Adapter found on npm');
|
|
1179
|
+
if (!body.collected ||
|
|
1180
|
+
!body.collected.metadata ||
|
|
1181
|
+
!body.collected.metadata.maintainers ||
|
|
1182
|
+
!body.collected.metadata.maintainers.length ||
|
|
1183
|
+
!body.collected.metadata.maintainers.find(user => user.username === 'bluefox' || user.username === 'iobluefox')) {
|
|
1184
|
+
context.errors.push(`[E201] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`);
|
|
1185
|
+
} else {
|
|
1186
|
+
context.checks.push('Bluefox found in collaborators on NPM');
|
|
1187
|
+
}
|
|
1190
1188
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1189
|
+
if (!body.collected ||
|
|
1190
|
+
!body.collected.metadata ||
|
|
1191
|
+
!body.collected.metadata.version ||
|
|
1192
|
+
context.packageJson.version !== body.collected.metadata.version
|
|
1193
|
+
) {
|
|
1194
|
+
context.warnings.push(`[W202] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${
|
|
1195
|
+
(body && body.collected && body.collected.metadata && body.collected.metadata.version) || JSON.stringify(body)})`);
|
|
1196
|
+
} else {
|
|
1197
|
+
context.checks.push('Version of package.json matches latest version on NPM');
|
|
1198
|
+
}
|
|
1201
1199
|
}
|
|
1202
1200
|
|
|
1203
1201
|
return context;
|
package/package.json
CHANGED