Skip to content

Commit e711405

Browse files
authored
chore: remove unused commands and logic; refactor (#297)
1 parent d92bb37 commit e711405

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1071
-6443
lines changed

README.md

Lines changed: 26 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The HeroDevs CLI
1515
1. Install node v20 or higher: [Download Node](https://nodejs.org/en/download)
1616
1. Install the CLI using one of the following methods:
1717
- Globally: Refer to the [Usage](#usage) instructions on installing the CLI globally
18-
- Npx:`npx @herodevs/cli@beta <commands>`
18+
- npx: `npx @herodevs/cli@beta`
1919
1. Refer to the [Commands](#commands) section for a list of commands
2020

2121
## TERMS
@@ -24,10 +24,10 @@ Use of this CLI is governed by the [HeroDevs End of Life Dataset Terms of Servic
2424

2525
## Scanning Behavior
2626

27-
The CLI's scanning commands (`hd scan eol` and `hd scan sbom`) are designed to be non-invasive:
27+
The CLI is designed to be non-invasive:
2828

29-
* They do not install dependencies or modify package manager files (package-lock.json, yarn.lock, etc.)
30-
* They analyze the project in its current state
29+
* It does not install dependencies or modify package manager files (package-lock.json, yarn.lock, etc.)
30+
* It analyzes the project in its current state
3131
* If you need dependencies installed for accurate scanning, please install them manually before running the scan
3232

3333

@@ -38,7 +38,7 @@ $ npm install -g @herodevs/cli
3838
$ hd COMMAND
3939
running command...
4040
$ hd (--version)
41-
@herodevs/cli/2.0.0-beta.4 darwin-arm64 node-v22.15.1
41+
@herodevs/cli/2.0.0-beta.4 darwin-arm64 node-v22.18.0
4242
$ hd --help [COMMAND]
4343
USAGE
4444
$ hd COMMAND
@@ -48,10 +48,7 @@ USAGE
4848
## Commands
4949
<!-- commands -->
5050
* [`hd help [COMMAND]`](#hd-help-command)
51-
* [`hd report committers`](#hd-report-committers)
52-
* [`hd report purls`](#hd-report-purls)
5351
* [`hd scan eol`](#hd-scan-eol)
54-
* [`hd scan sbom`](#hd-scan-sbom)
5552
* [`hd update [CHANNEL]`](#hd-update-channel)
5653

5754
## `hd help [COMMAND]`
@@ -74,130 +71,49 @@ DESCRIPTION
7471

7572
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.29/src/commands/help.ts)_
7673

77-
## `hd report committers`
78-
79-
Generate report of committers to a git repository
80-
81-
```
82-
USAGE
83-
$ hd report committers [--json] [-m <value>] [-c] [-s]
84-
85-
FLAGS
86-
-c, --csv Output in CSV format
87-
-m, --months=<value> [default: 12] The number of months of git history to review
88-
-s, --save Save the committers report as herodevs.committers.<output>
89-
90-
GLOBAL FLAGS
91-
--json Format output as json.
92-
93-
DESCRIPTION
94-
Generate report of committers to a git repository
95-
96-
EXAMPLES
97-
$ hd report committers
98-
99-
$ hd report committers --csv -s
100-
101-
$ hd report committers --json
102-
103-
$ hd report committers --csv
104-
```
105-
106-
_See code: [src/commands/report/committers.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/report/committers.ts)_
107-
108-
## `hd report purls`
109-
110-
Generate a list of purls from a sbom
111-
112-
```
113-
USAGE
114-
$ hd report purls [--json] [-f <value>] [-d <value>] [-s] [-c]
115-
116-
FLAGS
117-
-c, --csv Save output in CSV format (only applies when using --save)
118-
-d, --dir=<value> The directory to scan in order to create a cyclonedx sbom
119-
-f, --file=<value> The file path of an existing cyclonedx sbom to scan for EOL
120-
-s, --save Save the list of purls as herodevs.purls.<output>
121-
122-
GLOBAL FLAGS
123-
--json Format output as json.
124-
125-
DESCRIPTION
126-
Generate a list of purls from a sbom
127-
128-
EXAMPLES
129-
$ hd report purls --json -s
130-
131-
$ hd report purls --dir=./my-project
132-
133-
$ hd report purls --file=path/to/sbom.json
134-
135-
$ hd report purls --dir=./my-project --save
136-
137-
$ hd report purls --save --csv
138-
```
139-
140-
_See code: [src/commands/report/purls.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/report/purls.ts)_
141-
14274
## `hd scan eol`
14375

144-
Scan a given sbom for EOL data
76+
Scan a given SBOM for EOL data
14577

14678
```
14779
USAGE
148-
$ hd scan eol [--json] [-f <value>] [-p <value>] [-d <value>] [-s]
80+
$ hd scan eol [--json] [-f <value> | -d <value>] [-s] [--saveSbom]
14981
15082
FLAGS
151-
-d, --dir=<value> The directory to scan in order to create a cyclonedx sbom
152-
-f, --file=<value> The file path of an existing cyclonedx sbom to scan for EOL
153-
-p, --purls=<value> The file path of a list of purls to scan for EOL
154-
-s, --save Save the generated report as herodevs.report.json in the scanned directory
83+
-d, --dir=<value> [default: <current directory>] The directory to scan in order to create a cyclonedx SBOM
84+
-f, --file=<value> The file path of an existing cyclonedx SBOM to scan for EOL
85+
-s, --save Save the generated report as herodevs.report.json in the scanned directory
86+
--saveSbom Save the generated SBOM as herodevs.sbom.json in the scanned directory
15587
15688
GLOBAL FLAGS
15789
--json Format output as json.
15890
15991
DESCRIPTION
160-
Scan a given sbom for EOL data
92+
Scan a given SBOM for EOL data
16193
16294
EXAMPLES
163-
$ hd scan eol --dir=./my-project
164-
165-
$ hd scan eol --file=path/to/sbom.json
95+
Default behavior (no command or flags specified)
16696
167-
$ hd scan eol --purls=path/to/purls.json
97+
$ hd
16898
169-
$ hd scan eol -a --dir=./my-project
170-
```
99+
Equivalent to
171100
172-
_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/scan/eol.ts)_
101+
$ hd scan eol --dir .
173102
174-
## `hd scan sbom`
103+
Skip SBOM generation and specify an existing file
175104
176-
Scan a SBOM for purls
105+
$ hd scan eol --file /path/to/sbom.json
177106
178-
```
179-
USAGE
180-
$ hd scan sbom [--json] [-f <value>] [-d <value>] [-s] [-b]
107+
Save the report or SBOM to a file
181108
182-
FLAGS
183-
-b, --background Run the scan in the background
184-
-d, --dir=<value> The directory to scan in order to create a cyclonedx sbom
185-
-f, --file=<value> The file path of an existing cyclonedx sbom to scan for EOL
186-
-s, --save Save the generated SBOM as herodevs.sbom.json in the scanned directory
109+
$ hd scan eol --save --saveSbom
187110
188-
GLOBAL FLAGS
189-
--json Format output as json.
111+
Output the report in JSON format (for APIs, CI, etc.)
190112
191-
DESCRIPTION
192-
Scan a SBOM for purls
193-
194-
EXAMPLES
195-
$ hd scan sbom --dir=./my-project
196-
197-
$ hd scan sbom --file=path/to/sbom.json
113+
$ hd scan eol --json
198114
```
199115

200-
_See code: [src/commands/scan/sbom.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/scan/sbom.ts)_
116+
_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/scan/eol.ts)_
201117

202118
## `hd update [CHANNEL]`
203119

@@ -250,7 +166,7 @@ it contains build tools for most project types and will provide best results whe
250166
#### GitHub Actions
251167

252168
```yaml
253-
# .github/workflows/herodevs-eol-scan.yml
169+
## .github/workflows/herodevs-eol-scan.yml
254170
name: HeroDevs EOL Scan
255171

256172
on:
@@ -295,7 +211,7 @@ all requirements before the scan step.
295211
#### GitHub Actions
296212

297213
```yaml
298-
# .github/workflows/herodevs-eol-scan.yml
214+
## .github/workflows/herodevs-eol-scan.yml
299215
name: HeroDevs EOL Scan
300216
301217
on:
@@ -328,4 +244,4 @@ eol-scan:
328244
script:
329245
- echo # Prepare environment, install tooling, perform setup, etc.
330246
- npx @herodevs/cli@beta
331-
```
247+
```

e2e/fixtures/npm/empty.purls.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)