@fettle/cli 4.0.0 → 4.1.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/dist/cli.d.ts +13 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +31 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pretty.d.ts +27 -0
- package/dist/pretty.d.ts.map +1 -0
- package/dist/pretty.js +105 -0
- package/dist/pretty.js.map +1 -0
- package/package.json +2 -2
package/dist/cli.d.ts
CHANGED
|
@@ -4,19 +4,25 @@
|
|
|
4
4
|
* Kept separate from `index.ts` (the bin shim) so the whole command is testable as
|
|
5
5
|
* a function: nothing here reads `process` directly or calls `process.exit`.
|
|
6
6
|
*/
|
|
7
|
+
import { type PrettyOptions } from './pretty.js';
|
|
7
8
|
import { type AssessOptions, type BadgePayload, type FloorGrade, type HealthReport } from '@fettle/core';
|
|
8
9
|
export declare const EXIT_OK = 0;
|
|
9
10
|
export declare const EXIT_BELOW_FLOOR = 1;
|
|
10
11
|
export declare const EXIT_USAGE = 2;
|
|
11
12
|
/** A repository or its configuration could not be read; nothing was graded. */
|
|
12
13
|
export declare const EXIT_SCAN_FAILED = 3;
|
|
13
|
-
declare const FORMATS: readonly ["json", "markdown", "badge"];
|
|
14
|
+
declare const FORMATS: readonly ["pretty", "json", "markdown", "badge"];
|
|
14
15
|
export type Format = (typeof FORMATS)[number];
|
|
15
16
|
export interface CliOptions {
|
|
16
17
|
repos: string[];
|
|
17
|
-
|
|
18
|
+
/** Absent when not given: the default depends on whether stdout is a terminal. */
|
|
19
|
+
format?: Format;
|
|
18
20
|
failBelow?: FloorGrade;
|
|
19
21
|
apiUrl?: string;
|
|
22
|
+
/** A bare hostname, as `gh` takes in `GH_HOST`. Lower precedence than `apiUrl`. */
|
|
23
|
+
host?: string;
|
|
24
|
+
/** Print diagnostics to stderr. */
|
|
25
|
+
debug: boolean;
|
|
20
26
|
/** A local config file; absent means each repository supplies its own. */
|
|
21
27
|
configPath?: string;
|
|
22
28
|
help: boolean;
|
|
@@ -34,7 +40,7 @@ export declare const USAGE: string;
|
|
|
34
40
|
export declare function parseCliOptions(argv: readonly string[], env?: Readonly<Record<string, string | undefined>>): CliOptions;
|
|
35
41
|
/** Badge payloads keyed by repository, so multi-repo output stays valid JSON. */
|
|
36
42
|
export declare function renderBadges(report: HealthReport): Record<string, BadgePayload>;
|
|
37
|
-
export declare function render(report: HealthReport, format: Format): string;
|
|
43
|
+
export declare function render(report: HealthReport, format: Format, pretty: PrettyOptions): string;
|
|
38
44
|
/**
|
|
39
45
|
* Performs the scan.
|
|
40
46
|
*
|
|
@@ -50,6 +56,10 @@ export interface RunOptions {
|
|
|
50
56
|
stderr: (chunk: string) => void;
|
|
51
57
|
scan?: Scanner;
|
|
52
58
|
now?: Date;
|
|
59
|
+
/** Whether stdout is a terminal. Decides the default format and colour. */
|
|
60
|
+
isTty?: boolean;
|
|
61
|
+
/** Terminal width, for keeping evidence on one line. */
|
|
62
|
+
columns?: number;
|
|
53
63
|
}
|
|
54
64
|
/** Runs the command and returns its exit code. Never throws for expected failures. */
|
|
55
65
|
export declare function run(options: RunOptions): Promise<number>;
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAWL,KAAK,aAAa,EAClB,KAAK,YAAY,EAEjB,KAAK,UAAU,EAEf,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"c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YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAI/E;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM,CAW1F;AAMD;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AAElG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACnD,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,2EAA2E;IAC3E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyBD,sFAAsF;AACtF,wBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAmF9D"}
|
package/dist/cli.js
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { readFile } from 'node:fs/promises';
|
|
8
8
|
import { parseArgs } from 'node:util';
|
|
9
|
+
import { prettyOptions, renderPretty } from './pretty.js';
|
|
9
10
|
import { assess, badgeFilename, buildBadgePayload, CONFIG_FILENAME, FLOOR_GRADES, meetsGradeFloor, parseConfig, renderMarkdown, TOOL_NAME, TOOL_VERSION, } from '@fettle/core';
|
|
10
11
|
export const EXIT_OK = 0;
|
|
11
12
|
export const EXIT_BELOW_FLOOR = 1;
|
|
12
13
|
export const EXIT_USAGE = 2;
|
|
13
14
|
/** A repository or its configuration could not be read; nothing was graded. */
|
|
14
15
|
export const EXIT_SCAN_FAILED = 3;
|
|
15
|
-
const FORMATS = ['json', 'markdown', 'badge'];
|
|
16
|
+
const FORMATS = ['pretty', 'json', 'markdown', 'badge'];
|
|
16
17
|
/** A problem with how the command was invoked. Reported to stderr, exit code 2. */
|
|
17
18
|
export class UsageError extends Error {
|
|
18
19
|
constructor(message) {
|
|
@@ -28,11 +29,16 @@ Usage:
|
|
|
28
29
|
Options:
|
|
29
30
|
--repos <list> Comma- or newline-separated repositories. Defaults to
|
|
30
31
|
$GITHUB_REPOSITORY when set.
|
|
31
|
-
--format <format> Output format: ${FORMATS.join(' | ')}
|
|
32
|
+
--format <format> Output format: ${FORMATS.join(' | ')}.
|
|
33
|
+
Defaults to pretty in a terminal, json when piped.
|
|
32
34
|
--fail-below <grade> Exit ${EXIT_BELOW_FLOOR} if any repository grades below this
|
|
33
35
|
floor: ${FLOOR_GRADES.join(' | ')}.
|
|
34
|
-
--api-url <url> GitHub API base URL
|
|
35
|
-
Defaults to $GITHUB_API_URL
|
|
36
|
+
--api-url <url> Full GitHub API base URL, e.g.
|
|
37
|
+
https://ghe.example.com/api/v3. Defaults to $GITHUB_API_URL.
|
|
38
|
+
--gh-host <host> Hostname instead of a full URL, e.g. ghe.example.com.
|
|
39
|
+
Defaults to $GH_HOST, the variable the gh CLI uses.
|
|
40
|
+
--debug Print the resolved host, every API request and its timing
|
|
41
|
+
to stderr. Never prints the token. Also $FETTLE_DEBUG=1.
|
|
36
42
|
--config <path> Local config file to apply to every repository, instead of
|
|
37
43
|
reading ${CONFIG_FILENAME} from each one.
|
|
38
44
|
--version Print the version and exit.
|
|
@@ -82,7 +88,9 @@ export function parseCliOptions(argv, env = {}) {
|
|
|
82
88
|
format: { type: 'string' },
|
|
83
89
|
'fail-below': { type: 'string' },
|
|
84
90
|
'api-url': { type: 'string' },
|
|
91
|
+
'gh-host': { type: 'string' },
|
|
85
92
|
config: { type: 'string' },
|
|
93
|
+
debug: { type: 'boolean', default: false },
|
|
86
94
|
version: { type: 'boolean', default: false },
|
|
87
95
|
help: { type: 'boolean', short: 'h', default: false },
|
|
88
96
|
},
|
|
@@ -104,11 +112,13 @@ export function parseCliOptions(argv, env = {}) {
|
|
|
104
112
|
}
|
|
105
113
|
return {
|
|
106
114
|
repos,
|
|
107
|
-
format: values.format === undefined ?
|
|
115
|
+
format: values.format === undefined ? undefined : oneOf(values.format, FORMATS, 'format'),
|
|
108
116
|
failBelow: values['fail-below'] === undefined
|
|
109
117
|
? undefined
|
|
110
118
|
: oneOf(values['fail-below'], FLOOR_GRADES, 'fail-below'),
|
|
111
119
|
apiUrl: values['api-url'] ?? env.GITHUB_API_URL,
|
|
120
|
+
host: values['gh-host'] ?? env.GH_HOST,
|
|
121
|
+
debug: values.debug === true || (env.FETTLE_DEBUG !== undefined && env.FETTLE_DEBUG !== '0'),
|
|
112
122
|
configPath: values.config,
|
|
113
123
|
help,
|
|
114
124
|
version,
|
|
@@ -118,8 +128,10 @@ export function parseCliOptions(argv, env = {}) {
|
|
|
118
128
|
export function renderBadges(report) {
|
|
119
129
|
return Object.fromEntries(report.repos.map((repo) => [badgeFilename(repo.repo), buildBadgePayload(repo)]));
|
|
120
130
|
}
|
|
121
|
-
export function render(report, format) {
|
|
131
|
+
export function render(report, format, pretty) {
|
|
122
132
|
switch (format) {
|
|
133
|
+
case 'pretty':
|
|
134
|
+
return renderPretty(report, pretty);
|
|
123
135
|
case 'json':
|
|
124
136
|
return JSON.stringify(report, null, 2);
|
|
125
137
|
case 'markdown':
|
|
@@ -172,6 +184,16 @@ export async function run(options) {
|
|
|
172
184
|
}
|
|
173
185
|
const env = options.env ?? {};
|
|
174
186
|
const warn = (text) => stderr(`${TOOL_NAME}: ${text}\n`);
|
|
187
|
+
// Pretty output is for a person reading it now; anything piped stays machine
|
|
188
|
+
// readable, so a script that never passed --format keeps working.
|
|
189
|
+
const isTty = options.isTty ?? false;
|
|
190
|
+
const format = cli.format ?? (isTty ? 'pretty' : 'json');
|
|
191
|
+
const pretty = prettyOptions(env, isTty, options.columns);
|
|
192
|
+
const debug = cli.debug
|
|
193
|
+
? (message) => stderr(`${TOOL_NAME}: debug: ${message}\n`)
|
|
194
|
+
: undefined;
|
|
195
|
+
debug?.(`format ${format}${cli.format === undefined ? ' (default)' : ''}, colour ${pretty.colour}`);
|
|
196
|
+
debug?.(`repositories: ${cli.repos.join(', ')}`);
|
|
175
197
|
let config;
|
|
176
198
|
try {
|
|
177
199
|
config = await readLocalConfig(cli.configPath, warn);
|
|
@@ -189,16 +211,18 @@ export async function run(options) {
|
|
|
189
211
|
report = await (options.scan ?? assess)(cli.repos, {
|
|
190
212
|
token: env.GITHUB_TOKEN,
|
|
191
213
|
apiUrl: cli.apiUrl,
|
|
214
|
+
host: cli.host,
|
|
192
215
|
config,
|
|
193
216
|
now: options.now,
|
|
194
217
|
onWarning: (repo, warning) => warn(`${repo}: ${warning}`),
|
|
218
|
+
onDebug: debug,
|
|
195
219
|
});
|
|
196
220
|
}
|
|
197
221
|
catch (error) {
|
|
198
222
|
warn(describe(error));
|
|
199
223
|
return EXIT_SCAN_FAILED;
|
|
200
224
|
}
|
|
201
|
-
stdout(`${render(report,
|
|
225
|
+
stdout(`${render(report, format, pretty)}\n`);
|
|
202
226
|
if (cli.failBelow === undefined)
|
|
203
227
|
return EXIT_OK;
|
|
204
228
|
const failures = belowFloor(report, cli.failBelow);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB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AAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3B,GAAG,EAAE,OAAO,CAAC,GAAG;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;IAC9C,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;IACpC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO;CAChC,CAAC,CAAC"}
|
package/dist/pretty.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The human-facing terminal renderer.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately CLI-only: markdown and the JSON report are contracts other things
|
|
5
|
+
* consume, while this exists to be read once by the person who just typed the
|
|
6
|
+
* command. It may change shape whenever that makes it clearer.
|
|
7
|
+
*
|
|
8
|
+
* Colour is written by hand rather than pulled in — a dozen escape codes do not
|
|
9
|
+
* justify a dependency in a tool that ships its own bundle.
|
|
10
|
+
*/
|
|
11
|
+
import type { HealthReport } from '@fettle/core';
|
|
12
|
+
export interface PrettyOptions {
|
|
13
|
+
/** Off when piped, when NO_COLOR is set, or when the terminal says it is dumb. */
|
|
14
|
+
colour: boolean;
|
|
15
|
+
/** Used to keep evidence on one line. */
|
|
16
|
+
width: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Decides whether to colour.
|
|
20
|
+
*
|
|
21
|
+
* Honours the NO_COLOR and FORCE_COLOR conventions, and otherwise colours only a
|
|
22
|
+
* real terminal — piping into a file should not fill it with escape codes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function prettyOptions(env: Readonly<Record<string, string | undefined>>, isTty: boolean, columns?: number): PrettyOptions;
|
|
25
|
+
/** Renders a report for a person reading it in a terminal. */
|
|
26
|
+
export declare function renderPretty(report: HealthReport, options: PrettyOptions): string;
|
|
27
|
+
//# sourceMappingURL=pretty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty.d.ts","sourceRoot":"","sources":["../src/pretty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAS,YAAY,EAA0B,MAAM,cAAc,CAAC;AAiBhF,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACjD,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,MAAM,GACf,aAAa,CAQf;AA6DD,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CA2BjF"}
|
package/dist/pretty.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The human-facing terminal renderer.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately CLI-only: markdown and the JSON report are contracts other things
|
|
5
|
+
* consume, while this exists to be read once by the person who just typed the
|
|
6
|
+
* command. It may change shape whenever that makes it clearer.
|
|
7
|
+
*
|
|
8
|
+
* Colour is written by hand rather than pulled in — a dozen escape codes do not
|
|
9
|
+
* justify a dependency in a tool that ships its own bundle.
|
|
10
|
+
*/
|
|
11
|
+
const CSI = '\u001b[';
|
|
12
|
+
const ANSI = {
|
|
13
|
+
reset: `${CSI}0m`,
|
|
14
|
+
bold: `${CSI}1m`,
|
|
15
|
+
dim: `${CSI}2m`,
|
|
16
|
+
red: `${CSI}31m`,
|
|
17
|
+
green: `${CSI}32m`,
|
|
18
|
+
yellow: `${CSI}33m`,
|
|
19
|
+
blue: `${CSI}34m`,
|
|
20
|
+
grey: `${CSI}90m`,
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Decides whether to colour.
|
|
24
|
+
*
|
|
25
|
+
* Honours the NO_COLOR and FORCE_COLOR conventions, and otherwise colours only a
|
|
26
|
+
* real terminal — piping into a file should not fill it with escape codes.
|
|
27
|
+
*/
|
|
28
|
+
export function prettyOptions(env, isTty, columns) {
|
|
29
|
+
const forced = env.FORCE_COLOR !== undefined && env.FORCE_COLOR !== '0';
|
|
30
|
+
const disabled = env.NO_COLOR !== undefined || env.TERM === 'dumb';
|
|
31
|
+
return {
|
|
32
|
+
colour: forced || (isTty && !disabled),
|
|
33
|
+
width: Math.max(60, Math.min(columns ?? 100, 120)),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function paint(options, colour, text) {
|
|
37
|
+
return options.colour ? `${ANSI[colour]}${text}${ANSI.reset}` : text;
|
|
38
|
+
}
|
|
39
|
+
const GRADE_COLOUR = {
|
|
40
|
+
A: 'green',
|
|
41
|
+
B: 'green',
|
|
42
|
+
C: 'yellow',
|
|
43
|
+
D: 'yellow',
|
|
44
|
+
F: 'red',
|
|
45
|
+
'N/A': 'grey',
|
|
46
|
+
};
|
|
47
|
+
/** A glyph per status, chosen to stay legible without colour. */
|
|
48
|
+
const STATUS_MARK = {
|
|
49
|
+
pass: { mark: 'ok ', colour: 'green' },
|
|
50
|
+
fail: { mark: 'FAIL', colour: 'red' },
|
|
51
|
+
na: { mark: 'n/a ', colour: 'grey' },
|
|
52
|
+
disabled: { mark: 'off ', colour: 'grey' },
|
|
53
|
+
};
|
|
54
|
+
function truncate(text, width) {
|
|
55
|
+
return text.length <= width ? text : `${text.slice(0, Math.max(0, width - 1))}…`;
|
|
56
|
+
}
|
|
57
|
+
/** Truncates *and* pads, so a column is exactly its width whatever it holds. */
|
|
58
|
+
function column(text, width) {
|
|
59
|
+
return truncate(text, width).padEnd(width);
|
|
60
|
+
}
|
|
61
|
+
/** Columns consumed by everything on a rule line except the evidence. */
|
|
62
|
+
const RULE_ID_WIDTH = 19;
|
|
63
|
+
const RULE_GUTTER = 2 + 4 + 1 + RULE_ID_WIDTH + 1 + 3 + 1 + 3 + 2;
|
|
64
|
+
function renderRule(rule, options) {
|
|
65
|
+
const { mark, colour } = STATUS_MARK[rule.status];
|
|
66
|
+
const score = rule.score === null ? ' -' : String(rule.score).padStart(3);
|
|
67
|
+
const weight = `x${rule.weight}`.padEnd(3);
|
|
68
|
+
const evidence = truncate(rule.evidence, Math.max(20, options.width - RULE_GUTTER));
|
|
69
|
+
return (` ${paint(options, colour, mark)} ${column(rule.id, RULE_ID_WIDTH)} ${score} ` +
|
|
70
|
+
`${paint(options, 'grey', weight)} ${paint(options, 'grey', evidence)}`);
|
|
71
|
+
}
|
|
72
|
+
function renderRepo(repo, options) {
|
|
73
|
+
const gradeText = options.colour ? `${ANSI.bold}${repo.grade}${ANSI.reset}` : repo.grade;
|
|
74
|
+
const grade = paint(options, GRADE_COLOUR[repo.grade], gradeText);
|
|
75
|
+
const score = repo.score === null ? '' : ` ${repo.score.toFixed(1)}`;
|
|
76
|
+
const nameWidth = Math.max(20, options.width - 12);
|
|
77
|
+
return [
|
|
78
|
+
'',
|
|
79
|
+
`${paint(options, 'blue', column(repo.repo, nameWidth))} ${grade}${score}`,
|
|
80
|
+
...repo.rules.map((rule) => renderRule(rule, options)),
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
/** Renders a report for a person reading it in a terminal. */
|
|
84
|
+
export function renderPretty(report, options) {
|
|
85
|
+
const { repoCount, averageScore } = report.fleet;
|
|
86
|
+
const summary = repoCount === 1
|
|
87
|
+
? '1 repository'
|
|
88
|
+
: `${repoCount} repositories` +
|
|
89
|
+
(averageScore === null ? '' : `, average ${averageScore.toFixed(1)}`);
|
|
90
|
+
const lines = [paint(options, 'dim', `fettle - ${summary}`)];
|
|
91
|
+
for (const repo of report.repos)
|
|
92
|
+
lines.push(...renderRepo(repo, options));
|
|
93
|
+
const blocked = report.repos.flatMap((repo) => repo.rules.filter((rule) => rule.status === 'na').map((rule) => ({ repo: repo.repo, rule })));
|
|
94
|
+
if (blocked.length > 0) {
|
|
95
|
+
lines.push('', paint(options, 'yellow', 'Checks that could not run'));
|
|
96
|
+
for (const { repo, rule } of blocked) {
|
|
97
|
+
const detail = `${repo} ${rule.id} - ${rule.evidence}`;
|
|
98
|
+
lines.push(paint(options, 'grey', ` ${truncate(detail, options.width - 2)}`));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (repoCount === 0)
|
|
102
|
+
lines.push('', paint(options, 'grey', ' no repositories scanned'));
|
|
103
|
+
return lines.join('\n');
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=pretty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty.js","sourceRoot":"","sources":["../src/pretty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,GAAG,GAAG,SAAS,CAAC;AAEtB,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,GAAG,GAAG,IAAI;IACjB,IAAI,EAAE,GAAG,GAAG,IAAI;IAChB,GAAG,EAAE,GAAG,GAAG,IAAI;IACf,GAAG,EAAE,GAAG,GAAG,KAAK;IAChB,KAAK,EAAE,GAAG,GAAG,KAAK;IAClB,MAAM,EAAE,GAAG,GAAG,KAAK;IACnB,IAAI,EAAE,GAAG,GAAG,KAAK;IACjB,IAAI,EAAE,GAAG,GAAG,KAAK;CACT,CAAC;AAW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AAO,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IAED,IAAI,SAAS,KAAK,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,2BAA2B,CAAC,CAAC,CAAC;IAEzF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fettle/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Command-line interface for grading repository maintenance health.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/rumankazi/fettle#readme",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"node": ">=22"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@fettle/core": "4.
|
|
40
|
+
"@fettle/core": "4.1.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsc -p tsconfig.build.json",
|