@dotenvx/dotenvx 1.69.0 → 1.69.1

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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
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.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.69.1...main)
6
+
7
+ ## [1.69.1](https://github.com/dotenvx/dotenvx/compare/v1.69.0...v1.69.1) (2026-05-25)
8
+
9
+ ### Changed
10
+
11
+ * Internally rename `ops` to `vlt` ([#823](https://github.com/dotenvx/dotenvx/pull/823))
6
12
 
7
13
  ## [1.69.0](https://github.com/dotenvx/dotenvx/compare/v1.68.1...v1.69.0) (2026-05-25)
8
14
 
@@ -302,7 +308,7 @@ export default {
302
308
 
303
309
  ### Added
304
310
 
305
- * Add hint on `.env.keys` for `dotenvx ops backup`. Dotenvx Ops Backup lets you back up your private keys securely with just a single command. It's a convenient alterantive to manually copy/pasting them in and out of 1Password. ([#718](https://github.com/dotenvx/dotenvx/pull/718))
311
+ * Add hint on `.env.keys` for `dotenvx armor up`. Dotenvx Armor lets you armor your private keys securely with just a single command. It's a convenient alternative to manually copy/pasting them in and out of 1Password. ([#718](https://github.com/dotenvx/dotenvx/pull/718))
306
312
 
307
313
  ## [1.51.2](https://github.com/dotenvx/dotenvx/compare/v1.51.1...v1.51.2) (2025-12-12)
308
314
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.69.0",
2
+ "version": "1.69.1",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "secrets for agents–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -15,7 +15,7 @@ async function decrypt () {
15
15
 
16
16
  const sesh = new Session()
17
17
  const envs = this.envs
18
- const noOps = options.ops === false || (await sesh.noVlt())
18
+ const noVlt = options.vlt === false || (await sesh.noVlt())
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, noOps).run()
26
+ } = await new Decrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).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, noOps).run()
48
+ } = await new Decrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
49
49
 
50
50
  for (const processedEnv of processedEnvs) {
51
51
  logger.verbose(`decrypting ${processedEnv.envFilepath} (${processedEnv.filepath})`)
@@ -11,19 +11,19 @@ const Session = require('../../db/session')
11
11
  const normalizeVltOptions = require('./normalizeVltOptions')
12
12
 
13
13
  function keypairSpinnerHooks (spinner) {
14
- let stoppedForOps = false
14
+ let stoppedForVlt = false
15
15
 
16
16
  return {
17
17
  onStderr: () => {
18
- if (spinner && !stoppedForOps) {
18
+ if (spinner && !stoppedForVlt) {
19
19
  spinner.stop()
20
- stoppedForOps = true
20
+ stoppedForVlt = true
21
21
  }
22
22
  },
23
23
  after: () => {
24
- if (spinner && stoppedForOps) {
24
+ if (spinner && stoppedForVlt) {
25
25
  spinner.start('encrypting')
26
- stoppedForOps = false
26
+ stoppedForVlt = false
27
27
  }
28
28
  }
29
29
  }
@@ -52,12 +52,12 @@ function keyStorageSelector (spinner) {
52
52
  }
53
53
  }
54
54
 
55
- function encryptOptions (spinner, noOps) {
55
+ function encryptOptions (spinner, noVlt) {
56
56
  const options = {
57
57
  keypairHooks: keypairSpinnerHooks(spinner)
58
58
  }
59
59
 
60
- if (!noOps) {
60
+ if (!noVlt) {
61
61
  options.selectKeyStorage = keyStorageSelector(spinner)
62
62
  }
63
63
 
@@ -72,14 +72,14 @@ async function encrypt () {
72
72
 
73
73
  const sesh = new Session()
74
74
  const envs = this.envs
75
- const noOps = options.ops === false || (!options.token && (await sesh.noVlt()))
75
+ const noVlt = options.vlt === false || (!options.token && (await sesh.noVlt()))
76
76
  const noCreate = options.create === false
77
77
 
78
78
  // stdout - should not have a try so that exit codes can surface to stdout
79
79
  if (options.stdout) {
80
80
  const {
81
81
  processedEnvs
82
- } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noOps, noCreate, options.token, encryptOptions(spinner, noOps)).run()
82
+ } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt, noCreate, options.token, encryptOptions(spinner, noVlt)).run()
83
83
  if (spinner) spinner.stop()
84
84
  for (const processedEnv of processedEnvs) {
85
85
  console.log(processedEnv.envSrc)
@@ -91,7 +91,7 @@ async function encrypt () {
91
91
  processedEnvs,
92
92
  changedFilepaths,
93
93
  unchangedFilepaths
94
- } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noOps, noCreate, options.token, encryptOptions(spinner, noOps)).run()
94
+ } = await new Encrypt(envs, options.key, options.excludeKey, options.envKeysFile, noVlt, noCreate, options.token, encryptOptions(spinner, noVlt)).run()
95
95
 
96
96
  for (const processedEnv of processedEnvs) {
97
97
  logger.verbose(`encrypting ${processedEnv.envFilepath} (${processedEnv.filepath})`)
@@ -30,8 +30,8 @@ async function get (key) {
30
30
 
31
31
  try {
32
32
  const sesh = new Session()
33
- const noOps = options.ops === false || (await sesh.noVlt())
34
- const { parsed, errors } = await new Get(key, envs, options.overload, options.all, options.envKeysFile, noOps).run()
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()
35
35
 
36
36
  for (const error of errors || []) {
37
37
  if (options.strict) throw error // throw immediately if strict
@@ -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 noOps = options.ops === false || await sesh.noVlt()
21
- const keypairs = await new Keypair(options.envFile, options.envKeysFile, noOps).run()
20
+ const noVlt = options.vlt === false || await sesh.noVlt()
21
+ const keypairs = await new Keypair(options.envFile, options.envKeysFile, noVlt).run()
22
22
  const results = key ? keypairs[key] : keypairs
23
23
 
24
24
  if (spinner) spinner.stop()
@@ -17,13 +17,13 @@ async function rotate () {
17
17
 
18
18
  const envs = this.envs
19
19
  const sesh = new Session()
20
- const noOps = options.ops === false || (await sesh.noVlt())
20
+ const noVlt = options.vlt === false || (await sesh.noVlt())
21
21
 
22
22
  // stdout - should not have a try so that exit codes can surface to stdout
23
23
  if (options.stdout) {
24
24
  const {
25
25
  processedEnvs
26
- } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noOps).run()
26
+ } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
27
27
  if (spinner) spinner.stop()
28
28
  for (const processedEnv of processedEnvs) {
29
29
  console.log(processedEnv.envSrc)
@@ -39,7 +39,7 @@ async function rotate () {
39
39
  processedEnvs,
40
40
  changedFilepaths,
41
41
  unchangedFilepaths
42
- } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noOps).run()
42
+ } = await new Rotate(envs, options.key, options.excludeKey, options.envKeysFile, noVlt).run()
43
43
 
44
44
  for (const processedEnv of processedEnvs) {
45
45
  logger.verbose(`rotating ${processedEnv.envFilepath} (${processedEnv.filepath})`)
@@ -22,7 +22,7 @@ async function run () {
22
22
  const ignore = options.ignore || []
23
23
 
24
24
  const sesh = new Session()
25
- const noOps = options.ops === false || (await sesh.noVlt())
25
+ const noVlt = options.vlt === false || (await sesh.noVlt())
26
26
 
27
27
  if (commandArgs.length < 1) {
28
28
  if (spinner) spinner.stop()
@@ -54,7 +54,7 @@ async function run () {
54
54
  readableStrings,
55
55
  readableFilepaths,
56
56
  uniqueInjectedKeys
57
- } = await new Run(envs, options.overload, process.env, options.envKeysFile, noOps, {
57
+ } = await new Run(envs, options.overload, process.env, options.envKeysFile, noVlt, {
58
58
  keypairHooks: {
59
59
  before: () => {
60
60
  if (spinner) spinner.start('retrieving')
@@ -28,14 +28,14 @@ async function set (key, value) {
28
28
  const sesh = new Session()
29
29
  const envs = this.envs
30
30
  const envKeysFilepath = options.envKeysFile
31
- const noOps = options.ops === false || (await sesh.noVlt())
31
+ const noVlt = options.vlt === false || (await sesh.noVlt())
32
32
  const noCreate = options.create === false
33
33
 
34
34
  const {
35
35
  processedEnvs,
36
36
  changedFilepaths,
37
37
  unchangedFilepaths
38
- } = await new Sets(key, value, envs, encrypt, envKeysFilepath, noOps, noCreate).run()
38
+ } = await new Sets(key, value, envs, encrypt, envKeysFilepath, noVlt, noCreate).run()
39
39
 
40
40
  let withEncryption = ''
41
41
 
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
- opsKeypair: require('./opsKeypair'),
3
- opsKeypairSync: require('./opsKeypairSync'),
2
+ vltKeypair: require('./vltKeypair'),
3
+ vltKeypairSync: require('./vltKeypairSync'),
4
4
  localKeypair: require('./localKeypair'),
5
5
  encryptValue: require('./encryptValue'),
6
6
  decryptKeyValue: require('./decryptKeyValue'),
@@ -2,7 +2,7 @@ const FIRST_TIME_KEYS_SRC = [
2
2
  '#/------------------!DOTENV_PRIVATE_KEYS!-------------------/',
3
3
  '#/ private decryption keys. DO NOT commit to source control /',
4
4
  '#/ [how it works](https://dotenvx.com/encryption) /',
5
- // '#/ backup with: `dotenvx ops backup` /',
5
+ '#/ harden private keys: `dotenvx armor up` /',
6
6
  '#/----------------------------------------------------------/'
7
7
  ].join('\n')
8
8
 
@@ -2,7 +2,7 @@ const FIRST_TIME_KEYS_SRC = [
2
2
  '#/------------------!DOTENV_PRIVATE_KEYS!-------------------/',
3
3
  '#/ private decryption keys. DO NOT commit to source control /',
4
4
  '#/ [how it works](https://dotenvx.com/encryption) /',
5
- // '#/ backup with: `dotenvx ops backup` /',
5
+ '#/ harden private keys: `dotenvx armor up` /',
6
6
  '#/----------------------------------------------------------/'
7
7
  ].join('\n')
8
8
 
@@ -1,13 +1,13 @@
1
1
  const mutateSrc = require('./mutateSrc')
2
2
  const mutateKeysSrc = require('./mutateKeysSrc')
3
- const opsKeypair = require('./opsKeypair')
3
+ const vltKeypair = require('./vltKeypair')
4
4
  const localKeypair = require('./localKeypair')
5
5
  const { keyNames } = require('../keyResolution')
6
6
 
7
- async function provision ({ envSrc, envFilepath, keysFilepath, noOps, token, keypairHooks, selectKeyStorage }) {
8
- noOps = noOps !== false
9
- if (!noOps && selectKeyStorage) {
10
- noOps = await selectKeyStorage() !== 'armored'
7
+ async function provision ({ envSrc, envFilepath, keysFilepath, noVlt, token, keypairHooks, selectKeyStorage }) {
8
+ noVlt = noVlt !== false
9
+ if (!noVlt && selectKeyStorage) {
10
+ noVlt = await selectKeyStorage() !== 'armored'
11
11
  }
12
12
 
13
13
  const { publicKeyName, privateKeyName } = keyNames(envFilepath)
@@ -19,12 +19,12 @@ async function provision ({ envSrc, envFilepath, keysFilepath, noOps, token, key
19
19
  let localPrivateKeyAdded = false
20
20
  let remotePrivateKeyAdded = false
21
21
 
22
- if (noOps) {
22
+ if (noVlt) {
23
23
  const kp = localKeypair()
24
24
  publicKey = kp.publicKey
25
25
  privateKey = kp.privateKey
26
26
  } else {
27
- const kp = await opsKeypair(undefined, { token, envFilepath, hooks: keypairHooks })
27
+ const kp = await vltKeypair(undefined, { token, envFilepath, hooks: keypairHooks })
28
28
  publicKey = kp.publicKey
29
29
  privateKey = kp.privateKey
30
30
  }
@@ -32,7 +32,7 @@ async function provision ({ envSrc, envFilepath, keysFilepath, noOps, token, key
32
32
  const mutated = mutateSrc({ envSrc, envFilepath, keysFilepath, publicKeyName, publicKeyValue: publicKey })
33
33
  envSrc = mutated.envSrc
34
34
 
35
- if (noOps) {
35
+ if (noVlt) {
36
36
  const mutated = await mutateKeysSrc({ envFilepath, keysFilepath, privateKeyName, privateKeyValue: privateKey })
37
37
  keysSrc = mutated.keysSrc
38
38
  envKeysFilepath = mutated.envKeysFilepath
@@ -1,11 +1,11 @@
1
1
  const mutateSrc = require('./mutateSrc')
2
2
  const mutateKeysSrcSync = require('./mutateKeysSrcSync')
3
- const opsKeypairSync = require('./opsKeypairSync')
3
+ const vltKeypairSync = require('./vltKeypairSync')
4
4
  const localKeypair = require('./localKeypair')
5
5
  const { keyNames } = require('../keyResolution')
6
6
 
7
- function provisionSync ({ envSrc, envFilepath, keysFilepath, noOps }) {
8
- noOps = noOps !== false
7
+ function provisionSync ({ envSrc, envFilepath, keysFilepath, noVlt }) {
8
+ noVlt = noVlt !== false
9
9
  const { publicKeyName, privateKeyName } = keyNames(envFilepath)
10
10
 
11
11
  let publicKey
@@ -15,12 +15,12 @@ function provisionSync ({ envSrc, envFilepath, keysFilepath, noOps }) {
15
15
  let localPrivateKeyAdded = false
16
16
  let remotePrivateKeyAdded = false
17
17
 
18
- if (noOps) {
18
+ if (noVlt) {
19
19
  const kp = localKeypair()
20
20
  publicKey = kp.publicKey
21
21
  privateKey = kp.privateKey
22
22
  } else {
23
- const kp = opsKeypairSync(undefined, { envFilepath })
23
+ const kp = vltKeypairSync(undefined, { envFilepath })
24
24
  publicKey = kp.publicKey
25
25
  privateKey = kp.privateKey
26
26
  }
@@ -28,7 +28,7 @@ function provisionSync ({ envSrc, envFilepath, keysFilepath, noOps }) {
28
28
  const mutated = mutateSrc({ envSrc, envFilepath, keysFilepath, publicKeyName, publicKeyValue: publicKey })
29
29
  envSrc = mutated.envSrc
30
30
 
31
- if (noOps) {
31
+ if (noVlt) {
32
32
  const mutated = mutateKeysSrcSync({ envFilepath, keysFilepath, privateKeyName, privateKeyValue: privateKey })
33
33
  keysSrc = mutated.keysSrc
34
34
  envKeysFilepath = mutated.envKeysFilepath
@@ -3,7 +3,7 @@ const mutateSrc = require('./mutateSrc')
3
3
  const localKeypair = require('./localKeypair')
4
4
 
5
5
  function provisionWithPrivateKey ({ envSrc, envFilepath, keysFilepath, privateKeyValue, publicKeyValue, publicKeyName }) {
6
- const { publicKey, privateKey } = localKeypair(privateKeyValue) // noOps doesn't matter here since privateKeyValue was already discovered prior (via ops and local) and passed as privateKeyValue
6
+ const { publicKey, privateKey } = localKeypair(privateKeyValue) // noVlt doesn't matter here since privateKeyValue was already discovered prior (via vlt and local) and passed as privateKeyValue
7
7
 
8
8
  // if derivation doesn't match what's in the file (or preset in env)
9
9
  if (publicKeyValue && publicKeyValue !== publicKey) {
@@ -1,6 +1,6 @@
1
1
  const Vlt = require('../../extensions/vlt')
2
2
 
3
- async function opsKeypair (existingPublicKey, options = {}) {
3
+ async function vltKeypair (existingPublicKey, options = {}) {
4
4
  const hooks = options.hooks || {}
5
5
  if (hooks.before) await hooks.before()
6
6
 
@@ -27,4 +27,4 @@ async function opsKeypair (existingPublicKey, options = {}) {
27
27
  }
28
28
  }
29
29
 
30
- module.exports = opsKeypair
30
+ module.exports = vltKeypair
@@ -1,6 +1,6 @@
1
1
  const Vlt = require('../../extensions/vlt')
2
2
 
3
- function opsKeypairSync (existingPublicKey, options = {}) {
3
+ function vltKeypairSync (existingPublicKey, options = {}) {
4
4
  const kp = new Vlt().keypairSync(existingPublicKey, options)
5
5
  const publicKey = kp.public_key
6
6
  const privateKey = kp.private_key
@@ -11,4 +11,4 @@ function opsKeypairSync (existingPublicKey, options = {}) {
11
11
  }
12
12
  }
13
13
 
14
- module.exports = opsKeypairSync
14
+ module.exports = vltKeypairSync
@@ -2,37 +2,10 @@ const path = require('path')
2
2
  const childProcess = require('child_process')
3
3
  const { logger } = require('../../shared/logger')
4
4
 
5
- function installCommandForOps () {
6
- return 'curl -sfS https://dotenvx.sh/ops | sh'
7
- }
8
-
9
5
  function installCommandForVlt () {
10
6
  return 'curl -sfS https://dotenvx.sh/vlt | sh'
11
7
  }
12
8
 
13
- function opsBanner (installCommand) {
14
- const lines = [
15
- '',
16
- ' ██████╗ ██████╗ ███████╗',
17
- ' ██╔═══██╗██╔══██╗██╔════╝',
18
- ' ██║ ██║██████╔╝███████╗',
19
- ' ██║ ██║██╔═══╝ ╚════██║ [www.dotenvx.com/ops]',
20
- ' ╚██████╔╝██║ ███████║',
21
- ' ╚═════╝ ╚═╝ ╚══════╝',
22
- '',
23
- ' ⛨ ARMORED KEYS: Harden your private keys.',
24
- ` ⮕ install [${installCommand}]`,
25
- ' ⮕ then run [dotenvx-ops login]'
26
- ]
27
-
28
- const innerWidth = Math.max(67, ...lines.map((line) => line.length))
29
- const top = ` ${'_'.repeat(innerWidth)}`
30
- const middle = lines.map((line) => `|${line.padEnd(innerWidth)}|`).join('\n')
31
- const bottom = `|${'_'.repeat(innerWidth)}|`
32
-
33
- return `${top}\n${middle}\n${bottom}`
34
- }
35
-
36
9
  function vltBanner (installCommand) {
37
10
  const lines = [
38
11
  '',
@@ -80,8 +53,8 @@ function executeDynamic (program, command, rawArgs) {
80
53
  const installCommand = installCommandForVlt()
81
54
  console.log(vltBanner(installCommand))
82
55
  } else if (command === 'ops') {
83
- const installCommand = installCommandForOps()
84
- console.log(opsBanner(installCommand))
56
+ const installCommand = installCommandForVlt()
57
+ console.log(vltBanner(installCommand))
85
58
  } else {
86
59
  logger.info(`error: unknown command '${command}'`)
87
60
  }
@@ -5,7 +5,7 @@ const dotenvParse = require('./../dotenvParse')
5
5
  const keyNames = require('./keyNames')
6
6
  const readProcessKey = require('./readProcessKey')
7
7
  const readFileKey = require('./readFileKey')
8
- const opsKeypair = require('../cryptography/opsKeypair')
8
+ const vltKeypair = require('../cryptography/vltKeypair')
9
9
 
10
10
  async function invertForPrivateKeyName (filepath) {
11
11
  const PUBLIC_KEY_SCHEMA = 'DOTENV_PUBLIC_KEY'
@@ -34,7 +34,7 @@ async function invertForPrivateKeyName (filepath) {
34
34
 
35
35
  async function keyValues (filepath, opts = {}) {
36
36
  let keysFilepath = opts.keysFilepath || null
37
- const noOps = opts.noOps === true
37
+ const noVlt = opts.noVlt === true
38
38
  const names = keyNames(filepath)
39
39
  const publicKeyName = names.publicKeyName // DOTENV_PUBLIC_KEY_${ENVIRONMENT}
40
40
  let privateKeyName = names.privateKeyName // DOTENV_PRIVATE_KEY_${ENVIRONMENT}
@@ -70,9 +70,9 @@ async function keyValues (filepath, opts = {}) {
70
70
  }
71
71
  }
72
72
 
73
- // ops
74
- if (!noOps && !privateKey && publicKey && publicKey.length > 0) {
75
- const kp = await opsKeypair(publicKey, { envFilepath: filepath, hooks: opts.keypairHooks })
73
+ // vlt
74
+ if (!noVlt && !privateKey && publicKey && publicKey.length > 0) {
75
+ const kp = await vltKeypair(publicKey, { envFilepath: filepath, hooks: opts.keypairHooks })
76
76
  privateKey = kp.privateKey
77
77
  }
78
78
 
@@ -2,7 +2,7 @@ const path = require('path')
2
2
 
3
3
  const dotenvParse = require('./../dotenvParse')
4
4
  const readFileKeySync = require('./readFileKeySync')
5
- const opsKeypairSync = require('../cryptography/opsKeypairSync')
5
+ const vltKeypairSync = require('../cryptography/vltKeypairSync')
6
6
 
7
7
  const PUBLIC_KEY_SCHEMA = 'DOTENV_PUBLIC_KEY'
8
8
  const PRIVATE_KEY_SCHEMA = 'DOTENV_PRIVATE_KEY'
@@ -25,7 +25,7 @@ function publicKeyNameFromEnvSrc (envParsed) {
25
25
 
26
26
  function keyValuesFromEnvSrc (src, privateKeyName = null, opts = {}) {
27
27
  let keysFilepath = opts.keysFilepath || null
28
- const noOps = opts.noOps === true
28
+ const noVlt = opts.noVlt === true
29
29
  const processEnv = opts.processEnv || process.env
30
30
  const envParsed = dotenvParse(src)
31
31
 
@@ -51,8 +51,8 @@ function keyValuesFromEnvSrc (src, privateKeyName = null, opts = {}) {
51
51
  }
52
52
  }
53
53
 
54
- if (!noOps && !privateKeyValue && publicKeyValue && publicKeyValue.length > 0) {
55
- const kp = opsKeypairSync(publicKeyValue)
54
+ if (!noVlt && !privateKeyValue && publicKeyValue && publicKeyValue.length > 0) {
55
+ const kp = vltKeypairSync(publicKeyValue)
56
56
  privateKeyValue = kp.privateKey
57
57
  }
58
58
 
@@ -5,7 +5,7 @@ const dotenvParse = require('./../dotenvParse')
5
5
  const keyNames = require('./keyNames')
6
6
  const readProcessKey = require('./readProcessKey')
7
7
  const readFileKeySync = require('./readFileKeySync')
8
- const opsKeypairSync = require('../cryptography/opsKeypairSync')
8
+ const vltKeypairSync = require('../cryptography/vltKeypairSync')
9
9
 
10
10
  function invertForPrivateKeyName (filepath) {
11
11
  const PUBLIC_KEY_SCHEMA = 'DOTENV_PUBLIC_KEY'
@@ -34,7 +34,7 @@ function invertForPrivateKeyName (filepath) {
34
34
 
35
35
  function keyValuesSync (filepath, opts = {}) {
36
36
  let keysFilepath = opts.keysFilepath || null
37
- const noOps = opts.noOps === true
37
+ const noVlt = opts.noVlt === true
38
38
  const names = keyNames(filepath)
39
39
  const publicKeyName = names.publicKeyName // DOTENV_PUBLIC_KEY_${ENVIRONMENT}
40
40
  let privateKeyName = names.privateKeyName // DOTENV_PRIVATE_KEY_${ENVIRONMENT}
@@ -70,14 +70,14 @@ function keyValuesSync (filepath, opts = {}) {
70
70
  }
71
71
  }
72
72
 
73
- // ops
74
- if (!noOps && !privateKey && publicKey && publicKey.length > 0) {
75
- const opsOptions = { envFilepath: filepath }
73
+ // vlt
74
+ if (!noVlt && !privateKey && publicKey && publicKey.length > 0) {
75
+ const vltOptions = { envFilepath: filepath }
76
76
  if (opts.noSpinner) {
77
- opsOptions.noSpinner = true
77
+ vltOptions.noSpinner = true
78
78
  }
79
79
 
80
- const kp = opsKeypairSync(publicKey, opsOptions)
80
+ const kp = vltKeypairSync(publicKey, vltOptions)
81
81
  privateKey = kp.privateKey
82
82
  }
83
83
 
package/src/lib/main.js CHANGED
@@ -48,8 +48,8 @@ const config = function (options = {}) {
48
48
  setLogVersion(options)
49
49
  }
50
50
 
51
- // dotenvx-ops related
52
- const noOps = resolveNoOps(options)
51
+ // dotenvx-vlt related
52
+ const noVlt = resolveNoVlt(options)
53
53
 
54
54
  try {
55
55
  let envs = buildEnvs(options)
@@ -60,7 +60,7 @@ const config = function (options = {}) {
60
60
  processedEnvs,
61
61
  readableFilepaths,
62
62
  uniqueInjectedKeys
63
- } = new Run(envs, overload, processEnv, envKeysFile, noOps, {
63
+ } = new Run(envs, overload, processEnv, envKeysFile, noVlt, {
64
64
  noSpinner: options.noSpinner
65
65
  }).runSync()
66
66
 
@@ -180,13 +180,13 @@ const set = function (key, value, options = {}) {
180
180
 
181
181
  const envs = buildEnvs(options)
182
182
  const envKeysFilepath = options.envKeysFile
183
- const noOps = resolveNoOps(options)
183
+ const noVlt = resolveNoVlt(options)
184
184
 
185
185
  const {
186
186
  processedEnvs,
187
187
  changedFilepaths,
188
188
  unchangedFilepaths
189
- } = new Sets(key, value, envs, encrypt, envKeysFilepath, noOps).runSync()
189
+ } = new Sets(key, value, envs, encrypt, envKeysFilepath, noVlt).runSync()
190
190
 
191
191
  let withEncryption = ''
192
192
 
@@ -247,12 +247,12 @@ const set = function (key, value, options = {}) {
247
247
  /* @type {import('./main').get} */
248
248
  const get = function (key, options = {}) {
249
249
  const envs = buildEnvs(options)
250
- const noOps = resolveNoOps(options)
250
+ const noVlt = resolveNoVlt(options)
251
251
 
252
252
  // ignore
253
253
  const ignore = options.ignore || []
254
254
 
255
- const { parsed, errors } = new Get(key, envs, options.overload, options.all, options.envKeysFile, noOps).runSync()
255
+ const { parsed, errors } = new Get(key, envs, options.overload, options.all, options.envKeysFile, noVlt).runSync()
256
256
 
257
257
  for (const error of errors || []) {
258
258
  if (ignore.includes(error.code)) {
@@ -317,8 +317,8 @@ const genexample = function (directory, envFile) {
317
317
  }
318
318
 
319
319
  /** @type {import('./main').keypair} */
320
- const keypair = function (envFile, key, envKeysFile = null, noOps = false) {
321
- const keypairs = new Keypair(envFile, envKeysFile, noOps).runSync()
320
+ const keypair = function (envFile, key, envKeysFile = null, noVlt = false) {
321
+ const keypairs = new Keypair(envFile, envKeysFile, noVlt).runSync()
322
322
  if (key) {
323
323
  return keypairs[key]
324
324
  } else {
@@ -326,9 +326,9 @@ const keypair = function (envFile, key, envKeysFile = null, noOps = false) {
326
326
  }
327
327
  }
328
328
 
329
- function resolveNoOps (options = {}) {
329
+ function resolveNoVlt (options = {}) {
330
330
  const sesh = new Session()
331
- return options.noOps === true || options.noVlt === true || sesh.noVltSync()
331
+ return options.noVlt === true || options.noOps === true || sesh.noVltSync()
332
332
  }
333
333
 
334
334
  module.exports = {
@@ -25,12 +25,12 @@ const dotenvParse = require('./../helpers/dotenvParse')
25
25
  const detectEncoding = require('./../helpers/detectEncoding')
26
26
 
27
27
  class Decrypt {
28
- constructor (envs = [], key = [], excludeKey = [], envKeysFilepath = null, noOps = false) {
28
+ constructor (envs = [], key = [], excludeKey = [], envKeysFilepath = null, noVlt = false) {
29
29
  this.envs = determine(envs, process.env)
30
30
  this.key = key
31
31
  this.excludeKey = excludeKey
32
32
  this.envKeysFilepath = envKeysFilepath
33
- this.noOps = noOps
33
+ this.noVlt = noVlt
34
34
 
35
35
  this.processedEnvs = []
36
36
  this.changedFilepaths = new Set()
@@ -77,7 +77,7 @@ class Decrypt {
77
77
  const envParsed = dotenvParse(envSrc, false, false, true)
78
78
 
79
79
  const { privateKeyName } = keyNames(envFilepath)
80
- const { privateKeyValue } = await keyValues(envFilepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
80
+ const { privateKeyValue } = await keyValues(envFilepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
81
81
 
82
82
  row.privateKey = privateKeyValue
83
83
  row.privateKeyName = privateKeyName
@@ -29,12 +29,12 @@ const detectEncoding = require('./../helpers/detectEncoding')
29
29
  const SAMPLE_ENV_KIT = require('./../helpers/kits/sample')
30
30
 
31
31
  class Encrypt {
32
- constructor (envs = [], key = [], excludeKey = [], envKeysFilepath = null, noOps = false, noCreate = false, token = undefined, options = {}) {
32
+ constructor (envs = [], key = [], excludeKey = [], envKeysFilepath = null, noVlt = false, noCreate = false, token = undefined, options = {}) {
33
33
  this.envs = determine(envs, process.env)
34
34
  this.key = key
35
35
  this.excludeKey = excludeKey
36
36
  this.envKeysFilepath = envKeysFilepath
37
- this.noOps = noOps
37
+ this.noVlt = noVlt
38
38
  this.noCreate = noCreate
39
39
  this.token = token
40
40
  this.keypairHooks = options.keypairHooks
@@ -105,7 +105,7 @@ class Encrypt {
105
105
  const { publicKeyName, privateKeyName } = keyNames(envFilepath)
106
106
  const { publicKeyValue, privateKeyValue } = await keyValues(envFilepath, {
107
107
  keysFilepath: this.envKeysFilepath,
108
- noOps: this.noOps,
108
+ noVlt: this.noVlt,
109
109
  keypairHooks: this.keypairHooks
110
110
  })
111
111
 
@@ -115,7 +115,7 @@ class Encrypt {
115
115
  envSrc,
116
116
  envFilepath,
117
117
  keysFilepath: this.envKeysFilepath,
118
- noOps: this.noOps,
118
+ noVlt: this.noVlt,
119
119
  token: this.token,
120
120
  keypairHooks: this.keypairHooks,
121
121
  selectKeyStorage: this.selectKeyStorage
@@ -3,26 +3,26 @@ const Errors = require('./../helpers/errors')
3
3
  const { determine } = require('./../helpers/envResolution')
4
4
 
5
5
  class Get {
6
- constructor (key, envs = [], overload = false, all = false, envKeysFilepath = null, noOps = false) {
6
+ constructor (key, envs = [], overload = false, all = false, envKeysFilepath = null, noVlt = false) {
7
7
  this.key = key
8
8
  this.envs = envs
9
9
  this.overload = overload
10
10
  this.all = all
11
11
  this.envKeysFilepath = envKeysFilepath
12
- this.noOps = noOps
12
+ this.noVlt = noVlt
13
13
  }
14
14
 
15
15
  runSync () {
16
16
  const processEnv = { ...process.env }
17
17
  const envs = determine(this.envs, processEnv)
18
- const { processedEnvs } = new Run(envs, this.overload, processEnv, this.envKeysFilepath, this.noOps).runSync()
18
+ const { processedEnvs } = new Run(envs, this.overload, processEnv, this.envKeysFilepath, this.noVlt).runSync()
19
19
  return this._result(processedEnvs, processEnv)
20
20
  }
21
21
 
22
22
  async run () {
23
23
  const processEnv = { ...process.env }
24
24
  const envs = determine(this.envs, processEnv)
25
- const { processedEnvs } = await new Run(envs, this.overload, processEnv, this.envKeysFilepath, this.noOps).run()
25
+ const { processedEnvs } = await new Run(envs, this.overload, processEnv, this.envKeysFilepath, this.noVlt).run()
26
26
  return this._result(processedEnvs, processEnv)
27
27
  }
28
28
 
@@ -5,10 +5,10 @@ const {
5
5
  } = require('./../helpers/keyResolution')
6
6
 
7
7
  class Keypair {
8
- constructor (envFile = '.env', envKeysFilepath = null, noOps = false) {
8
+ constructor (envFile = '.env', envKeysFilepath = null, noVlt = false) {
9
9
  this.envFile = envFile
10
10
  this.envKeysFilepath = envKeysFilepath
11
- this.noOps = noOps
11
+ this.noVlt = noVlt
12
12
  }
13
13
 
14
14
  runSync () {
@@ -17,7 +17,7 @@ class Keypair {
17
17
  const filepaths = this._filepaths()
18
18
  for (const filepath of filepaths) {
19
19
  const { publicKeyName, privateKeyName } = keyNames(filepath)
20
- const { publicKeyValue, privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
20
+ const { publicKeyValue, privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
21
21
 
22
22
  out[publicKeyName] = publicKeyValue
23
23
  out[privateKeyName] = privateKeyValue
@@ -32,7 +32,7 @@ class Keypair {
32
32
  const filepaths = this._filepaths()
33
33
  for (const filepath of filepaths) {
34
34
  const { publicKeyName, privateKeyName } = keyNames(filepath)
35
- const { publicKeyValue, privateKeyValue } = await keyValues(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
35
+ const { publicKeyValue, privateKeyValue } = await keyValues(filepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
36
36
 
37
37
  out[publicKeyName] = publicKeyValue
38
38
  out[privateKeyName] = privateKeyValue
@@ -16,7 +16,7 @@ const {
16
16
  } = require('./../helpers/keyResolution')
17
17
 
18
18
  const {
19
- opsKeypair,
19
+ vltKeypair,
20
20
  localKeypair,
21
21
  encryptValue,
22
22
  decryptKeyValue,
@@ -29,12 +29,12 @@ const dotenvParse = require('./../helpers/dotenvParse')
29
29
  const detectEncoding = require('./../helpers/detectEncoding')
30
30
 
31
31
  class Rotate {
32
- constructor (envs = [], key = [], excludeKey = [], envKeysFilepath = null, noOps = false) {
32
+ constructor (envs = [], key = [], excludeKey = [], envKeysFilepath = null, noVlt = false) {
33
33
  this.envs = determine(envs, process.env)
34
34
  this.key = key
35
35
  this.excludeKey = excludeKey
36
36
  this.envKeysFilepath = envKeysFilepath
37
- this.noOps = noOps
37
+ this.noVlt = noVlt
38
38
 
39
39
  this.processedEnvs = []
40
40
  this.changedFilepaths = new Set()
@@ -83,15 +83,15 @@ class Rotate {
83
83
  const envParsed = dotenvParse(envSrc, false, false, true)
84
84
 
85
85
  const { publicKeyName, privateKeyName } = keyNames(envFilepath)
86
- const { privateKeyValue } = await keyValues(envFilepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
86
+ const { privateKeyValue } = await keyValues(envFilepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
87
87
 
88
88
  let newPublicKey
89
89
  let newPrivateKey
90
90
  let envKeysFilepath
91
91
  let envKeysSrc
92
92
 
93
- if (!this.noOps) {
94
- const kp = await opsKeypair()
93
+ if (!this.noVlt) {
94
+ const kp = await vltKeypair()
95
95
  newPublicKey = kp.publicKey
96
96
  newPrivateKey = kp.privateKey
97
97
 
@@ -146,8 +146,8 @@ class Rotate {
146
146
  row.privateKeyName = privateKeyName
147
147
  row.privateKey = newPrivateKey
148
148
 
149
- if (this.noOps) {
150
- // keys src only for ops
149
+ if (this.noVlt) {
150
+ // keys src only for vlt
151
151
  envKeysSrc = append(envKeysSrc, privateKeyName, newPrivateKey) // append privateKey
152
152
  this.envKeysSources[envKeysFilepath] = envKeysSrc
153
153
  row.envKeysSrc = envKeysSrc
@@ -158,7 +158,7 @@ class Rotate {
158
158
  if (e.code === 'ENOENT') {
159
159
  const missingPath = e.path ? path.resolve(e.path) : null
160
160
  const expectedEnvKeysPath = row.envKeysFilepath ? path.resolve(row.envKeysFilepath) : null
161
- if (this.noOps && expectedEnvKeysPath && missingPath === expectedEnvKeysPath) {
161
+ if (this.noVlt && expectedEnvKeysPath && missingPath === expectedEnvKeysPath) {
162
162
  row.error = new Errors({ envKeysFilepath: row.envKeysFilepath }).missingEnvKeysFile()
163
163
  } else {
164
164
  row.error = new Errors({ envFilepath, filepath }).missingEnvFile()
@@ -17,12 +17,12 @@ const {
17
17
  } = require('./../helpers/keyResolution')
18
18
 
19
19
  class Run {
20
- constructor (envs = [], overload = false, processEnv = process.env, envKeysFilepath = null, noOps = false, options = {}) {
20
+ constructor (envs = [], overload = false, processEnv = process.env, envKeysFilepath = null, noVlt = false, options = {}) {
21
21
  this.envs = envs
22
22
  this.overload = overload
23
23
  this.processEnv = processEnv
24
24
  this.envKeysFilepath = envKeysFilepath
25
- this.noOps = noOps
25
+ this.noVlt = noVlt
26
26
  this.noSpinner = options.noSpinner
27
27
  this.keypairHooks = options.keypairHooks
28
28
 
@@ -94,7 +94,7 @@ class Run {
94
94
  const {
95
95
  privateKeyName: resolvedPrivateKeyName,
96
96
  privateKeyValue
97
- } = keyValuesFromEnvSrc(env, privateKeyName, { keysFilepath: this.envKeysFilepath, noOps: this.noOps, processEnv: this.processEnv })
97
+ } = keyValuesFromEnvSrc(env, privateKeyName, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt, processEnv: this.processEnv })
98
98
 
99
99
  const {
100
100
  parsed,
@@ -138,7 +138,7 @@ class Run {
138
138
  const { privateKeyName } = keyNames(filepath)
139
139
  const { privateKeyValue } = keyValuesSync(filepath, {
140
140
  keysFilepath: this.envKeysFilepath,
141
- noOps: this.noOps,
141
+ noVlt: this.noVlt,
142
142
  noSpinner: this.noSpinner
143
143
  })
144
144
 
@@ -187,7 +187,7 @@ class Run {
187
187
  const { privateKeyName } = keyNames(filepath)
188
188
  const { privateKeyValue } = await keyValues(filepath, {
189
189
  keysFilepath: this.envKeysFilepath,
190
- noOps: this.noOps,
190
+ noVlt: this.noVlt,
191
191
  keypairHooks: this.keypairHooks
192
192
  })
193
193
 
@@ -34,13 +34,13 @@ function allValuesForKey (envSrc, key) {
34
34
  }
35
35
 
36
36
  class Sets {
37
- constructor (key, value, envs = [], encrypt = true, envKeysFilepath = null, noOps = false, noCreate = false) {
37
+ constructor (key, value, envs = [], encrypt = true, envKeysFilepath = null, noVlt = false, noCreate = false) {
38
38
  this.envs = determine(envs, process.env)
39
39
  this.key = key
40
40
  this.value = value
41
41
  this.encrypt = encrypt
42
42
  this.envKeysFilepath = envKeysFilepath
43
- this.noOps = noOps
43
+ this.noVlt = noVlt
44
44
  this.noCreate = noCreate
45
45
 
46
46
  this.processedEnvs = []
@@ -131,11 +131,11 @@ class Sets {
131
131
  let privateKey
132
132
 
133
133
  const { publicKeyName, privateKeyName } = keyNames(filepath)
134
- const { publicKeyValue, privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
134
+ const { publicKeyValue, privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
135
135
 
136
136
  // first pass - provisionSync
137
137
  if (!privateKeyValue && !publicKeyValue) {
138
- const prov = provisionSync({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noOps: this.noOps })
138
+ const prov = provisionSync({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
139
139
  envSrc = prov.envSrc
140
140
  publicKey = prov.publicKey
141
141
  privateKey = prov.privateKey
@@ -238,11 +238,11 @@ class Sets {
238
238
  let privateKey
239
239
 
240
240
  const { publicKeyName, privateKeyName } = keyNames(filepath)
241
- const { publicKeyValue, privateKeyValue } = await keyValues(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
241
+ const { publicKeyValue, privateKeyValue } = await keyValues(filepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
242
242
 
243
243
  // first pass - provision
244
244
  if (!privateKeyValue && !publicKeyValue) {
245
- const prov = await provision({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noOps: this.noOps })
245
+ const prov = await provision({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
246
246
  envSrc = prov.envSrc
247
247
  publicKey = prov.publicKey
248
248
  privateKey = prov.privateKey