@dotenvx/dotenvx 1.61.0 → 1.61.2

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,20 @@
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.61.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.61.2...main)
6
+
7
+ ## [1.61.2](https://github.com/dotenvx/dotenvx/compare/v1.61.1...v1.61.2) (2026-04-21)
8
+
9
+ ### Changed
10
+
11
+ * For Ops ⛨ users surface stderr ([#796](https://github.com/dotenvx/dotenvx/pull/796))
12
+
13
+ ## [1.61.1](https://github.com/dotenvx/dotenvx/compare/v1.61.0...v1.61.1) (2026-04-17)
14
+
15
+ ### Changed
16
+
17
+ * Faster coldstarts! ([#781](https://github.com/dotenvx/dotenvx/pull/781))
18
+ * Patch `dotenvx precommit|prebuild` shorthand ([#793](https://github.com/dotenvx/dotenvx/pull/793))
6
19
 
7
20
  ## [1.61.0](https://github.com/dotenvx/dotenvx/compare/v1.60.2...v1.61.0) (2026-04-08)
8
21
 
package/README.md CHANGED
@@ -2617,77 +2617,15 @@ This is known as *Decryption at Access* and is written about in [the whitepaper]
2617
2617
 
2618
2618
  ## Ops ⛨
2619
2619
 
2620
- [![dotenvx-ops](https://dotenvx.com/dotenvx-ops-banner.png?v=3)](https://dotenvx.com/ops)
2620
+ [![dotenvx-ops](https://dotenvx.com/dotenvx-ops-banner.png?v=6)](https://dotenvx.com/ops)
2621
2621
 
2622
- > ⛨ ARMORED KEYS: Harden your private keys.
2623
-
2624
- ### Quickstart
2625
-
2626
- Install it and gain `ops` commands.
2627
-
2628
- ```sh
2629
- $ curl -sfS https://dotenvx.sh/ops | sh
2630
- $ dotenvx ops login
2631
- $ dotenvx encrypt
2632
- ```
2633
-
2634
- ### CLI
2635
-
2636
- <details><summary>`ops login`</summary><br>
2637
-
2638
- Log in.
2639
-
2640
- ```sh
2641
- $ dotenvx-ops login
2642
- press Enter to open [https://ops.dotenvx.com/login/device] and enter code [D9C1-03BC]... (Y/n)
2643
- ⠹ waiting on browser authorization
2644
- ◈ logged in [username] to this device and activated token [dxo_6kjPifI…]
2645
- ```
2646
-
2647
- </details>
2648
- <details><summary>`ops logout`</summary><br>
2649
-
2650
- Log out.
2651
-
2652
- ```sh
2653
- $ dotenvx ops logout
2654
- ◈ logged out [username] from this device and revoked token [dxo_5ZrwRXV…]
2655
2622
  ```
2656
-
2657
- </details>
2658
- <details><summary>`ops settings`</summary><br>
2659
-
2660
- Check and configure various settings for [Ops](https://dotenvx.com/ops) - `username`, `token`, and more.
2661
-
2662
- ```sh
2663
- $ dotenvx-ops settings
2664
- Usage: dotenvx-ops settings [options] [command]
2665
-
2666
- ⚙️ settings
2667
-
2668
- Options:
2669
- -h, --help display help for command
2670
-
2671
- Commands:
2672
- username print your username
2673
- token [options] print your access token (--unmask)
2674
- device [options] print your device pubkey (--unmask)
2675
- hostname print hostname
2676
- path print path to settings file
2677
- help [command] display help for command
2678
- ```
2679
-
2680
- </details>
2681
- <details><summary>`ops status`</summary><br>
2682
-
2683
- Check current status of [Ops](https://dotenvx.com/ops) - `on` or `off` (logged in or out).
2684
-
2685
- ```sh
2686
- $ dotenvx ops status
2687
- on
2623
+ ⛨ ARMORED KEYS: Harden your private keys.
2624
+ ⮕ install [curl -sfS https://dotenvx.sh/ops | sh]
2625
+ ⮕ then run [dotenvx-ops login]
2688
2626
  ```
2689
2627
 
2690
- </details>
2628
+ [Learn more](https://dotenvx.com/ops)
2691
2629
 
2692
2630
  &nbsp;
2693
2631
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.61.0",
2
+ "version": "1.61.2",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "secrets for agents–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -50,7 +50,7 @@
50
50
  "fdir": "^6.2.0",
51
51
  "ignore": "^5.3.0",
52
52
  "object-treeify": "1.1.33",
53
- "picomatch": "^4.0.2",
53
+ "picomatch": "^4.0.4",
54
54
  "which": "^4.0.0",
55
55
  "yocto-spinner": "^1.1.0"
56
56
  },
@@ -24,28 +24,36 @@ ext.command('ls')
24
24
  .argument('[directory]', 'directory to list .env files from', '.')
25
25
  .option('-f, --env-file <filenames...>', 'path(s) to your env file(s)', '.env*')
26
26
  .option('-ef, --exclude-env-file <excludeFilenames...>', 'path(s) to exclude from your env file(s) (default: none)')
27
- .action(require('./../actions/ls'))
27
+ .action(function (...args) {
28
+ return require('./../actions/ls').apply(this, args)
29
+ })
28
30
 
29
31
  // dotenvx ext genexample
30
32
  ext.command('genexample')
31
33
  .description('generate .env.example')
32
34
  .argument('[directory]', 'directory to generate from', '.')
33
35
  .option('-f, --env-file <paths...>', 'path(s) to your env file(s)', '.env')
34
- .action(require('./../actions/ext/genexample'))
36
+ .action(function (...args) {
37
+ return require('./../actions/ext/genexample').apply(this, args)
38
+ })
35
39
 
36
40
  // dotenvx ext gitignore
37
41
  ext.command('gitignore')
38
42
  .description('append to .gitignore file (and if existing, .dockerignore, .npmignore, and .vercelignore)')
39
43
  .addHelpText('after', examples.gitignore)
40
44
  .option('--pattern <patterns...>', 'pattern(s) to gitignore', ['.env*'])
41
- .action(require('./../actions/ext/gitignore'))
45
+ .action(function (...args) {
46
+ return require('./../actions/ext/gitignore').apply(this, args)
47
+ })
42
48
 
43
49
  // dotenvx ext prebuild
44
50
  ext.command('prebuild')
45
51
  .description('prevent including .env files in docker builds')
46
52
  .addHelpText('after', examples.prebuild)
47
53
  .argument('[directory]', 'directory to prevent including .env files from', '.')
48
- .action(require('./../actions/ext/prebuild'))
54
+ .action(function (...args) {
55
+ return require('./../actions/ext/prebuild').apply(this, args)
56
+ })
49
57
 
50
58
  // dotenvx ext precommit
51
59
  ext.command('precommit')
@@ -53,12 +61,16 @@ ext.command('precommit')
53
61
  .addHelpText('after', examples.precommit)
54
62
  .argument('[directory]', 'directory to prevent committing .env files from', '.')
55
63
  .option('-i, --install', 'install to .git/hooks/pre-commit')
56
- .action(require('./../actions/ext/precommit'))
64
+ .action(function (...args) {
65
+ return require('./../actions/ext/precommit').apply(this, args)
66
+ })
57
67
 
58
68
  // dotenvx scan
59
69
  ext.command('scan')
60
70
  .description('scan for leaked secrets')
61
- .action(require('./../actions/ext/scan'))
71
+ .action(function (...args) {
72
+ return require('./../actions/ext/scan').apply(this, args)
73
+ })
62
74
 
63
75
  // override helpInformation to hide dynamic commands
64
76
  ext.helpInformation = function () {
@@ -60,7 +60,6 @@ program
60
60
  .allowUnknownOption()
61
61
 
62
62
  // dotenvx run -- node index.js
63
- const runAction = require('./actions/run')
64
63
  program.command('run')
65
64
  .description('inject env at runtime [dotenvx run -- yourcommand]')
66
65
  .addHelpText('after', examples.run)
@@ -75,11 +74,10 @@ program.command('run')
75
74
  .addOption(new Option('--ops-off', 'DEPRECATED: use --no-ops').hideHelp())
76
75
  .action(function (...args) {
77
76
  this.envs = envs
78
- return runAction.apply(this, args)
77
+ return require('./actions/run').apply(this, args)
79
78
  })
80
79
 
81
80
  // dotenvx get
82
- const getAction = require('./actions/get')
83
81
  program.command('get')
84
82
  .usage('[KEY] [options]')
85
83
  .description('return a single environment variable')
@@ -98,11 +96,10 @@ program.command('get')
98
96
  .option('--no-ops', 'disable dotenvx-ops features')
99
97
  .action(function (...args) {
100
98
  this.envs = envs
101
- return getAction.apply(this, args)
99
+ return require('./actions/get').apply(this, args)
102
100
  })
103
101
 
104
102
  // dotenvx set
105
- const setAction = require('./actions/set')
106
103
  program.command('set')
107
104
  .usage('<KEY> <value> [options]')
108
105
  .description('encrypt a single environment variable')
@@ -118,11 +115,10 @@ program.command('set')
118
115
  .option('--no-ops', 'disable dotenvx-ops features')
119
116
  .action(function (...args) {
120
117
  this.envs = envs
121
- return setAction.apply(this, args)
118
+ return require('./actions/set').apply(this, args)
122
119
  })
123
120
 
124
121
  // dotenvx encrypt
125
- const encryptAction = require('./actions/encrypt')
126
122
  program.command('encrypt')
127
123
  .description('convert .env file(s) to encrypted .env file(s)')
128
124
  .option('-f, --env-file <paths...>', 'path(s) to your env file(s)', collectEnvs('envFile'), [])
@@ -134,11 +130,10 @@ program.command('encrypt')
134
130
  .option('--no-ops', 'disable dotenvx-ops features')
135
131
  .action(function (...args) {
136
132
  this.envs = envs
137
- return encryptAction.apply(this, args)
133
+ return require('./actions/encrypt').apply(this, args)
138
134
  })
139
135
 
140
136
  // dotenvx decrypt
141
- const decryptAction = require('./actions/decrypt')
142
137
  program.command('decrypt')
143
138
  .description('convert encrypted .env file(s) to plain .env file(s)')
144
139
  .option('-f, --env-file <paths...>', 'path(s) to your env file(s)', collectEnvs('envFile'), [])
@@ -149,11 +144,10 @@ program.command('decrypt')
149
144
  .option('--stdout', 'send to stdout')
150
145
  .action(function (...args) {
151
146
  this.envs = envs
152
- return decryptAction.apply(this, args)
147
+ return require('./actions/decrypt').apply(this, args)
153
148
  })
154
149
 
155
150
  // dotenvx rotate
156
- const rotateAction = require('./actions/rotate')
157
151
  program.command('rotate')
158
152
  .description('rotate keypair(s) and re-encrypt .env file(s)')
159
153
  .option('-f, --env-file <paths...>', 'path(s) to your env file(s)', collectEnvs('envFile'), [])
@@ -164,11 +158,10 @@ program.command('rotate')
164
158
  .option('--stdout', 'send to stdout')
165
159
  .action(function (...args) {
166
160
  this.envs = envs
167
- return rotateAction.apply(this, args)
161
+ return require('./actions/rotate').apply(this, args)
168
162
  })
169
163
 
170
164
  // dotenvx keypair
171
- const keypairAction = require('./actions/keypair')
172
165
  program.command('keypair')
173
166
  .usage('[KEY] [options]')
174
167
  .description('print public/private keys for .env file(s)')
@@ -179,16 +172,19 @@ program.command('keypair')
179
172
  .option('-pp, --pretty-print', 'pretty print output')
180
173
  .option('--pp', 'pretty print output (alias)')
181
174
  .option('--format <type>', 'format of the output (json, shell)', 'json')
182
- .action(keypairAction)
175
+ .action(function (...args) {
176
+ return require('./actions/keypair').apply(this, args)
177
+ })
183
178
 
184
179
  // dotenvx ls
185
- const lsAction = require('./actions/ls')
186
180
  program.command('ls')
187
181
  .description('print all .env files in a tree structure')
188
182
  .argument('[directory]', 'directory to list .env files from', '.')
189
183
  .option('-f, --env-file <filenames...>', 'path(s) to your env file(s)', '.env*')
190
184
  .option('-ef, --exclude-env-file <excludeFilenames...>', 'path(s) to exclude from your env file(s) (default: none)')
191
- .action(lsAction)
185
+ .action(function (...args) {
186
+ return require('./actions/ls').apply(this, args)
187
+ })
192
188
 
193
189
  // dotenvx login
194
190
  program.command('login')
@@ -235,25 +231,25 @@ program.addCommand(require('./commands/ext'))
235
231
  //
236
232
  // MOVED
237
233
  //
238
- const prebuildAction = require('./actions/ext/prebuild')
239
234
  program.command('prebuild')
240
235
  .description('DEPRECATED: moved to [dotenvx ext prebuild]')
241
236
  .addHelpText('after', examples.prebuild)
237
+ .argument('[directory]', 'directory to prevent including .env files from', '.')
242
238
  .action(function (...args) {
243
239
  logger.warn('DEPRECATION NOTICE: [prebuild] has moved to [dotenvx ext prebuild]')
244
240
 
245
- prebuildAction.apply(this, args)
241
+ require('./actions/ext/prebuild').apply(this, args)
246
242
  })
247
243
 
248
- const precommitAction = require('./actions/ext/precommit')
249
244
  program.command('precommit')
250
245
  .description('DEPRECATED: moved to [dotenvx ext precommit]')
251
246
  .addHelpText('after', examples.precommit)
247
+ .argument('[directory]', 'directory to prevent committing .env files from', '.')
252
248
  .option('-i, --install', 'install to .git/hooks/pre-commit')
253
249
  .action(function (...args) {
254
250
  logger.warn('DEPRECATION NOTICE: [precommit] has moved to [dotenvx ext precommit]')
255
251
 
256
- precommitAction.apply(this, args)
252
+ require('./actions/ext/precommit').apply(this, args)
257
253
  })
258
254
 
259
255
  // override helpInformation to hide DEPRECATED and 'ext' commands
@@ -90,7 +90,10 @@ class Ops {
90
90
  }
91
91
 
92
92
  async _exec (binary, args) {
93
- const { stdout } = await execFile(binary, args)
93
+ const { stdout, stderr } = await execFile(binary, args)
94
+ if (stderr && stderr.length > 0) {
95
+ process.stderr.write(stderr.toString())
96
+ }
94
97
  return stdout.toString().trim()
95
98
  }
96
99