@dotenvx/dotenvx 1.50.0 → 1.51.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.50.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.51.0...main)
6
+
7
+ ## [1.51.0](https://github.com/dotenvx/dotenvx/compare/v1.50.1...v1.51.0) (2025-09-23)
8
+
9
+ ### Added
10
+
11
+ * Add `config({opsOff: true})` options and `--ops-off` flag for turning off [Dotenvx Ops](https://dotenvx.com/ops) features. ([#680](https://github.com/dotenvx/dotenvx/pull/680))
12
+
13
+ ## [1.50.1](https://github.com/dotenvx/dotenvx/compare/v1.50.0...v1.50.1) (2025-09-18)
14
+
15
+ ### Removed
16
+
17
+ * Remove listed command to `radar` (now `ops`) ([#678](https://github.com/dotenvx/dotenvx/pull/678))
6
18
 
7
19
  ## [1.50.0](https://github.com/dotenvx/dotenvx/compare/v1.49.1...v1.50.0) (2025-09-18)
8
20
 
package/README.md CHANGED
@@ -1247,6 +1247,15 @@ $ dotenvx set HELLO world -fk .env.keys -f apps/app1/.env
1247
1247
  $ dotenvx run -fk .env.keys -f apps/app1/.env -- yourcommand
1248
1248
  ```
1249
1249
 
1250
+ </details>
1251
+ <details><summary>`run --ops-off`</summary><br>
1252
+
1253
+ Turn off [Dotenvx Ops](https://dotenvx.com/ops) features.
1254
+
1255
+ ```sh
1256
+ $ dotenvx run --ops-off -- yourcommand
1257
+ ```
1258
+
1250
1259
  </details>
1251
1260
  <details><summary>`get KEY`</summary><br>
1252
1261
 
@@ -2453,6 +2462,16 @@ HELLO="World"
2453
2462
  require('@dotenvx/dotenvx').config({path: ['.env'], envKeysFile: '../../.env.keys'})
2454
2463
  ```
2455
2464
 
2465
+ </details>
2466
+ <details><summary>`config(opsOff:)` - opsOff</summary><br>
2467
+
2468
+ Turn off [Dotenvx Ops](https://dotenvx.com/ops) features.
2469
+
2470
+ ```js
2471
+ // index.js
2472
+ require('@dotenvx/dotenvx').config({opsOff: true})
2473
+ ```
2474
+
2456
2475
  </details>
2457
2476
  <details><summary>`parse(src)`</summary><br>
2458
2477
 
@@ -2535,24 +2554,26 @@ This is known as *Decryption at Access* and is written about in [the whitepaper]
2535
2554
 
2536
2555
  &nbsp;
2537
2556
 
2538
- ## Radar 📡
2557
+ ## Ops 🏰
2558
+
2559
+ [![dotenvx-ops](https://dotenvx.com/dotenvx-ops-banner.png?v=2)](https://dotenvx.com/ops)
2539
2560
 
2540
- > [Dotenvx Radar](https://dotenvx.com/radar) is a commercial extension for [dotenvx](https://github.com/dotenvx/dotenvx).
2561
+ > [Dotenvx Ops](https://dotenvx.com/ops) is optional commercial tooling for [dotenvx](https://github.com/dotenvx/dotenvx).
2541
2562
 
2542
- *Observe, version, and back up your environment variables at runtime.*
2563
+ *Use dotenvx across your team, infrastructure, agents, and more.*
2543
2564
 
2544
2565
  ### Usage
2545
2566
 
2546
- 1. Install Radar
2567
+ 1. Install dotenvx-ops
2547
2568
 
2548
2569
  ```sh
2549
- $ curl -sfS https://dotenvx.sh/radar | sh
2570
+ $ curl -sfS https://dotenvx.sh/ops | sh
2550
2571
  ```
2551
2572
 
2552
2573
  2. Log in
2553
2574
 
2554
2575
  ```sh
2555
- $ dotenvx-radar login
2576
+ $ dotenvx-ops login
2556
2577
  ✔ logged in [username]
2557
2578
  ```
2558
2579
 
@@ -2564,21 +2585,21 @@ $ dotenvx run -- yourcommand
2564
2585
  [dotenvx@1.0.0] injecting env (1) from .env
2565
2586
  ```
2566
2587
 
2567
- That's it! Your environment variables are auto-observed and backed up by [Radar](https://dotenvx.com/radar).
2588
+ That's it! Your environment variables are auto-observed and backed up by [Dotenvx Ops](https://dotenvx.com/ops) radar feature.
2568
2589
 
2569
2590
  ### UI
2570
2591
 
2571
- ![dotenvx-radar](https://dotenvx.com/radar/ui.png)
2592
+ ![dotenvx-ops](https://dotenvx.com/ops/ui.png)
2572
2593
 
2573
2594
  ### CLI
2574
2595
 
2575
2596
  <details><summary>`login`</summary><br>
2576
2597
 
2577
- Log in to [radar](https://dotenvx.com/radar).
2598
+ Log in to [Ops](https://dotenvx.com/ops).
2578
2599
 
2579
2600
  ```sh
2580
- $ dotenvx-radar login
2581
- press Enter to open [https://radar.dotenvx.com/login/device] and enter code [D9C1-03BC]... (Y/n)
2601
+ $ dotenvx-ops login
2602
+ press Enter to open [https://ops.dotenvx.com/login/device] and enter code [D9C1-03BC]... (Y/n)
2582
2603
  ⠹ waiting on browser authorization
2583
2604
  ✔ logged in [username] to this device and activated token [dxo_6kjPifI…]
2584
2605
  ```
@@ -2586,31 +2607,31 @@ press Enter to open [https://radar.dotenvx.com/login/device] and enter code [D9C
2586
2607
  </details>
2587
2608
  <details><summary>`logout`</summary><br>
2588
2609
 
2589
- Log out of [radar](https://dotenvx.com/radar).
2610
+ Log out of [Ops](https://dotenvx.com/ops).
2590
2611
 
2591
2612
  ```sh
2592
- $ dotenvx-radar logout
2613
+ $ dotenvx-ops logout
2593
2614
  ✔ logged out [username] from this device and revoked token [dxo_5ZrwRXV…]
2594
2615
  ```
2595
2616
 
2596
2617
  </details>
2597
2618
  <details><summary>`status`</summary><br>
2598
2619
 
2599
- Check current status of [radar](https://dotenvx.com/radar) - `on` or `off` (logged in or out).
2620
+ Check current status of [Ops](https://dotenvx.com/ops) - `on` or `off` (logged in or out).
2600
2621
 
2601
2622
  ```sh
2602
- $ dotenvx-radar status
2623
+ $ dotenvx-ops status
2603
2624
  on
2604
2625
  ```
2605
2626
 
2606
2627
  </details>
2607
2628
  <details><summary>`settings`</summary><br>
2608
2629
 
2609
- Check and configure various settings for [radar](https://dotenvx.com/radar) - `username`, `token`, and more.
2630
+ Check and configure various settings for [Ops](https://dotenvx.com/ops) - `username`, `token`, and more.
2610
2631
 
2611
2632
  ```sh
2612
- $ dotenvx-radar settings
2613
- Usage: dotenvx-radar settings [options] [command]
2633
+ $ dotenvx-ops settings
2634
+ Usage: dotenvx-ops settings [options] [command]
2614
2635
 
2615
2636
  ⚙️ settings
2616
2637
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.50.0",
2
+ "version": "1.51.0",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a secure dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -18,6 +18,9 @@ async function run () {
18
18
 
19
19
  const ignore = options.ignore || []
20
20
 
21
+ // dotenvx-ops related
22
+ const opsOn = options.opsOff !== true
23
+
21
24
  if (commandArgs.length < 1) {
22
25
  const hasSeparator = process.argv.indexOf('--') !== -1
23
26
 
@@ -49,10 +52,12 @@ async function run () {
49
52
  readableStrings,
50
53
  readableFilepaths,
51
54
  uniqueInjectedKeys
52
- } = new Run(envs, options.overload, process.env.DOTENV_KEY, process.env, options.envKeysFile).run()
55
+ } = new Run(envs, options.overload, process.env.DOTENV_KEY, process.env, options.envKeysFile, opsOn).run()
53
56
 
54
- try { new Radar().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
55
- try { new Ops().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
57
+ if (opsOn) {
58
+ try { new Radar().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
59
+ try { new Ops().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
60
+ }
56
61
 
57
62
  for (const processedEnv of processedEnvs) {
58
63
  if (processedEnv.type === 'envVaultFile') {
@@ -73,6 +73,7 @@ program.command('run')
73
73
  .option('--strict', 'process.exit(1) on any errors', false)
74
74
  .option('--convention <name>', 'load a .env convention (available conventions: [\'nextjs\', \'flow\'])')
75
75
  .option('--ignore <errorCodes...>', 'error code(s) to ignore (example: --ignore=MISSING_ENV_FILE)')
76
+ .option('--ops-off', 'disable dotenvx-ops features', false)
76
77
  .action(function (...args) {
77
78
  this.envs = envs
78
79
  runAction.apply(this, args)
@@ -200,7 +201,6 @@ program.command('help [command]')
200
201
  // dotenvx pro
201
202
  program.addHelpText('after', ' ')
202
203
  program.addHelpText('after', 'Advanced: ')
203
- program.addHelpText('after', ' radar 📡 radar')
204
204
  program.addHelpText('after', ' ops 🏰 ops')
205
205
  program.addHelpText('after', ' ext 🔌 extensions')
206
206
 
@@ -23,7 +23,8 @@ function executeDynamic (program, command, rawArgs) {
23
23
  const result = childProcess.spawnSync(`dotenvx-${command}`, forwardedArgs, { stdio: 'inherit', env })
24
24
  if (result.error) {
25
25
  if (command === 'pro') {
26
- logger.warn(`[INSTALLATION_NEEDED] install dotenvx-${command} to use [dotenvx ${command}] commands 🏆`)
26
+ logger.warn(`[INSTALLATION_NEEDED] install dotenvx-${command} to use [dotenvx-${command}] commands 🏆`)
27
+ logger.warn('[DEPRECATION NOTICE] dotenvx-pro to be sunsetted soon (2026) and its featureset to be rolled into dotenvx-ops')
27
28
  logger.help('? see installation instructions [https://github.com/dotenvx/dotenvx-pro]')
28
29
  } else if (command === 'ops') {
29
30
  const ops = ` _______________________________________________________________________
@@ -5,11 +5,15 @@ const ProKeypair = require('./proKeypair')
5
5
  // services
6
6
  const Keypair = require('./../services/keypair')
7
7
 
8
- function findPrivateKey (envFilepath, envKeysFilepath = null) {
8
+ function findPrivateKey (envFilepath, envKeysFilepath = null, opsOn = true) {
9
9
  // use path/to/.env.${environment} to generate privateKeyName
10
10
  const privateKeyName = guessPrivateKeyName(envFilepath)
11
11
 
12
- const proKeypairs = new ProKeypair(envFilepath).run() // TODO: implement custom envKeysFilepath
12
+ let proKeypairs = {}
13
+ if (opsOn) {
14
+ proKeypairs = new ProKeypair(envFilepath).run() // TODO: implement custom envKeysFilepath
15
+ }
16
+
13
17
  const keypairs = new Keypair(envFilepath, envKeysFilepath).run()
14
18
 
15
19
  return proKeypairs[privateKeyName] || keypairs[privateKeyName]
@@ -5,10 +5,14 @@ const ProKeypair = require('./proKeypair')
5
5
  // services
6
6
  const Keypair = require('./../services/keypair')
7
7
 
8
- function findPublicKey (envFilepath) {
8
+ function findPublicKey (envFilepath, opsOn = true) {
9
9
  const publicKeyName = guessPublicKeyName(envFilepath)
10
10
 
11
- const proKeypairs = new ProKeypair(envFilepath).run()
11
+ let proKeypairs = {}
12
+ if (opsOn) {
13
+ proKeypairs = new ProKeypair(envFilepath).run()
14
+ }
15
+
12
16
  const keypairs = new Keypair(envFilepath).run()
13
17
 
14
18
  return proKeypairs[publicKeyName] || keypairs[publicKeyName]
package/src/lib/main.js CHANGED
@@ -47,6 +47,9 @@ const config = function (options = {}) {
47
47
  DOTENV_KEY = options.DOTENV_KEY
48
48
  }
49
49
 
50
+ // dotenvx-ops related
51
+ const opsOn = options.opsOff !== true
52
+
50
53
  if (options) {
51
54
  setLogLevel(options)
52
55
  setLogName(options)
@@ -61,10 +64,12 @@ const config = function (options = {}) {
61
64
  processedEnvs,
62
65
  readableFilepaths,
63
66
  uniqueInjectedKeys
64
- } = new Run(envs, overload, DOTENV_KEY, processEnv, envKeysFile).run()
67
+ } = new Run(envs, overload, DOTENV_KEY, processEnv, envKeysFile, opsOn).run()
65
68
 
66
- try { new Radar().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
67
- try { new Ops().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
69
+ if (opsOn) {
70
+ try { new Radar().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
71
+ try { new Ops().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
72
+ }
68
73
 
69
74
  let lastError
70
75
  /** @type {Record<string, string>} */
@@ -10,11 +10,13 @@ class Radar {
10
10
  // check npm lib
11
11
  try {
12
12
  this.radarLib = this._radarNpm()
13
+ logger.warn('[DEPRECATION NOTICE] dotenvx-radar is renamed dotenv-ops. [See https://dotenvx.com/docs/ops]')
13
14
  logger.successv(`📡 radar: ${this.radarLib.status}`)
14
15
  } catch (e) {
15
16
  // check binary cli
16
17
  try {
17
18
  this.radarLib = this._radarCli()
19
+ logger.warn('[DEPRECATION NOTICE] dotenvx-radar is renamed dotenv-ops. [See https://dotenvx.com/docs/ops]')
18
20
  logger.successv(`📡 radar: ${this.radarLib.status}`)
19
21
  } catch (_e2) {
20
22
  // noop
@@ -16,12 +16,13 @@ const guessPrivateKeyName = require('./../helpers/guessPrivateKeyName')
16
16
  const determineEnvs = require('./../helpers/determineEnvs')
17
17
 
18
18
  class Run {
19
- constructor (envs = [], overload = false, DOTENV_KEY = '', processEnv = process.env, envKeysFilepath = null) {
19
+ constructor (envs = [], overload = false, DOTENV_KEY = '', processEnv = process.env, envKeysFilepath = null, opsOn = true) {
20
20
  this.envs = determineEnvs(envs, processEnv, DOTENV_KEY)
21
21
  this.overload = overload
22
22
  this.DOTENV_KEY = DOTENV_KEY
23
23
  this.processEnv = processEnv
24
24
  this.envKeysFilepath = envKeysFilepath
25
+ this.opsOn = opsOn
25
26
 
26
27
  this.processedEnvs = []
27
28
  this.readableFilepaths = new Set()
@@ -96,7 +97,7 @@ class Run {
96
97
  const src = fsx.readFileX(filepath, { encoding })
97
98
  this.readableFilepaths.add(envFilepath)
98
99
 
99
- const privateKey = findPrivateKey(envFilepath, this.envKeysFilepath)
100
+ const privateKey = findPrivateKey(envFilepath, this.envKeysFilepath, this.opsOn)
100
101
  const privateKeyName = guessPrivateKeyName(envFilepath)
101
102
  const { parsed, errors, injected, preExisted } = new Parse(src, privateKey, this.processEnv, this.overload, privateKeyName).run()
102
103