@dotenvx/dotenvx 1.68.0 → 1.69.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.
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.68.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.69.0...main)
6
+
7
+ ## [1.69.0](https://github.com/dotenvx/dotenvx/compare/v1.68.1...v1.69.0) (2026-05-25)
8
+
9
+ ### Changed
10
+
11
+ * Remove fully-deprecated `opsOff` option in favor of `noOps` ([#822](https://github.com/dotenvx/dotenvx/pull/822))
12
+
13
+ ## [1.68.1](https://github.com/dotenvx/dotenvx/compare/v1.68.0...v1.68.1) (2026-05-24)
14
+
15
+ ### Changed
16
+
17
+ * Pass `-f` to ops ([#821](https://github.com/dotenvx/dotenvx/pull/821))
6
18
 
7
19
  ## [1.68.0](https://github.com/dotenvx/dotenvx/compare/v1.67.0...v1.68.0) (2026-05-24)
8
20
 
package/README.md CHANGED
@@ -1287,12 +1287,12 @@ $ dotenvx run -fk .env.keys -f apps/app1/.env -- yourcommand
1287
1287
  ```
1288
1288
 
1289
1289
  </details>
1290
- <details><summary>`run --no-ops`</summary><br>
1290
+ <details><summary>`run --no-vlt`</summary><br>
1291
1291
 
1292
- Turn off [Dotenvx Ops](https://dotenvx.com/ops) features.
1292
+ Turn off [Dotenvx Vlt Ops](https://dotenvx.com/vlt) features.
1293
1293
 
1294
1294
  ```sh
1295
- $ dotenvx run --no-ops -- yourcommand
1295
+ $ dotenvx run --no-vlt -- yourcommand
1296
1296
  ```
1297
1297
 
1298
1298
  </details>
@@ -1622,12 +1622,12 @@ $ dotenvx encrypt -f .env.production
1622
1622
  ```
1623
1623
 
1624
1624
  </details>
1625
- <details><summary>`encrypt --no-ops`</summary><br>
1625
+ <details><summary>`encrypt --no-vlt`</summary><br>
1626
1626
 
1627
- Turn off [Dotenvx Ops](https://dotenvx.com/ops) features for encrypt.
1627
+ Turn off [Dotenvx Vlt Ops](https://dotenvx.com/vlt) features for encrypt.
1628
1628
 
1629
1629
  ```sh
1630
- $ dotenvx encrypt --no-ops
1630
+ $ dotenvx encrypt --no-vlt
1631
1631
  ◈ encrypted (.env)
1632
1632
  ```
1633
1633
 
@@ -2548,13 +2548,13 @@ $ dotenvx run --convention=nextjs -- node index.js
2548
2548
  ```
2549
2549
 
2550
2550
  </details>
2551
- <details><summary>`config(noOps:)` - noOps</summary><br>
2551
+ <details><summary>`config(noVlt:)` - noVlt</summary><br>
2552
2552
 
2553
- Turn off [Dotenvx Ops](https://dotenvx.com/ops) features.
2553
+ Turn off [Dotenvx Vlt Ops](https://dotenvx.com/vlt) features.
2554
2554
 
2555
2555
  ```js
2556
2556
  // index.js
2557
- require('@dotenvx/dotenvx').config({noOps: true})
2557
+ require('@dotenvx/dotenvx').config({noVlt: true})
2558
2558
  ```
2559
2559
 
2560
2560
  </details>
@@ -2650,17 +2650,17 @@ This is known as *Decryption at Access* and is written about in [the whitepaper]
2650
2650
 
2651
2651
  &nbsp;
2652
2652
 
2653
- ## Ops ⛨
2653
+ ## Vlt Ops ⛨
2654
2654
 
2655
- [![dotenvx-ops](https://dotenvx.com/dotenvx-ops-banner.png?v=6)](https://dotenvx.com/ops)
2655
+ [![dotenvx-vlt](https://dotenvx.com/dotenvx-vlt-banner.png)](https://dotenvx.com/vlt)
2656
2656
 
2657
2657
  ```
2658
2658
  ⛨ ARMORED KEYS: Harden your private keys.
2659
- ⮕ install [curl -sfS https://dotenvx.sh/ops | sh]
2660
- ⮕ then run [dotenvx-ops login]
2659
+ ⮕ install [curl -sfS https://dotenvx.sh/vlt | sh]
2660
+ ⮕ then run [dotenvx-vlt login]
2661
2661
  ```
2662
2662
 
2663
- [Learn more](https://dotenvx.com/ops)
2663
+ [Learn more](https://dotenvx.com/vlt)
2664
2664
 
2665
2665
  &nbsp;
2666
2666
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.68.0",
2
+ "version": "1.69.0",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "secrets for agents–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -35,8 +35,8 @@
35
35
  "scripts": {
36
36
  "standard": "standard",
37
37
  "standard:fix": "standard --fix",
38
- "test": "tap run --test-env=DOTENVX_NO_OPS=true --allow-empty-coverage --disable-coverage --timeout=60000",
39
- "test-coverage": "tap run --test-env=DOTENVX_NO_OPS=true --show-full-coverage --timeout=60000",
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",
40
40
  "testshell": "bash shellspec",
41
41
  "prerelease": "npm test && npm run testshell",
42
42
  "release": "standard-version"
@@ -5,16 +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
9
 
9
10
  async function decrypt () {
10
- const options = this.opts()
11
+ const options = normalizeVltOptions(this.opts())
11
12
  const spinner = await createSpinner({ ...options, text: 'decrypting' })
12
13
 
13
14
  logger.debug(`options: ${JSON.stringify(options)}`)
14
15
 
15
16
  const sesh = new Session()
16
17
  const envs = this.envs
17
- const noOps = options.ops === false || (await sesh.noOps())
18
+ const noOps = options.ops === false || (await sesh.noVlt())
18
19
 
19
20
  let errorCount = 0
20
21
 
@@ -8,6 +8,7 @@ const localDisplayPath = require('../../lib/helpers/localDisplayPath')
8
8
  const createSpinner = require('../../lib/helpers/createSpinner')
9
9
  const prompts = require('../../lib/helpers/prompts')
10
10
  const Session = require('../../db/session')
11
+ const normalizeVltOptions = require('./normalizeVltOptions')
11
12
 
12
13
  function keypairSpinnerHooks (spinner) {
13
14
  let stoppedForOps = false
@@ -64,14 +65,14 @@ function encryptOptions (spinner, noOps) {
64
65
  }
65
66
 
66
67
  async function encrypt () {
67
- const options = this.opts()
68
+ const options = normalizeVltOptions(this.opts())
68
69
  const spinner = await createSpinner({ ...options, text: 'encrypting' })
69
70
 
70
71
  logger.debug(`options: ${JSON.stringify(options)}`)
71
72
 
72
73
  const sesh = new Session()
73
74
  const envs = this.envs
74
- const noOps = options.ops === false || (!options.token && (await sesh.noOps()))
75
+ const noOps = options.ops === false || (!options.token && (await sesh.noVlt()))
75
76
  const noCreate = options.create === false
76
77
 
77
78
  // stdout - should not have a try so that exit codes can surface to stdout
@@ -6,9 +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
10
 
10
11
  async function get (key) {
11
- const options = this.opts()
12
+ const options = normalizeVltOptions(this.opts())
12
13
  const spinner = await createSpinner({ ...options, text: 'decrypting' })
13
14
 
14
15
  logger.debug(`options: ${JSON.stringify(options)}`)
@@ -29,7 +30,7 @@ async function get (key) {
29
30
 
30
31
  try {
31
32
  const sesh = new Session()
32
- const noOps = options.ops === false || (await sesh.noOps())
33
+ const noOps = options.ops === false || (await sesh.noVlt())
33
34
  const { parsed, errors } = await new Get(key, envs, options.overload, options.all, options.envKeysFile, noOps).run()
34
35
 
35
36
  for (const error of errors || []) {
@@ -3,9 +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
7
 
7
8
  async function keypair (key) {
8
- const options = this.opts()
9
+ const options = normalizeVltOptions(this.opts())
9
10
  const spinner = await createSpinner({ ...options, text: 'retrieving' })
10
11
 
11
12
  logger.debug(`options: ${JSON.stringify(options)}`)
@@ -16,7 +17,7 @@ async function keypair (key) {
16
17
  const prettyPrint = options.prettyPrint || options.pp
17
18
 
18
19
  const sesh = new Session()
19
- const noOps = options.ops === false || await sesh.noOps()
20
+ const noOps = options.ops === false || await sesh.noVlt()
20
21
  const keypairs = await new Keypair(options.envFile, options.envKeysFile, noOps).run()
21
22
  const results = key ? keypairs[key] : keypairs
22
23
 
@@ -0,0 +1,10 @@
1
+ function normalizeVltOptions (options) {
2
+ if (options.ops === false || options.vlt === false) {
3
+ options.ops = false
4
+ options.vlt = false
5
+ }
6
+
7
+ return options
8
+ }
9
+
10
+ module.exports = normalizeVltOptions
@@ -7,16 +7,17 @@ const catchAndLog = require('../../lib/helpers/catchAndLog')
7
7
  const createSpinner = require('../../lib/helpers/createSpinner')
8
8
  const localDisplayPath = require('../../lib/helpers/localDisplayPath')
9
9
  const Session = require('../../db/session')
10
+ const normalizeVltOptions = require('./normalizeVltOptions')
10
11
 
11
12
  async function rotate () {
12
- const options = this.opts()
13
+ const options = normalizeVltOptions(this.opts())
13
14
  const spinner = await createSpinner({ ...options, text: 'rotating', frames: ['⟳', '⤾', '⥁'] })
14
15
 
15
16
  logger.debug(`options: ${JSON.stringify(options)}`)
16
17
 
17
18
  const envs = this.envs
18
19
  const sesh = new Session()
19
- const noOps = options.ops === false || (await sesh.noOps())
20
+ const noOps = options.ops === false || (await sesh.noVlt())
20
21
 
21
22
  // stdout - should not have a try so that exit codes can surface to stdout
22
23
  if (options.stdout) {
@@ -6,12 +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
10
 
10
11
  const conventions = require('./../../lib/helpers/conventions')
11
12
  const { determine } = require('./../../lib/helpers/envResolution')
12
13
 
13
14
  async function run () {
14
- const options = this.opts()
15
+ const options = normalizeVltOptions(this.opts())
15
16
  const commandArgs = this.args
16
17
  const spinner = await createSpinner({ ...options, text: 'injecting' })
17
18
 
@@ -21,7 +22,7 @@ async function run () {
21
22
  const ignore = options.ignore || []
22
23
 
23
24
  const sesh = new Session()
24
- const noOps = options.ops === false || options.opsOff === true || (await sesh.noOps())
25
+ const noOps = options.ops === false || (await sesh.noVlt())
25
26
 
26
27
  if (commandArgs.length < 1) {
27
28
  if (spinner) spinner.stop()
@@ -6,9 +6,10 @@ const createSpinner = require('../../lib/helpers/createSpinner')
6
6
  const localDisplayPath = require('../../lib/helpers/localDisplayPath')
7
7
  const Session = require('../../db/session')
8
8
  const Sets = require('./../../lib/services/sets')
9
+ const normalizeVltOptions = require('./normalizeVltOptions')
9
10
 
10
11
  async function set (key, value) {
11
- const options = this.opts()
12
+ const options = normalizeVltOptions(this.opts())
12
13
 
13
14
  let encrypt = true
14
15
  let settingMessage = 'encrypting'
@@ -27,7 +28,7 @@ async function set (key, value) {
27
28
  const sesh = new Session()
28
29
  const envs = this.envs
29
30
  const envKeysFilepath = options.envKeysFile
30
- const noOps = options.ops === false || (await sesh.noOps())
31
+ const noOps = options.ops === false || (await sesh.noVlt())
31
32
  const noCreate = options.create === false
32
33
 
33
34
  const {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /* c8 ignore start */
4
- const { Command, Option } = require('commander')
4
+ const { Command } = 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-ops, etc
46
+ // for dynamic loading of dotenvx-vlt, etc
47
47
  program
48
48
  .argument('[command]', 'dynamic command')
49
49
  .argument('[args...]', 'dynamic command arguments')
@@ -71,7 +71,7 @@ program.command('run')
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
73
  .option('--no-ops', 'disable dotenvx-ops features')
74
- .addOption(new Option('--ops-off', 'DEPRECATED: use --no-ops').hideHelp())
74
+ .option('--no-vlt', 'disable dotenvx-vlt features')
75
75
  .action(function (...args) {
76
76
  this.envs = envs
77
77
  return require('./actions/run').apply(this, args)
@@ -94,6 +94,7 @@ program.command('get')
94
94
  .option('--pp', 'pretty print output (alias)')
95
95
  .option('--format <type>', 'format of the output (json, shell, colon, eval)', 'json')
96
96
  .option('--no-ops', 'disable dotenvx-ops features')
97
+ .option('--no-vlt', 'disable dotenvx-vlt features')
97
98
  .action(function (...args) {
98
99
  this.envs = envs
99
100
  return require('./actions/get').apply(this, args)
@@ -113,6 +114,7 @@ program.command('set')
113
114
  .option('-p, --plain', 'store value as plain text', false)
114
115
  .option('--no-create', 'do not create .env file(s) when missing')
115
116
  .option('--no-ops', 'disable dotenvx-ops features')
117
+ .option('--no-vlt', 'disable dotenvx-vlt features')
116
118
  .action(function (...args) {
117
119
  this.envs = envs
118
120
  return require('./actions/set').apply(this, args)
@@ -126,9 +128,10 @@ program.command('encrypt')
126
128
  .option('-k, --key <keys...>', 'keys(s) to encrypt (default: all keys in file)')
127
129
  .option('-ek, --exclude-key <excludeKeys...>', 'keys(s) to exclude from encryption (default: none)')
128
130
  .option('--stdout', 'send to stdout')
129
- .option('--token <token>', 'set Ops token')
131
+ .option('--token <token>', 'set Vlt Ops token')
130
132
  .option('--no-create', 'do not create .env file(s) when missing')
131
133
  .option('--no-ops', 'disable dotenvx-ops features')
134
+ .option('--no-vlt', 'disable dotenvx-vlt features')
132
135
  .action(function (...args) {
133
136
  this.envs = envs
134
137
  return require('./actions/encrypt').apply(this, args)
@@ -142,6 +145,7 @@ program.command('decrypt')
142
145
  .option('-k, --key <keys...>', 'keys(s) to decrypt (default: all keys in file)')
143
146
  .option('-ek, --exclude-key <excludeKeys...>', 'keys(s) to exclude from decryption (default: none)')
144
147
  .option('--no-ops', 'disable dotenvx-ops features')
148
+ .option('--no-vlt', 'disable dotenvx-vlt features')
145
149
  .option('--stdout', 'send to stdout')
146
150
  .action(function (...args) {
147
151
  this.envs = envs
@@ -156,6 +160,7 @@ program.command('rotate')
156
160
  .option('-k, --key <keys...>', 'keys(s) to encrypt (default: all keys in file)')
157
161
  .option('-ek, --exclude-key <excludeKeys...>', 'keys(s) to exclude from encryption (default: none)')
158
162
  .option('--no-ops', 'disable dotenvx-ops features')
163
+ .option('--no-vlt', 'disable dotenvx-vlt features')
159
164
  .option('--stdout', 'send to stdout')
160
165
  .action(function (...args) {
161
166
  this.envs = envs
@@ -170,6 +175,7 @@ program.command('keypair')
170
175
  .option('-f, --env-file <paths...>', 'path(s) to your env file(s)')
171
176
  .option('-fk, --env-keys-file <path>', 'path to your .env.keys file (default: same path as your env file)')
172
177
  .option('--no-ops', 'disable dotenvx-ops features')
178
+ .option('--no-vlt', 'disable dotenvx-vlt features')
173
179
  .option('-pp, --pretty-print', 'pretty print output')
174
180
  .option('--pp', 'pretty print output (alias)')
175
181
  .option('--format <type>', 'format of the output (json, shell, colon)', 'json')
@@ -238,10 +244,10 @@ program.command('help [command]')
238
244
  }
239
245
  })
240
246
 
241
- // dotenvx ops
247
+ // dotenvx vlt ops
242
248
  program.addHelpText('after', ' ')
243
249
  program.addHelpText('after', 'Advanced: ')
244
- program.addHelpText('after', ' ops ⛨ Ops [www.dotenvx.com/ops]')
250
+ program.addHelpText('after', ' vltVlt Ops [www.dotenvx.com/vlt]')
245
251
  program.addHelpText('after', ' ext 🔌 extensions')
246
252
 
247
253
  // dotenvx ext
package/src/db/session.js CHANGED
@@ -1,23 +1,23 @@
1
- const Ops = require('./../lib/extensions/ops')
1
+ const Vlt = require('./../lib/extensions/vlt')
2
2
  const { logger } = require('./../shared/logger')
3
3
 
4
4
  class Session {
5
5
  constructor () {
6
- this.ops = new Ops()
6
+ this.vlt = new Vlt()
7
7
  }
8
8
 
9
9
  //
10
- // ops status helpers
10
+ // vlt status helpers
11
11
  //
12
- async noOps () {
13
- const status = await this.ops.status()
14
- logger.debug(`ops: ${status}`)
12
+ async noVlt () {
13
+ const status = await this.vlt.status()
14
+ logger.debug(`vlt: ${status}`)
15
15
  return status === 'off'
16
16
  }
17
17
 
18
- noOpsSync () {
19
- const status = this.ops.statusSync()
20
- logger.debug(`ops: ${status}`)
18
+ noVltSync () {
19
+ const status = this.vlt.statusSync()
20
+ logger.debug(`vlt: ${status}`)
21
21
  return status === 'off'
22
22
  }
23
23
  }
@@ -4,8 +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
8
 
8
- class Ops {
9
+ class Vlt {
9
10
  async status () {
10
11
  if (this._isForcedOff()) return 'off'
11
12
 
@@ -41,6 +42,7 @@ class Ops {
41
42
  const args = ['keypair']
42
43
  if (options.noSpinner) args.push('--no-spinner')
43
44
  if (options.token) args.push('--token', options.token)
45
+ if (options.envFilepath) args.push('-f', options.envFilepath)
44
46
  if (publicKey) args.push(publicKey)
45
47
 
46
48
  try {
@@ -61,6 +63,7 @@ class Ops {
61
63
  const args = ['keypair']
62
64
  if (options.noSpinner) args.push('--no-spinner')
63
65
  if (options.token) args.push('--token', options.token)
66
+ if (options.envFilepath) args.push('-f', options.envFilepath)
64
67
  if (publicKey) args.push(publicKey)
65
68
 
66
69
  try {
@@ -154,16 +157,12 @@ class Ops {
154
157
  if (this._binaryPromise) return this._binaryPromise
155
158
 
156
159
  this._binaryPromise = (async () => {
157
- const npmBin = path.resolve(process.cwd(), 'node_modules/.bin/dotenvx-ops')
158
- try {
159
- await this._exec(npmBin, ['--version'])
160
- return npmBin
161
- } catch (_e) {}
162
-
163
- try {
164
- await this._exec('dotenvx-ops', ['--version'])
165
- return 'dotenvx-ops'
166
- } catch (_e) {}
160
+ for (const binary of this._binaryCandidates()) {
161
+ try {
162
+ await this._exec(binary, ['--version'])
163
+ return binary
164
+ } catch (_e) {}
165
+ }
167
166
 
168
167
  return null
169
168
  })()
@@ -174,30 +173,30 @@ class Ops {
174
173
  _resolveBinarySync () {
175
174
  if (this._binarySync !== undefined) return this._binarySync
176
175
 
177
- const npmBin = path.resolve(process.cwd(), 'node_modules/.bin/dotenvx-ops')
178
- try {
179
- this._execSync(npmBin, ['--version'])
180
- this._binarySync = npmBin
181
- return this._binarySync
182
- } catch (err) {
183
- logger.debug(err.message)
184
- }
185
-
186
- try {
187
- this._execSync('dotenvx-ops', ['--version'])
188
- this._binarySync = 'dotenvx-ops'
189
- return this._binarySync
190
- } catch (err) {
191
- logger.debug(err.message)
176
+ for (const binary of this._binaryCandidates()) {
177
+ try {
178
+ this._execSync(binary, ['--version'])
179
+ this._binarySync = binary
180
+ return this._binarySync
181
+ } catch (err) {
182
+ logger.debug(err.message)
183
+ }
192
184
  }
193
185
 
194
186
  this._binarySync = null
195
187
  return null
196
188
  }
197
189
 
190
+ _binaryCandidates () {
191
+ return BINARY_NAMES.flatMap((binary) => [
192
+ path.resolve(process.cwd(), `node_modules/.bin/${binary}`),
193
+ binary
194
+ ])
195
+ }
196
+
198
197
  _isForcedOff () {
199
- return process.env.DOTENVX_NO_OPS === 'true'
198
+ return process.env.DOTENVX_NO_OPS === 'true' || process.env.DOTENVX_NO_VLT === 'true'
200
199
  }
201
200
  }
202
201
 
203
- module.exports = Ops
202
+ module.exports = Vlt
@@ -1,21 +1,19 @@
1
- const Ops = require('../../extensions/ops')
1
+ const Vlt = require('../../extensions/vlt')
2
2
 
3
3
  async function opsKeypair (existingPublicKey, options = {}) {
4
4
  const hooks = options.hooks || {}
5
5
  if (hooks.before) await hooks.before()
6
6
 
7
- const keypairOptions = {}
8
- if (options.token) keypairOptions.token = options.token
7
+ const keypairOptions = {
8
+ token: options.token,
9
+ envFilepath: options.envFilepath
10
+ }
9
11
  if (hooks.onStderr) keypairOptions.onStderr = hooks.onStderr
10
12
  if (hooks.before || hooks.onStderr || hooks.after) keypairOptions.noSpinner = true
11
13
 
12
14
  let kp
13
15
  try {
14
- if (Object.keys(keypairOptions).length > 0) {
15
- kp = await new Ops().keypair(existingPublicKey, keypairOptions)
16
- } else {
17
- kp = await new Ops().keypair(existingPublicKey)
18
- }
16
+ kp = await new Vlt().keypair(existingPublicKey, keypairOptions)
19
17
  } finally {
20
18
  if (hooks.after) await hooks.after()
21
19
  }
@@ -1,8 +1,7 @@
1
- const Ops = require('../../extensions/ops')
1
+ const Vlt = require('../../extensions/vlt')
2
2
 
3
3
  function opsKeypairSync (existingPublicKey, options = {}) {
4
- const ops = new Ops()
5
- const kp = Object.keys(options).length > 0 ? ops.keypairSync(existingPublicKey, options) : ops.keypairSync(existingPublicKey)
4
+ const kp = new Vlt().keypairSync(existingPublicKey, options)
6
5
  const publicKey = kp.public_key
7
6
  const privateKey = kp.private_key
8
7
 
@@ -24,10 +24,7 @@ async function provision ({ envSrc, envFilepath, keysFilepath, noOps, token, key
24
24
  publicKey = kp.publicKey
25
25
  privateKey = kp.privateKey
26
26
  } else {
27
- const keypairOptions = {}
28
- if (token) keypairOptions.token = token
29
- if (keypairHooks) keypairOptions.hooks = keypairHooks
30
- const kp = await opsKeypair(undefined, keypairOptions)
27
+ const kp = await opsKeypair(undefined, { token, envFilepath, hooks: keypairHooks })
31
28
  publicKey = kp.publicKey
32
29
  privateKey = kp.privateKey
33
30
  }
@@ -20,7 +20,7 @@ function provisionSync ({ envSrc, envFilepath, keysFilepath, noOps }) {
20
20
  publicKey = kp.publicKey
21
21
  privateKey = kp.privateKey
22
22
  } else {
23
- const kp = opsKeypairSync()
23
+ const kp = opsKeypairSync(undefined, { envFilepath })
24
24
  publicKey = kp.publicKey
25
25
  privateKey = kp.privateKey
26
26
  }
@@ -6,6 +6,10 @@ function installCommandForOps () {
6
6
  return 'curl -sfS https://dotenvx.sh/ops | sh'
7
7
  }
8
8
 
9
+ function installCommandForVlt () {
10
+ return 'curl -sfS https://dotenvx.sh/vlt | sh'
11
+ }
12
+
9
13
  function opsBanner (installCommand) {
10
14
  const lines = [
11
15
  '',
@@ -29,6 +33,29 @@ function opsBanner (installCommand) {
29
33
  return `${top}\n${middle}\n${bottom}`
30
34
  }
31
35
 
36
+ function vltBanner (installCommand) {
37
+ const lines = [
38
+ '',
39
+ ' ██╗ ██╗██╗ ████████╗',
40
+ ' ██║ ██║██║ ╚══██╔══╝',
41
+ ' ██║ ██║██║ ██║ ',
42
+ ' ╚██╗ ██╔╝██║ ██║ [www.dotenvx.com/vlt]',
43
+ ' ╚████╔╝ ███████╗██║ ',
44
+ ' ╚═══╝ ╚══════╝╚═╝ ',
45
+ '',
46
+ ' ⛨ ARMORED KEYS: Harden your private keys.',
47
+ ` ⮕ install [${installCommand}]`,
48
+ ' ⮕ then run [dotenvx-vlt login]'
49
+ ]
50
+
51
+ const innerWidth = Math.max(67, ...lines.map((line) => line.length))
52
+ const top = ` ${'_'.repeat(innerWidth)}`
53
+ const middle = lines.map((line) => `|${line.padEnd(innerWidth)}|`).join('\n')
54
+ const bottom = `|${'_'.repeat(innerWidth)}|`
55
+
56
+ return `${top}\n${middle}\n${bottom}`
57
+ }
58
+
32
59
  function executeDynamic (program, command, rawArgs) {
33
60
  if (!command) {
34
61
  program.outputHelp()
@@ -49,7 +76,10 @@ function executeDynamic (program, command, rawArgs) {
49
76
 
50
77
  const result = childProcess.spawnSync(`dotenvx-${command}`, forwardedArgs, { stdio: 'inherit', env })
51
78
  if (result.error) {
52
- if (command === 'ops') {
79
+ if (command === 'vlt') {
80
+ const installCommand = installCommandForVlt()
81
+ console.log(vltBanner(installCommand))
82
+ } else if (command === 'ops') {
53
83
  const installCommand = installCommandForOps()
54
84
  console.log(opsBanner(installCommand))
55
85
  } else {
@@ -72,9 +72,7 @@ async function keyValues (filepath, opts = {}) {
72
72
 
73
73
  // ops
74
74
  if (!noOps && !privateKey && publicKey && publicKey.length > 0) {
75
- const kp = await opsKeypair(publicKey, {
76
- hooks: opts.keypairHooks
77
- })
75
+ const kp = await opsKeypair(publicKey, { envFilepath: filepath, hooks: opts.keypairHooks })
78
76
  privateKey = kp.privateKey
79
77
  }
80
78
 
@@ -72,12 +72,12 @@ function keyValuesSync (filepath, opts = {}) {
72
72
 
73
73
  // ops
74
74
  if (!noOps && !privateKey && publicKey && publicKey.length > 0) {
75
- const opsOptions = {}
75
+ const opsOptions = { envFilepath: filepath }
76
76
  if (opts.noSpinner) {
77
77
  opsOptions.noSpinner = true
78
78
  }
79
79
 
80
- const kp = Object.keys(opsOptions).length > 0 ? opsKeypairSync(publicKey, opsOptions) : opsKeypairSync(publicKey)
80
+ const kp = opsKeypairSync(publicKey, opsOptions)
81
81
  privateKey = kp.privateKey
82
82
  }
83
83
 
package/src/lib/main.d.ts CHANGED
@@ -165,7 +165,7 @@ export interface DotenvConfigOptions {
165
165
  | 'debug';
166
166
 
167
167
  /**
168
- * Turn off Dotenvx Ops features - https://dotenvx.com/ops
168
+ * Turn off Dotenvx Vlt Ops features. Alias for `noVlt`.
169
169
  *
170
170
  * @default false
171
171
  * @example require('@dotenvx/dotenvx').config({ noOps: true })
@@ -173,9 +173,13 @@ export interface DotenvConfigOptions {
173
173
  noOps?: boolean;
174
174
 
175
175
  /**
176
- * @deprecated use `noOps` instead.
176
+ * Turn off Dotenvx Vlt Ops features.
177
+ *
178
+ * @default false
179
+ * @example require('@dotenvx/dotenvx').config({ noVlt: true })
177
180
  */
178
- opsOff?: boolean;
181
+ noVlt?: boolean;
182
+
179
183
  }
180
184
 
181
185
  export type DotenvConfigEnv =
@@ -244,7 +248,7 @@ export interface SetOptions {
244
248
  encrypt?: boolean;
245
249
 
246
250
  /**
247
- * Turn off Dotenvx Ops features - https://dotenvx.com/ops
251
+ * Turn off Dotenvx Vlt Ops features. Alias for `noVlt`.
248
252
  *
249
253
  * @default false
250
254
  * @example require('@dotenvx/dotenvx').set(key, value, { noOps: true })
@@ -252,9 +256,13 @@ export interface SetOptions {
252
256
  noOps?: boolean;
253
257
 
254
258
  /**
255
- * @deprecated use `noOps` instead.
259
+ * Turn off Dotenvx Vlt Ops features.
260
+ *
261
+ * @default false
262
+ * @example require('@dotenvx/dotenvx').set(key, value, { noVlt: true })
256
263
  */
257
- opsOff?: boolean;
264
+ noVlt?: boolean;
265
+
258
266
  }
259
267
 
260
268
  export type SetProcessedEnv = {
@@ -325,7 +333,7 @@ export interface GetOptions {
325
333
  strict?: boolean;
326
334
 
327
335
  /**
328
- * Turn off Dotenvx Ops features - https://dotenvx.com/ops
336
+ * Turn off Dotenvx Vlt Ops features. Alias for `noVlt`.
329
337
  *
330
338
  * @default false
331
339
  * @example require('@dotenvx/dotenvx').get('KEY', { noOps: true })
@@ -333,9 +341,13 @@ export interface GetOptions {
333
341
  noOps?: boolean;
334
342
 
335
343
  /**
336
- * @deprecated use `noOps` instead.
344
+ * Turn off Dotenvx Vlt Ops features.
345
+ *
346
+ * @default false
347
+ * @example require('@dotenvx/dotenvx').get('KEY', { noVlt: true })
337
348
  */
338
- opsOff?: boolean;
349
+ noVlt?: boolean;
350
+
339
351
  }
340
352
 
341
353
  /**
package/src/lib/main.js CHANGED
@@ -328,7 +328,7 @@ const keypair = function (envFile, key, envKeysFile = null, noOps = false) {
328
328
 
329
329
  function resolveNoOps (options = {}) {
330
330
  const sesh = new Session()
331
- return options.noOps === true || options.opsOff === true || sesh.noOpsSync()
331
+ return options.noOps === true || options.noVlt === true || sesh.noVltSync()
332
332
  }
333
333
 
334
334
  module.exports = {