@dotenvx/dotenvx 1.67.0 → 1.68.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 +13 -1
- package/package.json +1 -1
- package/src/lib/extensions/ops.js +2 -0
- package/src/lib/helpers/cryptography/opsKeypair.js +5 -7
- package/src/lib/helpers/cryptography/opsKeypairSync.js +1 -2
- package/src/lib/helpers/cryptography/provision.js +1 -4
- package/src/lib/helpers/cryptography/provisionSync.js +1 -1
- package/src/lib/helpers/keyResolution/keyValues.js +1 -3
- package/src/lib/helpers/keyResolution/keyValuesSync.js +2 -2
- package/src/lib/main.js +8 -0
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.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.68.1...main)
|
|
6
|
+
|
|
7
|
+
## [1.68.1](https://github.com/dotenvx/dotenvx/compare/v1.68.0...v1.68.1) (2026-05-24)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Pass `-f` to ops ([#821](https://github.com/dotenvx/dotenvx/pull/821))
|
|
12
|
+
|
|
13
|
+
## [1.68.0](https://github.com/dotenvx/dotenvx/compare/v1.67.0...v1.68.0) (2026-05-24)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
* Support `ignore` option on `parse` ([#820](https://github.com/dotenvx/dotenvx/pull/820))
|
|
6
18
|
|
|
7
19
|
## [1.67.0](https://github.com/dotenvx/dotenvx/compare/v1.66.0...v1.67.0) (2026-05-21)
|
|
8
20
|
|
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ class Ops {
|
|
|
41
41
|
const args = ['keypair']
|
|
42
42
|
if (options.noSpinner) args.push('--no-spinner')
|
|
43
43
|
if (options.token) args.push('--token', options.token)
|
|
44
|
+
if (options.envFilepath) args.push('-f', options.envFilepath)
|
|
44
45
|
if (publicKey) args.push(publicKey)
|
|
45
46
|
|
|
46
47
|
try {
|
|
@@ -61,6 +62,7 @@ class Ops {
|
|
|
61
62
|
const args = ['keypair']
|
|
62
63
|
if (options.noSpinner) args.push('--no-spinner')
|
|
63
64
|
if (options.token) args.push('--token', options.token)
|
|
65
|
+
if (options.envFilepath) args.push('-f', options.envFilepath)
|
|
64
66
|
if (publicKey) args.push(publicKey)
|
|
65
67
|
|
|
66
68
|
try {
|
|
@@ -4,18 +4,16 @@ 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
|
-
|
|
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
|
-
|
|
15
|
-
kp = await new Ops().keypair(existingPublicKey, keypairOptions)
|
|
16
|
-
} else {
|
|
17
|
-
kp = await new Ops().keypair(existingPublicKey)
|
|
18
|
-
}
|
|
16
|
+
kp = await new Ops().keypair(existingPublicKey, keypairOptions)
|
|
19
17
|
} finally {
|
|
20
18
|
if (hooks.after) await hooks.after()
|
|
21
19
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const Ops = require('../../extensions/ops')
|
|
2
2
|
|
|
3
3
|
function opsKeypairSync (existingPublicKey, options = {}) {
|
|
4
|
-
const
|
|
5
|
-
const kp = Object.keys(options).length > 0 ? ops.keypairSync(existingPublicKey, options) : ops.keypairSync(existingPublicKey)
|
|
4
|
+
const kp = new Ops().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
|
|
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
|
}
|
|
@@ -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 =
|
|
80
|
+
const kp = opsKeypairSync(publicKey, opsOptions)
|
|
81
81
|
privateKey = kp.privateKey
|
|
82
82
|
}
|
|
83
83
|
|
package/src/lib/main.js
CHANGED
|
@@ -144,10 +144,18 @@ const parse = function (src, options = {}) {
|
|
|
144
144
|
// overload
|
|
145
145
|
const overload = options.overload || options.override
|
|
146
146
|
|
|
147
|
+
// ignore
|
|
148
|
+
const ignore = options.ignore || []
|
|
149
|
+
|
|
147
150
|
const { parsed, errors } = new Parse(src, privateKey, processEnv, overload).run()
|
|
148
151
|
|
|
149
152
|
// display any errors
|
|
150
153
|
for (const error of errors) {
|
|
154
|
+
if (ignore.includes(error.code)) {
|
|
155
|
+
logger.verbose(`ignored: ${error.message}`)
|
|
156
|
+
continue // ignore error
|
|
157
|
+
}
|
|
158
|
+
|
|
151
159
|
logger.error(error.messageWithHelp)
|
|
152
160
|
}
|
|
153
161
|
|