@dotenvx/dotenvx 1.47.0 → 1.47.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 CHANGED
@@ -2,11 +2,17 @@
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.47.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.47.1...main)
6
+
7
+ ## 1.47.1
8
+
9
+ ### Added
10
+
11
+ * Add convenience log that `radar active 📡` when dotenvx-radar is installed ([#625](https://github.com/dotenvx/dotenvx/pull/625))
6
12
 
7
13
  ## 1.47.0
8
14
 
9
- ## Added
15
+ ### Added
10
16
 
11
17
  * Add optional `dotenvx radar` command ([#624](https://github.com/dotenvx/dotenvx/pull/624))
12
18
  * Radar is an early access commercial extension for dotenvx that will auto backup your .env files.
@@ -35,17 +41,17 @@ All notable changes to this project will be documented in this file. See [standa
35
41
 
36
42
  ## 1.46.0
37
43
 
38
- ## Added
44
+ ### Added
39
45
 
40
46
  * Add error when hoisting issue experienced around commander.js ([#623](https://github.com/dotenvx/dotenvx/pull/623))
41
47
 
42
- ## Removed
48
+ ### Removed
43
49
 
44
50
  * Remove `git-dotenvx` and `git dotenvx` shorthand ([#621](https://github.com/dotenvx/dotenvx/pull/621))
45
51
 
46
52
  ## 1.45.2
47
53
 
48
- ## Changed
54
+ ### Changed
49
55
 
50
56
  * Minor README updates
51
57
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.47.0",
2
+ "version": "1.47.1",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -6,6 +6,7 @@ const Run = require('./../../lib/services/run')
6
6
 
7
7
  const conventions = require('./../../lib/helpers/conventions')
8
8
  const DeprecationNotice = require('./../../lib/helpers/deprecationNotice')
9
+ const logRadar = require('./../../lib/helpers/logRadar')
9
10
 
10
11
  async function run () {
11
12
  const commandArgs = this.args
@@ -40,6 +41,8 @@ async function run () {
40
41
 
41
42
  new DeprecationNotice().dotenvKey() // DEPRECATION NOTICE
42
43
 
44
+ logRadar()
45
+
43
46
  const {
44
47
  processedEnvs,
45
48
  readableStrings,
@@ -0,0 +1,31 @@
1
+ const path = require('path')
2
+ const childProcess = require('child_process')
3
+
4
+ const { logger } = require('./../../shared/logger')
5
+
6
+ function logRadar () {
7
+ let installed = false
8
+
9
+ try {
10
+ // if installed as sibling module
11
+ const projectRoot = path.resolve(process.cwd())
12
+ const dotenvxRadarPath = require.resolve('@dotenvx/dotenvx-radar', { paths: [projectRoot] })
13
+ require(dotenvxRadarPath)
14
+ installed = true
15
+ } catch (_e) {
16
+ try {
17
+ // if installed as binary cli
18
+ childProcess.execSync('dotenvx-radar help', { stdio: ['pipe', 'pipe', 'ignore'] }).toString().trim()
19
+ installed = true
20
+ // if succeeds
21
+ } catch (_e) {
22
+ // do nothing
23
+ }
24
+ }
25
+
26
+ if (installed) {
27
+ logger.successv('radar active 📡')
28
+ }
29
+ }
30
+
31
+ module.exports = logRadar