env-detector 1.0.3 → 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.
- package/README.md +1 -0
- package/bin/env-scan.js +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/bin/env-scan.js
CHANGED
|
@@ -89,18 +89,17 @@ if (!fs.existsSync(envPath)) {
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
// grouped generation
|
|
92
|
-
|
|
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`;
|