@iobroker/repochecker 2.1.5 → 2.1.7

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.
Files changed (3) hide show
  1. package/README.md +7 -0
  2. package/index.js +10 -10
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -20,6 +20,13 @@ Branch (`master/main/dev`) is optional.
20
20
  -->
21
21
 
22
22
  ## Changelog
23
+ ### 2.1.7 (2023-08-14)
24
+ * (mcm57) Update index.js - fix typo in error message (packet.json)
25
+ * (mcm57) Update index.js - renumber E504/1 to 519 - fixes #112
26
+
27
+ ### 2.1.6 (2022-12-08)
28
+ * (bluefox) added better error logging
29
+
23
30
  ### 2.1.5 (2022-12-07)
24
31
  * (bluefox) added check of `.releaseconfig.json` file
25
32
 
package/index.js CHANGED
@@ -116,7 +116,7 @@ function checkPackageJson(context) {
116
116
  try {
117
117
  context.packageJson = JSON.parse(context.packageJson);
118
118
  } catch (e) {
119
- context.errors.push('[E001] Cannot parse packet.json: ' + e);
119
+ context.errors.push('[E001] Cannot parse package.json: ' + e);
120
120
  return context;
121
121
  }
122
122
  }
@@ -157,9 +157,9 @@ function checkPackageJson(context) {
157
157
  }
158
158
 
159
159
  if (adapterName.startsWith('_')) {
160
- context.errors.push(`[E024] Adapter name "${adapterName}" may not start from '_'`);
160
+ context.errors.push(`[E024] Adapter name "${adapterName}" may not start with '_'`);
161
161
  } else {
162
- context.checks.push(`Adapter name "${adapterName}" does not start from '_'`);
162
+ context.checks.push(`Adapter name "${adapterName}" does not start with '_'`);
163
163
  }
164
164
 
165
165
  const n = context.githubUrlOriginal.match(/\/([^/]+)\/iobroker\./i);
@@ -1274,13 +1274,13 @@ function checkRepo(context) {
1274
1274
  if (context.latestRepo[context.adapterName].version) {
1275
1275
  context.errors.push('[E403] Version set in latest repository');
1276
1276
  } else {
1277
- context.checks.push('Version does not set in latest repository');
1277
+ context.checks.push('Version not set in latest repository');
1278
1278
  }
1279
1279
 
1280
1280
  const url = `https://raw.githubusercontent.com/${context.authorName}/ioBroker.${context.adapterName}/${context.branch}/`;
1281
1281
 
1282
1282
  if (!context.latestRepo[context.adapterName].icon) {
1283
- context.errors.push('[E404] Icon does not found in latest repository');
1283
+ context.errors.push('[E404] Icon not found in latest repository');
1284
1284
  } else {
1285
1285
  context.checks.push('Icon found in latest repository');
1286
1286
 
@@ -1333,7 +1333,7 @@ function checkRepo(context) {
1333
1333
  const url = `https://raw.githubusercontent.com/${context.authorName}/ioBroker.${context.adapterName}/${context.branch}/`;
1334
1334
 
1335
1335
  if (!context.stableRepo[context.adapterName].icon) {
1336
- context.errors.push('[E425] Icon does not found in stable repository');
1336
+ context.errors.push('[E425] Icon not found in stable repository');
1337
1337
  } else {
1338
1338
  context.checks.push('Icon found in stable repository');
1339
1339
 
@@ -1569,7 +1569,7 @@ function checkCode(context) {
1569
1569
  if (!context.ioPackageJson.common.javascriptRules.url) {
1570
1570
  context.errors.push('[E515] JavaScript-Rules support is declared, but no location in property url defined');
1571
1571
  }
1572
- if (!context['/' + context.ioPackageJson.common.javascriptRules.url]) {
1572
+ if (!context.filesList.includes('admin/' + context.ioPackageJson.common.javascriptRules.url)) {
1573
1573
  context.errors.push('[E516] "' + context.ioPackageJson.common.javascriptRules.url + '" not found, but JavaScript-Rules support is declared');
1574
1574
  }
1575
1575
  }
@@ -1592,7 +1592,7 @@ function checkCode(context) {
1592
1592
 
1593
1593
  if (context.packageJson.main && context.packageJson.main.endsWith('.js')) {
1594
1594
  if (!context['/' + context.packageJson.main]) {
1595
- context.errors.push(`[E504] "${context.packageJson.main}" found in package.json, but not found as file`);
1595
+ context.errors.push(`[E519] "${context.packageJson.main}" found in package.json, but not found as file`);
1596
1596
  } else {
1597
1597
  if (context['/' + context.packageJson.main].includes('setInterval(') && !context['/' + context.packageJson.main].includes('clearInterval(')) {
1598
1598
  if (context.ioPackageJson.compact) {
@@ -1612,7 +1612,7 @@ function checkCode(context) {
1612
1612
  }
1613
1613
  }
1614
1614
  }
1615
- // max E518
1615
+ // max E519
1616
1616
  resolve(context);
1617
1617
  })
1618
1618
  .catch(e => reject(e));
@@ -1944,7 +1944,7 @@ function check(request, ctx, callback) {
1944
1944
  }));
1945
1945
  })
1946
1946
  .catch(err => {
1947
- console.error('GLOBAL ERROR' + err);
1947
+ console.error(`GLOBAL ERROR: ${err.toString()}, ${JSON.stringify(err)}`);
1948
1948
 
1949
1949
  return callback(null, makeResponse(200, {
1950
1950
  result: 'Errors found',
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
- "version": "2.1.5",
2
+ "version": "2.1.7",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
- "axios": "^1.2.1",
6
- "compare-versions": "^5.0.1",
5
+ "axios": "^1.4.0",
6
+ "compare-versions": "^6.1.0",
7
7
  "image-size": "^1.0.2",
8
- "unzipper": "^0.10.11",
9
- "json5": "^2.2.1"
8
+ "unzipper": "^0.10.14",
9
+ "json5": "^2.2.3"
10
10
  },
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
14
14
  "devDependencies": {
15
- "@alcalzone/release-script": "^3.5.9",
16
- "eslint": "^8.29.0"
15
+ "@alcalzone/release-script": "^3.6.0",
16
+ "eslint": "^8.47.0"
17
17
  },
18
18
  "files": [
19
19
  "index.js"