1 | #!/usr/bin/env node
|
2 |
|
3 | const update = require("../verify/update");
|
4 |
|
5 | const { original: npmArgs = [] } = JSON.parse(process.env.npm_config_argv || "{}");
|
6 | const [, , ...processArgs ] = process.argv;
|
7 |
|
8 | const flags = [ ...npmArgs, ...processArgs ]
|
9 | .filter(f => f.startsWith("--"))
|
10 | .map(f => f.substring(2));
|
11 |
|
12 | function addOption(all, current) {
|
13 | all[current] = true;
|
14 | return all;
|
15 | }
|
16 |
|
17 | const options = flags.reduce(addOption, {});
|
18 |
|
19 | update(options);
|
20 |
|