@dotenvx/dotenvx 1.69.2 → 1.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/README.md +29 -14
  3. package/package.json +7 -6
  4. package/src/cli/actions/decrypt.js +5 -5
  5. package/src/cli/actions/encrypt.js +13 -13
  6. package/src/cli/actions/get.js +4 -4
  7. package/src/cli/actions/keypair.js +4 -4
  8. package/src/cli/actions/normalizeArmorOptions.js +11 -0
  9. package/src/cli/actions/rotate.js +5 -5
  10. package/src/cli/actions/run.js +5 -4
  11. package/src/cli/actions/set.js +4 -4
  12. package/src/cli/commands/ext.js +1 -1
  13. package/src/cli/dotenvx.js +31 -33
  14. package/src/db/session.js +9 -9
  15. package/src/lib/extensions/{vlt.js → armor.js} +4 -4
  16. package/src/lib/helpers/cryptography/{vltKeypair.js → armorKeypair.js} +4 -4
  17. package/src/lib/helpers/cryptography/armorKeypairSync.js +14 -0
  18. package/src/lib/helpers/cryptography/index.js +2 -2
  19. package/src/lib/helpers/cryptography/mutateKeysSrc.js +1 -1
  20. package/src/lib/helpers/cryptography/mutateKeysSrcSync.js +1 -1
  21. package/src/lib/helpers/cryptography/provision.js +8 -8
  22. package/src/lib/helpers/cryptography/provisionSync.js +6 -6
  23. package/src/lib/helpers/cryptography/provisionWithPrivateKey.js +1 -1
  24. package/src/lib/helpers/executeDynamic.js +41 -12
  25. package/src/lib/helpers/keyResolution/keyValues.js +10 -6
  26. package/src/lib/helpers/keyResolution/keyValuesFromEnvSrc.js +9 -5
  27. package/src/lib/helpers/keyResolution/keyValuesSync.js +11 -8
  28. package/src/lib/main.d.ts +44 -13
  29. package/src/lib/main.js +13 -12
  30. package/src/lib/services/decrypt.js +4 -4
  31. package/src/lib/services/encrypt.js +4 -4
  32. package/src/lib/services/get.js +4 -4
  33. package/src/lib/services/keypair.js +4 -4
  34. package/src/lib/services/rotate.js +9 -9
  35. package/src/lib/services/run.js +12 -9
  36. package/src/lib/services/sets.js +6 -6
  37. package/src/cli/actions/normalizeVltOptions.js +0 -10
  38. package/src/lib/helpers/cryptography/vltKeypairSync.js +0 -14
package/CHANGELOG.md CHANGED
@@ -2,7 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.69.2...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.71.0...main)
6
+
7
+ ## [1.71.0](https://github.com/dotenvx/dotenvx/compare/v1.70.0...v1.71.0) (2026-06-01)
8
+
9
+ ### Added
10
+
11
+ * Add optional automation `--token` support for Armor ⛨ users ([#831](https://github.com/dotenvx/dotenvx/pull/831))
12
+
13
+ ## [1.70.0](https://github.com/dotenvx/dotenvx/compare/v1.69.2...v1.70.0) (2026-05-31)
14
+
15
+ ### Changed
16
+
17
+ * Dotenvx Ops/Vlt is now Dotenvx Armor ⛨ ([#830](https://github.com/dotenvx/dotenvx/pull/830))
6
18
 
7
19
  ## [1.69.2](https://github.com/dotenvx/dotenvx/compare/v1.69.1...v1.69.2) (2026-05-29)
8
20
 
package/README.md CHANGED
@@ -1287,14 +1287,25 @@ $ dotenvx run -fk .env.keys -f apps/app1/.env -- yourcommand
1287
1287
  ```
1288
1288
 
1289
1289
  </details>
1290
- <details><summary>`run --no-vlt`</summary><br>
1290
+ <details><summary>`run --token`</summary><br>
1291
1291
 
1292
- Turn off [Dotenvx VLT ⛨](https://dotenvx.com/vlt) features.
1292
+ Set Armor token for retrieving armored private keys.
1293
1293
 
1294
1294
  ```sh
1295
- $ dotenvx run --no-vlt -- yourcommand
1295
+ $ dotenvx run --token "$DOTENVX_ARMOR_TOKEN" -- yourcommand
1296
1296
  ```
1297
1297
 
1298
+ </details>
1299
+ <details><summary>`run --no-armor`</summary><br>
1300
+
1301
+ Turn off [Dotenvx Armor ⛨](https://dotenvx.com/armor) features.
1302
+
1303
+ ```sh
1304
+ $ dotenvx run --no-armor -- yourcommand
1305
+ ```
1306
+
1307
+ `--no-vlt` and `--no-ops` are deprecated aliases.
1308
+
1298
1309
  </details>
1299
1310
  <details><summary>`get KEY`</summary><br>
1300
1311
 
@@ -1622,15 +1633,17 @@ $ dotenvx encrypt -f .env.production
1622
1633
  ```
1623
1634
 
1624
1635
  </details>
1625
- <details><summary>`encrypt --no-vlt`</summary><br>
1636
+ <details><summary>`encrypt --no-armor`</summary><br>
1626
1637
 
1627
- Turn off [Dotenvx VLT ⛨](https://dotenvx.com/vlt) features for encrypt.
1638
+ Turn off [Dotenvx Armor ⛨](https://dotenvx.com/armor) features for encrypt.
1628
1639
 
1629
1640
  ```sh
1630
- $ dotenvx encrypt --no-vlt
1641
+ $ dotenvx encrypt --no-armor
1631
1642
  ◈ encrypted (.env)
1632
1643
  ```
1633
1644
 
1645
+ `--no-vlt` and `--no-ops` are deprecated aliases.
1646
+
1634
1647
  </details>
1635
1648
  <details><summary>`encrypt -fk`</summary><br>
1636
1649
 
@@ -2548,15 +2561,17 @@ $ dotenvx run --convention=nextjs -- node index.js
2548
2561
  ```
2549
2562
 
2550
2563
  </details>
2551
- <details><summary>`config(noVlt:)` - noVlt</summary><br>
2564
+ <details><summary>`config(noArmor:)` - noArmor</summary><br>
2552
2565
 
2553
- Turn off [Dotenvx VLT ⛨](https://dotenvx.com/vlt) features.
2566
+ Turn off [Dotenvx Armor ⛨](https://dotenvx.com/armor) features.
2554
2567
 
2555
2568
  ```js
2556
2569
  // index.js
2557
- require('@dotenvx/dotenvx').config({noVlt: true})
2570
+ require('@dotenvx/dotenvx').config({noArmor: true})
2558
2571
  ```
2559
2572
 
2573
+ `noVlt` and `noOps` are deprecated aliases.
2574
+
2560
2575
  </details>
2561
2576
  <details><summary>`parse(src)`</summary><br>
2562
2577
 
@@ -2650,17 +2665,17 @@ This is known as *Decryption at Access* and is written about in [the whitepaper]
2650
2665
 
2651
2666
  &nbsp;
2652
2667
 
2653
- ## VLT
2668
+ ## Armor
2654
2669
 
2655
- [![dotenvx-vlt](https://dotenvx.com/dotenvx-vlt-banner.png?v2)](https://dotenvx.com/vlt)
2670
+ [![dotenvx-armor](https://dotenvx.com/dotenvx-armor-banner.png?v2)](https://dotenvx.com/armor)
2656
2671
 
2657
2672
  ```
2658
2673
  ⛨ ARMORED KEYS: Harden your private keys.
2659
- ⮕ install [curl -sfS https://dotenvx.sh/vlt | sh]
2660
- ⮕ then run [dotenvx vlt login]
2674
+ ⮕ install [curl -sfS https://dotenvx.sh/armor | sh]
2675
+ ⮕ then run [dotenvx armor login]
2661
2676
  ```
2662
2677
 
2663
- [Learn more](https://dotenvx.com/vlt)
2678
+ [Learn more](https://dotenvx.com/armor)
2664
2679
 
2665
2680
  &nbsp;
2666
2681
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "1.69.2",
2
+ "version": "1.71.0",
3
3
  "name": "@dotenvx/dotenvx",
4
- "description": "secrets for agents–from the creator of `dotenv`",
4
+ "description": "a secure dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
6
6
  "keywords": [
7
7
  "dotenv",
@@ -35,11 +35,12 @@
35
35
  "scripts": {
36
36
  "standard": "standard",
37
37
  "standard:fix": "standard --fix",
38
- "test": "tap run --test-env=DOTENVX_NO_VLT=true --allow-empty-coverage --disable-coverage --timeout=60000",
39
- "test-coverage": "tap run --test-env=DOTENVX_NO_VLT=true --show-full-coverage --timeout=60000",
38
+ "test": "tap run --test-env=DOTENVX_NO_ARMOR=true --allow-empty-coverage --disable-coverage --timeout=60000",
39
+ "test-coverage": "tap run --test-env=DOTENVX_NO_ARMOR=true --show-full-coverage --timeout=60000",
40
40
  "testshell": "bash shellspec",
41
- "prerelease": "npm test && npm run testshell",
42
- "release": "standard-version"
41
+ "release:check": "npm test && npm run testshell",
42
+ "prerelease": "npm run release:check",
43
+ "release": "npm run release:check && standard-version"
43
44
  },
44
45
  "funding": "https://dotenvx.com",
45
46
  "dependencies": {
@@ -5,17 +5,17 @@ const Decrypt = require('./../../lib/services/decrypt')
5
5
  const catchAndLog = require('../../lib/helpers/catchAndLog')
6
6
  const createSpinner = require('../../lib/helpers/createSpinner')
7
7
  const Session = require('../../db/session')
8
- const normalizeVltOptions = require('./normalizeVltOptions')
8
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
9
9
 
10
10
  async function decrypt () {
11
- const options = normalizeVltOptions(this.opts())
11
+ const options = normalizeArmorOptions(this.opts())
12
12
  const spinner = await createSpinner({ ...options, text: 'decrypting' })
13
13
 
14
14
  logger.debug(`options: ${JSON.stringify(options)}`)
15
15
 
16
16
  const sesh = new Session()
17
17
  const envs = this.envs
18
- const noVlt = options.vlt === false || (await sesh.noVlt())
18
+ const noArmor = options.armor === false || (await sesh.noArmor())
19
19
 
20
20
  let errorCount = 0
21
21
 
@@ -23,7 +23,7 @@ async function decrypt () {
23
23
  if (options.stdout) {
24
24
  const {
25
25
  processedEnvs
26
- } = await new Decrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
26
+ } = await new Decrypt(envs, options.key, options.excludeKey, options.envKeysFile, noArmor).run()
27
27
  if (spinner) spinner.stop()
28
28
  for (const processedEnv of processedEnvs) {
29
29
  if (processedEnv.error) {
@@ -45,7 +45,7 @@ async function decrypt () {
45
45
  processedEnvs,
46
46
  changedFilepaths,
47
47
  unchangedFilepaths
48
- } = await new Decrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
48
+ } = await new Decrypt(envs, options.key, options.excludeKey, options.envKeysFile, noArmor).run()
49
49
 
50
50
  for (const processedEnv of processedEnvs) {
51
51
  logger.verbose(`decrypting ${processedEnv.envFilepath} (${processedEnv.filepath})`)
@@ -7,22 +7,22 @@ const catchAndLog = require('../../lib/helpers/catchAndLog')
7
7
  const createSpinner = require('../../lib/helpers/createSpinner')
8
8
  const prompts = require('../../lib/helpers/prompts')
9
9
  const Session = require('../../db/session')
10
- const normalizeVltOptions = require('./normalizeVltOptions')
10
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
11
11
 
12
12
  function keypairSpinnerHooks (spinner) {
13
- let stoppedForVlt = false
13
+ let stoppedForArmor = false
14
14
 
15
15
  return {
16
16
  onStderr: () => {
17
- if (spinner && !stoppedForVlt) {
17
+ if (spinner && !stoppedForArmor) {
18
18
  spinner.stop()
19
- stoppedForVlt = true
19
+ stoppedForArmor = true
20
20
  }
21
21
  },
22
22
  after: () => {
23
- if (spinner && stoppedForVlt) {
23
+ if (spinner && stoppedForArmor) {
24
24
  spinner.start('encrypting')
25
- stoppedForVlt = false
25
+ stoppedForArmor = false
26
26
  }
27
27
  }
28
28
  }
@@ -39,7 +39,7 @@ function keyStorageSelector (spinner) {
39
39
  message: 'Choose private key storage',
40
40
  choices: [
41
41
  { name: '◫ File (.env.keys)', value: 'file' },
42
- { name: '⛨ Armor (vlt.dotenvx.com)', value: 'armored' }
42
+ { name: '⛨ Armor (armor.dotenvx.com)', value: 'armored' }
43
43
  ]
44
44
  }, {
45
45
  input: process.stdin,
@@ -51,12 +51,12 @@ function keyStorageSelector (spinner) {
51
51
  }
52
52
  }
53
53
 
54
- function encryptOptions (spinner, noVlt) {
54
+ function encryptOptions (spinner, noArmor) {
55
55
  const options = {
56
56
  keypairHooks: keypairSpinnerHooks(spinner)
57
57
  }
58
58
 
59
- if (!noVlt) {
59
+ if (!noArmor) {
60
60
  options.selectKeyStorage = keyStorageSelector(spinner)
61
61
  }
62
62
 
@@ -64,21 +64,21 @@ function encryptOptions (spinner, noVlt) {
64
64
  }
65
65
 
66
66
  async function encrypt () {
67
- const options = normalizeVltOptions(this.opts())
67
+ const options = normalizeArmorOptions(this.opts())
68
68
  const spinner = await createSpinner({ ...options, text: 'encrypting' })
69
69
 
70
70
  logger.debug(`options: ${JSON.stringify(options)}`)
71
71
 
72
72
  const sesh = new Session()
73
73
  const envs = this.envs
74
- const noVlt = options.vlt === false || (!options.token && (await sesh.noVlt()))
74
+ const noArmor = options.armor === false || (!options.token && (await sesh.noArmor()))
75
75
  const noCreate = options.create === false
76
76
 
77
77
  // stdout - should not have a try so that exit codes can surface to stdout
78
78
  if (options.stdout) {
79
79
  const {
80
80
  processedEnvs
81
- } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt, noCreate, options.token, encryptOptions(spinner, noVlt)).run()
81
+ } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noArmor, noCreate, options.token, encryptOptions(spinner, noArmor)).run()
82
82
  if (spinner) spinner.stop()
83
83
  for (const processedEnv of processedEnvs) {
84
84
  console.log(processedEnv.envSrc)
@@ -90,7 +90,7 @@ async function encrypt () {
90
90
  processedEnvs,
91
91
  changedFilepaths,
92
92
  unchangedFilepaths
93
- } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt, noCreate, options.token, encryptOptions(spinner, noVlt)).run()
93
+ } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noArmor, noCreate, options.token, encryptOptions(spinner, noArmor)).run()
94
94
 
95
95
  for (const processedEnv of processedEnvs) {
96
96
  logger.verbose(`encrypting ${processedEnv.envFilepath} (${processedEnv.filepath})`)
@@ -6,10 +6,10 @@ const catchAndLog = require('./../../lib/helpers/catchAndLog')
6
6
  const createSpinner = require('../../lib/helpers/createSpinner')
7
7
  const Session = require('../../db/session')
8
8
  const Get = require('./../../lib/services/get')
9
- const normalizeVltOptions = require('./normalizeVltOptions')
9
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
10
10
 
11
11
  async function get (key) {
12
- const options = normalizeVltOptions(this.opts())
12
+ const options = normalizeArmorOptions(this.opts())
13
13
  const spinner = await createSpinner({ ...options, text: 'decrypting' })
14
14
 
15
15
  logger.debug(`options: ${JSON.stringify(options)}`)
@@ -30,8 +30,8 @@ async function get (key) {
30
30
 
31
31
  try {
32
32
  const sesh = new Session()
33
- const noVlt = options.vlt === false || (await sesh.noVlt())
34
- const { parsed, errors } = await new Get(key, envs, options.overload, options.all, options.envKeysFile, noVlt).run()
33
+ const noArmor = options.armor === false || (await sesh.noArmor())
34
+ const { parsed, errors } = await new Get(key, envs, options.overload, options.all, options.envKeysFile, noArmor).run()
35
35
 
36
36
  for (const error of errors || []) {
37
37
  if (options.strict) throw error // throw immediately if strict
@@ -3,10 +3,10 @@ const { logger } = require('./../../shared/logger')
3
3
  const Keypair = require('./../../lib/services/keypair')
4
4
  const createSpinner = require('../../lib/helpers/createSpinner')
5
5
  const Session = require('../../db/session')
6
- const normalizeVltOptions = require('./normalizeVltOptions')
6
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
7
7
 
8
8
  async function keypair (key) {
9
- const options = normalizeVltOptions(this.opts())
9
+ const options = normalizeArmorOptions(this.opts())
10
10
  const spinner = await createSpinner({ ...options, text: 'retrieving' })
11
11
 
12
12
  logger.debug(`options: ${JSON.stringify(options)}`)
@@ -17,8 +17,8 @@ async function keypair (key) {
17
17
  const prettyPrint = options.prettyPrint || options.pp
18
18
 
19
19
  const sesh = new Session()
20
- const noVlt = options.vlt === false || await sesh.noVlt()
21
- const keypairs = await new Keypair(options.envFile, options.envKeysFile, noVlt).run()
20
+ const noArmor = options.armor === false || await sesh.noArmor()
21
+ const keypairs = await new Keypair(options.envFile, options.envKeysFile, noArmor).run()
22
22
  const results = key ? keypairs[key] : keypairs
23
23
 
24
24
  if (spinner) spinner.stop()
@@ -0,0 +1,11 @@
1
+ function normalizeArmorOptions (options) {
2
+ if (options.armor === false || options.ops === false || options.vlt === false) {
3
+ options.armor = false
4
+ options.ops = false
5
+ options.vlt = false
6
+ }
7
+
8
+ return options
9
+ }
10
+
11
+ module.exports = normalizeArmorOptions
@@ -6,23 +6,23 @@ const Rotate = require('./../../lib/services/rotate')
6
6
  const catchAndLog = require('../../lib/helpers/catchAndLog')
7
7
  const createSpinner = require('../../lib/helpers/createSpinner')
8
8
  const Session = require('../../db/session')
9
- const normalizeVltOptions = require('./normalizeVltOptions')
9
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
10
10
 
11
11
  async function rotate () {
12
- const options = normalizeVltOptions(this.opts())
12
+ const options = normalizeArmorOptions(this.opts())
13
13
  const spinner = await createSpinner({ ...options, text: 'rotating', frames: ['⟳', '⤾', '⥁'] })
14
14
 
15
15
  logger.debug(`options: ${JSON.stringify(options)}`)
16
16
 
17
17
  const envs = this.envs
18
18
  const sesh = new Session()
19
- const noVlt = options.vlt === false || (await sesh.noVlt())
19
+ const noArmor = options.armor === false || (await sesh.noArmor())
20
20
 
21
21
  // stdout - should not have a try so that exit codes can surface to stdout
22
22
  if (options.stdout) {
23
23
  const {
24
24
  processedEnvs
25
- } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
25
+ } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noArmor).run()
26
26
  if (spinner) spinner.stop()
27
27
  for (const processedEnv of processedEnvs) {
28
28
  console.log(processedEnv.envSrc)
@@ -38,7 +38,7 @@ async function rotate () {
38
38
  processedEnvs,
39
39
  changedFilepaths,
40
40
  unchangedFilepaths
41
- } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
41
+ } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noArmor).run()
42
42
 
43
43
  for (const processedEnv of processedEnvs) {
44
44
  logger.verbose(`rotating ${processedEnv.envFilepath} (${processedEnv.filepath})`)
@@ -6,13 +6,13 @@ const Run = require('./../../lib/services/run')
6
6
  const catchAndLog = require('./../../lib/helpers/catchAndLog')
7
7
  const createSpinner = require('../../lib/helpers/createSpinner')
8
8
  const Session = require('../../db/session')
9
- const normalizeVltOptions = require('./normalizeVltOptions')
9
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
10
10
 
11
11
  const conventions = require('./../../lib/helpers/conventions')
12
12
  const { determine } = require('./../../lib/helpers/envResolution')
13
13
 
14
14
  async function run () {
15
- const options = normalizeVltOptions(this.opts())
15
+ const options = normalizeArmorOptions(this.opts())
16
16
  const commandArgs = this.args
17
17
  const spinner = await createSpinner({ ...options, text: 'injecting' })
18
18
 
@@ -22,7 +22,7 @@ async function run () {
22
22
  const ignore = options.ignore || []
23
23
 
24
24
  const sesh = new Session()
25
- const noVlt = options.vlt === false || (await sesh.noVlt())
25
+ const noArmor = options.armor === false || (!options.token && (await sesh.noArmor()))
26
26
 
27
27
  if (commandArgs.length < 1) {
28
28
  if (spinner) spinner.stop()
@@ -54,7 +54,8 @@ async function run () {
54
54
  readableStrings,
55
55
  readableFilepaths,
56
56
  uniqueInjectedKeys
57
- } = await new Run(envs, options.overload, process.env, options.envKeysFile, noVlt, {
57
+ } = await new Run(envs, options.overload, process.env, options.envKeysFile, noArmor, {
58
+ token: options.token,
58
59
  keypairHooks: {
59
60
  after: () => {
60
61
  if (spinner) spinner.start('injecting')
@@ -5,10 +5,10 @@ const catchAndLog = require('../../lib/helpers/catchAndLog')
5
5
  const createSpinner = require('../../lib/helpers/createSpinner')
6
6
  const Session = require('../../db/session')
7
7
  const Sets = require('./../../lib/services/sets')
8
- const normalizeVltOptions = require('./normalizeVltOptions')
8
+ const normalizeArmorOptions = require('./normalizeArmorOptions')
9
9
 
10
10
  async function set (key, value) {
11
- const options = normalizeVltOptions(this.opts())
11
+ const options = normalizeArmorOptions(this.opts())
12
12
 
13
13
  let encrypt = true
14
14
  let settingMessage = 'encrypting'
@@ -27,14 +27,14 @@ async function set (key, value) {
27
27
  const sesh = new Session()
28
28
  const envs = this.envs
29
29
  const envKeysFilepath = options.envKeysFile
30
- const noVlt = options.vlt === false || (await sesh.noVlt())
30
+ const noArmor = options.armor === false || (await sesh.noArmor())
31
31
  const noCreate = options.create === false
32
32
 
33
33
  const {
34
34
  processedEnvs,
35
35
  changedFilepaths,
36
36
  unchangedFilepaths
37
- } = await new Sets(key, value, envs, encrypt, envKeysFilepath, noVlt, noCreate).run()
37
+ } = await new Sets(key, value, envs, encrypt, envKeysFilepath, noArmor, noCreate).run()
38
38
 
39
39
  let withEncryption = ''
40
40
 
@@ -65,7 +65,7 @@ ext.command('precommit')
65
65
  return require('./../actions/ext/precommit').apply(this, args)
66
66
  })
67
67
 
68
- // dotenvx scan
68
+ // dotenvx ext scan
69
69
  ext.command('scan')
70
70
  .description('scan for leaked secrets')
71
71
  .action(function (...args) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /* c8 ignore start */
4
- const { Command } = require('commander')
4
+ const { Command, Option } = require('commander')
5
5
  const program = new Command()
6
6
 
7
7
  const { setLogLevel, logger } = require('../shared/logger')
@@ -43,7 +43,7 @@ program
43
43
  setLogLevel(options)
44
44
  })
45
45
 
46
- // for dynamic loading of dotenvx-vlt, etc
46
+ // for dynamic loading of dotenvx-armor, etc
47
47
  program
48
48
  .argument('[command]', 'dynamic command')
49
49
  .argument('[args...]', 'dynamic command arguments')
@@ -70,8 +70,10 @@ program.command('run')
70
70
  .option('--strict', 'process.exit(1) on any errors', false)
71
71
  .option('--convention <name>', 'load a .env convention (available conventions: [\'nextjs\', \'flow\'])')
72
72
  .option('--ignore <errorCodes...>', 'error code(s) to ignore (example: --ignore=MISSING_ENV_FILE)')
73
- .option('--no-ops', 'disable dotenvx-ops features')
74
- .option('--no-vlt', 'disable dotenvx-vlt features')
73
+ .option('--token <token>', 'set Armor ⛨ token')
74
+ .option('--no-armor', 'disable dotenvx-armor features')
75
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
76
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
75
77
  .action(function (...args) {
76
78
  this.envs = envs
77
79
  return require('./actions/run').apply(this, args)
@@ -93,8 +95,9 @@ program.command('get')
93
95
  .option('-pp, --pretty-print', 'pretty print output')
94
96
  .option('--pp', 'pretty print output (alias)')
95
97
  .option('--format <type>', 'format of the output (json, shell, colon, eval)', 'json')
96
- .option('--no-ops', 'disable dotenvx-ops features')
97
- .option('--no-vlt', 'disable dotenvx-vlt features')
98
+ .option('--no-armor', 'disable dotenvx-armor features')
99
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
100
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
98
101
  .action(function (...args) {
99
102
  this.envs = envs
100
103
  return require('./actions/get').apply(this, args)
@@ -113,8 +116,9 @@ program.command('set')
113
116
  .option('-c, --encrypt', 'encrypt value', true)
114
117
  .option('-p, --plain', 'store value as plain text', false)
115
118
  .option('--no-create', 'do not create .env file(s) when missing')
116
- .option('--no-ops', 'disable dotenvx-ops features')
117
- .option('--no-vlt', 'disable dotenvx-vlt features')
119
+ .option('--no-armor', 'disable dotenvx-armor features')
120
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
121
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
118
122
  .action(function (...args) {
119
123
  this.envs = envs
120
124
  return require('./actions/set').apply(this, args)
@@ -128,10 +132,11 @@ program.command('encrypt')
128
132
  .option('-k, --key <keys...>', 'keys(s) to encrypt (default: all keys in file)')
129
133
  .option('-ek, --exclude-key <excludeKeys...>', 'keys(s) to exclude from encryption (default: none)')
130
134
  .option('--stdout', 'send to stdout')
131
- .option('--token <token>', 'set Vlt Ops token')
135
+ .option('--token <token>', 'set Armor token')
132
136
  .option('--no-create', 'do not create .env file(s) when missing')
133
- .option('--no-ops', 'disable dotenvx-ops features')
134
- .option('--no-vlt', 'disable dotenvx-vlt features')
137
+ .option('--no-armor', 'disable dotenvx-armor features')
138
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
139
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
135
140
  .action(function (...args) {
136
141
  this.envs = envs
137
142
  return require('./actions/encrypt').apply(this, args)
@@ -144,8 +149,9 @@ program.command('decrypt')
144
149
  .option('-fk, --env-keys-file <path>', 'path to your .env.keys file (default: same path as your env file)')
145
150
  .option('-k, --key <keys...>', 'keys(s) to decrypt (default: all keys in file)')
146
151
  .option('-ek, --exclude-key <excludeKeys...>', 'keys(s) to exclude from decryption (default: none)')
147
- .option('--no-ops', 'disable dotenvx-ops features')
148
- .option('--no-vlt', 'disable dotenvx-vlt features')
152
+ .option('--no-armor', 'disable dotenvx-armor features')
153
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
154
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
149
155
  .option('--stdout', 'send to stdout')
150
156
  .action(function (...args) {
151
157
  this.envs = envs
@@ -159,8 +165,9 @@ program.command('rotate')
159
165
  .option('-fk, --env-keys-file <path>', 'path to your .env.keys file (default: same path as your env file)')
160
166
  .option('-k, --key <keys...>', 'keys(s) to encrypt (default: all keys in file)')
161
167
  .option('-ek, --exclude-key <excludeKeys...>', 'keys(s) to exclude from encryption (default: none)')
162
- .option('--no-ops', 'disable dotenvx-ops features')
163
- .option('--no-vlt', 'disable dotenvx-vlt features')
168
+ .option('--no-armor', 'disable dotenvx-armor features')
169
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
170
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
164
171
  .option('--stdout', 'send to stdout')
165
172
  .action(function (...args) {
166
173
  this.envs = envs
@@ -174,8 +181,9 @@ program.command('keypair')
174
181
  .argument('[KEY]', 'environment variable key name')
175
182
  .option('-f, --env-file <paths...>', 'path(s) to your env file(s)')
176
183
  .option('-fk, --env-keys-file <path>', 'path to your .env.keys file (default: same path as your env file)')
177
- .option('--no-ops', 'disable dotenvx-ops features')
178
- .option('--no-vlt', 'disable dotenvx-vlt features')
184
+ .option('--no-armor', 'disable dotenvx-armor features')
185
+ .addOption(new Option('--no-vlt', 'disable dotenvx-vlt features (deprecated. use --no-armor)').hideHelp())
186
+ .addOption(new Option('--no-ops', 'disable dotenvx-ops features (deprecated. use --no-armor)').hideHelp())
179
187
  .option('-pp, --pretty-print', 'pretty print output')
180
188
  .option('--pp', 'pretty print output (alias)')
181
189
  .option('--format <type>', 'format of the output (json, shell, colon)', 'json')
@@ -206,8 +214,8 @@ program.command('login', { hidden: true })
206
214
  .description('')
207
215
  .allowUnknownOption()
208
216
  .action(() => {
209
- const rawArgs = ['vlt', 'login', ...process.argv.slice(3)]
210
- executeDynamic(program, 'vlt', rawArgs)
217
+ const rawArgs = ['armor', 'login', ...process.argv.slice(3)]
218
+ executeDynamic(program, 'armor', rawArgs)
211
219
  })
212
220
 
213
221
  // dotenvx logout
@@ -215,17 +223,8 @@ program.command('logout', { hidden: true })
215
223
  .description('log out of your dotenvx account')
216
224
  .allowUnknownOption()
217
225
  .action(() => {
218
- const rawArgs = ['vlt', 'logout', ...process.argv.slice(3)]
219
- executeDynamic(program, 'vlt', rawArgs)
220
- })
221
-
222
- // dotenvx armor
223
- program.command('armor', { hidden: true })
224
- .description('ARMORED KEYS ⛨')
225
- .allowUnknownOption()
226
- .action((args) => {
227
- const rawArgs = ['vlt', 'armor', ...process.argv.slice(3)]
228
- executeDynamic(program, 'vlt', rawArgs)
226
+ const rawArgs = ['armor', 'logout', ...process.argv.slice(3)]
227
+ executeDynamic(program, 'armor', rawArgs)
229
228
  })
230
229
 
231
230
  // dotenvx help
@@ -244,11 +243,10 @@ program.command('help [command]')
244
243
  }
245
244
  })
246
245
 
247
- // dotenvx vlt ops
246
+ // dotenvx armor
248
247
  program.addHelpText('after', ' ')
249
248
  program.addHelpText('after', 'Advanced: ')
250
- program.addHelpText('after', ' login')
251
- program.addHelpText('after', ' vlt ⛨ ARMORED KEYS [www.dotenvx.com/vlt]')
249
+ program.addHelpText('after', ' armor ⛨ ARMORED KEYS [www.dotenvx.com/armor]')
252
250
  program.addHelpText('after', ' ext ⊕ extensions')
253
251
 
254
252
  // dotenvx ext
package/src/db/session.js CHANGED
@@ -1,23 +1,23 @@
1
- const Vlt = require('./../lib/extensions/vlt')
1
+ const Armor = require('./../lib/extensions/armor')
2
2
  const { logger } = require('./../shared/logger')
3
3
 
4
4
  class Session {
5
5
  constructor () {
6
- this.vlt = new Vlt()
6
+ this.armor = new Armor()
7
7
  }
8
8
 
9
9
  //
10
- // vlt status helpers
10
+ // armor status helpers
11
11
  //
12
- async noVlt () {
13
- const status = await this.vlt.status()
14
- logger.debug(`vlt: ${status}`)
12
+ async noArmor () {
13
+ const status = await this.armor.status()
14
+ logger.debug(`armor: ${status}`)
15
15
  return status === 'off'
16
16
  }
17
17
 
18
- noVltSync () {
19
- const status = this.vlt.statusSync()
20
- logger.debug(`vlt: ${status}`)
18
+ noArmorSync () {
19
+ const status = this.armor.statusSync()
20
+ logger.debug(`armor: ${status}`)
21
21
  return status === 'off'
22
22
  }
23
23
  }
@@ -4,9 +4,9 @@ const util = require('util')
4
4
  const { logger } = require('../../shared/logger')
5
5
 
6
6
  const execFile = util.promisify(childProcess.execFile)
7
- const BINARY_NAMES = ['dotenvx-vlt', 'dotenvx-ops']
7
+ const BINARY_NAMES = ['dotenvx-armor', 'dotenvx-vlt', 'dotenvx-ops']
8
8
 
9
- class Vlt {
9
+ class Armor {
10
10
  async status () {
11
11
  if (this._isForcedOff()) return 'off'
12
12
 
@@ -195,8 +195,8 @@ class Vlt {
195
195
  }
196
196
 
197
197
  _isForcedOff () {
198
- return process.env.DOTENVX_NO_OPS === 'true' || process.env.DOTENVX_NO_VLT === 'true'
198
+ return process.env.DOTENVX_NO_ARMOR === 'true' || process.env.DOTENVX_NO_VLT === 'true' || process.env.DOTENVX_NO_OPS === 'true'
199
199
  }
200
200
  }
201
201
 
202
- module.exports = Vlt
202
+ module.exports = Armor