@fettle/cli 2.0.1 → 3.0.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.
Files changed (2) hide show
  1. package/README.md +16 -0
  2. package/package.json +8 -2
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @fettle/cli
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/%40fettle%2Fcli?logo=npm)](https://www.npmjs.com/package/@fettle/cli)
4
+ [![socket](https://badge.socket.dev/npm/package/@fettle/cli)](https://socket.dev/npm/package/@fettle/cli)
5
+
3
6
  Command-line interface for [Fettle](https://github.com/rumankazi/fettle) — grade the
4
7
  maintenance health of GitHub repositories.
5
8
 
@@ -17,5 +20,18 @@ fettle --repos acme/api --api-url https://ghe.acme.com/api/v3
17
20
  Exit codes: `0` success, `1` graded below `--fail-below`, `2` invalid usage, `3` a
18
21
  repository or its configuration could not be read.
19
22
 
23
+ ## Programmatic use
24
+
25
+ The supported interface is the `fettle` command. The package also exports the pieces
26
+ it is built from — `run`, `parseCliOptions`, `render`, and the exit codes — for
27
+ wrapping the command in your own entry point:
28
+
29
+ ```ts
30
+ import { run, EXIT_BELOW_FLOOR } from '@fettle/cli';
31
+ ```
32
+
33
+ For scanning from code, use [`@fettle/core`](https://www.npmjs.com/package/@fettle/core)
34
+ instead; it is the library, and this is a shell around it.
35
+
20
36
  Run `fettle --help` for all flags. Full documentation:
21
37
  [github.com/rumankazi/fettle](https://github.com/rumankazi/fettle).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fettle/cli",
3
- "version": "2.0.1",
3
+ "version": "3.0.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",
@@ -21,6 +21,12 @@
21
21
  "ghes"
22
22
  ],
23
23
  "type": "module",
24
+ "main": "./dist/cli.js",
25
+ "types": "./dist/cli.d.ts",
26
+ "exports": {
27
+ ".": "./dist/cli.js",
28
+ "./package.json": "./package.json"
29
+ },
24
30
  "bin": {
25
31
  "fettle": "./dist/index.js"
26
32
  },
@@ -31,7 +37,7 @@
31
37
  "node": ">=20"
32
38
  },
33
39
  "dependencies": {
34
- "@fettle/core": "2.0.1"
40
+ "@fettle/core": "3.0.0"
35
41
  },
36
42
  "scripts": {
37
43
  "build": "tsc -p tsconfig.build.json",