MCPcopy
hub / github.com/dotenvx/dotenvx / configureArmorCommand

Function configureArmorCommand

src/cli/commands/armor.js:4–70  ·  view source on GitHub ↗
(armor)

Source from the content-addressed store, hash-verified

2const Session = require('./../../db/session')
3
4function configureArmorCommand (armor) {
5 armor
6 .description('move private keys off-device')
7 .allowUnknownOption()
8 .argument('[command]', 'dotenvx-armor command')
9 .argument('[args...]', 'dotenvx-armor command arguments')
10 .action(async function (command, args) {
11 if (command) {
12 return executeDynamic(armor, 'armor', [command, ...(args || [])])
13 }
14
15 const sesh = new Session()
16 await sesh.notifyUpdate()
17 this.help()
18 })
19
20 // dotenvx armor up
21 const upAction = require('./../actions/armor/up')
22 armor
23 .command('up')
24 .description('armor key')
25 .option('-f, --env-file <path>', 'path to your env file')
26 .option('--token <token>', 'set token')
27 .option('--team <team>', 'team to armor private key for')
28 .action(upAction)
29
30 // dotenvx armor down
31 const downAction = require('./../actions/armor/down')
32 armor
33 .command('down')
34 .description('dearmor key')
35 .option('-f, --env-file <path>', 'path to your env file')
36 .option('--token <token>', 'set token')
37 .option('--team <team>', 'team to dearmor private key from')
38 .action(downAction)
39
40 // dotenvx armor push
41 const pushAction = require('./../actions/armor/push')
42 armor
43 .command('push')
44 .description('push armored key (from .env.keys)')
45 .option('-f, --env-file <path>', 'path to your env file')
46 .option('--token <token>', 'set token')
47 .option('--team <team>', 'team to push armored private key for')
48 .action(pushAction)
49
50 // dotenvx armor pull
51 const pullAction = require('./../actions/armor/pull')
52 armor
53 .command('pull')
54 .description('pull armored key (into .env.keys)')
55 .option('-f, --env-file <path>', 'path to your env file')
56 .option('--token <token>', 'set token')
57 .option('--team <team>', 'team to pull armored private key from')
58 .action(pullAction)
59
60 // dotenvx armor move
61 const moveAction = require('./../actions/armor/move')

Callers 1

armor.test.jsFile · 0.85

Calls 2

notifyUpdateMethod · 0.95
executeDynamicFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…