-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathargs.js
49 lines (47 loc) · 1.63 KB
/
args.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
const argv = yargs(hideBin(process.argv))
.option("resolution", {
alias: "r",
describe:
"Controls the dependency resolution strategy.\nSupported options:\n* release: selects the latest release\n* milestone: select the latest version being either a milestone or a release (default)\n* integration: selects the latest revision of the dependency module (such as SNAPSHOT)",
type: "string",
nargs: 1,
demand: false,
})
.option("semver", {
alias: "s",
describe:
"Which semantic version diffs to include (https://semver.org). Flag can be used multiple times.\nSupported options:\n* major: Include upgrades with a major version change\n* minor: Include upgrades with a minor version change\n* patch: Include upgrades with a patch version change",
type: "string",
array: true,
nargs: 1,
demand: false,
})
.option("external-file", {
alias: "e",
describe: "Points to a file where dependencies have been declared, e.g. gradle/dependencies.gradle. Option can be used multiple times.",
type: "array",
nargs: 1,
demand: false,
})
.option("path-of-report", {
alias: "p",
describe: "Points to the path, where the report.json is defined",
type: "array",
nargs: 1,
demand: false,
})
.option("debug", {
alias: "d",
describe: "Prints debugging information, such as commands executed and current status.",
type: "boolean",
demand: false,
default: false,
})
.option("no-color", {
describe: "Disables color output",
nargs: 1,
demand: false,
}).argv;
export { argv };