neex 0.2.8 → 0.3.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.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/bun.lock +118 -544
  3. package/dist/cli.d.ts +1 -0
  4. package/dist/cli.js +46 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/build.d.ts +3 -0
  7. package/dist/commands/build.js +41 -0
  8. package/dist/commands/build.js.map +1 -0
  9. package/dist/commands/cache.d.ts +3 -0
  10. package/dist/commands/cache.js +34 -0
  11. package/dist/commands/cache.js.map +1 -0
  12. package/dist/commands/dev.d.ts +3 -0
  13. package/dist/commands/dev.js +51 -0
  14. package/dist/commands/dev.js.map +1 -0
  15. package/dist/commands/process-command/process.d.ts +2 -0
  16. package/dist/commands/process-command/process.js +149 -0
  17. package/dist/commands/process-command/process.js.map +1 -0
  18. package/dist/commands/process.d.ts +2 -0
  19. package/dist/commands/process.js +216 -0
  20. package/dist/commands/process.js.map +1 -0
  21. package/dist/commands/project-command/build.d.ts +3 -0
  22. package/dist/commands/project-command/build.js +41 -0
  23. package/dist/commands/project-command/build.js.map +1 -0
  24. package/dist/commands/project-command/cache.d.ts +3 -0
  25. package/dist/commands/project-command/cache.js +56 -0
  26. package/dist/commands/project-command/cache.js.map +1 -0
  27. package/dist/commands/project-command/dev.d.ts +3 -0
  28. package/dist/commands/project-command/dev.js +51 -0
  29. package/dist/commands/project-command/dev.js.map +1 -0
  30. package/dist/commands/project-command/start.d.ts +3 -0
  31. package/dist/commands/project-command/start.js +45 -0
  32. package/dist/commands/project-command/start.js.map +1 -0
  33. package/dist/commands/run-commands/run.d.ts +2 -0
  34. package/dist/commands/run-commands/run.js +81 -0
  35. package/dist/commands/run-commands/run.js.map +1 -0
  36. package/dist/commands/run.d.ts +2 -0
  37. package/dist/commands/run.js +81 -0
  38. package/dist/commands/run.js.map +1 -0
  39. package/dist/commands/start.d.ts +3 -0
  40. package/dist/commands/start.js +45 -0
  41. package/dist/commands/start.js.map +1 -0
  42. package/dist/dev-manager.d.ts +34 -0
  43. package/dist/dev-manager.js +172 -0
  44. package/dist/dev-manager.js.map +1 -0
  45. package/dist/index.d.ts +30 -0
  46. package/dist/index.js +65 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/logger.d.ts +31 -0
  49. package/dist/logger.js +238 -0
  50. package/dist/logger.js.map +1 -0
  51. package/dist/process-manager.d.ts +61 -0
  52. package/dist/process-manager.js +279 -0
  53. package/dist/process-manager.js.map +1 -0
  54. package/dist/project-manager.d.ts +51 -0
  55. package/dist/project-manager.js +252 -0
  56. package/dist/project-manager.js.map +1 -0
  57. package/dist/runner.d.ts +16 -0
  58. package/dist/runner.js +331 -0
  59. package/dist/runner.js.map +1 -0
  60. package/dist/types.d.ts +37 -0
  61. package/dist/types.js +3 -0
  62. package/dist/types.js.map +1 -0
  63. package/dist/typescript-runner.d.ts +12 -0
  64. package/dist/typescript-runner.js +162 -0
  65. package/dist/typescript-runner.js.map +1 -0
  66. package/package.json +5 -2
package/dist/runner.js ADDED
@@ -0,0 +1,331 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Runner = void 0;
40
+ // src/runner.ts - Updated version
41
+ const child_process_1 = require("child_process");
42
+ const fsPromises = __importStar(require("fs/promises"));
43
+ const path = __importStar(require("path"));
44
+ const chalk_1 = __importDefault(require("chalk"));
45
+ const logger_1 = __importDefault(require("./logger"));
46
+ const p_map_1 = __importDefault(require("p-map"));
47
+ const npm_run_path_1 = __importDefault(require("npm-run-path"));
48
+ class Runner {
49
+ constructor(options) {
50
+ this.activeProcesses = new Map();
51
+ this.serverInfo = new Map();
52
+ this.portRegex = /listening on (?:port |http:\/\/localhost:|https:\/\/localhost:)(\d+)/i;
53
+ this.urlRegex = /(https?:\/\/localhost:[0-9]+(?:\/[^\s]*)?)/i;
54
+ this.options = options;
55
+ this.activeProcesses = new Map();
56
+ }
57
+ async resolveScriptAndCwd(scriptNameOrCommand, baseDir) {
58
+ try {
59
+ const packageJsonPath = path.join(baseDir, 'package.json');
60
+ const packageJsonContent = await fsPromises.readFile(packageJsonPath, 'utf-8');
61
+ const packageJson = JSON.parse(packageJsonContent);
62
+ if (packageJson.scripts && packageJson.scripts[scriptNameOrCommand]) {
63
+ const scriptValue = packageJson.scripts[scriptNameOrCommand];
64
+ const cdMatch = scriptValue.match(/^cd\s+([^&]+)\s+&&\s+(.*)$/);
65
+ if (cdMatch) {
66
+ const dir = cdMatch[1];
67
+ const commandToExecute = cdMatch[2];
68
+ const targetCwd = path.resolve(baseDir, dir);
69
+ return { executableCommand: commandToExecute, executionCwd: targetCwd };
70
+ }
71
+ else {
72
+ // It's a script from package.json, but no 'cd ... && ...' pattern
73
+ return { executableCommand: scriptValue, executionCwd: baseDir };
74
+ }
75
+ }
76
+ }
77
+ catch (error) {
78
+ // Errors like package.json not found, or script not in package.json
79
+ // Will treat as direct command
80
+ }
81
+ return { executableCommand: scriptNameOrCommand, executionCwd: undefined };
82
+ }
83
+ detectServerInfo(command, data) {
84
+ if (!this.options.isServerMode)
85
+ return;
86
+ // Get or create server info
87
+ let serverInfo = this.serverInfo.get(command);
88
+ if (!serverInfo) {
89
+ serverInfo = {
90
+ name: command,
91
+ status: 'starting'
92
+ };
93
+ this.serverInfo.set(command, serverInfo);
94
+ }
95
+ // Try to detect port from output
96
+ const portMatch = data.match(this.portRegex);
97
+ if (portMatch && portMatch[1]) {
98
+ serverInfo.port = parseInt(portMatch[1], 10);
99
+ serverInfo.status = 'running';
100
+ // Only log if we just discovered the port
101
+ if (!serverInfo.url) {
102
+ logger_1.default.printLine(`Server ${command} running on port ${serverInfo.port}`, 'info');
103
+ }
104
+ }
105
+ // Try to detect full URL from output
106
+ const urlMatch = data.match(this.urlRegex);
107
+ if (urlMatch && urlMatch[1]) {
108
+ serverInfo.url = urlMatch[1];
109
+ serverInfo.status = 'running';
110
+ // Log the full URL once we detect it
111
+ logger_1.default.printLine(`Server ${command} available at ${chalk_1.default.cyan(serverInfo.url)}`, 'info');
112
+ }
113
+ // Update server info
114
+ this.serverInfo.set(command, serverInfo);
115
+ }
116
+ async runCommand(originalCommand) {
117
+ const { executableCommand: command, executionCwd: cwd } = await this.resolveScriptAndCwd(originalCommand, process.cwd());
118
+ const startTime = new Date();
119
+ const result = {
120
+ command: originalCommand,
121
+ success: false,
122
+ code: null,
123
+ startTime,
124
+ endTime: null,
125
+ output: []
126
+ };
127
+ if (this.options.printOutput) {
128
+ logger_1.default.printStart(originalCommand);
129
+ }
130
+ return new Promise((resolve) => {
131
+ const [cmd, ...args] = command.split(' ');
132
+ const env = {
133
+ ...process.env,
134
+ ...npm_run_path_1.default.env(),
135
+ FORCE_COLOR: this.options.color ? '1' : '0'
136
+ };
137
+ const proc = (0, child_process_1.spawn)(cmd, args, {
138
+ stdio: ['ignore', 'pipe', 'pipe'],
139
+ shell: true,
140
+ env,
141
+ detached: true,
142
+ cwd
143
+ });
144
+ this.activeProcesses.set(originalCommand, proc);
145
+ if (this.options.isServerMode) {
146
+ this.serverInfo.set(originalCommand, {
147
+ name: originalCommand,
148
+ status: 'starting',
149
+ pid: proc.pid,
150
+ startTime: new Date()
151
+ });
152
+ }
153
+ // Capture and display output
154
+ if (this.options.printOutput) {
155
+ proc.stdout.on('data', (data) => {
156
+ const output = {
157
+ command: originalCommand,
158
+ type: 'stdout',
159
+ data: data.toString(),
160
+ timestamp: new Date()
161
+ };
162
+ if (this.options.isServerMode) {
163
+ this.detectServerInfo(originalCommand, data.toString());
164
+ }
165
+ // Store output for logging
166
+ if (result.output)
167
+ result.output.push(output);
168
+ logger_1.default.bufferOutput(output);
169
+ // Print immediately unless we're in group mode
170
+ if (!this.options.groupOutput) {
171
+ logger_1.default.printBuffer(originalCommand);
172
+ }
173
+ });
174
+ proc.stderr.on('data', (data) => {
175
+ const output = {
176
+ command: originalCommand,
177
+ type: 'stderr',
178
+ data: data.toString(),
179
+ timestamp: new Date()
180
+ };
181
+ // Store output for logging
182
+ if (result.output)
183
+ result.output.push(output);
184
+ logger_1.default.bufferOutput(output);
185
+ // Print immediately unless we're in group mode
186
+ if (!this.options.groupOutput) {
187
+ logger_1.default.printBuffer(originalCommand);
188
+ }
189
+ });
190
+ }
191
+ proc.on('close', (code) => {
192
+ const endTime = new Date();
193
+ const duration = endTime.getTime() - startTime.getTime();
194
+ result.endTime = endTime;
195
+ result.duration = duration;
196
+ result.code = code;
197
+ result.success = code === 0;
198
+ this.activeProcesses.delete(originalCommand);
199
+ if (this.options.isServerMode) {
200
+ const serverInfo = this.serverInfo.get(originalCommand);
201
+ if (serverInfo) {
202
+ serverInfo.status = code === 0 ? 'stopped' : 'error';
203
+ this.serverInfo.set(originalCommand, serverInfo);
204
+ }
205
+ // If this is server mode and a server failed, print prominent error
206
+ if (code !== 0) {
207
+ logger_1.default.printLine(`Server ${originalCommand} crashed with code ${code}`, 'error');
208
+ }
209
+ }
210
+ // Print grouped output at the end if enabled
211
+ if (this.options.groupOutput && result.output && result.output.length > 0) {
212
+ logger_1.default.printBuffer(originalCommand);
213
+ }
214
+ if (this.options.printOutput) {
215
+ if (result.success) {
216
+ logger_1.default.printSuccess(result);
217
+ }
218
+ else {
219
+ logger_1.default.printError(result);
220
+ }
221
+ }
222
+ resolve(result);
223
+ });
224
+ proc.on('error', (error) => {
225
+ const endTime = new Date();
226
+ const duration = endTime.getTime() - startTime.getTime();
227
+ result.endTime = endTime;
228
+ result.duration = duration;
229
+ result.error = error;
230
+ result.success = false;
231
+ this.activeProcesses.delete(originalCommand);
232
+ if (this.options.isServerMode) {
233
+ const serverInfo = this.serverInfo.get(originalCommand);
234
+ if (serverInfo) {
235
+ serverInfo.status = 'error';
236
+ this.serverInfo.set(originalCommand, serverInfo);
237
+ }
238
+ }
239
+ if (this.options.printOutput) {
240
+ logger_1.default.printError(result);
241
+ }
242
+ resolve(result);
243
+ });
244
+ });
245
+ }
246
+ async runSequential(commands) {
247
+ const results = [];
248
+ for (const cmd of commands) {
249
+ const result = await this.runCommand(cmd);
250
+ results.push(result);
251
+ // Stop on error if enabled
252
+ if (!result.success && this.options.stopOnError) {
253
+ break;
254
+ }
255
+ }
256
+ return results;
257
+ }
258
+ async runParallel(commands) {
259
+ const concurrency = this.options.maxParallel || commands.length;
260
+ const mapper = async (cmd) => {
261
+ return this.runCommand(cmd);
262
+ };
263
+ try {
264
+ return await (0, p_map_1.default)(commands, mapper, {
265
+ concurrency,
266
+ stopOnError: this.options.stopOnError
267
+ });
268
+ }
269
+ catch (error) {
270
+ // If pMap stops due to stopOnError
271
+ if (this.options.isServerMode) {
272
+ logger_1.default.printLine('One or more servers failed to start. Stopping all servers.', 'error');
273
+ }
274
+ return [];
275
+ }
276
+ }
277
+ async run(commands) {
278
+ if (commands.length === 0) {
279
+ return [];
280
+ }
281
+ // Set up logger with commands
282
+ logger_1.default.setCommands(commands);
283
+ // Run in parallel or sequential mode
284
+ if (this.options.parallel) {
285
+ if (this.options.isServerMode) {
286
+ logger_1.default.printLine('Starting servers in parallel mode', 'info');
287
+ }
288
+ return this.runParallel(commands);
289
+ }
290
+ else {
291
+ if (this.options.isServerMode) {
292
+ logger_1.default.printLine('Starting servers in sequential mode', 'info');
293
+ }
294
+ return this.runSequential(commands);
295
+ }
296
+ }
297
+ cleanup(signal = 'SIGTERM') {
298
+ logger_1.default.printLine('Cleaning up child processes...', 'warn');
299
+ this.activeProcesses.forEach((proc, command) => {
300
+ if (proc.pid && !proc.killed) {
301
+ try {
302
+ // Kill process group
303
+ process.kill(-proc.pid, signal);
304
+ logger_1.default.printLine(`Sent ${signal} to process group ${proc.pid} (${command})`, 'info');
305
+ }
306
+ catch (e) {
307
+ // Fallback if killing group failed
308
+ try {
309
+ proc.kill(signal);
310
+ logger_1.default.printLine(`Sent ${signal} to process ${proc.pid} (${command})`, 'info');
311
+ }
312
+ catch (errInner) {
313
+ logger_1.default.printLine(`Failed to kill process ${proc.pid} (${command}): ${errInner.message}`, 'error');
314
+ }
315
+ }
316
+ }
317
+ });
318
+ this.activeProcesses.clear();
319
+ // Print server status summary if in server mode
320
+ if (this.options.isServerMode && this.serverInfo.size > 0) {
321
+ logger_1.default.printLine('Server shutdown summary:', 'info');
322
+ this.serverInfo.forEach((info, command) => {
323
+ const statusColor = info.status === 'running' ? chalk_1.default.green :
324
+ info.status === 'error' ? chalk_1.default.red : chalk_1.default.yellow;
325
+ logger_1.default.printLine(` ${command}: ${statusColor(info.status)}`, 'info');
326
+ });
327
+ }
328
+ }
329
+ }
330
+ exports.Runner = Runner;
331
+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C,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;QAE7B,gDAAgD;QAChD,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACxD,gBAAM,CAAC,SAAS,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC;YACrD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;gBACtC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,CAAC;oBACzD,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,CAAC,CAAC,eAAK,CAAC,MAAM,CAAC;gBACvD,gBAAM,CAAC,SAAS,CAAC,KAAK,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YAC1E,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ;AAzUD,wBAyUC"}
@@ -0,0 +1,37 @@
1
+ export interface RunOptions {
2
+ parallel: boolean;
3
+ maxParallel?: number;
4
+ printOutput: boolean;
5
+ color: boolean;
6
+ showTiming: boolean;
7
+ prefix: boolean;
8
+ stopOnError: boolean;
9
+ minimalOutput: boolean;
10
+ groupOutput: boolean;
11
+ isServerMode: boolean;
12
+ }
13
+ export interface RunResult {
14
+ command: string;
15
+ success: boolean;
16
+ code: number | null;
17
+ startTime: Date;
18
+ endTime: Date | null;
19
+ duration?: number;
20
+ error?: Error;
21
+ output?: CommandOutput[];
22
+ }
23
+ export interface CommandOutput {
24
+ command: string;
25
+ type: 'stdout' | 'stderr';
26
+ data: string;
27
+ timestamp: Date;
28
+ }
29
+ export interface ServerInfo {
30
+ name: string;
31
+ url?: string;
32
+ status: 'starting' | 'running' | 'error' | 'stopped';
33
+ pid?: number;
34
+ port?: number;
35
+ startTime?: Date;
36
+ }
37
+ export type LogLevel = 'info' | 'warn' | 'error' | 'debug' | 'success';
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export declare class FastTypeScriptRunner {
2
+ private cache;
3
+ private compiler;
4
+ private tempDir;
5
+ constructor();
6
+ private detectBestCompiler;
7
+ compile(filePath: string): Promise<string>;
8
+ private compileWithSWC;
9
+ private compileWithESBuild;
10
+ private compileWithTSC;
11
+ clearCache(): void;
12
+ }
@@ -0,0 +1,162 @@
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.FastTypeScriptRunner = void 0;
7
+ const child_process_1 = require("child_process");
8
+ const path_1 = require("path");
9
+ const fs_1 = require("fs");
10
+ const chalk_1 = __importDefault(require("chalk"));
11
+ const figures_1 = __importDefault(require("figures"));
12
+ const crypto_1 = require("crypto");
13
+ const util_1 = require("util");
14
+ const logger_1 = __importDefault(require("./logger"));
15
+ const execAsync = (0, util_1.promisify)(child_process_1.exec);
16
+ // TypeScript Cache Manager for faster transpilation
17
+ class TypeScriptCache {
18
+ constructor() {
19
+ this.enabled = true;
20
+ this.cacheDir = (0, path_1.join)(process.cwd(), '.neex', 'cache');
21
+ if (!(0, fs_1.existsSync)(this.cacheDir)) {
22
+ (0, fs_1.mkdirSync)(this.cacheDir, { recursive: true });
23
+ }
24
+ }
25
+ getFileHash(filePath) {
26
+ try {
27
+ const content = (0, fs_1.readFileSync)(filePath, 'utf8');
28
+ return (0, crypto_1.createHash)('md5').update(content).digest('hex');
29
+ }
30
+ catch {
31
+ return '';
32
+ }
33
+ }
34
+ getCachePath(filePath) {
35
+ const hash = this.getFileHash(filePath);
36
+ const fileName = `${hash}.js`;
37
+ return (0, path_1.join)(this.cacheDir, fileName);
38
+ }
39
+ isCached(filePath) {
40
+ if (!this.enabled)
41
+ return false;
42
+ const cachePath = this.getCachePath(filePath);
43
+ return (0, fs_1.existsSync)(cachePath);
44
+ }
45
+ getCachedFile(filePath) {
46
+ if (!this.isCached(filePath))
47
+ return null;
48
+ return this.getCachePath(filePath);
49
+ }
50
+ cacheFile(originalPath, compiledPath) {
51
+ if (!this.enabled)
52
+ return;
53
+ try {
54
+ const cachePath = this.getCachePath(originalPath);
55
+ const compiledContent = (0, fs_1.readFileSync)(compiledPath, 'utf8');
56
+ (0, fs_1.writeFileSync)(cachePath, compiledContent);
57
+ }
58
+ catch (error) {
59
+ logger_1.default.printLine(`Warning: Failed to cache ${originalPath}`, 'warn');
60
+ }
61
+ }
62
+ clear() {
63
+ try {
64
+ (0, child_process_1.exec)(`rm -rf ${this.cacheDir}`);
65
+ (0, fs_1.mkdirSync)(this.cacheDir, { recursive: true });
66
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Cache cleared successfully`));
67
+ }
68
+ catch (error) {
69
+ console.error(chalk_1.default.red(`${figures_1.default.cross} Failed to clear cache`));
70
+ }
71
+ }
72
+ }
73
+ class FastTypeScriptRunner {
74
+ constructor() {
75
+ this.cache = new TypeScriptCache();
76
+ this.tempDir = (0, path_1.join)(process.cwd(), '.neex', 'temp');
77
+ if (!(0, fs_1.existsSync)(this.tempDir)) {
78
+ (0, fs_1.mkdirSync)(this.tempDir, { recursive: true });
79
+ }
80
+ this.compiler = this.detectBestCompiler();
81
+ }
82
+ detectBestCompiler() {
83
+ try {
84
+ require.resolve('@swc/core');
85
+ return 'swc';
86
+ }
87
+ catch {
88
+ try {
89
+ require.resolve('esbuild');
90
+ return 'esbuild';
91
+ }
92
+ catch {
93
+ return 'tsc';
94
+ }
95
+ }
96
+ }
97
+ async compile(filePath) {
98
+ const cachedFile = this.cache.getCachedFile(filePath);
99
+ if (cachedFile) {
100
+ return cachedFile;
101
+ }
102
+ const outputPath = (0, path_1.join)(this.tempDir, `${Date.now()}.js`);
103
+ try {
104
+ switch (this.compiler) {
105
+ case 'swc':
106
+ await this.compileWithSWC(filePath, outputPath);
107
+ break;
108
+ case 'esbuild':
109
+ await this.compileWithESBuild(filePath, outputPath);
110
+ break;
111
+ default:
112
+ await this.compileWithTSC(filePath, outputPath);
113
+ }
114
+ this.cache.cacheFile(filePath, outputPath);
115
+ return outputPath;
116
+ }
117
+ catch (error) {
118
+ throw new Error(`Compilation failed: ${error}`);
119
+ }
120
+ }
121
+ async compileWithSWC(input, output) {
122
+ const swc = require('@swc/core');
123
+ const result = await swc.transformFile(input, {
124
+ jsc: {
125
+ parser: {
126
+ syntax: 'typescript',
127
+ tsx: false,
128
+ decorators: true,
129
+ },
130
+ target: 'es2022',
131
+ transform: {
132
+ legacyDecorator: true,
133
+ decoratorMetadata: true,
134
+ },
135
+ },
136
+ module: {
137
+ type: 'commonjs',
138
+ },
139
+ });
140
+ (0, fs_1.writeFileSync)(output, result.code);
141
+ }
142
+ async compileWithESBuild(input, output) {
143
+ const esbuild = require('esbuild');
144
+ await esbuild.build({
145
+ entryPoints: [input],
146
+ outfile: output,
147
+ platform: 'node',
148
+ target: 'node18',
149
+ format: 'cjs',
150
+ sourcemap: true,
151
+ bundle: false,
152
+ });
153
+ }
154
+ async compileWithTSC(input, output) {
155
+ await execAsync(`npx tsc ${input} --outFile ${output} --target ES2022 --module commonjs --esModuleInterop --allowSyntheticDefaultImports --experimentalDecorators --emitDecoratorMetadata --skipLibCheck`);
156
+ }
157
+ clearCache() {
158
+ this.cache.clear();
159
+ }
160
+ }
161
+ exports.FastTypeScriptRunner = FastTypeScriptRunner;
162
+ //# sourceMappingURL=typescript-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript-runner.js","sourceRoot":"","sources":["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,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,KAAa,EAAE,MAAc;QACtD,MAAM,SAAS,CAAC,WAAW,KAAK,cAAc,MAAM,qJAAqJ,CAAC,CAAC;IAC/M,CAAC;IAED,UAAU;QACN,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACJ;AAjGD,oDAiGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neex",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "description": "The Modern Build System for Polyrepo-in-Monorepo Architecture",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -28,10 +28,13 @@
28
28
  "author": "foshati",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
+ "@types/express": "^5.0.3",
31
32
  "chalk": "^4.1.2",
32
- "chokidar": "^3.5.3",
33
+ "chokidar": "^4.0.3",
33
34
  "cli-table3": "^0.6.5",
34
35
  "commander": "^9.4.0",
36
+ "esbuild": "^0.25.5",
37
+ "express": "^5.1.0",
35
38
  "figlet": "^1.8.1",
36
39
  "figures": "^3.2.0",
37
40
  "gradient-string": "^3.0.0",