neex 0.6.89 → 0.6.91
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.
|
@@ -36,7 +36,7 @@ function addDevCommands(program) {
|
|
|
36
36
|
const delay = options.fast ? 50 : options.delay;
|
|
37
37
|
if (!options.quiet) {
|
|
38
38
|
console.log(''); // Empty line for better visual separation
|
|
39
|
-
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.blue('
|
|
39
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.blue('ℹ')} Starting ${chalk_1.default.cyan('neex dev')} for ${chalk_1.default.cyan(targetFile)}`, 'info');
|
|
40
40
|
}
|
|
41
41
|
devManager = new dev_manager_js_1.DevManager({
|
|
42
42
|
file: targetFile,
|
package/dist/src/dev-manager.js
CHANGED
|
@@ -32,6 +32,7 @@ const child_process_1 = require("child_process");
|
|
|
32
32
|
const chokidar_1 = require("chokidar");
|
|
33
33
|
const logger_manager_js_1 = require("./logger-manager.js");
|
|
34
34
|
const chalk_1 = __importDefault(require("chalk"));
|
|
35
|
+
const figures_1 = __importDefault(require("figures"));
|
|
35
36
|
const path_1 = __importDefault(require("path"));
|
|
36
37
|
const fs_1 = __importDefault(require("fs"));
|
|
37
38
|
const lodash_1 = require("lodash");
|
|
@@ -100,9 +101,11 @@ class DevManager {
|
|
|
100
101
|
return defaultOptions;
|
|
101
102
|
}
|
|
102
103
|
loadEnvFile() {
|
|
103
|
-
|
|
104
|
+
let count = 0;
|
|
105
|
+
const envFile = this.options.envFile;
|
|
106
|
+
if (envFile && fs_1.default.existsSync(envFile)) {
|
|
104
107
|
try {
|
|
105
|
-
const envContent = fs_1.default.readFileSync(
|
|
108
|
+
const envContent = fs_1.default.readFileSync(envFile, 'utf8');
|
|
106
109
|
const lines = envContent.split('\n');
|
|
107
110
|
for (const line of lines) {
|
|
108
111
|
const trimmed = line.trim();
|
|
@@ -110,13 +113,17 @@ class DevManager {
|
|
|
110
113
|
const [key, ...values] = trimmed.split('=');
|
|
111
114
|
if (key && values.length > 0) {
|
|
112
115
|
process.env[key.trim()] = values.join('=').trim().replace(/^["']|["']$/g, '');
|
|
116
|
+
count++;
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
}
|
|
120
|
+
if (!this.options.quiet) {
|
|
121
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.blue(figures_1.default.info)} Loaded ${count} env variables from ${envFile}`, 'info');
|
|
122
|
+
}
|
|
116
123
|
}
|
|
117
124
|
catch (error) {
|
|
118
125
|
if (this.options.verbose) {
|
|
119
|
-
logger_manager_js_1.loggerManager.printLine(`Failed to load ${
|
|
126
|
+
logger_manager_js_1.loggerManager.printLine(`Failed to load ${envFile}: ${error.message}`, 'warn');
|
|
120
127
|
}
|
|
121
128
|
}
|
|
122
129
|
}
|
|
@@ -284,9 +291,8 @@ class DevManager {
|
|
|
284
291
|
this.startTime = new Date();
|
|
285
292
|
this.restartCount++;
|
|
286
293
|
if (!this.options.quiet) {
|
|
287
|
-
const timestamp = new Date().toLocaleTimeString();
|
|
288
294
|
const fileRelative = path_1.default.relative(process.cwd(), this.options.file);
|
|
289
|
-
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.green('▶')} ${chalk_1.default.cyan(fileRelative)}
|
|
295
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.green('▶')} Started ${chalk_1.default.cyan(fileRelative)}`, 'info');
|
|
290
296
|
}
|
|
291
297
|
// Handle stdout/stderr
|
|
292
298
|
(_a = this.process.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
@@ -415,7 +421,7 @@ class DevManager {
|
|
|
415
421
|
this.moduleCache.clear();
|
|
416
422
|
this.setupTempDir();
|
|
417
423
|
if (!this.options.quiet) {
|
|
418
|
-
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.blue('
|
|
424
|
+
logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.blue('ℹ')} Starting TypeScript development server...`, 'info');
|
|
419
425
|
}
|
|
420
426
|
this.setupWatcher();
|
|
421
427
|
await this.startProcess();
|