@dotenvx/dotenvx 2.3.3 → 2.3.4
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 +4 -17
- package/src/cli/actions/ls.js +1 -1
- package/src/cli/commands/armor.js +22 -15
- package/src/cli/commands/lock.js +6 -4
- package/src/cli/commands/native.js +12 -8
- package/src/db/device.js +1 -1
- package/src/db/session.js +4 -6
- package/src/lib/helpers/execute.js +1 -1
- package/src/lib/helpers/executeCommand.js +1 -1
- package/src/lib/helpers/http.js +1 -1
- package/src/lib/helpers/keypairMetadata.js +1 -1
- package/src/lib/helpers/openUrl.js +1 -1
- package/src/lib/helpers/prompts.js +1 -1
- package/src/lib/providers/index.js +1 -1
- package/src/lib/providers/worker.js +1 -1
- package/src/lib/resolvers/ls.js +4 -4
- package/src/lib/services/doctor.js +3 -3
- package/src/lib/services/prebuild.js +1 -1
- package/src/lib/services/precommit.js +1 -1
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.3.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.3.4...main)
|
|
6
|
+
|
|
7
|
+
## [2.3.4](https://github.com/dotenvx/dotenvx/compare/v2.3.3...v2.3.4) (2026-07-09)
|
|
8
|
+
|
|
9
|
+
### Removed
|
|
10
|
+
|
|
11
|
+
* Replace various deps with `@dotenvx/tooling` ([#879](https://github.com/dotenvx/dotenvx/pull/879))
|
|
6
12
|
|
|
7
13
|
## [2.3.3](https://github.com/dotenvx/dotenvx/compare/v2.3.2...v2.3.3) (2026-07-09)
|
|
8
14
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.3.
|
|
2
|
+
"version": "2.3.4",
|
|
3
3
|
"name": "@dotenvx/dotenvx",
|
|
4
4
|
"description": "a secure dotenv–from the creator of `dotenv`",
|
|
5
5
|
"author": "@motdotla",
|
|
@@ -43,22 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"funding": "https://dotenvx.com",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@dotenvx/primitives": "^1.
|
|
47
|
-
"@dotenvx/tooling": "^0.2
|
|
48
|
-
"
|
|
49
|
-
"enquirer": "^2.4.1",
|
|
50
|
-
"env-paths": "^2.2.1",
|
|
51
|
-
"execa": "^5.1.1",
|
|
52
|
-
"fdir": "^6.2.0",
|
|
53
|
-
"ignore": "^7.0.5",
|
|
54
|
-
"object-treeify": "1.1.33",
|
|
55
|
-
"open": "^8.4.2",
|
|
56
|
-
"picomatch": "^4.0.4",
|
|
57
|
-
"synckit": "0.11.13",
|
|
58
|
-
"systeminformation": "^5.31.11",
|
|
59
|
-
"undici": "^7.11.0",
|
|
60
|
-
"which": "^6.0.1",
|
|
61
|
-
"yocto-spinner": "^1.2.0"
|
|
46
|
+
"@dotenvx/primitives": "^1.8.1",
|
|
47
|
+
"@dotenvx/tooling": "^1.0.2",
|
|
48
|
+
"yocto-spinner": "^1.2.1"
|
|
62
49
|
},
|
|
63
50
|
"devDependencies": {
|
|
64
51
|
"@yao-pkg/pkg": "^6.12.0",
|
package/src/cli/actions/ls.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const executeDynamic = require('./../../lib/helpers/executeDynamic')
|
|
2
|
-
const Session = require('./../../db/session')
|
|
3
2
|
|
|
4
3
|
function configureArmorCommand (armor) {
|
|
5
4
|
armor
|
|
@@ -12,77 +11,85 @@ function configureArmorCommand (armor) {
|
|
|
12
11
|
return executeDynamic(armor, 'armor', [command, ...(args || [])])
|
|
13
12
|
}
|
|
14
13
|
|
|
14
|
+
const Session = require('./../../db/session')
|
|
15
15
|
const sesh = new Session()
|
|
16
16
|
await sesh.notifyUpdate()
|
|
17
17
|
this.help()
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
// dotenvx armor up
|
|
21
|
-
const upAction = require('./../actions/armor/up')
|
|
22
21
|
armor
|
|
23
22
|
.command('up')
|
|
24
23
|
.description('armor key')
|
|
25
24
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
26
25
|
.option('--token <token>', 'set token')
|
|
27
26
|
.option('--team <team>', 'team to armor private key for')
|
|
28
|
-
.action(
|
|
27
|
+
.action(function (...args) {
|
|
28
|
+
return require('./../actions/armor/up').apply(this, args)
|
|
29
|
+
})
|
|
29
30
|
|
|
30
31
|
// dotenvx armor down
|
|
31
|
-
const downAction = require('./../actions/armor/down')
|
|
32
32
|
armor
|
|
33
33
|
.command('down')
|
|
34
34
|
.description('dearmor key')
|
|
35
35
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
36
36
|
.option('--token <token>', 'set token')
|
|
37
37
|
.option('--team <team>', 'team to dearmor private key from')
|
|
38
|
-
.action(
|
|
38
|
+
.action(function (...args) {
|
|
39
|
+
return require('./../actions/armor/down').apply(this, args)
|
|
40
|
+
})
|
|
39
41
|
|
|
40
42
|
// dotenvx armor push
|
|
41
|
-
const pushAction = require('./../actions/armor/push')
|
|
42
43
|
armor
|
|
43
44
|
.command('push')
|
|
44
45
|
.description('push armored key (from .env.keys)')
|
|
45
46
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
46
47
|
.option('--token <token>', 'set token')
|
|
47
48
|
.option('--team <team>', 'team to push armored private key for')
|
|
48
|
-
.action(
|
|
49
|
+
.action(function (...args) {
|
|
50
|
+
return require('./../actions/armor/push').apply(this, args)
|
|
51
|
+
})
|
|
49
52
|
|
|
50
53
|
// dotenvx armor pull
|
|
51
|
-
const pullAction = require('./../actions/armor/pull')
|
|
52
54
|
armor
|
|
53
55
|
.command('pull')
|
|
54
56
|
.description('pull armored key (into .env.keys)')
|
|
55
57
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
56
58
|
.option('--token <token>', 'set token')
|
|
57
59
|
.option('--team <team>', 'team to pull armored private key from')
|
|
58
|
-
.action(
|
|
60
|
+
.action(function (...args) {
|
|
61
|
+
return require('./../actions/armor/pull').apply(this, args)
|
|
62
|
+
})
|
|
59
63
|
|
|
60
64
|
// dotenvx armor move
|
|
61
|
-
const moveAction = require('./../actions/armor/move')
|
|
62
65
|
armor
|
|
63
66
|
.command('move')
|
|
64
67
|
.description('move armored key (to other team)')
|
|
65
68
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
66
69
|
.option('--token <token>', 'set token')
|
|
67
|
-
.action(
|
|
70
|
+
.action(function (...args) {
|
|
71
|
+
return require('./../actions/armor/move').apply(this, args)
|
|
72
|
+
})
|
|
68
73
|
|
|
69
74
|
// dotenvx armor login
|
|
70
|
-
const loginAction = require('./../actions/login')
|
|
71
75
|
armor
|
|
72
76
|
.command('login')
|
|
73
77
|
.description('log in to Dotenvx Armor')
|
|
74
78
|
.allowUnknownOption()
|
|
75
79
|
.option('--hostname <hostname>', 'set Armor ⛨ hostname')
|
|
76
|
-
.action(
|
|
80
|
+
.action(function (...args) {
|
|
81
|
+
return require('./../actions/login').apply(this, args)
|
|
82
|
+
})
|
|
77
83
|
|
|
78
84
|
// dotenvx armor logout
|
|
79
|
-
const logoutAction = require('./../actions/logout')
|
|
80
85
|
armor
|
|
81
86
|
.command('logout')
|
|
82
87
|
.description('log out of Dotenvx Armor')
|
|
83
88
|
.allowUnknownOption()
|
|
84
89
|
.option('--hostname <hostname>', 'set Armor ⛨ hostname')
|
|
85
|
-
.action(
|
|
90
|
+
.action(function (...args) {
|
|
91
|
+
return require('./../actions/logout').apply(this, args)
|
|
92
|
+
})
|
|
86
93
|
|
|
87
94
|
return armor
|
|
88
95
|
}
|
package/src/cli/commands/lock.js
CHANGED
|
@@ -5,21 +5,23 @@ function configureLockCommand (lock) {
|
|
|
5
5
|
this.help()
|
|
6
6
|
})
|
|
7
7
|
|
|
8
|
-
const upAction = require('./../actions/lock/up')
|
|
9
8
|
lock
|
|
10
9
|
.command('up')
|
|
11
10
|
.description('lock key in .env.keys')
|
|
12
11
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
13
12
|
.option('-fk, --env-keys-file <path>', 'path to your .env.keys file', '.env.keys')
|
|
14
|
-
.action(
|
|
13
|
+
.action(function (...args) {
|
|
14
|
+
return require('./../actions/lock/up').apply(this, args)
|
|
15
|
+
})
|
|
15
16
|
|
|
16
|
-
const downAction = require('./../actions/lock/down')
|
|
17
17
|
lock
|
|
18
18
|
.command('down')
|
|
19
19
|
.description('unlock key in .env.keys')
|
|
20
20
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
21
21
|
.option('-fk, --env-keys-file <path>', 'path to your .env.keys file', '.env.keys')
|
|
22
|
-
.action(
|
|
22
|
+
.action(function (...args) {
|
|
23
|
+
return require('./../actions/lock/down').apply(this, args)
|
|
24
|
+
})
|
|
23
25
|
|
|
24
26
|
return lock
|
|
25
27
|
}
|
|
@@ -5,37 +5,41 @@ function configureNativeCommand (native) {
|
|
|
5
5
|
this.help()
|
|
6
6
|
})
|
|
7
7
|
|
|
8
|
-
const upAction = require('./../actions/keychain/up')
|
|
9
8
|
native
|
|
10
9
|
.command('up')
|
|
11
10
|
.description('store key in OS secret store')
|
|
12
11
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
13
12
|
.option('-fk, --env-keys-file <path>', 'path to your .env.keys file', '.env.keys')
|
|
14
|
-
.action(
|
|
13
|
+
.action(function (...args) {
|
|
14
|
+
return require('./../actions/keychain/up').apply(this, args)
|
|
15
|
+
})
|
|
15
16
|
|
|
16
|
-
const downAction = require('./../actions/keychain/down')
|
|
17
17
|
native
|
|
18
18
|
.command('down')
|
|
19
19
|
.description('move key from OS secret store to .env.keys')
|
|
20
20
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
21
21
|
.option('-fk, --env-keys-file <path>', 'path to your .env.keys file', '.env.keys')
|
|
22
|
-
.action(
|
|
22
|
+
.action(function (...args) {
|
|
23
|
+
return require('./../actions/keychain/down').apply(this, args)
|
|
24
|
+
})
|
|
23
25
|
|
|
24
|
-
const pushAction = require('./../actions/keychain/push')
|
|
25
26
|
native
|
|
26
27
|
.command('push')
|
|
27
28
|
.description('push key to OS secret store from .env.keys')
|
|
28
29
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
29
30
|
.option('-fk, --env-keys-file <path>', 'path to your .env.keys file', '.env.keys')
|
|
30
|
-
.action(
|
|
31
|
+
.action(function (...args) {
|
|
32
|
+
return require('./../actions/keychain/push').apply(this, args)
|
|
33
|
+
})
|
|
31
34
|
|
|
32
|
-
const pullAction = require('./../actions/keychain/pull')
|
|
33
35
|
native
|
|
34
36
|
.command('pull')
|
|
35
37
|
.description('pull key from OS secret store into .env.keys')
|
|
36
38
|
.option('-f, --env-file <path>', 'path to your env file')
|
|
37
39
|
.option('-fk, --env-keys-file <path>', 'path to your .env.keys file', '.env.keys')
|
|
38
|
-
.action(
|
|
40
|
+
.action(function (...args) {
|
|
41
|
+
return require('./../actions/keychain/pull').apply(this, args)
|
|
42
|
+
})
|
|
39
43
|
|
|
40
44
|
return native
|
|
41
45
|
}
|
package/src/db/device.js
CHANGED
package/src/db/session.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
const fs = require('fs')
|
|
2
2
|
const path = require('path')
|
|
3
|
-
const Conf = require('
|
|
4
|
-
const { dotenv } = require('@dotenvx/tooling')
|
|
5
|
-
const envPaths = require('env-paths')
|
|
3
|
+
const { Conf, dotenv, envPaths } = require('@dotenvx/tooling')
|
|
6
4
|
|
|
7
5
|
const jsonToEnv = require('./../lib/helpers/jsonToEnv')
|
|
8
6
|
const packageJson = require('./../lib/helpers/packageJson')
|
|
@@ -148,9 +146,9 @@ class Session {
|
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
async systemInformation () {
|
|
151
|
-
const
|
|
152
|
-
const system = await
|
|
153
|
-
const osInfo = await
|
|
149
|
+
const { systeminformation } = require('@dotenvx/tooling')
|
|
150
|
+
const system = await systeminformation.system()
|
|
151
|
+
const osInfo = await systeminformation.osInfo()
|
|
154
152
|
|
|
155
153
|
return {
|
|
156
154
|
system_uuid: system.uuid,
|
package/src/lib/helpers/http.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
2
|
const fs = require('fs')
|
|
3
|
-
const execa = require('
|
|
3
|
+
const { execa } = require('@dotenvx/tooling')
|
|
4
4
|
const { scan } = require('@dotenvx/primitives')
|
|
5
5
|
const canonicalEnvFilename = require('./canonicalEnvFilename')
|
|
6
6
|
const environment = require('../conventions/environment')
|
|
@@ -4,7 +4,7 @@ const armorProvider = require('./armor/index')
|
|
|
4
4
|
const keychainProvider = require('./keychain/index')
|
|
5
5
|
|
|
6
6
|
function syncArmorProvider (publicKeyHex) {
|
|
7
|
-
const { createSyncFn } = require('
|
|
7
|
+
const { createSyncFn } = require('@dotenvx/tooling')
|
|
8
8
|
const runProviderSync = createSyncFn(require.resolve('./worker.js'))
|
|
9
9
|
return runProviderSync(require.resolve('./armor/index'), publicKeyHex)
|
|
10
10
|
}
|
package/src/lib/resolvers/ls.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { Fdir } = require('@dotenvx/tooling')
|
|
2
2
|
const path = require('path')
|
|
3
|
-
const
|
|
3
|
+
const { match } = require('@dotenvx/primitives')
|
|
4
4
|
|
|
5
5
|
function patternsFor (value) {
|
|
6
6
|
if (!Array.isArray(value)) {
|
|
@@ -25,8 +25,8 @@ function ls (options = {}) {
|
|
|
25
25
|
const excludeEnvFile = options.excludeEnvFile || []
|
|
26
26
|
const excludePatterns = excludePatternsFor(excludeEnvFile)
|
|
27
27
|
const excludes = excludePatterns.length > 0 ? ignore.concat(excludePatterns) : ignore
|
|
28
|
-
const exclude =
|
|
29
|
-
const include =
|
|
28
|
+
const exclude = match(excludes, { dot: true })
|
|
29
|
+
const include = match(patternsFor(envFile), {
|
|
30
30
|
dot: true,
|
|
31
31
|
ignore: excludes
|
|
32
32
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { Fdir } = require('@dotenvx/tooling')
|
|
2
2
|
const path = require('path')
|
|
3
|
-
const
|
|
3
|
+
const { match } = require('@dotenvx/primitives')
|
|
4
4
|
const fsx = require('./../helpers/fsx')
|
|
5
5
|
|
|
6
6
|
const patterns = [
|
|
@@ -33,7 +33,7 @@ class Doctor {
|
|
|
33
33
|
'**/coverage/**',
|
|
34
34
|
'**/.next/**'
|
|
35
35
|
]
|
|
36
|
-
this.exclude =
|
|
36
|
+
this.exclude = match(this.ignore)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
run () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
2
|
const fsx = require('./../helpers/fsx')
|
|
3
3
|
const path = require('path')
|
|
4
|
-
const ignore = require('
|
|
4
|
+
const { ignore } = require('@dotenvx/tooling')
|
|
5
5
|
|
|
6
6
|
const ls = require('../resolvers/ls')
|
|
7
7
|
const Errors = require('../helpers/errors')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
2
|
const fsx = require('./../helpers/fsx')
|
|
3
3
|
const path = require('path')
|
|
4
|
-
const ignore = require('
|
|
4
|
+
const { ignore } = require('@dotenvx/tooling')
|
|
5
5
|
|
|
6
6
|
const ls = require('../resolvers/ls')
|
|
7
7
|
const { sealed } = require('@dotenvx/primitives')
|