neex 0.4.4 → 0.5.0
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 +227 -70
- package/dist/bin/neex.js +4 -0
- package/dist/src/cli.js +50 -0
- package/dist/src/commands/dev-commands.js +190 -0
- package/dist/src/commands/index.js +21 -0
- package/dist/src/commands/process-commands.js +679 -0
- package/dist/src/commands/run-commands.js +94 -0
- package/dist/src/commands/server-commands.js +50 -0
- package/dist/src/dev-runner.js +209 -0
- package/dist/src/index.js +72 -0
- package/dist/{logger.js → src/logger.js} +36 -1
- package/dist/src/process-manager.js +669 -0
- package/dist/{runner.js → src/runner.js} +112 -79
- package/dist/{types.js → src/types.js} +0 -1
- package/dist/src/utils.js +10 -0
- package/dist/src/watcher.js +245 -0
- package/feet.txt +16 -0
- package/package.json +5 -19
- package/.env +0 -2
- package/Screenshot 1404-03-20 at 17.20.45.png +0 -0
- package/Screenshot 1404-03-20 at 17.20.56.png +0 -0
- package/Screenshot 1404-03-20 at 17.21.04.png +0 -0
- package/bun.lock +0 -939
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -49
- package/dist/cli.js.map +0 -1
- package/dist/commands/process-command/process.d.ts +0 -2
- package/dist/commands/process-command/process.js +0 -150
- package/dist/commands/process-command/process.js.map +0 -1
- package/dist/commands/project-command/build.d.ts +0 -3
- package/dist/commands/project-command/build.js +0 -42
- package/dist/commands/project-command/build.js.map +0 -1
- package/dist/commands/project-command/cache.d.ts +0 -3
- package/dist/commands/project-command/cache.js +0 -57
- package/dist/commands/project-command/cache.js.map +0 -1
- package/dist/commands/project-command/dev.d.ts +0 -3
- package/dist/commands/project-command/dev.js +0 -52
- package/dist/commands/project-command/dev.js.map +0 -1
- package/dist/commands/project-command/start.d.ts +0 -3
- package/dist/commands/project-command/start.js +0 -46
- package/dist/commands/project-command/start.js.map +0 -1
- package/dist/commands/run-commands/run.d.ts +0 -2
- package/dist/commands/run-commands/run.js +0 -82
- package/dist/commands/run-commands/run.js.map +0 -1
- package/dist/index.d.ts +0 -30
- package/dist/index.js +0 -66
- package/dist/index.js.map +0 -1
- package/dist/logger.d.ts +0 -31
- package/dist/logger.js.map +0 -1
- package/dist/process-manager.d.ts +0 -60
- package/dist/process-manager.js +0 -277
- package/dist/process-manager.js.map +0 -1
- package/dist/project-manager.d.ts +0 -64
- package/dist/project-manager.js +0 -467
- package/dist/project-manager.js.map +0 -1
- package/dist/runner.d.ts +0 -17
- package/dist/runner.js.map +0 -1
- package/dist/server.d.ts +0 -2
- package/dist/server.js +0 -67
- package/dist/server.js.map +0 -1
- package/dist/types.d.ts +0 -37
- package/dist/types.js.map +0 -1
- package/dist/typescript-runner.d.ts +0 -12
- package/dist/typescript-runner.js +0 -162
- package/dist/typescript-runner.js.map +0 -1
package/dist/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function cli(): void;
|
package/dist/cli.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// src/cli.ts - Updated version
|
|
7
|
-
const commander_1 = require("commander");
|
|
8
|
-
const project_manager_js_1 = require("./project-manager.js");
|
|
9
|
-
const dev_js_1 = require("./commands/project-command/dev.js");
|
|
10
|
-
const build_js_1 = require("./commands/project-command/build.js");
|
|
11
|
-
const start_js_1 = require("./commands/project-command/start.js");
|
|
12
|
-
const cache_js_1 = require("./commands/project-command/cache.js");
|
|
13
|
-
const process_js_1 = require("./commands/process-command/process.js");
|
|
14
|
-
const run_js_1 = require("./commands/run-commands/run.js");
|
|
15
|
-
const logger_js_1 = __importDefault(require("./logger.js"));
|
|
16
|
-
const { version } = require('../../package.json');
|
|
17
|
-
function cli() {
|
|
18
|
-
const program = new commander_1.Command();
|
|
19
|
-
const projectManager = new project_manager_js_1.ProjectManager();
|
|
20
|
-
program
|
|
21
|
-
.name('neex')
|
|
22
|
-
.description('Professional TypeScript development tool with ultra-fast compilation')
|
|
23
|
-
.version(version);
|
|
24
|
-
// Register all commands
|
|
25
|
-
(0, dev_js_1.registerDevCommand)(program, projectManager);
|
|
26
|
-
(0, build_js_1.registerBuildCommand)(program, projectManager);
|
|
27
|
-
(0, start_js_1.registerStartCommand)(program, projectManager);
|
|
28
|
-
(0, cache_js_1.registerCacheCommand)(program, projectManager);
|
|
29
|
-
(0, process_js_1.registerProcessCommands)(program);
|
|
30
|
-
(0, run_js_1.registerRunCommands)(program);
|
|
31
|
-
program.parse(process.argv);
|
|
32
|
-
// Show help if no commands specified
|
|
33
|
-
if (program.args.length === 0) {
|
|
34
|
-
program.help();
|
|
35
|
-
}
|
|
36
|
-
// Graceful shutdown handling
|
|
37
|
-
const handleSignal = (signal) => {
|
|
38
|
-
logger_js_1.default.printLine(`Shutting down...`, 'warn');
|
|
39
|
-
if (projectManager) {
|
|
40
|
-
projectManager.cleanup(signal);
|
|
41
|
-
}
|
|
42
|
-
setTimeout(() => process.exit(0), 500);
|
|
43
|
-
};
|
|
44
|
-
process.on('SIGINT', () => handleSignal('SIGINT')); // Ctrl+C
|
|
45
|
-
process.on('SIGTERM', () => handleSignal('SIGTERM'));
|
|
46
|
-
process.on('SIGQUIT', () => handleSignal('SIGQUIT'));
|
|
47
|
-
}
|
|
48
|
-
exports.default = cli;
|
|
49
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAAA,+BAA+B;AAC/B,yCAAoC;AAIpC,6DAAsD;AACtD,8DAAuE;AACvE,kEAA2E;AAC3E,kEAA2E;AAC3E,kEAA2E;AAC3E,sEAAgF;AAChF,2DAAqE;AACrE,4DAAiC;AACjC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CAAC,SAAS;IAC7D,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;AACzD,CAAC;AApCD,sBAoCC"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerProcessCommands = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const figures_1 = __importDefault(require("figures"));
|
|
9
|
-
const chokidar_1 = require("chokidar");
|
|
10
|
-
const process_manager_js_1 = require("../../process-manager.js");
|
|
11
|
-
function registerProcessCommands(program) {
|
|
12
|
-
// Start process command
|
|
13
|
-
program
|
|
14
|
-
.command('startx <command>')
|
|
15
|
-
.description('Start a process with monitoring and auto-restart')
|
|
16
|
-
.option('-n, --name <name>', 'Process name')
|
|
17
|
-
.option('-w, --watch', 'Watch for file changes and auto-restart')
|
|
18
|
-
.option('-r, --max-restarts <number>', 'Maximum number of restart attempts', '5')
|
|
19
|
-
.option('-d, --restart-delay <number>', 'Delay between restarts in milliseconds', '1000')
|
|
20
|
-
.option('-c, --cwd <path>', 'Working directory for the process')
|
|
21
|
-
.action(async (command, options) => {
|
|
22
|
-
try {
|
|
23
|
-
const process = await process_manager_js_1.processManager.startProcess(command, {
|
|
24
|
-
name: options.name,
|
|
25
|
-
watch: options.watch,
|
|
26
|
-
maxRestarts: parseInt(options.maxRestarts),
|
|
27
|
-
restartDelay: parseInt(options.restartDelay),
|
|
28
|
-
cwd: options.cwd
|
|
29
|
-
});
|
|
30
|
-
console.log(chalk_1.default.green(`${figures_1.default.tick} Process started successfully`));
|
|
31
|
-
console.log(chalk_1.default.blue(`Name: ${process.name}`));
|
|
32
|
-
console.log(chalk_1.default.blue(`PID: ${process.pid}`));
|
|
33
|
-
console.log(chalk_1.default.blue(`Command: ${process.command}`));
|
|
34
|
-
console.log(chalk_1.default.blue(`Max Restarts: ${process.maxRestarts}`));
|
|
35
|
-
console.log(chalk_1.default.blue(`Restart Delay: ${process.restartDelay}ms`));
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
if (error instanceof Error) {
|
|
39
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
43
|
-
}
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
// Stop process command
|
|
48
|
-
program
|
|
49
|
-
.command('stopx <name>')
|
|
50
|
-
.description('Stop a running process')
|
|
51
|
-
.option('-f, --force', 'Force stop the process')
|
|
52
|
-
.action(async (name, options) => {
|
|
53
|
-
try {
|
|
54
|
-
await process_manager_js_1.processManager.stop(name);
|
|
55
|
-
console.log(chalk_1.default.green(`${figures_1.default.tick} Process stopped successfully`));
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
if (error instanceof Error) {
|
|
59
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
63
|
-
}
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
// List processes command
|
|
68
|
-
program
|
|
69
|
-
.command('list')
|
|
70
|
-
.description('List all running processes')
|
|
71
|
-
.option('-a, --all', 'Show all processes including stopped ones')
|
|
72
|
-
.option('-j, --json', 'Output in JSON format')
|
|
73
|
-
.action((options) => {
|
|
74
|
-
try {
|
|
75
|
-
process_manager_js_1.processManager.list();
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
if (error instanceof Error) {
|
|
79
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
83
|
-
}
|
|
84
|
-
process.exit(1);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
// Monitor process command
|
|
88
|
-
program
|
|
89
|
-
.command('monit <name>')
|
|
90
|
-
.description('Monitor a process in real-time')
|
|
91
|
-
.option('-i, --interval <number>', 'Update interval in milliseconds', '1000')
|
|
92
|
-
.action((name, options) => {
|
|
93
|
-
try {
|
|
94
|
-
const interval = parseInt(options.interval);
|
|
95
|
-
if (isNaN(interval) || interval < 100) {
|
|
96
|
-
throw new Error('Interval must be a number greater than 100ms');
|
|
97
|
-
}
|
|
98
|
-
process_manager_js_1.processManager.monit(name);
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
if (error instanceof Error) {
|
|
102
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
106
|
-
}
|
|
107
|
-
process.exit(1);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
// View logs command
|
|
111
|
-
program
|
|
112
|
-
.command('log <name>')
|
|
113
|
-
.description('View process logs')
|
|
114
|
-
.option('-f, --follow', 'Follow log output')
|
|
115
|
-
.option('-e, --errors', 'Show only errors')
|
|
116
|
-
.option('-w, --warnings', 'Show only warnings')
|
|
117
|
-
.option('-l, --lines <number>', 'Number of lines to show', '100')
|
|
118
|
-
.action((name, options) => {
|
|
119
|
-
try {
|
|
120
|
-
const lines = parseInt(options.lines);
|
|
121
|
-
if (isNaN(lines) || lines < 1) {
|
|
122
|
-
throw new Error('Lines must be a positive number');
|
|
123
|
-
}
|
|
124
|
-
process_manager_js_1.processManager.log(name, lines);
|
|
125
|
-
if (options.follow) {
|
|
126
|
-
const watcher = (0, chokidar_1.watch)(process_manager_js_1.processManager.getLogPath(name), {
|
|
127
|
-
persistent: true
|
|
128
|
-
});
|
|
129
|
-
watcher.on('change', () => {
|
|
130
|
-
process_manager_js_1.processManager.log(name, 1);
|
|
131
|
-
});
|
|
132
|
-
process.on('SIGINT', () => {
|
|
133
|
-
watcher.close();
|
|
134
|
-
process.exit(0);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
if (error instanceof Error) {
|
|
140
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
144
|
-
}
|
|
145
|
-
process.exit(1);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
exports.registerProcessCommands = registerProcessCommands;
|
|
150
|
-
//# sourceMappingURL=process.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../../src/commands/process-command/process.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,sDAA8B;AAC9B,uCAAiC;AACjC,iEAA0D;AAE1D,SAAgB,uBAAuB,CAAC,OAAgB;IACpD,wBAAwB;IACxB,OAAO;SACF,OAAO,CAAC,kBAAkB,CAAC;SAC3B,WAAW,CAAC,kDAAkD,CAAC;SAC/D,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC;SAC3C,MAAM,CAAC,aAAa,EAAE,yCAAyC,CAAC;SAChE,MAAM,CAAC,6BAA6B,EAAE,oCAAoC,EAAE,GAAG,CAAC;SAChF,MAAM,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YAAY,KAAK,EAAE;gBACxB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,WAAW,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACxE;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,4BAA4B,CAAC,CAAC,CAAC;aAC1E;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAxID,0DAwIC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerBuildCommand = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const figures_1 = __importDefault(require("figures"));
|
|
9
|
-
function registerBuildCommand(program, projectManager) {
|
|
10
|
-
program
|
|
11
|
-
.command('build')
|
|
12
|
-
.description('Build TypeScript project with optimized output')
|
|
13
|
-
.option('-o, --outDir <dir>', 'Output directory', 'dist')
|
|
14
|
-
.option('-m, --minify', 'Minify output')
|
|
15
|
-
.option('-s, --sourcemap', 'Generate source maps')
|
|
16
|
-
.option('-w, --watch', 'Watch mode')
|
|
17
|
-
.option('-c, --compiler <type>', 'Compiler to use: swc, esbuild, tsc', 'auto')
|
|
18
|
-
.option('--target <target>', 'Target ES version', 'ES2022')
|
|
19
|
-
.action(async (options) => {
|
|
20
|
-
try {
|
|
21
|
-
await projectManager.build({
|
|
22
|
-
outDir: options.outDir,
|
|
23
|
-
minify: options.minify,
|
|
24
|
-
sourcemap: options.sourcemap,
|
|
25
|
-
watch: options.watch,
|
|
26
|
-
compiler: options.compiler,
|
|
27
|
-
target: options.target
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
if (error instanceof Error) {
|
|
32
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
36
|
-
}
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
exports.registerBuildCommand = registerBuildCommand;
|
|
42
|
-
//# sourceMappingURL=build.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/commands/project-command/build.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,sDAA8B;AAG9B,SAAgB,oBAAoB,CAAC,OAAgB,EAAE,cAA8B;IACjF,OAAO;SACF,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,gDAAgD,CAAC;SAC7D,MAAM,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,CAAC;SACxD,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC;SACvC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;SACjD,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC;SACnC,MAAM,CAAC,uBAAuB,EAAE,oCAAoC,EAAE,MAAM,CAAC;SAC7E,MAAM,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,CAAC;SAC1D,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,IAAI;YACA,MAAM,cAAc,CAAC,KAAK,CAAC;gBACvB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;aACzB,CAAC,CAAC;SACN;QAAC,OAAO,KAAc,EAAE;YACrB,IAAI,KAAK,YAAY,KAAK,EAAE;gBACxB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,WAAW,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACxE;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,4BAA4B,CAAC,CAAC,CAAC;aAC1E;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AA7BD,oDA6BC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerCacheCommand = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const figures_1 = __importDefault(require("figures"));
|
|
9
|
-
const logger_js_1 = __importDefault(require("../../logger.js"));
|
|
10
|
-
function registerCacheCommand(program, projectManager) {
|
|
11
|
-
program
|
|
12
|
-
.command('cache')
|
|
13
|
-
.description('Manage TypeScript compilation cache')
|
|
14
|
-
.option('-c, --clear', 'Clear compilation cache')
|
|
15
|
-
.option('-s, --stats', 'Show cache statistics')
|
|
16
|
-
.option('-p, --path', 'Show cache directory path')
|
|
17
|
-
.action((options) => {
|
|
18
|
-
try {
|
|
19
|
-
if (options.clear) {
|
|
20
|
-
projectManager.clearCache();
|
|
21
|
-
console.log(chalk_1.default.green(`${figures_1.default.tick} Cache cleared successfully`));
|
|
22
|
-
}
|
|
23
|
-
else if (options.stats) {
|
|
24
|
-
const stats = projectManager.getCacheStats();
|
|
25
|
-
console.log(chalk_1.default.blue('Cache Statistics:'));
|
|
26
|
-
console.log(chalk_1.default.white(` Size: ${stats.size}`));
|
|
27
|
-
console.log(chalk_1.default.white(` Files: ${stats.files}`));
|
|
28
|
-
console.log(chalk_1.default.white(` Last Updated: ${stats.lastUpdated}`));
|
|
29
|
-
if (stats.files === 0) {
|
|
30
|
-
console.log(chalk_1.default.yellow(`${figures_1.default.warning} Cache is empty`));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else if (options.path) {
|
|
34
|
-
const cachePath = projectManager.getCachePath();
|
|
35
|
-
console.log(chalk_1.default.blue('Cache Directory:'));
|
|
36
|
-
console.log(chalk_1.default.white(` ${cachePath}`));
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
console.log(chalk_1.default.blue('Cache management:'));
|
|
40
|
-
console.log(chalk_1.default.white(' --clear Clear compilation cache'));
|
|
41
|
-
console.log(chalk_1.default.white(' --stats Show cache statistics'));
|
|
42
|
-
console.log(chalk_1.default.white(' --path Show cache directory path'));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
if (error instanceof Error) {
|
|
47
|
-
logger_js_1.default.printLine(`Error: ${error.message}`, 'error');
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
logger_js_1.default.printLine('An unknown error occurred', 'error');
|
|
51
|
-
}
|
|
52
|
-
process.exit(1);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
exports.registerCacheCommand = registerCacheCommand;
|
|
57
|
-
//# sourceMappingURL=cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/commands/project-command/cache.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,sDAA8B;AAE9B,gEAAqC;AAErC,SAAgB,oBAAoB,CAAC,OAAgB,EAAE,cAA8B;IACjF,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CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC5C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC;aAC9C;iBAAM;gBACH,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC,CAAC;gBAChE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;gBAC9D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC,CAAC;aACrE;SACJ;QAAC,OAAO,KAAc,EAAE;YACrB,IAAI,KAAK,YAAY,KAAK,EAAE;gBACxB,mBAAM,CAAC,SAAS,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;aACxD;iBAAM;gBACH,mBAAM,CAAC,SAAS,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;aAC1D;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAxCD,oDAwCC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerDevCommand = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const figures_1 = __importDefault(require("figures"));
|
|
9
|
-
function registerDevCommand(program, projectManager) {
|
|
10
|
-
program
|
|
11
|
-
.command('dev <entry>')
|
|
12
|
-
.description('Run project in development mode with hot reload')
|
|
13
|
-
.option('-p, --port <number>', 'Port to run the server on', '8000')
|
|
14
|
-
.option('-w, --watch <paths...>', 'Paths to watch for changes', ['src'])
|
|
15
|
-
.option('-i, --ignore <paths...>', 'Paths to ignore', ['node_modules', 'dist', '.git', '.neex'])
|
|
16
|
-
.option('-e, --ext <extensions...>', 'File extensions to watch', ['ts', 'js', 'json'])
|
|
17
|
-
.option('-d, --delay <number>', 'Delay before restarting in milliseconds', '500')
|
|
18
|
-
.option('-c, --no-color', 'Disable colored output')
|
|
19
|
-
.option('--no-clear', 'Disable screen clearing on restart')
|
|
20
|
-
.option('--no-cache', 'Disable TypeScript compilation cache')
|
|
21
|
-
.option('--compiler <type>', 'Choose compiler: swc, esbuild, tsc', 'auto')
|
|
22
|
-
.option('--inspect', 'Enable Node.js inspector')
|
|
23
|
-
.option('--inspect-brk', 'Enable Node.js inspector with break')
|
|
24
|
-
.action(async (entry, options) => {
|
|
25
|
-
try {
|
|
26
|
-
await projectManager.startDev({
|
|
27
|
-
entry,
|
|
28
|
-
port: options.port,
|
|
29
|
-
watch: options.watch,
|
|
30
|
-
ignore: options.ignore,
|
|
31
|
-
ext: options.ext,
|
|
32
|
-
delay: options.delay,
|
|
33
|
-
clear: options.clear,
|
|
34
|
-
cache: options.cache,
|
|
35
|
-
compiler: options.compiler,
|
|
36
|
-
inspect: options.inspect,
|
|
37
|
-
inspectBrk: options.inspectBrk
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
if (error instanceof Error) {
|
|
42
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
46
|
-
}
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
exports.registerDevCommand = registerDevCommand;
|
|
52
|
-
//# sourceMappingURL=dev.js.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K,EAAE,OAAO,CAAC,KAAK;gBACpB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,UAAU,EAAE,OAAO,CAAC,UAAU;aACjC,CAAC,CAAC;SACN;QAAC,OAAO,KAAc,EAAE;YACrB,IAAI,KAAK,YAAY,KAAK,EAAE;gBACxB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,WAAW,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACxE;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,4BAA4B,CAAC,CAAC,CAAC;aAC1E;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAvCD,gDAuCC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerStartCommand = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const figures_1 = __importDefault(require("figures"));
|
|
9
|
-
function registerStartCommand(program, projectManager) {
|
|
10
|
-
program
|
|
11
|
-
.command('start')
|
|
12
|
-
.description('Start the built application in production mode with health monitoring')
|
|
13
|
-
.option('-p, --port <number>', 'Port to run the server on', '8000')
|
|
14
|
-
.option('-o, --outDir <dir>', 'Output directory', 'dist')
|
|
15
|
-
.option('-e, --entry <file>', 'Entry file name', 'server.js')
|
|
16
|
-
.option('-i, --inspect', 'Enable Node.js inspector')
|
|
17
|
-
.option('-c, --cluster', 'Run in cluster mode')
|
|
18
|
-
.option('-w, --workers <number>', 'Number of worker processes', '0')
|
|
19
|
-
.option('--max-memory <size>', 'Maximum memory per process (e.g., 1024M)')
|
|
20
|
-
.option('--health-check', 'Enable health check endpoint')
|
|
21
|
-
.action(async (options) => {
|
|
22
|
-
try {
|
|
23
|
-
await projectManager.start({
|
|
24
|
-
port: options.port,
|
|
25
|
-
outDir: options.outDir,
|
|
26
|
-
entry: options.entry,
|
|
27
|
-
inspect: options.inspect,
|
|
28
|
-
cluster: options.cluster,
|
|
29
|
-
workers: options.workers,
|
|
30
|
-
maxMemory: options.maxMemory,
|
|
31
|
-
healthCheck: options.healthCheck
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
if (error instanceof Error) {
|
|
36
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
40
|
-
}
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
exports.registerStartCommand = registerStartCommand;
|
|
46
|
-
//# sourceMappingURL=start.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/commands/project-command/start.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,sDAA8B;AAG9B,SAAgB,oBAAoB,CAAC,OAAgB,EAAE,cAA8B;IACjF,OAAO;SACF,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,uEAAuE,CAAC;SACpF,MAAM,CAAC,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAClE,MAAM,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,CAAC;SACxD,MAAM,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,CAAC;SAC5D,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;SACnD,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC;SAC9C,MAAM,CAAC,wBAAwB,EAAE,4BAA4B,EAAE,GAAG,CAAC;SACnE,MAAM,CAAC,qBAAqB,EAAE,0CAA0C,CAAC;SACzE,MAAM,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;SACxD,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,IAAI;YACA,MAAM,cAAc,CAAC,KAAK,CAAC;gBACvB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;aACnC,CAAC,CAAC;SACN;QAAC,OAAO,KAAc,EAAE;YACrB,IAAI,KAAK,YAAY,KAAK,EAAE;gBACxB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,WAAW,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACxE;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,iBAAO,CAAC,KAAK,4BAA4B,CAAC,CAAC,CAAC;aAC1E;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAjCD,oDAiCC"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerRunCommands = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const figures_1 = __importDefault(require("figures"));
|
|
9
|
-
const index_js_1 = require("../../index.js");
|
|
10
|
-
function registerRunCommands(program) {
|
|
11
|
-
// Sequential execution command
|
|
12
|
-
program
|
|
13
|
-
.command('sequential <commands...>')
|
|
14
|
-
.alias('s')
|
|
15
|
-
.description('Run commands sequentially')
|
|
16
|
-
.option('-c, --no-color', 'Disable colored output')
|
|
17
|
-
.option('-t, --no-timing', 'Hide timing information')
|
|
18
|
-
.option('-p, --no-prefix', 'Hide command prefix')
|
|
19
|
-
.option('-s, --stop-on-error', 'Stop on first error')
|
|
20
|
-
.option('-o, --no-output', 'Hide command output')
|
|
21
|
-
.option('-m, --minimal', 'Use minimal output format')
|
|
22
|
-
.action(async (commands, options) => {
|
|
23
|
-
try {
|
|
24
|
-
await (0, index_js_1.run)(commands, {
|
|
25
|
-
parallel: false,
|
|
26
|
-
color: options.color,
|
|
27
|
-
showTiming: options.timing,
|
|
28
|
-
prefix: options.prefix,
|
|
29
|
-
stopOnError: options.stopOnError,
|
|
30
|
-
printOutput: options.output,
|
|
31
|
-
minimalOutput: options.minimal
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
if (error instanceof Error) {
|
|
36
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
40
|
-
}
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
// Parallel execution command
|
|
45
|
-
program
|
|
46
|
-
.command('parallel <commands...>', { isDefault: true })
|
|
47
|
-
.alias('p')
|
|
48
|
-
.description('Run commands in parallel (default) or sequentially with -q. Alias: p')
|
|
49
|
-
.option('-c, --no-color', 'Disable colored output')
|
|
50
|
-
.option('-t, --no-timing', 'Hide timing information')
|
|
51
|
-
.option('-p, --no-prefix', 'Hide command prefix')
|
|
52
|
-
.option('-s, --stop-on-error', 'Stop on first error')
|
|
53
|
-
.option('-o, --no-output', 'Hide command output')
|
|
54
|
-
.option('-m, --minimal', 'Use minimal output format')
|
|
55
|
-
.option('-x, --max-parallel <number>', 'Maximum number of parallel processes', parseInt)
|
|
56
|
-
.option('-q, --sequential', 'Run commands sequentially instead of in parallel')
|
|
57
|
-
.action(async (commands, options) => {
|
|
58
|
-
try {
|
|
59
|
-
await (0, index_js_1.run)(commands, {
|
|
60
|
-
parallel: !options.sequential,
|
|
61
|
-
maxParallel: options.maxParallel,
|
|
62
|
-
color: options.color,
|
|
63
|
-
showTiming: options.timing,
|
|
64
|
-
prefix: options.prefix,
|
|
65
|
-
stopOnError: options.stopOnError,
|
|
66
|
-
printOutput: options.output,
|
|
67
|
-
minimalOutput: options.minimal
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
if (error instanceof Error) {
|
|
72
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} Error: ${error.message}`));
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
console.error(chalk_1.default.red(`${figures_1.default.cross} An unknown error occurred`));
|
|
76
|
-
}
|
|
77
|
-
process.exit(1);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
exports.registerRunCommands = registerRunCommands;
|
|
82
|
-
//# sourceMappingURL=run.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/commands/run-commands/run.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,sDAA8B;AAC9B,6CAAqC;AAErC,SAAgB,mBAAmB,CAAC,OAAgB;IAChD,+BAA+B;IAC/B,OAAO;SACF,OAAO,CAA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AI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAnED,kDAmEC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { RunOptions, RunResult } from './types';
|
|
2
|
-
export { RunOptions, RunResult };
|
|
3
|
-
export interface neexOptions extends Partial<RunOptions> {
|
|
4
|
-
parallel?: boolean;
|
|
5
|
-
maxParallel?: number;
|
|
6
|
-
isServerMode?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Run one or more commands with specified options
|
|
10
|
-
*/
|
|
11
|
-
export declare function run(commands: string | string[], options?: neexOptions): Promise<RunResult[]>;
|
|
12
|
-
/**
|
|
13
|
-
* Run multiple commands in parallel
|
|
14
|
-
*/
|
|
15
|
-
export declare function runParallel(commands: string | string[], options?: Omit<neexOptions, 'parallel'>): Promise<RunResult[]>;
|
|
16
|
-
/**
|
|
17
|
-
* Run multiple commands sequentially
|
|
18
|
-
*/
|
|
19
|
-
export declare function runSequential(commands: string | string[], options?: Omit<neexOptions, 'parallel'>): Promise<RunResult[]>;
|
|
20
|
-
/**
|
|
21
|
-
* Run multiple servers with optimized output
|
|
22
|
-
*/
|
|
23
|
-
export declare function runServers(commands: string | string[], options?: Omit<neexOptions, 'parallel' | 'isServerMode'>): Promise<RunResult[]>;
|
|
24
|
-
declare const _default: {
|
|
25
|
-
run: typeof run;
|
|
26
|
-
runParallel: typeof runParallel;
|
|
27
|
-
runSequential: typeof runSequential;
|
|
28
|
-
runServers: typeof runServers;
|
|
29
|
-
};
|
|
30
|
-
export default _default;
|