neex 0.6.0 → 0.6.1
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 -1
- package/dist/src/commands/dev-commands.js +9 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,20 +50,20 @@ async function getBestCommand(filePath) {
|
|
|
50
50
|
if (!(await fileExists(absolutePath))) {
|
|
51
51
|
throw new Error(`File not found: ${filePath}`);
|
|
52
52
|
}
|
|
53
|
-
console.log(chalk_1.default.blue(`${figures_1.default.info} neex dev: Analyzing
|
|
53
|
+
console.log(chalk_1.default.blue(`${figures_1.default.info} neex dev: Analyzing ${chalk_1.default.cyan(path.basename(filePath))}`));
|
|
54
54
|
switch (ext) {
|
|
55
55
|
case '.ts':
|
|
56
56
|
case '.mts':
|
|
57
57
|
case '.cts':
|
|
58
|
-
console.log(chalk_1.default.green(`${figures_1.default.tick} neex dev:
|
|
58
|
+
console.log(chalk_1.default.green(`${figures_1.default.tick} neex dev: TypeScript detected, ready to run`));
|
|
59
59
|
return `npx ts-node ${filePath}`;
|
|
60
60
|
case '.js':
|
|
61
61
|
case '.mjs':
|
|
62
62
|
case '.cjs':
|
|
63
|
-
console.log(chalk_1.default.green(`${figures_1.default.tick} neex dev:
|
|
63
|
+
console.log(chalk_1.default.green(`${figures_1.default.tick} neex dev: JavaScript detected, ready to run`));
|
|
64
64
|
return `node ${filePath}`;
|
|
65
65
|
default:
|
|
66
|
-
console.log(chalk_1.default.yellow(`${figures_1.default.warning} neex dev: Unknown file
|
|
66
|
+
console.log(chalk_1.default.yellow(`${figures_1.default.warning} neex dev: Unknown file type, using Node.js`));
|
|
67
67
|
return `node ${filePath}`;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -100,8 +100,10 @@ function addDevCommands(program) {
|
|
|
100
100
|
}
|
|
101
101
|
// Get the best command to run the file
|
|
102
102
|
let commandToExecute;
|
|
103
|
+
let fileExtension;
|
|
103
104
|
try {
|
|
104
105
|
commandToExecute = await getBestCommand(file);
|
|
106
|
+
fileExtension = path.extname(file).toLowerCase();
|
|
105
107
|
}
|
|
106
108
|
catch (error) {
|
|
107
109
|
console.error(chalk_1.default.red(`${figures_1.default.cross} neex dev: ${error instanceof Error ? error.message : 'Unknown error occurred'}`));
|
|
@@ -125,18 +127,17 @@ function addDevCommands(program) {
|
|
|
125
127
|
const extensions = options.ext || ['js', 'mjs', 'json', 'ts', 'tsx', 'jsx', 'vue', 'svelte'];
|
|
126
128
|
// Log configuration
|
|
127
129
|
console.log(chalk_1.default.blue(`${figures_1.default.info} neex dev: Configuration:`));
|
|
128
|
-
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight}
|
|
130
|
+
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Target: ${chalk_1.default.cyan(file)}`));
|
|
131
|
+
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Runtime: ${chalk_1.default.cyan(fileExtension === '.ts' || fileExtension === '.mts' || fileExtension === '.cts' ? 'TypeScript' : 'JavaScript')}`));
|
|
129
132
|
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Watch paths: ${chalk_1.default.cyan(watchPaths.join(', '))}`));
|
|
130
133
|
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Extensions: ${chalk_1.default.cyan(extensions.join(', '))}`));
|
|
131
|
-
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Ignore patterns: ${chalk_1.default.cyan(ignorePatterns.length)} patterns`));
|
|
132
134
|
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Restart delay: ${chalk_1.default.cyan(options.delay || 1000)}ms`));
|
|
133
135
|
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Clear console: ${chalk_1.default.cyan(options.clear ? 'Yes' : 'No')}`));
|
|
134
|
-
console.log(chalk_1.default.blue(` ${figures_1.default.arrowRight} Signal: ${chalk_1.default.cyan(options.signal)}`));
|
|
135
136
|
if (options.verbose) {
|
|
136
137
|
console.log(chalk_1.default.blue(`${figures_1.default.info} neex dev: Verbose mode enabled - showing detailed logs`));
|
|
137
138
|
}
|
|
138
139
|
console.log(chalk_1.default.green(`${figures_1.default.tick} neex dev: Starting file watcher and process manager...`));
|
|
139
|
-
// Create DevRunner instance
|
|
140
|
+
// Create DevRunner instance - remove customPrefix since it doesn't exist
|
|
140
141
|
devRunner = new dev_runner_js_1.DevRunner({
|
|
141
142
|
runnerName: 'neex dev',
|
|
142
143
|
parallel: false,
|