@dotenvx/dotenvx 2.34.0 → 2.34.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 +7 -1
- package/package.json +1 -1
- package/src/lib/helpers/prompts.js +18 -13
- package/src/lib/transforms/encrypt.js +2 -2
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/v2.34.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.34.1...main)
|
|
6
|
+
|
|
7
|
+
## [2.34.1](https://github.com/dotenvx/dotenvx/compare/v2.34.0...v2.34.1) (2026-10-08)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Patch: don't write public key on ctrl+c or prompt failure ([#1009](https://github.com/dotenvx/dotenvx/pull/1009))
|
|
6
12
|
|
|
7
13
|
## [2.34.0](https://github.com/dotenvx/dotenvx/compare/v2.33.0...v2.34.0) (2026-10-08)
|
|
8
14
|
|
package/package.json
CHANGED
|
@@ -41,20 +41,25 @@ function clearLastLine (stream) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
async function select ({ message, choices, navigation, backValue, initial, prefix }, context) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
try {
|
|
45
|
+
if (navigation) {
|
|
46
|
+
const CustodySelect = require('./custodySelect')
|
|
47
|
+
return await new CustodySelect({ message, choices: choicesForSelect(choices), backValue, initial, ...(prefix ? { symbols: { prefix: { pending: prefix } } } : {}), ...enquirerOptions(context) }).run()
|
|
48
|
+
}
|
|
49
|
+
const answer = await enquirer.prompt({
|
|
50
|
+
type: 'select',
|
|
51
|
+
name: 'value',
|
|
52
|
+
...(prefix ? { symbols: { prefix: { pending: prefix } } } : {}),
|
|
53
|
+
message,
|
|
54
|
+
choices: choicesForSelect(choices),
|
|
55
|
+
...enquirerOptions(context)
|
|
56
|
+
})
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
return answer.value
|
|
59
|
+
} catch (error) {
|
|
60
|
+
if (error instanceof Error) throw error
|
|
61
|
+
throw Object.assign(new Error('prompt cancelled'), { code: 'PROMPT_CANCELLED' })
|
|
62
|
+
}
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
async function multiselect ({ message, choices, initial = [], submitLabel }, context) {
|
|
@@ -126,10 +126,10 @@ async function encryptTransform (options = {}) {
|
|
|
126
126
|
unchangedFilepaths.push(envFilepath)
|
|
127
127
|
}
|
|
128
128
|
} catch (error) {
|
|
129
|
-
if (error
|
|
129
|
+
if (error?.code === 'ENOENT') {
|
|
130
130
|
row.error = new Errors({ envFilepath, filepath }).missingEnvFile()
|
|
131
131
|
} else {
|
|
132
|
-
row.error = error
|
|
132
|
+
row.error = error instanceof Error ? error : new Error('Encryption aborted before private key storage completed')
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|