@dotenvx/dotenvx 1.65.2 → 1.65.3

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.65.2...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.65.3...main)
6
+
7
+ ## [1.65.3](https://github.com/dotenvx/dotenvx/compare/v1.65.2...v1.65.3) (2026-05-13)
8
+
9
+ ### Changed
10
+
11
+ * Improve spinner message blinking with simpler `--no-spinner` flag passed to ops ([#814](https://github.com/dotenvx/dotenvx/pull/814))
6
12
 
7
13
  ## [1.65.2](https://github.com/dotenvx/dotenvx/compare/v1.65.1...v1.65.2) (2026-05-13)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.65.2",
2
+ "version": "1.65.3",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "secrets for agents–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -55,7 +55,7 @@ async function run () {
55
55
  uniqueInjectedKeys
56
56
  } = await new Run(envs, options.overload, process.env, options.envKeysFile, noOps, {
57
57
  beforeOpsKeypair: () => {
58
- if (spinner) spinner.stop()
58
+ if (spinner) spinner.start('retrieving')
59
59
  },
60
60
  afterOpsKeypair: () => {
61
61
  if (spinner) spinner.start('injecting')
@@ -32,13 +32,14 @@ class Ops {
32
32
  }
33
33
  }
34
34
 
35
- async keypair (publicKey) {
35
+ async keypair (publicKey, options = {}) {
36
36
  if (this._isForcedOff()) return {}
37
37
 
38
38
  const binary = await this._resolveBinary()
39
39
  if (!binary) return {}
40
40
 
41
41
  const args = ['keypair']
42
+ if (options.noSpinner) args.push('--no-spinner')
42
43
  if (publicKey) args.push(publicKey)
43
44
 
44
45
  try {
@@ -48,13 +49,14 @@ class Ops {
48
49
  }
49
50
  }
50
51
 
51
- keypairSync (publicKey) {
52
+ keypairSync (publicKey, options = {}) {
52
53
  if (this._isForcedOff()) return {}
53
54
 
54
55
  const binary = this._resolveBinarySync()
55
56
  if (!binary) return {}
56
57
 
57
58
  const args = ['keypair']
59
+ if (options.noSpinner) args.push('--no-spinner')
58
60
  if (publicKey) args.push(publicKey)
59
61
 
60
62
  try {
@@ -106,9 +108,10 @@ class Ops {
106
108
 
107
109
  _execInteractive (binary, args) {
108
110
  return new Promise((resolve, reject) => {
109
- const subprocess = childProcess.spawn(binary, args, {
111
+ const spawnOptions = {
110
112
  stdio: ['inherit', 'pipe', 'inherit']
111
- })
113
+ }
114
+ const subprocess = childProcess.spawn(binary, args, spawnOptions)
112
115
  let stdout = ''
113
116
 
114
117
  subprocess.stdout.on('data', (data) => {
@@ -5,7 +5,11 @@ async function opsKeypair (existingPublicKey, options = {}) {
5
5
 
6
6
  let kp
7
7
  try {
8
- kp = await new Ops().keypair(existingPublicKey)
8
+ if (options.beforeOpsKeypair || options.afterOpsKeypair) {
9
+ kp = await new Ops().keypair(existingPublicKey, { noSpinner: true })
10
+ } else {
11
+ kp = await new Ops().keypair(existingPublicKey)
12
+ }
9
13
  } finally {
10
14
  if (options.afterOpsKeypair) await options.afterOpsKeypair()
11
15
  }
@@ -1,7 +1,8 @@
1
1
  const Ops = require('../../extensions/ops')
2
2
 
3
- function opsKeypairSync (existingPublicKey) {
4
- const kp = new Ops().keypairSync(existingPublicKey)
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)
5
6
  const publicKey = kp.public_key
6
7
  const privateKey = kp.private_key
7
8
 
@@ -72,7 +72,12 @@ function keyValuesSync (filepath, opts = {}) {
72
72
 
73
73
  // ops
74
74
  if (!noOps && !privateKey && publicKey && publicKey.length > 0) {
75
- const kp = opsKeypairSync(publicKey)
75
+ const opsOptions = {}
76
+ if (opts.noSpinner) {
77
+ opsOptions.noSpinner = true
78
+ }
79
+
80
+ const kp = Object.keys(opsOptions).length > 0 ? opsKeypairSync(publicKey, opsOptions) : opsKeypairSync(publicKey)
76
81
  privateKey = kp.privateKey
77
82
  }
78
83
 
package/src/lib/main.d.ts CHANGED
@@ -146,6 +146,14 @@ export interface DotenvConfigOptions {
146
146
 
147
147
  quiet?: boolean;
148
148
 
149
+ /**
150
+ * Disable spinner output from child Dotenvx Ops commands.
151
+ *
152
+ * @default false
153
+ * @example require('@dotenvx/dotenvx').config({ noSpinner: true })
154
+ */
155
+ noSpinner?: boolean;
156
+
149
157
  logLevel?:
150
158
  | 'error'
151
159
  | 'warn'
package/src/lib/main.js CHANGED
@@ -59,7 +59,9 @@ const config = function (options = {}) {
59
59
  processedEnvs,
60
60
  readableFilepaths,
61
61
  uniqueInjectedKeys
62
- } = new Run(envs, overload, processEnv, envKeysFile, noOps).runSync()
62
+ } = new Run(envs, overload, processEnv, envKeysFile, noOps, {
63
+ noSpinner: options.noSpinner
64
+ }).runSync()
63
65
 
64
66
  let lastError
65
67
  /** @type {Record<string, string>} */
@@ -23,6 +23,7 @@ class Run {
23
23
  this.processEnv = processEnv
24
24
  this.envKeysFilepath = envKeysFilepath
25
25
  this.noOps = noOps
26
+ this.noSpinner = options.noSpinner
26
27
  this.beforeOpsKeypair = options.beforeOpsKeypair
27
28
  this.afterOpsKeypair = options.afterOpsKeypair
28
29
 
@@ -136,7 +137,11 @@ class Run {
136
137
  this.readableFilepaths.add(envFilepath)
137
138
 
138
139
  const { privateKeyName } = keyNames(filepath)
139
- const { privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
140
+ const { privateKeyValue } = keyValuesSync(filepath, {
141
+ keysFilepath: this.envKeysFilepath,
142
+ noOps: this.noOps,
143
+ noSpinner: this.noSpinner
144
+ })
140
145
 
141
146
  const {
142
147
  parsed,