@dotenvx/dotenvx 1.48.1 → 1.48.3

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.48.1",
2
+ "version": "1.48.3",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -10,12 +10,12 @@ class Radar {
10
10
  // check npm lib
11
11
  try {
12
12
  this.radarLib = this._radarNpm()
13
- logger.successv('📡 radar active')
13
+ logger.successv(`📡 radar: ${this.radarLib.status}`)
14
14
  } catch (e) {
15
15
  // check binary cli
16
16
  try {
17
17
  this.radarLib = this._radarCli()
18
- logger.successv('📡 radar active')
18
+ logger.successv(`📡 radar: ${this.radarLib.status}`)
19
19
  } catch (_e2) {
20
20
  // noop
21
21
  }
@@ -24,7 +24,7 @@ class Radar {
24
24
  }
25
25
 
26
26
  observe (payload) {
27
- if (this.radarLib) {
27
+ if (this.radarLib && this.radarLib.status !== 'off') {
28
28
  const encoded = this.encode(payload)
29
29
  this.radarLib.observe(encoded)
30
30
  }
@@ -36,8 +36,10 @@ class Radar {
36
36
 
37
37
  _radarNpm () {
38
38
  const fallbackBin = path.resolve(process.cwd(), 'node_modules/.bin/dotenvx-radar')
39
- childProcess.execSync(`${fallbackBin} help`, { stdio: ['pipe', 'pipe', 'ignore'] })
39
+ const status = childProcess.execSync(`${fallbackBin} status`, { stdio: ['pipe', 'pipe', 'ignore'] })
40
+
40
41
  return {
42
+ status: status.toString().trim(),
41
43
  observe: (encoded) => {
42
44
  try {
43
45
  const subprocess = childProcess.spawn(fallbackBin, ['observe', encoded], {
@@ -54,8 +56,10 @@ class Radar {
54
56
  }
55
57
 
56
58
  _radarCli () {
57
- childProcess.execSync('dotenvx-radar help', { stdio: ['pipe', 'pipe', 'ignore'] })
59
+ const status = childProcess.execSync('dotenvx-radar status', { stdio: ['pipe', 'pipe', 'ignore'] })
60
+
58
61
  return {
62
+ status: status.toString().trim(),
59
63
  observe: (encoded) => {
60
64
  try {
61
65
  const subprocess = childProcess.spawn('dotenvx-radar', ['observe', encoded], {
@@ -100,6 +100,8 @@ class Run {
100
100
  const privateKeyName = guessPrivateKeyName(envFilepath)
101
101
  const { parsed, errors, injected, preExisted } = new Parse(src, privateKey, this.processEnv, this.overload, privateKeyName).run()
102
102
 
103
+ row.privateKeyName = privateKeyName
104
+ row.privateKey = privateKey
103
105
  row.src = src
104
106
  row.parsed = parsed
105
107
  row.errors = errors