1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function addCfgKey(argv) {
|
4 | return argv.positional('key', {
|
5 | describe: 'Config key',
|
6 | type: 'string'
|
7 | });
|
8 | }
|
9 | exports.addCfgKey = addCfgKey;
|
10 | function addPwd(argv) {
|
11 | return argv.option('password', {
|
12 | alias: 'pwd',
|
13 | describe: 'Encryption password',
|
14 | type: 'string'
|
15 | });
|
16 | }
|
17 | exports.addPwd = addPwd;
|
18 | function addEncrypt(argv, alias = 'enc') {
|
19 | const opt = {
|
20 | default: false,
|
21 | describe: 'Encrypt the input',
|
22 | type: 'boolean'
|
23 | };
|
24 | if (alias) {
|
25 | opt.alias = alias;
|
26 | }
|
27 | return argv.option('encrypt', opt);
|
28 | }
|
29 | exports.addEncrypt = addEncrypt;
|
30 | function addCfgScope(argv) {
|
31 | return argv.positional('scope', {
|
32 | describe: 'Optional scope of the config key (defaults to global)',
|
33 | type: 'string'
|
34 | });
|
35 | }
|
36 | exports.addCfgScope = addCfgScope;
|