@dotenvx/dotenvx 1.47.7 → 1.48.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/cli/actions/run.js +3 -1
- package/src/lib/main.js +3 -1
- package/src/lib/services/run.js +4 -1
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.48.1...main)
|
|
6
|
+
|
|
7
|
+
## 1.48.1
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Send `beforEnv` and `afterEnv` to Radar if user has installed ([#645](https://github.com/dotenvx/dotenvx/pull/645))
|
|
12
|
+
|
|
13
|
+
## 1.48.0
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
* Include `beforeEnv` and `afterEnv` for user debugging ([#644](https://github.com/dotenvx/dotenvx/pull/644))
|
|
6
18
|
|
|
7
19
|
## 1.47.7
|
|
8
20
|
|
package/package.json
CHANGED
package/src/cli/actions/run.js
CHANGED
|
@@ -42,13 +42,15 @@ async function run () {
|
|
|
42
42
|
new DeprecationNotice().dotenvKey() // DEPRECATION NOTICE
|
|
43
43
|
|
|
44
44
|
const {
|
|
45
|
+
beforeEnv,
|
|
46
|
+
afterEnv,
|
|
45
47
|
processedEnvs,
|
|
46
48
|
readableStrings,
|
|
47
49
|
readableFilepaths,
|
|
48
50
|
uniqueInjectedKeys
|
|
49
51
|
} = new Run(envs, options.overload, process.env.DOTENV_KEY, process.env, options.envKeysFile).run()
|
|
50
52
|
|
|
51
|
-
try { new Radar().observe({ processedEnvs }) } catch {}
|
|
53
|
+
try { new Radar().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
|
|
52
54
|
|
|
53
55
|
for (const processedEnv of processedEnvs) {
|
|
54
56
|
if (processedEnv.type === 'envVaultFile') {
|
package/src/lib/main.js
CHANGED
|
@@ -55,12 +55,14 @@ const config = function (options = {}) {
|
|
|
55
55
|
try {
|
|
56
56
|
const envs = buildEnvs(options, DOTENV_KEY)
|
|
57
57
|
const {
|
|
58
|
+
beforeEnv,
|
|
59
|
+
afterEnv,
|
|
58
60
|
processedEnvs,
|
|
59
61
|
readableFilepaths,
|
|
60
62
|
uniqueInjectedKeys
|
|
61
63
|
} = new Run(envs, overload, DOTENV_KEY, processEnv, envKeysFile).run()
|
|
62
64
|
|
|
63
|
-
try { new Radar().observe({ processedEnvs }) } catch {}
|
|
65
|
+
try { new Radar().observe({ beforeEnv, processedEnvs, afterEnv }) } catch {}
|
|
64
66
|
|
|
65
67
|
let lastError
|
|
66
68
|
/** @type {Record<string, string>} */
|
package/src/lib/services/run.js
CHANGED
|
@@ -27,6 +27,7 @@ class Run {
|
|
|
27
27
|
this.readableFilepaths = new Set()
|
|
28
28
|
this.readableStrings = new Set()
|
|
29
29
|
this.uniqueInjectedKeys = new Set()
|
|
30
|
+
this.beforeEnv = { ...this.processEnv }
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
run () {
|
|
@@ -52,7 +53,9 @@ class Run {
|
|
|
52
53
|
processedEnvs: this.processedEnvs,
|
|
53
54
|
readableStrings: [...this.readableStrings],
|
|
54
55
|
readableFilepaths: [...this.readableFilepaths],
|
|
55
|
-
uniqueInjectedKeys: [...this.uniqueInjectedKeys]
|
|
56
|
+
uniqueInjectedKeys: [...this.uniqueInjectedKeys],
|
|
57
|
+
beforeEnv: this.beforeEnv,
|
|
58
|
+
afterEnv: { ...this.processEnv }
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
|