@dotenvx/dotenvx 1.68.1 → 1.69.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/README.md +14 -14
  3. package/package.json +3 -3
  4. package/src/cli/actions/decrypt.js +5 -4
  5. package/src/cli/actions/encrypt.js +12 -11
  6. package/src/cli/actions/get.js +4 -3
  7. package/src/cli/actions/keypair.js +4 -3
  8. package/src/cli/actions/normalizeVltOptions.js +10 -0
  9. package/src/cli/actions/rotate.js +5 -4
  10. package/src/cli/actions/run.js +4 -3
  11. package/src/cli/actions/set.js +4 -3
  12. package/src/cli/dotenvx.js +12 -6
  13. package/src/db/session.js +9 -9
  14. package/src/lib/extensions/{ops.js → vlt.js} +25 -28
  15. package/src/lib/helpers/cryptography/index.js +2 -2
  16. package/src/lib/helpers/cryptography/mutateKeysSrc.js +1 -1
  17. package/src/lib/helpers/cryptography/mutateKeysSrcSync.js +1 -1
  18. package/src/lib/helpers/cryptography/provision.js +8 -8
  19. package/src/lib/helpers/cryptography/provisionSync.js +6 -6
  20. package/src/lib/helpers/cryptography/provisionWithPrivateKey.js +1 -1
  21. package/src/lib/helpers/cryptography/{opsKeypair.js → vltKeypair.js} +4 -4
  22. package/src/lib/helpers/cryptography/vltKeypairSync.js +14 -0
  23. package/src/lib/helpers/executeDynamic.js +16 -13
  24. package/src/lib/helpers/keyResolution/keyValues.js +5 -5
  25. package/src/lib/helpers/keyResolution/keyValuesFromEnvSrc.js +4 -4
  26. package/src/lib/helpers/keyResolution/keyValuesSync.js +7 -7
  27. package/src/lib/main.d.ts +21 -9
  28. package/src/lib/main.js +11 -11
  29. package/src/lib/services/decrypt.js +3 -3
  30. package/src/lib/services/encrypt.js +4 -4
  31. package/src/lib/services/get.js +4 -4
  32. package/src/lib/services/keypair.js +4 -4
  33. package/src/lib/services/rotate.js +9 -9
  34. package/src/lib/services/run.js +5 -5
  35. package/src/lib/services/sets.js +6 -6
  36. package/src/lib/helpers/cryptography/opsKeypairSync.js +0 -14
@@ -34,13 +34,13 @@ function allValuesForKey (envSrc, key) {
34
34
  }
35
35
 
36
36
  class Sets {
37
- constructor (key, value, envs = [], encrypt = true, envKeysFilepath = null, noOps = false, noCreate = false) {
37
+ constructor (key, value, envs = [], encrypt = true, envKeysFilepath = null, noVlt = false, noCreate = false) {
38
38
  this.envs = determine(envs, process.env)
39
39
  this.key = key
40
40
  this.value = value
41
41
  this.encrypt = encrypt
42
42
  this.envKeysFilepath = envKeysFilepath
43
- this.noOps = noOps
43
+ this.noVlt = noVlt
44
44
  this.noCreate = noCreate
45
45
 
46
46
  this.processedEnvs = []
@@ -131,11 +131,11 @@ class Sets {
131
131
  let privateKey
132
132
 
133
133
  const { publicKeyName, privateKeyName } = keyNames(filepath)
134
- const { publicKeyValue, privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
134
+ const { publicKeyValue, privateKeyValue } = keyValuesSync(filepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
135
135
 
136
136
  // first pass - provisionSync
137
137
  if (!privateKeyValue && !publicKeyValue) {
138
- const prov = provisionSync({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noOps: this.noOps })
138
+ const prov = provisionSync({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
139
139
  envSrc = prov.envSrc
140
140
  publicKey = prov.publicKey
141
141
  privateKey = prov.privateKey
@@ -238,11 +238,11 @@ class Sets {
238
238
  let privateKey
239
239
 
240
240
  const { publicKeyName, privateKeyName } = keyNames(filepath)
241
- const { publicKeyValue, privateKeyValue } = await keyValues(filepath, { keysFilepath: this.envKeysFilepath, noOps: this.noOps })
241
+ const { publicKeyValue, privateKeyValue } = await keyValues(filepath, { keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
242
242
 
243
243
  // first pass - provision
244
244
  if (!privateKeyValue && !publicKeyValue) {
245
- const prov = await provision({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noOps: this.noOps })
245
+ const prov = await provision({ envSrc, envFilepath, keysFilepath: this.envKeysFilepath, noVlt: this.noVlt })
246
246
  envSrc = prov.envSrc
247
247
  publicKey = prov.publicKey
248
248
  privateKey = prov.privateKey
@@ -1,14 +0,0 @@
1
- const Ops = require('../../extensions/ops')
2
-
3
- function opsKeypairSync (existingPublicKey, options = {}) {
4
- const kp = new Ops().keypairSync(existingPublicKey, options)
5
- const publicKey = kp.public_key
6
- const privateKey = kp.private_key
7
-
8
- return {
9
- publicKey,
10
- privateKey
11
- }
12
- }
13
-
14
- module.exports = opsKeypairSync