@iobroker/repochecker 5.19.11 → 5.20.0
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 +16 -1
- package/index.js +3 -2
- package/lib/M1000_IOPackageJson.js +2 -2
- package/lib/M3000_Testing.js +20 -0
- package/lib/M9000_GitNpmIgnore.js +165 -43
- package/lib/common.js +82 -0
- package/lib/postprocessing.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This is a code for frontend and back-end of the service <https://adapter-check.i
|
|
|
4
4
|
|
|
5
5
|
If you want to add your adapter to the public ioBroker repository, all tests on this page must be OK.
|
|
6
6
|
|
|
7
|
-
## How to test via cli
|
|
7
|
+
## How to test via cli (standard tests accessing repository data)
|
|
8
8
|
|
|
9
9
|
When running the repository checker via the command line, you **need** to add the repository as parameter, while the branch parameter (`master/main/dev`) is optional. If this parameter is omitted, the `default` branch (typically master / main) will be checked.
|
|
10
10
|
|
|
@@ -12,6 +12,11 @@ When running the repository checker via the command line, you **need** to add th
|
|
|
12
12
|
npx @iobroker/repochecker <repo> [branch]`
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## How to test via cli using local mode
|
|
16
|
+
|
|
17
|
+
> [!NOTE]
|
|
18
|
+
> local mode feature is experimental and untested.
|
|
19
|
+
|
|
15
20
|
For extra debugging outputs you can pass the `--debug` parameter.
|
|
16
21
|
|
|
17
22
|
For a local test you can pass the `--local` parameter. Most of the files are read locally.
|
|
@@ -21,10 +26,20 @@ Example:
|
|
|
21
26
|
|
|
22
27
|
`npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.repochecker --local`
|
|
23
28
|
|
|
29
|
+
## Changelog
|
|
24
30
|
<!--
|
|
25
31
|
Placeholder for the next version (at the beginning of the line):
|
|
26
32
|
### **WORK IN PROGRESS**
|
|
27
33
|
-->
|
|
34
|
+
### 5.20.0 (2026-07-17)
|
|
35
|
+
|
|
36
|
+
* (Copilot) Add a workflow check that rejects `always()` on standard test-and-release jobs and flags it for review on custom jobs.
|
|
37
|
+
* (Copilot) Warn when tracked files or directories are still covered by `.gitignore` and error if a tracked `/build` directory is ignored.
|
|
38
|
+
|
|
39
|
+
### 5.19.12 (2026-07-13)
|
|
40
|
+
|
|
41
|
+
- (Copilot) Redact sensitive Axios error fields so `OWN_GITHUB_TOKEN`/authorization values are never logged in clear text.
|
|
42
|
+
|
|
28
43
|
### 5.19.11 (2026-07-13)
|
|
29
44
|
|
|
30
45
|
- (Copilot) Send `OWN_GITHUB_TOKEN` only for GitHub URLs to avoid forwarding it to jsDelivr.
|
package/index.js
CHANGED
|
@@ -182,8 +182,9 @@ function check(request, ctx, callback) {
|
|
|
182
182
|
);
|
|
183
183
|
})
|
|
184
184
|
.catch(err => {
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
const sanitizedErrorJson = common.stringifyError(err);
|
|
186
|
+
console.error(`GLOBAL ERROR: ${err.toString()}, ${sanitizedErrorJson}`);
|
|
187
|
+
context.errors.push(`[E9999] GLOBAL ERROR: ${err.toString()}, ${sanitizedErrorJson}`);
|
|
187
188
|
|
|
188
189
|
return callback(
|
|
189
190
|
null,
|
|
@@ -990,8 +990,8 @@ async function checkIOPackageJson(context) {
|
|
|
990
990
|
const untranslatedDetails = untranslatedLanguages
|
|
991
991
|
.map(language => `${language}(${untranslatedNewsByLanguage[language].sort().join(', ')})`)
|
|
992
992
|
.join('; ');
|
|
993
|
-
context.
|
|
994
|
-
`[
|
|
993
|
+
context.warnings.push(
|
|
994
|
+
`[W1144] Untranslated "common.news" entries detected (identical to English text): ${untranslatedDetails}.`,
|
|
995
995
|
);
|
|
996
996
|
}
|
|
997
997
|
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -387,6 +387,10 @@ function isExplicitlyTrue(value) {
|
|
|
387
387
|
return ['true', 'yes', 'on', 'y'].includes(value.trim().toLowerCase());
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
function jobConditionUsesAlways(job) {
|
|
391
|
+
return typeof job?.if === 'string' && /\balways\s*\(\s*\)/i.test(job.if);
|
|
392
|
+
}
|
|
393
|
+
|
|
390
394
|
function stepUsesActionPrefix(step, actionPrefix) {
|
|
391
395
|
return typeof step?.uses === 'string' && step.uses.toLowerCase().startsWith(actionPrefix.toLowerCase());
|
|
392
396
|
}
|
|
@@ -1213,6 +1217,20 @@ async function checkTests(context) {
|
|
|
1213
1217
|
'ioBroker/testing-action-deploy@',
|
|
1214
1218
|
];
|
|
1215
1219
|
for (const [jobName, job] of Object.entries(jobs)) {
|
|
1220
|
+
if (jobConditionUsesAlways(job)) {
|
|
1221
|
+
if (['check-and-lint', 'adapter-tests', 'deploy'].includes(jobName)) {
|
|
1222
|
+
context.errors.push(
|
|
1223
|
+
`[E3057] "${WORKFLOW_FILE_SHORT}": job "${jobName}" uses "always()" in its job condition. ` +
|
|
1224
|
+
'Standard jobs must not use "always()"; remove it.',
|
|
1225
|
+
);
|
|
1226
|
+
} else {
|
|
1227
|
+
context.warnings.push(
|
|
1228
|
+
`[S3058] "${WORKFLOW_FILE_SHORT}": job "${jobName}" uses "always()" in its job condition. ` +
|
|
1229
|
+
'Please verify whether "always()" is really needed.',
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1216
1234
|
if (!Array.isArray(job.steps)) {
|
|
1217
1235
|
continue;
|
|
1218
1236
|
}
|
|
@@ -1705,3 +1723,5 @@ exports.checkTests = checkTests;
|
|
|
1705
1723
|
// [S3054] "${WORKFLOW_FILE_SHORT}": log for "check-and-lint" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
|
|
1706
1724
|
// [S3055] "${WORKFLOW_FILE_SHORT}": log for "${adapterJob.name}" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
|
|
1707
1725
|
// [S3056] "${WORKFLOW_FILE_SHORT}": workflow ${formatRunLink(run)} for ${sourceLabel} is older than 90 days; log files are no longer available.
|
|
1726
|
+
// [E3057] "${WORKFLOW_FILE_SHORT}": job "${jobName}" uses "always()" in its job condition. Standard jobs must not use "always()".
|
|
1727
|
+
// [S3058] "${WORKFLOW_FILE_SHORT}": job "${jobName}" uses "always()" in its job condition. Please verify whether "always()" is really needed.
|
|
@@ -33,6 +33,145 @@ const SRC_DIRS_TO_IGNORE = [
|
|
|
33
33
|
'admin/src',
|
|
34
34
|
];
|
|
35
35
|
|
|
36
|
+
function normalizeRepoPath(filePath) {
|
|
37
|
+
const normalized = filePath.replace(/\\/g, '/').replace(/\/+$/, '');
|
|
38
|
+
if (!normalized) {
|
|
39
|
+
return '/';
|
|
40
|
+
}
|
|
41
|
+
return normalized.startsWith('/') ? normalized : `/${normalized}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getTrackedRepositoryEntries(filesList) {
|
|
45
|
+
const entries = new Map();
|
|
46
|
+
|
|
47
|
+
for (const file of filesList) {
|
|
48
|
+
const normalized = normalizeRepoPath(file);
|
|
49
|
+
if (normalized === '/') {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!entries.has(normalized)) {
|
|
54
|
+
entries.set(normalized, { path: normalized, isDirectory: false });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const parts = normalized.replace(/^\//, '').split('/');
|
|
58
|
+
for (let i = 1; i < parts.length; i++) {
|
|
59
|
+
const directoryPath = `/${parts.slice(0, i).join('/')}`;
|
|
60
|
+
entries.set(directoryPath, { path: directoryPath, isDirectory: true });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return [...entries.values()].sort((a, b) => {
|
|
65
|
+
const depthA = a.path.split('/').length;
|
|
66
|
+
const depthB = b.path.split('/').length;
|
|
67
|
+
if (depthA !== depthB) {
|
|
68
|
+
return depthA - depthB;
|
|
69
|
+
}
|
|
70
|
+
if (a.isDirectory !== b.isDirectory) {
|
|
71
|
+
return Number(b.isDirectory) - Number(a.isDirectory);
|
|
72
|
+
}
|
|
73
|
+
return a.path.localeCompare(b.path);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function parseIgnoreRules(ignoreFile) {
|
|
78
|
+
return ignoreFile
|
|
79
|
+
.split('\n')
|
|
80
|
+
.map(line => line.replace(/\r/g, '').trim())
|
|
81
|
+
.filter(line => line && !line.startsWith('#'))
|
|
82
|
+
.map(line => {
|
|
83
|
+
let pattern = line;
|
|
84
|
+
let negated = false;
|
|
85
|
+
|
|
86
|
+
if (pattern.startsWith('\\#') || pattern.startsWith('\\!')) {
|
|
87
|
+
pattern = pattern.slice(1);
|
|
88
|
+
} else if (pattern.startsWith('!')) {
|
|
89
|
+
negated = true;
|
|
90
|
+
pattern = pattern.slice(1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const directoryOnly = pattern.endsWith('/');
|
|
94
|
+
const anchored = pattern.startsWith('/');
|
|
95
|
+
pattern = pattern.replace(/^\/+/, '').replace(/\/+$/, '');
|
|
96
|
+
|
|
97
|
+
if (!pattern) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
anchored,
|
|
103
|
+
directoryOnly,
|
|
104
|
+
hasSlash: pattern.includes('/'),
|
|
105
|
+
negated,
|
|
106
|
+
pattern,
|
|
107
|
+
};
|
|
108
|
+
})
|
|
109
|
+
.filter(Boolean);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function getIgnoreCandidates(filePath, isDirectory) {
|
|
113
|
+
const normalized = normalizeRepoPath(filePath);
|
|
114
|
+
const path = normalized.replace(/^\//, '');
|
|
115
|
+
const candidates = [{ isDirectory, path }];
|
|
116
|
+
const parts = path.split('/');
|
|
117
|
+
|
|
118
|
+
for (let i = 1; i < parts.length; i++) {
|
|
119
|
+
candidates.push({ isDirectory: true, path: parts.slice(0, i).join('/') });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return candidates;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function matchesIgnoreRule(rule, candidate) {
|
|
126
|
+
if (rule.directoryOnly && !candidate.isDirectory) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (rule.anchored || rule.hasSlash) {
|
|
131
|
+
return minimatch(candidate.path, rule.pattern, { dot: true });
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return candidate.path.split('/').some(segment => minimatch(segment, rule.pattern, { dot: true }));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function isPathIgnoredByRules(filePath, isDirectory, rules) {
|
|
138
|
+
const normalized = normalizeRepoPath(filePath);
|
|
139
|
+
if (normalized === '/') {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const candidates = getIgnoreCandidates(normalized, isDirectory);
|
|
144
|
+
let ignored = false;
|
|
145
|
+
|
|
146
|
+
for (const rule of rules) {
|
|
147
|
+
if (candidates.some(candidate => matchesIgnoreRule(rule, candidate))) {
|
|
148
|
+
ignored = !rule.negated;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return ignored;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function findIgnoredTrackedEntries(trackedEntries, rules) {
|
|
156
|
+
const ignoredEntries = [];
|
|
157
|
+
const ignoredDirectories = [];
|
|
158
|
+
|
|
159
|
+
for (const entry of trackedEntries) {
|
|
160
|
+
if (ignoredDirectories.some(directory => entry.path.startsWith(`${directory}/`))) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (isPathIgnoredByRules(entry.path, entry.isDirectory, rules)) {
|
|
165
|
+
ignoredEntries.push(entry);
|
|
166
|
+
if (entry.isDirectory) {
|
|
167
|
+
ignoredDirectories.push(entry.path);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return ignoredEntries;
|
|
173
|
+
}
|
|
174
|
+
|
|
36
175
|
/**
|
|
37
176
|
* Returns a deduplicated list of i18n directory paths found in the given file list.
|
|
38
177
|
* Example: '/admin/i18n/en/translations.json' → '/admin/i18n'
|
|
@@ -158,22 +297,9 @@ async function checkGitIgnore(context) {
|
|
|
158
297
|
if (!context.filesList.includes('/.gitignore')) {
|
|
159
298
|
context.errors.push(`[E9001] .gitignore not found`);
|
|
160
299
|
} else {
|
|
161
|
-
const rules = (context['/.gitignore'] || '')
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
.filter(line => line);
|
|
165
|
-
let tooComplexToCheck = false;
|
|
166
|
-
rules.forEach((name, i) => {
|
|
167
|
-
if (name.includes('*')) {
|
|
168
|
-
try {
|
|
169
|
-
rules[i] = new RegExp(
|
|
170
|
-
name.replace('.', '\\.').replace('/', '\\/').replace('**', '.*').replace('*', '[^\\/]*'),
|
|
171
|
-
);
|
|
172
|
-
} catch {
|
|
173
|
-
tooComplexToCheck = true;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
});
|
|
300
|
+
const rules = parseIgnoreRules(context['/.gitignore'] || '');
|
|
301
|
+
const trackedEntries = getTrackedRepositoryEntries(context.filesList);
|
|
302
|
+
const trackedEntriesByPath = new Map(trackedEntries.map(entry => [entry.path, entry]));
|
|
177
303
|
|
|
178
304
|
/* TODO: something is wrong with undefined 'check' variable
|
|
179
305
|
if (!rules.includes('node_modules') && !rules.includes('/node_modules') && !rules.includes('/node_modules/*') && !rules.includes('node_modules/*')) {
|
|
@@ -184,22 +310,12 @@ async function checkGitIgnore(context) {
|
|
|
184
310
|
}
|
|
185
311
|
*/
|
|
186
312
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return rule === file || rule === file.replace(/\/$/, '');
|
|
194
|
-
}
|
|
195
|
-
return rule.test(file);
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
!check &&
|
|
199
|
-
context.errors.push(`[E9004] file ${file} found in repository, but not found in .gitignore`);
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
313
|
+
checkFiles.forEach(file => {
|
|
314
|
+
const trackedEntry = trackedEntriesByPath.get(`/${file}`);
|
|
315
|
+
if (trackedEntry && !isPathIgnoredByRules(trackedEntry.path, trackedEntry.isDirectory, rules)) {
|
|
316
|
+
context.errors.push(`[E9004] file ${file} found in repository, but not found in .gitignore`);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
203
319
|
|
|
204
320
|
// Check for .commitinfo file presence
|
|
205
321
|
if (context.filesList.includes('/.commitinfo')) {
|
|
@@ -207,20 +323,24 @@ async function checkGitIgnore(context) {
|
|
|
207
323
|
}
|
|
208
324
|
|
|
209
325
|
// Check if .commitinfo is excluded by .gitignore (independent of file presence)
|
|
210
|
-
if (!
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
});
|
|
326
|
+
if (!isPathIgnoredByRules('/.commitinfo', false, rules)) {
|
|
327
|
+
// convert to warning mid of 2026
|
|
328
|
+
context.warnings.push(
|
|
329
|
+
'[S9006] .commitinfo file should be excluded by .gitignore, please add a line with text ".commitinfo" to .gitignore',
|
|
330
|
+
);
|
|
331
|
+
}
|
|
217
332
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
context.
|
|
221
|
-
'[
|
|
333
|
+
for (const entry of findIgnoredTrackedEntries(trackedEntries, rules)) {
|
|
334
|
+
if (entry.path === '/build' && entry.isDirectory) {
|
|
335
|
+
context.errors.push(
|
|
336
|
+
'[E9007] build directory is tracked but excluded by .gitignore. Either remove the tracked /build directory from git (if generated) or remove the ignore rule (if intentionally tracked).',
|
|
222
337
|
);
|
|
338
|
+
continue;
|
|
223
339
|
}
|
|
340
|
+
|
|
341
|
+
context.warnings.push(
|
|
342
|
+
`[W9008] ${entry.isDirectory ? 'directory' : 'file'} ${entry.path.replace(/^\//, '')} is tracked but covered by .gitignore. Remove from git if generated, or remove the ignore rule if intentionally tracked.`,
|
|
343
|
+
);
|
|
224
344
|
}
|
|
225
345
|
}
|
|
226
346
|
|
|
@@ -394,6 +514,8 @@ exports.checkNpmIgnore = checkNpmIgnore;
|
|
|
394
514
|
// [9004] file ${file} found in repository, but not found in .gitignore
|
|
395
515
|
// [9005] .commitinfo file found in repository, please remove it
|
|
396
516
|
// [9006] .commitinfo file should be excluded by .gitignore, consider adding it to .gitignore
|
|
517
|
+
// [9007] build directory found in repository, but excluded by .gitignore
|
|
518
|
+
// [9008] tracked file or directory is ignored by .gitignore
|
|
397
519
|
|
|
398
520
|
// [9010] file ${file} found in repository, but not found in .npmignore.
|
|
399
521
|
|
package/lib/common.js
CHANGED
|
@@ -9,6 +9,7 @@ const compareVersions = require('compare-versions');
|
|
|
9
9
|
const semver = require('semver');
|
|
10
10
|
const semverValid = require('semver/functions/valid');
|
|
11
11
|
const githubToken = process.env.OWN_GITHUB_TOKEN;
|
|
12
|
+
const redactedValue = '***REDACTED***';
|
|
12
13
|
|
|
13
14
|
let gDebug = false;
|
|
14
15
|
let gInfo = true;
|
|
@@ -65,6 +66,11 @@ if (githubToken) {
|
|
|
65
66
|
}, error => Promise.reject(error));
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
axios.interceptors.response.use(
|
|
70
|
+
response => response,
|
|
71
|
+
error => Promise.reject(redactAxiosError(error)),
|
|
72
|
+
);
|
|
73
|
+
|
|
68
74
|
// function log(msg) {
|
|
69
75
|
// console.log(`${msg}`);
|
|
70
76
|
// }
|
|
@@ -85,6 +91,80 @@ function error(msg) {
|
|
|
85
91
|
console.error(`${msg ? '[ERROR] ' : ''}${msg}`);
|
|
86
92
|
}
|
|
87
93
|
|
|
94
|
+
function isSensitiveKey(key) {
|
|
95
|
+
if (typeof key !== 'string') {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
const normalizedKey = key.toLowerCase();
|
|
99
|
+
return (
|
|
100
|
+
normalizedKey.includes('authorization') ||
|
|
101
|
+
normalizedKey.includes('token') ||
|
|
102
|
+
normalizedKey.includes('api-key') ||
|
|
103
|
+
normalizedKey.includes('apikey') ||
|
|
104
|
+
normalizedKey.includes('secret') ||
|
|
105
|
+
normalizedKey.includes('password') ||
|
|
106
|
+
normalizedKey.includes('cookie')
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function redactString(value) {
|
|
111
|
+
let result = value;
|
|
112
|
+
if (githubToken && result.includes(githubToken)) {
|
|
113
|
+
result = result.replaceAll(githubToken, redactedValue);
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function redactSensitiveData(value, seen = new WeakSet()) {
|
|
119
|
+
if (!value || typeof value !== 'object') {
|
|
120
|
+
return typeof value === 'string' ? redactString(value) : value;
|
|
121
|
+
}
|
|
122
|
+
if (seen.has(value)) {
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
seen.add(value);
|
|
126
|
+
|
|
127
|
+
for (const key of Object.keys(value)) {
|
|
128
|
+
const entry = value[key];
|
|
129
|
+
if (isSensitiveKey(key)) {
|
|
130
|
+
value[key] = redactedValue;
|
|
131
|
+
} else if (typeof entry === 'string') {
|
|
132
|
+
value[key] = redactString(entry);
|
|
133
|
+
} else if (entry && typeof entry === 'object') {
|
|
134
|
+
redactSensitiveData(entry, seen);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function redactAxiosError(error) {
|
|
141
|
+
if (!error || typeof error !== 'object') {
|
|
142
|
+
return error;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
redactSensitiveData(error);
|
|
146
|
+
return error;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function stringifyError(error) {
|
|
150
|
+
const sanitizedError = redactAxiosError(error);
|
|
151
|
+
try {
|
|
152
|
+
return JSON.stringify(sanitizedError);
|
|
153
|
+
} catch (serializationError) {
|
|
154
|
+
return JSON.stringify({
|
|
155
|
+
message: sanitizedError?.message,
|
|
156
|
+
code: sanitizedError?.code,
|
|
157
|
+
status: sanitizedError?.status,
|
|
158
|
+
config: sanitizedError?.config,
|
|
159
|
+
response: sanitizedError?.response && {
|
|
160
|
+
status: sanitizedError.response.status,
|
|
161
|
+
statusText: sanitizedError.response.statusText,
|
|
162
|
+
},
|
|
163
|
+
stringifyError: redactString(serializationError?.message || `${serializationError}`),
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
88
168
|
function isDebug() {
|
|
89
169
|
return gDebug;
|
|
90
170
|
}
|
|
@@ -343,6 +423,8 @@ exports.debug = debug;
|
|
|
343
423
|
exports.info = info;
|
|
344
424
|
exports.error = error;
|
|
345
425
|
exports.warn = warn;
|
|
426
|
+
exports.redactAxiosError = redactAxiosError;
|
|
427
|
+
exports.stringifyError = stringifyError;
|
|
346
428
|
|
|
347
429
|
exports.isDebug = isDebug;
|
|
348
430
|
exports.isInfo = isInfo;
|
package/lib/postprocessing.js
CHANGED
|
@@ -62,6 +62,7 @@ const mapSeverity4New = {
|
|
|
62
62
|
W1056: 'E', // [W1056] admin 7.6.17 listed as dependency but 7.6.20 is reW1commended.
|
|
63
63
|
W0078: 'E', // [W0078] Remove obsolete devDependencies @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint when using "@iobroker/eslint-config".
|
|
64
64
|
W1084: 'E', // [W1084] "common.title" is deprecated and replaced by "common.titleLang".
|
|
65
|
+
W1144: 'E', // [W1144] Untranslated "common.news" entries detected (identical to English text): nl(3.4.11, 3.4.8).
|
|
65
66
|
W2007: 'E', // [W2007] Version 0.7.0-beta.2 is tagged as "latest" at npm
|
|
66
67
|
W3009: 'E', // [W3009] Workflow "test-and-release.yml" is missing recommended concurrency configuration.
|
|
67
68
|
S3014: 'E', // [S3014] Workflow "test-and-release.yml": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.
|
package/package.json
CHANGED