env-detector 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/bin/env-scan.js +2 -4
  2. package/package.json +1 -1
package/bin/env-scan.js CHANGED
@@ -89,18 +89,17 @@ if (!fs.existsSync(envPath)) {
89
89
 
90
90
 
91
91
  // grouped generation
92
- if (Object.keys(result.grouped).length) {
92
+ // grouped generation
93
+ if (Object.keys(result.grouped).length && !askMode) {
93
94
 
94
95
  let output = "";
95
96
 
96
- // collect grouped keys
97
97
  const groupedKeys = new Set();
98
98
 
99
99
  Object.values(result.grouped).forEach(keys => {
100
100
  keys.forEach(k => groupedKeys.add(k));
101
101
  });
102
102
 
103
- // GLOBAL VARIABLES
104
103
  const globalKeys = result.used.filter(k => !groupedKeys.has(k));
105
104
 
106
105
  if (globalKeys.length) {
@@ -114,7 +113,6 @@ if (Object.keys(result.grouped).length) {
114
113
  output += "\n";
115
114
  }
116
115
 
117
- // GROUPED ENVIRONMENTS
118
116
  Object.entries(result.grouped).forEach(([env, keys]) => {
119
117
 
120
118
  output += `# ${env}\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "env-detector",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Smart .env generator and auditor",
5
5
  "main": "src/scan.js",
6
6
  "bin": {