@dotenvx/dotenvx 1.48.1 → 1.48.2
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 +1 -1
- package/src/lib/services/radar.js +9 -5
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/v1.48.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.48.2...main)
|
|
6
|
+
|
|
7
|
+
## 1.48.2
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Check radar status before sending ([#646](https://github.com/dotenvx/dotenvx/pull/646))
|
|
6
12
|
|
|
7
13
|
## 1.48.1
|
|
8
14
|
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@ class Radar {
|
|
|
10
10
|
// check npm lib
|
|
11
11
|
try {
|
|
12
12
|
this.radarLib = this._radarNpm()
|
|
13
|
-
logger.successv(
|
|
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(
|
|
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}
|
|
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
|
|
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], {
|