@herodevs/cli 2.0.0-beta.8 → 2.0.0-beta.9
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 +38 -10
- package/dist/commands/scan/eol.js +9 -9
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -10,13 +10,40 @@ The HeroDevs CLI
|
|
|
10
10
|
* [@herodevs/cli](#herodevscli)
|
|
11
11
|
<!-- tocstop -->
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Prerequisites
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
- Install node v20 or higher: [Download Node](https://nodejs.org/en/download)
|
|
16
|
+
- The HeroDevs CLI expects that you have all required technology installed for the project that you are running the CLI against
|
|
17
|
+
- For example, if you are running the CLI against a Gradle project, the CLI expects you to have Java installed.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Installation methods
|
|
21
|
+
|
|
22
|
+
#### Node Package Execute (NPX)
|
|
23
|
+
|
|
24
|
+
With Node installed, you can run the CLI directly from the npm registry without installing it globally or locally on your system
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npx @herodevs/cli@beta
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### Global NPM Installation
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm install -g @herodevs/cli@beta
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Binary Installation
|
|
37
|
+
|
|
38
|
+
HeroDevs CLI is available as a binary installation, without requiring `npm`. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
curl -o- https://raw.githubusercontent.com/herodevs/cli/v2.0.0-beta.9/scripts/install.sh | bash
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
wget -qO- https://raw.githubusercontent.com/herodevs/cli/v2.0.0-beta.9/scripts/install.sh | bash
|
|
46
|
+
```
|
|
20
47
|
|
|
21
48
|
## TERMS
|
|
22
49
|
|
|
@@ -44,7 +71,7 @@ $ npm install -g @herodevs/cli@beta
|
|
|
44
71
|
$ hd COMMAND
|
|
45
72
|
running command...
|
|
46
73
|
$ hd (--version)
|
|
47
|
-
@herodevs/cli/2.0.0-beta.
|
|
74
|
+
@herodevs/cli/2.0.0-beta.9 darwin-arm64 node-v22.18.0
|
|
48
75
|
$ hd --help [COMMAND]
|
|
49
76
|
USAGE
|
|
50
77
|
$ hd COMMAND
|
|
@@ -56,7 +83,7 @@ USAGE
|
|
|
56
83
|
* [`hd help [COMMAND]`](#hd-help-command)
|
|
57
84
|
* [`hd scan eol`](#hd-scan-eol)
|
|
58
85
|
* [`hd update [CHANNEL]`](#hd-update-channel)
|
|
59
|
-
* Only applies to
|
|
86
|
+
* **NOTE:** Only applies to [binary installation method](#binary-installation). NPM users should use [`npm install`](#global-npm-installation) to update to the latest version.
|
|
60
87
|
|
|
61
88
|
## `hd help [COMMAND]`
|
|
62
89
|
|
|
@@ -121,12 +148,13 @@ EXAMPLES
|
|
|
121
148
|
$ hd scan eol --json
|
|
122
149
|
```
|
|
123
150
|
|
|
124
|
-
_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.
|
|
151
|
+
_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.9/src/commands/scan/eol.ts)_
|
|
125
152
|
|
|
126
153
|
## `hd update [CHANNEL]`
|
|
127
154
|
|
|
128
155
|
update the hd CLI
|
|
129
|
-
|
|
156
|
+
|
|
157
|
+
* **NOTE:** Only applies to [binary installation method](#binary-installation). NPM users should use [`npm install`](#global-npm-installation) to update to the latest version.
|
|
130
158
|
|
|
131
159
|
```
|
|
132
160
|
USAGE
|
|
@@ -70,6 +70,15 @@ export default class ScanEol extends Command {
|
|
|
70
70
|
sbom_generation_time: (sbomEndTime - sbomStartTime) / 1000,
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
|
+
if (flags.saveSbom && !flags.file) {
|
|
74
|
+
const sbomPath = this.saveSbom(flags.dir, sbom);
|
|
75
|
+
this.log(`SBOM saved to ${sbomPath}`);
|
|
76
|
+
track('CLI SBOM Output Saved', (context) => ({
|
|
77
|
+
command: context.command,
|
|
78
|
+
command_flags: context.command_flags,
|
|
79
|
+
sbom_output_path: sbomPath,
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
73
82
|
if (!sbom.components?.length) {
|
|
74
83
|
track('CLI EOL Scan Ended, No Components Found', (context) => ({
|
|
75
84
|
command: context.command,
|
|
@@ -105,15 +114,6 @@ export default class ScanEol extends Command {
|
|
|
105
114
|
report_output_path: reportPath,
|
|
106
115
|
}));
|
|
107
116
|
}
|
|
108
|
-
if (flags.saveSbom && !flags.file) {
|
|
109
|
-
const sbomPath = this.saveSbom(flags.dir, sbom);
|
|
110
|
-
this.log(`SBOM saved to ${sbomPath}`);
|
|
111
|
-
track('CLI SBOM Output Saved', (context) => ({
|
|
112
|
-
command: context.command,
|
|
113
|
-
command_flags: context.command_flags,
|
|
114
|
-
sbom_output_path: sbomPath,
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
117
|
if (!this.jsonEnabled()) {
|
|
118
118
|
this.displayResults(scan);
|
|
119
119
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herodevs/cli",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.9",
|
|
4
4
|
"author": "HeroDevs, Inc",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hd": "./bin/run.js"
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
"prepare": "shx test -d dist || npm run build",
|
|
27
27
|
"prepack": "oclif manifest",
|
|
28
28
|
"pretest": "npm run lint && npm run typecheck",
|
|
29
|
-
"readme": "npm run ci:fix && npm run build &&
|
|
29
|
+
"readme": "npm run ci:fix && npm run build && oclif readme",
|
|
30
30
|
"test": "globstar -- node --import tsx --test --experimental-test-module-mocks \"test/**/*.test.ts\"",
|
|
31
31
|
"test:e2e": "globstar -- node --import tsx --test \"e2e/**/*.test.ts\"",
|
|
32
32
|
"typecheck": "tsc --noEmit",
|
|
33
|
-
"version": "oclif manifest"
|
|
33
|
+
"version": "oclif manifest",
|
|
34
|
+
"postversion": "node scripts/update-install-script-version.js && git add README.md"
|
|
34
35
|
},
|
|
35
36
|
"keywords": [
|
|
36
37
|
"herodevs",
|
|
@@ -38,11 +39,11 @@
|
|
|
38
39
|
"herodevs cli"
|
|
39
40
|
],
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"@amplitude/analytics-node": "^1.5.
|
|
42
|
+
"@amplitude/analytics-node": "^1.5.8",
|
|
42
43
|
"@apollo/client": "^3.13.8",
|
|
43
44
|
"@cyclonedx/cdxgen": "~11.4.4",
|
|
44
45
|
"@herodevs/eol-shared": "github:herodevs/eol-shared#v0.1.11",
|
|
45
|
-
"@oclif/core": "^4.5.
|
|
46
|
+
"@oclif/core": "^4.5.3",
|
|
46
47
|
"@oclif/plugin-help": "^6.2.32",
|
|
47
48
|
"@oclif/plugin-update": "^4.7.4",
|
|
48
49
|
"graphql": "^16.11.0",
|
|
@@ -56,11 +57,11 @@
|
|
|
56
57
|
"@biomejs/biome": "^2.2.2",
|
|
57
58
|
"@oclif/test": "^4.1.13",
|
|
58
59
|
"@types/inquirer": "^9.0.9",
|
|
59
|
-
"@types/node": "^24.3.
|
|
60
|
+
"@types/node": "^24.3.1",
|
|
60
61
|
"@types/sinon": "^17.0.4",
|
|
61
62
|
"@types/update-notifier": "^6.0.8",
|
|
62
63
|
"globstar": "^1.0.0",
|
|
63
|
-
"oclif": "^4.22.
|
|
64
|
+
"oclif": "^4.22.18",
|
|
64
65
|
"shx": "^0.4.0",
|
|
65
66
|
"sinon": "^21.0.0",
|
|
66
67
|
"ts-node": "^10.9.2",
|