@macrulez/devtoolz 0.4.1 → 0.4.3
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/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/image-batch/cli.js +16 -0
- package/dist/commands/image-batch/cli.js.map +1 -1
- package/dist/commands/image-batch/config.d.ts +1 -0
- package/dist/commands/image-batch/config.js +11 -0
- package/dist/commands/image-batch/config.js.map +1 -1
- package/dist/commands/image-batch/run.d.ts +5 -1
- package/dist/commands/image-batch/run.js +7 -0
- package/dist/commands/image-batch/run.js.map +1 -1
- package/dist/commands/image-hash/sharp-loader.d.ts +3 -0
- package/dist/commands/image-hash/sharp-loader.js.map +1 -1
- package/dist/commands/ui/cli.d.ts +2 -0
- package/dist/commands/ui/cli.js +78 -0
- package/dist/commands/ui/cli.js.map +1 -0
- package/dist/commands/ui/fs-routes.d.ts +7 -0
- package/dist/commands/ui/fs-routes.js +135 -0
- package/dist/commands/ui/fs-routes.js.map +1 -0
- package/dist/commands/ui/http.d.ts +41 -0
- package/dist/commands/ui/http.js +81 -0
- package/dist/commands/ui/http.js.map +1 -0
- package/dist/commands/ui/jobs.d.ts +15 -0
- package/dist/commands/ui/jobs.js +73 -0
- package/dist/commands/ui/jobs.js.map +1 -0
- package/dist/commands/ui/modules/checks.d.ts +28 -0
- package/dist/commands/ui/modules/checks.js +556 -0
- package/dist/commands/ui/modules/checks.js.map +1 -0
- package/dist/commands/ui/modules/cleanup.d.ts +2 -0
- package/dist/commands/ui/modules/cleanup.js +305 -0
- package/dist/commands/ui/modules/cleanup.js.map +1 -0
- package/dist/commands/ui/modules/image-batch-backups.d.ts +2 -0
- package/dist/commands/ui/modules/image-batch-backups.js +116 -0
- package/dist/commands/ui/modules/image-batch-backups.js.map +1 -0
- package/dist/commands/ui/modules/image-batch-manage.d.ts +2 -0
- package/dist/commands/ui/modules/image-batch-manage.js +245 -0
- package/dist/commands/ui/modules/image-batch-manage.js.map +1 -0
- package/dist/commands/ui/modules/image-batch.d.ts +2 -0
- package/dist/commands/ui/modules/image-batch.js +225 -0
- package/dist/commands/ui/modules/image-batch.js.map +1 -0
- package/dist/commands/ui/modules/image-hash.d.ts +2 -0
- package/dist/commands/ui/modules/image-hash.js +158 -0
- package/dist/commands/ui/modules/image-hash.js.map +1 -0
- package/dist/commands/ui/modules/index.d.ts +2 -0
- package/dist/commands/ui/modules/index.js +11 -0
- package/dist/commands/ui/modules/index.js.map +1 -0
- package/dist/commands/ui/open-browser.d.ts +1 -0
- package/dist/commands/ui/open-browser.js +18 -0
- package/dist/commands/ui/open-browser.js.map +1 -0
- package/dist/commands/ui/scan.d.ts +20 -0
- package/dist/commands/ui/scan.js +57 -0
- package/dist/commands/ui/scan.js.map +1 -0
- package/dist/commands/ui/server.d.ts +18 -0
- package/dist/commands/ui/server.js +196 -0
- package/dist/commands/ui/server.js.map +1 -0
- package/dist/ui/assets/ChecksPage-Ia4QJkV3.js +1 -0
- package/dist/ui/assets/ChecksPage-VewKhd5A.css +1 -0
- package/dist/ui/assets/CleanupPage-DqqrgWSI.js +4 -0
- package/dist/ui/assets/CleanupPage-nxJE8S0P.css +1 -0
- package/dist/ui/assets/FolderBrowser-Cdzt7edI.js +1 -0
- package/dist/ui/assets/FolderBrowser-CkH9R4jg.css +1 -0
- package/dist/ui/assets/ImageBatchPage-9HgS9uVf.js +4 -0
- package/dist/ui/assets/ImageBatchPage-EhlvnXbP.css +1 -0
- package/dist/ui/assets/ImageHashPage-BT4S8t3Y.css +1 -0
- package/dist/ui/assets/ImageHashPage-C0ltmpOF.js +1 -0
- package/dist/ui/assets/SourcePicker-6fQmtLgo.css +1 -0
- package/dist/ui/assets/SourcePicker-xk00AG2e.js +1 -0
- package/dist/ui/assets/UiSegmented-BT3dOelo.css +1 -0
- package/dist/ui/assets/UiSegmented-CsTRUZoX.js +1 -0
- package/dist/ui/assets/core-DVezgdzc.js +12 -0
- package/dist/ui/assets/css-Z72CF80r.js +1 -0
- package/dist/ui/assets/engine-javascript-CNmxVhbB.js +141 -0
- package/dist/ui/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/ui/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/ui/assets/highlight-DT7vvdYt.js +2 -0
- package/dist/ui/assets/html-BlS82ilI.js +1 -0
- package/dist/ui/assets/index-Ch5kTxCO.css +1 -0
- package/dist/ui/assets/index-D8H-zVzo.js +11 -0
- package/dist/ui/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/ui/assets/json-Cp-IABpG.js +1 -0
- package/dist/ui/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/ui/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/ui/assets/scss-Cw6XMfVs.js +1 -0
- package/dist/ui/assets/tsx-COt5Ahok.js +1 -0
- package/dist/ui/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/ui/assets/useCopy-i_vlQfC-.js +1 -0
- package/dist/ui/assets/vue-CwSeJimo.js +1 -0
- package/dist/ui/assets/yaml-Buea-lGh.js +1 -0
- package/dist/ui/index.html +17 -0
- package/package.json +17 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type UiModule } from '../http.js';
|
|
2
|
+
export type Severity = 'error' | 'warning' | 'info';
|
|
3
|
+
export interface CheckFinding {
|
|
4
|
+
file?: string;
|
|
5
|
+
line?: number;
|
|
6
|
+
column?: number;
|
|
7
|
+
severity: Severity;
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
files?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface CheckOutcome {
|
|
14
|
+
summary: string;
|
|
15
|
+
filesScanned?: number;
|
|
16
|
+
findings: CheckFinding[];
|
|
17
|
+
error?: string;
|
|
18
|
+
exitCode: number;
|
|
19
|
+
notes?: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface OptionDef {
|
|
22
|
+
key: string;
|
|
23
|
+
label: string;
|
|
24
|
+
type: 'boolean' | 'list';
|
|
25
|
+
default: boolean | string;
|
|
26
|
+
help: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const checksModule: UiModule;
|
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import { existsSync, readFileSync, realpathSync, statSync } from 'node:fs';
|
|
2
|
+
import { extname, isAbsolute, relative, resolve, sep } from 'node:path';
|
|
3
|
+
import { runCaseCheck } from '../../case-check/run.js';
|
|
4
|
+
import { runCircularImports } from '../../circular-imports/run.js';
|
|
5
|
+
import { runDeadExports } from '../../dead-exports/run.js';
|
|
6
|
+
import { runEmptyCatch } from '../../empty-catch/run.js';
|
|
7
|
+
import { runExportsDoctor } from '../../exports-doctor/run.js';
|
|
8
|
+
import { runOrphanTests } from '../../orphan-tests/run.js';
|
|
9
|
+
import { runReadmeCheck } from '../../readme-check/run.js';
|
|
10
|
+
import { runScriptsCheck } from '../../scripts-check/run.js';
|
|
11
|
+
import { runStaleTsIgnore } from '../../stale-ts-ignore/run.js';
|
|
12
|
+
import { runTodoReport } from '../../todo-report/run.js';
|
|
13
|
+
import { runUnusedDeps } from '../../unused-deps/run.js';
|
|
14
|
+
import { resolveUserPath } from '../fs-routes.js';
|
|
15
|
+
import { HttpError, asObject, sendJson, } from '../http.js';
|
|
16
|
+
import { startJob } from '../jobs.js';
|
|
17
|
+
const COMMON_OPTIONS = [
|
|
18
|
+
{
|
|
19
|
+
key: 'ignore',
|
|
20
|
+
label: 'Ignore',
|
|
21
|
+
type: 'list',
|
|
22
|
+
default: '',
|
|
23
|
+
help: 'Extra patterns to skip, one per line (gitignore syntax).',
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
function relativeTo(cwd, file) {
|
|
27
|
+
const abs = isAbsolute(file) ? file : resolve(cwd, file);
|
|
28
|
+
const rel = relative(cwd, abs);
|
|
29
|
+
return (rel === '' || rel.startsWith('..') ? abs : rel).split(sep).join('/');
|
|
30
|
+
}
|
|
31
|
+
function plural(count, word, many = `${word}s`) {
|
|
32
|
+
return `${count} ${count === 1 ? word : many}`;
|
|
33
|
+
}
|
|
34
|
+
const CHECKS = [
|
|
35
|
+
{
|
|
36
|
+
id: 'dead-exports',
|
|
37
|
+
title: 'Dead exports',
|
|
38
|
+
description: 'Exports nothing imports: code you can delete or stop exporting.',
|
|
39
|
+
group: 'code',
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
key: 'strict',
|
|
43
|
+
label: 'Include public entry points',
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
default: false,
|
|
46
|
+
help: 'Also flag exports of the package’s public API, not just internal files.',
|
|
47
|
+
},
|
|
48
|
+
...COMMON_OPTIONS,
|
|
49
|
+
],
|
|
50
|
+
run: ({ cwd, flag, list }) => {
|
|
51
|
+
const report = runDeadExports({
|
|
52
|
+
paths: ['.'],
|
|
53
|
+
cwd,
|
|
54
|
+
strict: flag('strict'),
|
|
55
|
+
ignoreGlobs: list('ignore'),
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
summary: `${plural(report.findings.length, 'unused export')} in ${plural(report.filesScanned, 'file')}`,
|
|
59
|
+
filesScanned: report.filesScanned,
|
|
60
|
+
exitCode: report.exitCode,
|
|
61
|
+
findings: report.findings.map((finding) => ({
|
|
62
|
+
file: relativeTo(cwd, finding.file),
|
|
63
|
+
line: finding.line,
|
|
64
|
+
severity: 'warning',
|
|
65
|
+
code: finding.isDefault ? 'default export' : finding.isType ? 'type export' : 'export',
|
|
66
|
+
message: `${finding.isDefault ? 'The default export' : `\`${finding.name}\``} is never imported.`,
|
|
67
|
+
hint: finding.isType
|
|
68
|
+
? 'A type nobody uses: delete it or stop exporting it.'
|
|
69
|
+
: 'Delete it, or remove the export keyword if it is used inside the file.',
|
|
70
|
+
})),
|
|
71
|
+
...(report.hasUnresolvableDynamicImports
|
|
72
|
+
? {
|
|
73
|
+
notes: [
|
|
74
|
+
'Some dynamic imports could not be resolved, so a few findings may be false positives.',
|
|
75
|
+
],
|
|
76
|
+
}
|
|
77
|
+
: {}),
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 'unused-deps',
|
|
83
|
+
title: 'Unused dependencies',
|
|
84
|
+
description: 'Packages declared in package.json that nothing imports, and imports package.json never declared.',
|
|
85
|
+
group: 'dependencies',
|
|
86
|
+
options: [
|
|
87
|
+
{
|
|
88
|
+
key: 'strict',
|
|
89
|
+
label: 'Include implicit packages',
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
default: false,
|
|
92
|
+
help: 'Also check packages that are usually used without being imported (types, test coverage).',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: 'ignorePackages',
|
|
96
|
+
label: 'Ignore packages',
|
|
97
|
+
type: 'list',
|
|
98
|
+
default: '',
|
|
99
|
+
help: 'Package names to leave out, one per line.',
|
|
100
|
+
},
|
|
101
|
+
...COMMON_OPTIONS,
|
|
102
|
+
],
|
|
103
|
+
run: ({ cwd, flag, list }) => {
|
|
104
|
+
const report = runUnusedDeps({
|
|
105
|
+
dir: cwd,
|
|
106
|
+
strict: flag('strict'),
|
|
107
|
+
ignorePackages: list('ignorePackages'),
|
|
108
|
+
ignoreGlobs: list('ignore'),
|
|
109
|
+
});
|
|
110
|
+
return {
|
|
111
|
+
summary: report.error
|
|
112
|
+
? 'Could not read package.json'
|
|
113
|
+
: `${plural(report.findings.length, 'problem')} in ${plural(report.filesScanned, 'file')}`,
|
|
114
|
+
filesScanned: report.filesScanned,
|
|
115
|
+
exitCode: report.exitCode,
|
|
116
|
+
...(report.error ? { error: report.error } : {}),
|
|
117
|
+
findings: report.findings.map((finding) => ({
|
|
118
|
+
file: 'package.json',
|
|
119
|
+
severity: finding.kind === 'phantom' ? 'error' : 'warning',
|
|
120
|
+
code: finding.kind === 'phantom' ? 'undeclared' : 'unused',
|
|
121
|
+
message: finding.kind === 'phantom'
|
|
122
|
+
? `\`${finding.name}\` is imported but not listed in package.json.`
|
|
123
|
+
: `\`${finding.name}\` is listed${finding.section ? ` in ${finding.section}` : ''} but nothing imports it.`,
|
|
124
|
+
hint: finding.kind === 'phantom'
|
|
125
|
+
? `It only works now because it resolves from ${finding.resolvedFrom ?? 'another package'}. Add it to package.json.`
|
|
126
|
+
: 'Remove it from package.json if nothing else (a config file, a script) needs it.',
|
|
127
|
+
})),
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'empty-catch',
|
|
133
|
+
title: 'Empty catch blocks',
|
|
134
|
+
description: 'catch blocks that swallow errors silently or only log them.',
|
|
135
|
+
group: 'code',
|
|
136
|
+
options: COMMON_OPTIONS,
|
|
137
|
+
run: ({ cwd, list }) => {
|
|
138
|
+
const report = runEmptyCatch({ paths: ['.'], cwd, ignoreGlobs: list('ignore') });
|
|
139
|
+
return {
|
|
140
|
+
summary: `${plural(report.findings.length, 'catch block')} in ${plural(report.filesScanned, 'file')}`,
|
|
141
|
+
filesScanned: report.filesScanned,
|
|
142
|
+
exitCode: report.exitCode,
|
|
143
|
+
findings: report.findings.map((finding) => ({
|
|
144
|
+
file: relativeTo(cwd, finding.file),
|
|
145
|
+
line: finding.line,
|
|
146
|
+
column: finding.column,
|
|
147
|
+
severity: finding.kind === 'empty' ? 'error' : 'warning',
|
|
148
|
+
code: finding.kind,
|
|
149
|
+
message: finding.kind === 'empty'
|
|
150
|
+
? 'This catch block is empty: the error disappears without a trace.'
|
|
151
|
+
: 'This catch block only logs the error to the console.',
|
|
152
|
+
hint: 'Handle the error, rethrow it, or add a comment that says why ignoring it is safe.',
|
|
153
|
+
})),
|
|
154
|
+
};
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 'orphan-tests',
|
|
159
|
+
title: 'Orphan tests',
|
|
160
|
+
description: 'Test files whose source file no longer exists.',
|
|
161
|
+
group: 'code',
|
|
162
|
+
options: COMMON_OPTIONS,
|
|
163
|
+
run: ({ cwd, list }) => {
|
|
164
|
+
const report = runOrphanTests({ paths: ['.'], cwd, ignoreGlobs: list('ignore') });
|
|
165
|
+
return {
|
|
166
|
+
summary: `${plural(report.findings.length, 'orphan test')} among ${plural(report.filesScanned, 'file')}`,
|
|
167
|
+
filesScanned: report.filesScanned,
|
|
168
|
+
exitCode: report.exitCode,
|
|
169
|
+
...(report.error ? { error: report.error } : {}),
|
|
170
|
+
findings: report.findings.map((finding) => ({
|
|
171
|
+
file: relativeTo(cwd, finding.file),
|
|
172
|
+
severity: 'warning',
|
|
173
|
+
code: 'orphan',
|
|
174
|
+
message: 'No source file belongs to this test.',
|
|
175
|
+
hint: `Looked for a matching file with: ${finding.triedExtensions.join(', ')}. Delete the test or restore the source.`,
|
|
176
|
+
})),
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'case-check',
|
|
182
|
+
title: 'Import case',
|
|
183
|
+
description: 'Imports whose letter case differs from the file on disk: they work on Windows and macOS and break on Linux.',
|
|
184
|
+
group: 'code',
|
|
185
|
+
options: COMMON_OPTIONS,
|
|
186
|
+
run: ({ cwd, list }) => {
|
|
187
|
+
const report = runCaseCheck({ paths: ['.'], cwd, ignoreGlobs: list('ignore') });
|
|
188
|
+
return {
|
|
189
|
+
summary: `${plural(report.findings.length, 'import')} with the wrong case in ${plural(report.filesScanned, 'file')}`,
|
|
190
|
+
filesScanned: report.filesScanned,
|
|
191
|
+
exitCode: report.exitCode,
|
|
192
|
+
findings: report.findings.map((finding) => ({
|
|
193
|
+
file: relativeTo(cwd, finding.file),
|
|
194
|
+
line: finding.line,
|
|
195
|
+
column: finding.column,
|
|
196
|
+
severity: 'error',
|
|
197
|
+
code: finding.isAlias ? 'alias' : 'case',
|
|
198
|
+
message: `"${finding.specifier}" should be "${finding.correctedSpecifier}".`,
|
|
199
|
+
hint: 'Rename the import to match the file name exactly, or Linux CI will fail to find it.',
|
|
200
|
+
})),
|
|
201
|
+
};
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'circular-imports',
|
|
206
|
+
title: 'Circular imports',
|
|
207
|
+
description: 'Files that import each other in a loop.',
|
|
208
|
+
group: 'code',
|
|
209
|
+
options: [
|
|
210
|
+
{
|
|
211
|
+
key: 'includeTypes',
|
|
212
|
+
label: 'Include type-only cycles',
|
|
213
|
+
type: 'boolean',
|
|
214
|
+
default: false,
|
|
215
|
+
help: 'Cycles made only of "import type" are harmless at runtime.',
|
|
216
|
+
},
|
|
217
|
+
...COMMON_OPTIONS,
|
|
218
|
+
],
|
|
219
|
+
run: ({ cwd, flag, list }) => {
|
|
220
|
+
const report = runCircularImports({
|
|
221
|
+
paths: ['.'],
|
|
222
|
+
cwd,
|
|
223
|
+
includeTypes: flag('includeTypes'),
|
|
224
|
+
ignoreGlobs: list('ignore'),
|
|
225
|
+
});
|
|
226
|
+
return {
|
|
227
|
+
summary: `${plural(report.findings.length, 'cycle')} in ${plural(report.filesScanned, 'file')}`,
|
|
228
|
+
filesScanned: report.filesScanned,
|
|
229
|
+
exitCode: report.exitCode,
|
|
230
|
+
findings: report.findings.map((finding) => {
|
|
231
|
+
const files = finding.files.map((file) => relativeTo(cwd, file));
|
|
232
|
+
return {
|
|
233
|
+
file: files[0],
|
|
234
|
+
severity: finding.typeOnly ? 'info' : 'error',
|
|
235
|
+
code: finding.typeOnly ? 'type-only' : 'cycle',
|
|
236
|
+
message: [...files, files[0]].join(' → '),
|
|
237
|
+
hint: finding.typeOnly
|
|
238
|
+
? 'Only types are involved, so this is harmless at runtime.'
|
|
239
|
+
: 'Move the shared code into a third file that both can import.',
|
|
240
|
+
files,
|
|
241
|
+
};
|
|
242
|
+
}),
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'todo-report',
|
|
248
|
+
title: 'TODO comments',
|
|
249
|
+
description: 'TODO, FIXME and HACK notes left in comments.',
|
|
250
|
+
group: 'code',
|
|
251
|
+
options: [
|
|
252
|
+
{
|
|
253
|
+
key: 'tags',
|
|
254
|
+
label: 'Tags',
|
|
255
|
+
type: 'list',
|
|
256
|
+
default: 'TODO\nFIXME\nHACK',
|
|
257
|
+
help: 'The words to look for, one per line.',
|
|
258
|
+
},
|
|
259
|
+
...COMMON_OPTIONS,
|
|
260
|
+
],
|
|
261
|
+
run: ({ cwd, list }) => {
|
|
262
|
+
const tags = list('tags');
|
|
263
|
+
const report = runTodoReport({
|
|
264
|
+
paths: ['.'],
|
|
265
|
+
cwd,
|
|
266
|
+
...(tags.length ? { tags } : {}),
|
|
267
|
+
ignoreGlobs: list('ignore'),
|
|
268
|
+
});
|
|
269
|
+
return {
|
|
270
|
+
summary: `${plural(report.findings.length, 'note')} in ${plural(report.filesScanned, 'file')}`,
|
|
271
|
+
filesScanned: report.filesScanned,
|
|
272
|
+
exitCode: 0,
|
|
273
|
+
findings: report.findings.map((finding) => ({
|
|
274
|
+
file: relativeTo(cwd, finding.file),
|
|
275
|
+
line: finding.line,
|
|
276
|
+
column: finding.column,
|
|
277
|
+
severity: finding.tag === 'FIXME' ? 'warning' : 'info',
|
|
278
|
+
code: finding.tag,
|
|
279
|
+
message: finding.text.trim() || finding.tag,
|
|
280
|
+
})),
|
|
281
|
+
};
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
id: 'stale-ts-ignore',
|
|
286
|
+
title: 'Stale @ts-ignore',
|
|
287
|
+
description: '@ts-ignore comments that no longer hide an error. This one type-checks the project, so it takes a while.',
|
|
288
|
+
group: 'code',
|
|
289
|
+
slow: true,
|
|
290
|
+
options: COMMON_OPTIONS,
|
|
291
|
+
run: ({ cwd, list }) => {
|
|
292
|
+
const report = runStaleTsIgnore({ dir: cwd, ignoreGlobs: list('ignore') });
|
|
293
|
+
return {
|
|
294
|
+
summary: report.error
|
|
295
|
+
? 'Could not type-check the project'
|
|
296
|
+
: `${plural(report.findings.length, 'stale directive')} among ${plural(report.directivesChecked, 'directive')}`,
|
|
297
|
+
exitCode: report.exitCode,
|
|
298
|
+
...(report.error ? { error: report.error } : {}),
|
|
299
|
+
findings: report.findings.map((finding) => ({
|
|
300
|
+
file: relativeTo(cwd, finding.file),
|
|
301
|
+
line: finding.line,
|
|
302
|
+
severity: 'warning',
|
|
303
|
+
code: 'stale',
|
|
304
|
+
message: 'This @ts-ignore hides nothing: the error it was added for is gone.',
|
|
305
|
+
hint: 'Delete the comment.',
|
|
306
|
+
})),
|
|
307
|
+
};
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: 'exports-doctor',
|
|
312
|
+
title: 'package.json exports',
|
|
313
|
+
description: 'main, module, types, bin and exports entries that point to files that are missing or have the wrong case.',
|
|
314
|
+
group: 'dependencies',
|
|
315
|
+
options: [],
|
|
316
|
+
run: ({ cwd }) => {
|
|
317
|
+
const report = runExportsDoctor({ dir: cwd });
|
|
318
|
+
const messages = {
|
|
319
|
+
missing: 'points to a file that does not exist.',
|
|
320
|
+
'case-mismatch': 'differs in letter case from the file on disk.',
|
|
321
|
+
'missing-shebang': 'is a bin file without a #! line at the top.',
|
|
322
|
+
'types-missing': 'has no types declared for this entry.',
|
|
323
|
+
};
|
|
324
|
+
return {
|
|
325
|
+
summary: report.error
|
|
326
|
+
? 'Could not read package.json'
|
|
327
|
+
: `${plural(report.findings.length, 'problem')}${report.packageName ? ` in ${report.packageName}` : ''}`,
|
|
328
|
+
exitCode: report.exitCode,
|
|
329
|
+
...(report.error ? { error: report.error } : {}),
|
|
330
|
+
findings: report.findings.map((finding) => ({
|
|
331
|
+
file: 'package.json',
|
|
332
|
+
severity: finding.kind === 'types-missing' ? 'warning' : 'error',
|
|
333
|
+
code: finding.kind,
|
|
334
|
+
message: `\`${finding.location}\` (${finding.path}) ${messages[finding.kind] ?? 'has a problem.'}`,
|
|
335
|
+
...(finding.realPath ? { hint: `On disk it is spelled ${finding.realPath}.` } : {}),
|
|
336
|
+
})),
|
|
337
|
+
};
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: 'readme-check',
|
|
342
|
+
title: 'README code samples',
|
|
343
|
+
description: 'TypeScript code blocks in the README that no longer type-check.',
|
|
344
|
+
group: 'docs',
|
|
345
|
+
options: [
|
|
346
|
+
{
|
|
347
|
+
key: 'files',
|
|
348
|
+
label: 'Markdown files',
|
|
349
|
+
type: 'list',
|
|
350
|
+
default: 'README.md',
|
|
351
|
+
help: 'Files to check, one per line, relative to the project.',
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
run: ({ cwd, list }) => {
|
|
355
|
+
const files = list('files');
|
|
356
|
+
const report = runReadmeCheck({ dir: cwd, ...(files.length ? { files } : {}) });
|
|
357
|
+
const blocks = report.fileResults.reduce((sum, file) => sum + file.blocksChecked, 0);
|
|
358
|
+
return {
|
|
359
|
+
summary: report.error
|
|
360
|
+
? 'Could not check the README'
|
|
361
|
+
: `${plural(report.findings.length, 'problem')} in ${plural(blocks, 'code block')}`,
|
|
362
|
+
exitCode: report.exitCode,
|
|
363
|
+
...(report.error ? { error: report.error } : {}),
|
|
364
|
+
findings: report.findings.map((finding) => ({
|
|
365
|
+
file: relativeTo(cwd, finding.file),
|
|
366
|
+
line: finding.line,
|
|
367
|
+
column: finding.column,
|
|
368
|
+
severity: 'error',
|
|
369
|
+
code: finding.lang,
|
|
370
|
+
message: finding.message,
|
|
371
|
+
})),
|
|
372
|
+
};
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
id: 'scripts-check',
|
|
377
|
+
title: 'npm scripts in the docs',
|
|
378
|
+
description: 'Docs and CI mention scripts that do not exist, or scripts nobody documents.',
|
|
379
|
+
group: 'docs',
|
|
380
|
+
options: [
|
|
381
|
+
{
|
|
382
|
+
key: 'files',
|
|
383
|
+
label: 'Docs to read',
|
|
384
|
+
type: 'list',
|
|
385
|
+
default: 'README.md',
|
|
386
|
+
help: 'Files to check, one per line, relative to the project.',
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
run: ({ cwd, list }) => {
|
|
390
|
+
const files = list('files');
|
|
391
|
+
const report = runScriptsCheck({ dir: cwd, ...(files.length ? { files } : {}) });
|
|
392
|
+
return {
|
|
393
|
+
summary: report.error
|
|
394
|
+
? 'Could not read package.json'
|
|
395
|
+
: `${plural(report.findings.length, 'mismatch', 'mismatches')} across ${plural(report.sourcesScanned.length, 'file')}`,
|
|
396
|
+
exitCode: report.exitCode,
|
|
397
|
+
...(report.error ? { error: report.error } : {}),
|
|
398
|
+
findings: report.findings.map((finding) => ({
|
|
399
|
+
file: relativeTo(cwd, finding.file),
|
|
400
|
+
line: finding.line,
|
|
401
|
+
severity: finding.kind === 'missing' ? 'error' : 'info',
|
|
402
|
+
code: finding.kind,
|
|
403
|
+
message: finding.kind === 'missing'
|
|
404
|
+
? `The docs mention \`${finding.name}\`, but package.json has no such script.`
|
|
405
|
+
: `The script \`${finding.name}\` is not mentioned anywhere in the docs or CI.`,
|
|
406
|
+
})),
|
|
407
|
+
};
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
];
|
|
411
|
+
function inputFrom(cwd, options) {
|
|
412
|
+
return {
|
|
413
|
+
cwd,
|
|
414
|
+
flag: (key) => options[key] === true,
|
|
415
|
+
list: (key) => {
|
|
416
|
+
const value = options[key];
|
|
417
|
+
const text = typeof value === 'string' ? value : '';
|
|
418
|
+
return text
|
|
419
|
+
.split(/\r?\n|,/)
|
|
420
|
+
.map((part) => part.trim())
|
|
421
|
+
.filter(Boolean);
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
function projectOf(ctx, value) {
|
|
426
|
+
const dir = resolveUserPath(typeof value === 'string' ? value : null, ctx.server.cwd);
|
|
427
|
+
if (!statSync(dir, { throwIfNoEntry: false })?.isDirectory()) {
|
|
428
|
+
throw new HttpError(404, `${dir} is not a folder`);
|
|
429
|
+
}
|
|
430
|
+
return dir;
|
|
431
|
+
}
|
|
432
|
+
function findCheck(id) {
|
|
433
|
+
const found = CHECKS.find((check) => check.id === id);
|
|
434
|
+
if (!found)
|
|
435
|
+
throw new HttpError(404, `no check named "${id}"`);
|
|
436
|
+
return found;
|
|
437
|
+
}
|
|
438
|
+
async function startCheck(ctx) {
|
|
439
|
+
const check = findCheck(ctx.params.id);
|
|
440
|
+
const body = asObject(await ctx.readBody());
|
|
441
|
+
const cwd = projectOf(ctx, body.project);
|
|
442
|
+
const options = body.options === undefined ? {} : asObject(body.options, 'options');
|
|
443
|
+
const id = startJob(async () => {
|
|
444
|
+
const started = Date.now();
|
|
445
|
+
const outcome = check.run(inputFrom(cwd, options));
|
|
446
|
+
return { ...outcome, project: cwd, check: check.id, tookMs: Date.now() - started };
|
|
447
|
+
});
|
|
448
|
+
sendJson(ctx.res, 202, { jobId: id });
|
|
449
|
+
}
|
|
450
|
+
function defaultsOf(check) {
|
|
451
|
+
return Object.fromEntries(check.options.map((option) => [option.key, option.default]));
|
|
452
|
+
}
|
|
453
|
+
async function startAll(ctx) {
|
|
454
|
+
const body = asObject(await ctx.readBody());
|
|
455
|
+
const cwd = projectOf(ctx, body.project);
|
|
456
|
+
const includeSlow = body.includeSlow === true;
|
|
457
|
+
const chosen = CHECKS.filter((check) => includeSlow || !check.slow);
|
|
458
|
+
const skipped = CHECKS.filter((check) => !chosen.includes(check)).map((check) => check.id);
|
|
459
|
+
const id = startJob(async (progress) => {
|
|
460
|
+
const started = Date.now();
|
|
461
|
+
const outcomes = {};
|
|
462
|
+
for (const [index, check] of chosen.entries()) {
|
|
463
|
+
progress({ done: index, total: chosen.length, current: check.title });
|
|
464
|
+
await new Promise((resolveTick) => setImmediate(resolveTick));
|
|
465
|
+
const begun = Date.now();
|
|
466
|
+
let outcome;
|
|
467
|
+
try {
|
|
468
|
+
outcome = check.run(inputFrom(cwd, defaultsOf(check)));
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
outcome = {
|
|
472
|
+
summary: 'The check could not run',
|
|
473
|
+
findings: [],
|
|
474
|
+
error: error instanceof Error ? error.message : String(error),
|
|
475
|
+
exitCode: 1,
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
outcomes[check.id] = { ...outcome, project: cwd, check: check.id, tookMs: Date.now() - begun };
|
|
479
|
+
}
|
|
480
|
+
progress({ done: chosen.length, total: chosen.length, current: '' });
|
|
481
|
+
return { project: cwd, outcomes, skipped, tookMs: Date.now() - started };
|
|
482
|
+
});
|
|
483
|
+
sendJson(ctx.res, 202, { jobId: id });
|
|
484
|
+
}
|
|
485
|
+
const SOURCE_LANGS = {
|
|
486
|
+
'.ts': 'ts',
|
|
487
|
+
'.tsx': 'tsx',
|
|
488
|
+
'.mts': 'ts',
|
|
489
|
+
'.cts': 'ts',
|
|
490
|
+
'.js': 'js',
|
|
491
|
+
'.jsx': 'jsx',
|
|
492
|
+
'.mjs': 'js',
|
|
493
|
+
'.cjs': 'js',
|
|
494
|
+
'.vue': 'vue',
|
|
495
|
+
'.json': 'json',
|
|
496
|
+
'.css': 'css',
|
|
497
|
+
'.scss': 'scss',
|
|
498
|
+
'.html': 'html',
|
|
499
|
+
'.md': 'md',
|
|
500
|
+
'.yml': 'yaml',
|
|
501
|
+
'.yaml': 'yaml',
|
|
502
|
+
};
|
|
503
|
+
const MAX_SOURCE_BYTES = 1024 * 1024;
|
|
504
|
+
function readSource(ctx) {
|
|
505
|
+
const project = projectOf(ctx, ctx.url.searchParams.get('project'));
|
|
506
|
+
const raw = ctx.url.searchParams.get('path');
|
|
507
|
+
if (!raw)
|
|
508
|
+
throw new HttpError(400, 'give a file path');
|
|
509
|
+
const abs = resolve(project, raw);
|
|
510
|
+
const real = existsSync(abs) ? realpathSync(abs) : abs;
|
|
511
|
+
const root = realpathSync(project);
|
|
512
|
+
if (real !== root && !real.startsWith(root + sep)) {
|
|
513
|
+
throw new HttpError(403, 'the file is outside the project folder');
|
|
514
|
+
}
|
|
515
|
+
const lang = SOURCE_LANGS[extname(abs).toLowerCase()] ?? 'text';
|
|
516
|
+
const stat = statSync(abs, { throwIfNoEntry: false });
|
|
517
|
+
if (!stat?.isFile())
|
|
518
|
+
throw new HttpError(404, 'no such file');
|
|
519
|
+
if (stat.size > MAX_SOURCE_BYTES)
|
|
520
|
+
throw new HttpError(413, 'this file is too large to show');
|
|
521
|
+
const text = readFileSync(abs, 'utf8');
|
|
522
|
+
sendJson(ctx.res, 200, {
|
|
523
|
+
path: relative(project, abs).split(sep).join('/'),
|
|
524
|
+
abs,
|
|
525
|
+
lang,
|
|
526
|
+
lines: text.split(/\r\n|\r|\n/).length,
|
|
527
|
+
text,
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
const routes = [
|
|
531
|
+
{
|
|
532
|
+
method: 'GET',
|
|
533
|
+
path: '/api/checks',
|
|
534
|
+
handler: ({ res }) => {
|
|
535
|
+
sendJson(res, 200, CHECKS.map(({ id, title, description, group, options, slow }) => ({
|
|
536
|
+
id,
|
|
537
|
+
title,
|
|
538
|
+
description,
|
|
539
|
+
group,
|
|
540
|
+
options,
|
|
541
|
+
slow: slow === true,
|
|
542
|
+
})));
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
{ method: 'POST', path: '/api/checks/all/run', handler: startAll },
|
|
546
|
+
{ method: 'POST', path: '/api/checks/:id/run', handler: startCheck },
|
|
547
|
+
{ method: 'GET', path: '/api/source', handler: readSource },
|
|
548
|
+
];
|
|
549
|
+
export const checksModule = {
|
|
550
|
+
id: 'checks',
|
|
551
|
+
title: 'Code checks',
|
|
552
|
+
description: 'Find dead code, unused dependencies and other problems in a project.',
|
|
553
|
+
status: 'available',
|
|
554
|
+
routes,
|
|
555
|
+
};
|
|
556
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../../../src/commands/ui/modules/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAA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