Skip to content

Commit ffff7f7

Browse files
committed
style: reorder CLI params
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent be76df2 commit ffff7f7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ Options:
8787
--omit <type...> Dependency types to omit from the installation tree.
8888
(can be set multiple times)
8989
(choices: "dev", "optional", "peer", default: "dev" if the NODE_ENV environment variable is set to "production", otherwise empty)
90+
--gather-license-texts Search for license files in components and include them as license evidence.
91+
This feature is experimental. (default: false)
9092
--flatten-components Whether to flatten the components.
9193
This means the actual nesting of node packages is not represented in the SBOM result.
9294
(default: false)
@@ -98,8 +100,6 @@ Options:
98100
--output-reproducible Whether to go the extra mile and make the output reproducible.
99101
This requires more resources, and might result in loss of time- and random-based-values.
100102
(env: BOM_REPRODUCIBLE)
101-
--gather-license-texts Search for license files in components and include them as license evidence.
102-
This feature is experimental. (default: false)
103103
--output-format <format> Which output format to use.
104104
(choices: "JSON", "XML", default: "JSON")
105105
--output-file <file> Path to the output file.

src/cli.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ interface CommandOptions {
4343
ignoreNpmErrors: boolean
4444
packageLockOnly: boolean
4545
omit: Omittable[]
46-
specVersion: Spec.Version
46+
gatherLicenseTexts: boolean
4747
flattenComponents: boolean
4848
shortPURLs: boolean
4949
outputReproducible: boolean
50-
gatherLicenseTexts: boolean
50+
specVersion: Spec.Version
5151
outputFormat: OutputFormat
5252
outputFile: string
5353
validate: boolean | undefined
@@ -87,6 +87,12 @@ function makeCommand (process: NodeJS.Process): Command {
8787
: [],
8888
`"${Omittable.Dev}" if the NODE_ENV environment variable is set to "production", otherwise empty`
8989
)
90+
).addOption(
91+
new Option(
92+
'--gather-license-texts',
93+
'Search for license files in components and include them as license evidence.\n' +
94+
'This feature is experimental.'
95+
).default(false)
9096
).addOption(
9197
new Option(
9298
'--flatten-components',
@@ -116,12 +122,6 @@ function makeCommand (process: NodeJS.Process): Command {
116122
).env(
117123
'BOM_REPRODUCIBLE'
118124
)
119-
).addOption(
120-
new Option(
121-
'--gather-license-texts',
122-
'Search for license files in components and include them as license evidence.\n' +
123-
'This feature is experimental. (default: false)'
124-
).default(false)
125125
).addOption(
126126
(function () {
127127
const o = new Option(
@@ -254,10 +254,10 @@ export async function run (process: NodeJS.Process): Promise<number> {
254254
metaComponentType: options.mcType,
255255
packageLockOnly: options.packageLockOnly,
256256
omitDependencyTypes: options.omit,
257+
gatherLicenseTexts: options.gatherLicenseTexts,
257258
reproducible: options.outputReproducible,
258259
flattenComponents: options.flattenComponents,
259-
shortPURLs: options.shortPURLs,
260-
gatherLicenseTexts: options.gatherLicenseTexts
260+
shortPURLs: options.shortPURLs
261261
},
262262
myConsole
263263
).buildFromProjectDir(projectDir, process)

0 commit comments

Comments
 (0)