neex 0.6.80 → 0.6.81
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/dist/src/dev-manager.js +8 -3
- package/package.json +1 -1
package/dist/src/dev-manager.js
CHANGED
|
@@ -99,21 +99,26 @@ class DevManager {
|
|
|
99
99
|
try {
|
|
100
100
|
const envContent = fs_1.default.readFileSync(this.options.envFile, 'utf8');
|
|
101
101
|
const lines = envContent.split('\n');
|
|
102
|
+
let loadedCount = 0;
|
|
102
103
|
for (const line of lines) {
|
|
103
104
|
const trimmed = line.trim();
|
|
104
105
|
if (trimmed && !trimmed.startsWith('#')) {
|
|
105
106
|
const [key, ...values] = trimmed.split('=');
|
|
106
107
|
if (key && values.length > 0) {
|
|
107
108
|
process.env[key.trim()] = values.join('=').trim().replace(/^["']|["']$/g, '');
|
|
109
|
+
loadedCount++;
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
|
-
if (this.options.
|
|
112
|
-
logger_manager_js_1.loggerManager.printLine(
|
|
113
|
+
if (!this.options.quiet && loadedCount > 0) {
|
|
114
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.dim(figures_1.default.info)} Loaded ${loadedCount} env variable${loadedCount > 1 ? 's' : ''} from ${path_1.default.basename(this.options.envFile)}`, 'info');
|
|
115
|
+
}
|
|
116
|
+
else if (this.options.verbose) {
|
|
117
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.dim(figures_1.default.info)} No env variables found in ${this.options.envFile}`, 'info');
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
120
|
catch (error) {
|
|
116
|
-
logger_manager_js_1.loggerManager.printLine(
|
|
121
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.yellow(figures_1.default.warning)} Failed to load ${this.options.envFile}: ${error.message}`, 'warn');
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
}
|