@dotenvx/dotenvx 1.47.0 → 1.47.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 CHANGED
@@ -2,11 +2,23 @@
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.2...main)
6
+
7
+ ## 1.47.2
8
+
9
+ ### Added
10
+
11
+ * Export `cli` in package.json ([#629](https://github.com/dotenvx/dotenvx/pull/629))
12
+
13
+ ## 1.47.1
14
+
15
+ ### Added
16
+
17
+ * Add convenience log that `radar active 📡` when dotenvx-radar is installed ([#625](https://github.com/dotenvx/dotenvx/pull/625))
6
18
 
7
19
  ## 1.47.0
8
20
 
9
- ## Added
21
+ ### Added
10
22
 
11
23
  * Add optional `dotenvx radar` command ([#624](https://github.com/dotenvx/dotenvx/pull/624))
12
24
  * Radar is an early access commercial extension for dotenvx that will auto backup your .env files.
@@ -35,17 +47,17 @@ All notable changes to this project will be documented in this file. See [standa
35
47
 
36
48
  ## 1.46.0
37
49
 
38
- ## Added
50
+ ### Added
39
51
 
40
52
  * Add error when hoisting issue experienced around commander.js ([#623](https://github.com/dotenvx/dotenvx/pull/623))
41
53
 
42
- ## Removed
54
+ ### Removed
43
55
 
44
56
  * Remove `git-dotenvx` and `git dotenvx` shorthand ([#621](https://github.com/dotenvx/dotenvx/pull/621))
45
57
 
46
58
  ## 1.45.2
47
59
 
48
- ## Changed
60
+ ### Changed
49
61
 
50
62
  * Minor README updates
51
63
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.47.0",
2
+ "version": "1.47.2",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -25,6 +25,8 @@
25
25
  "require": "./src/lib/main.js",
26
26
  "default": "./src/lib/main.js"
27
27
  },
28
+ "./cli": "./src/cli/dotenvx.js",
29
+ "./cli.js": "./src/cli/dotenvx.js",
28
30
  "./config": "./src/lib/config.js",
29
31
  "./config.js": "./src/lib/config.js",
30
32
  "./package.json": "./package.json"
@@ -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