neex 0.7.20 β†’ 0.7.32

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 (58) hide show
  1. package/README.md +13 -31
  2. package/dist/bin/neex.d.ts +26 -0
  3. package/dist/bin/neex.d.ts.map +1 -0
  4. package/dist/src/build-manager.d.ts +41 -0
  5. package/dist/src/build-manager.d.ts.map +1 -0
  6. package/dist/src/build-manager.js +26 -24
  7. package/dist/src/cli.d.ts +2 -0
  8. package/dist/src/cli.d.ts.map +1 -0
  9. package/dist/src/commands/build-commands.d.ts +5 -0
  10. package/dist/src/commands/build-commands.d.ts.map +1 -0
  11. package/dist/src/commands/build-commands.js +2 -2
  12. package/dist/src/commands/dev-commands.d.ts +5 -0
  13. package/dist/src/commands/dev-commands.d.ts.map +1 -0
  14. package/dist/src/commands/dev-commands.js +5 -3
  15. package/dist/src/commands/index.d.ts +7 -0
  16. package/dist/src/commands/index.d.ts.map +1 -0
  17. package/dist/src/commands/init-commands.d.ts +2 -0
  18. package/dist/src/commands/init-commands.d.ts.map +1 -0
  19. package/dist/src/commands/init-commands.js +4 -4
  20. package/dist/src/commands/run-commands.d.ts +3 -0
  21. package/dist/src/commands/run-commands.d.ts.map +1 -0
  22. package/dist/src/commands/run-commands.js +26 -26
  23. package/dist/src/commands/server-commands.d.ts +3 -0
  24. package/dist/src/commands/server-commands.d.ts.map +1 -0
  25. package/dist/src/commands/server-commands.js +4 -2
  26. package/dist/src/commands/start-commands.d.ts +5 -0
  27. package/dist/src/commands/start-commands.d.ts.map +1 -0
  28. package/dist/src/commands/start-commands.js +2 -2
  29. package/dist/src/dev-manager.d.ts +51 -0
  30. package/dist/src/dev-manager.d.ts.map +1 -0
  31. package/dist/src/dev-manager.js +29 -21
  32. package/dist/src/index.d.ts +41 -0
  33. package/dist/src/index.d.ts.map +1 -0
  34. package/dist/src/index.js +15 -16
  35. package/dist/src/logger-manager.d.ts +4 -0
  36. package/dist/src/logger-manager.d.ts.map +1 -0
  37. package/dist/src/logger-manager.js +4 -4
  38. package/dist/src/logger.d.ts +34 -0
  39. package/dist/src/logger.d.ts.map +1 -0
  40. package/dist/src/logger.js +21 -15
  41. package/dist/src/runner.d.ts +21 -0
  42. package/dist/src/runner.d.ts.map +1 -0
  43. package/dist/src/runner.js +38 -25
  44. package/dist/src/start-manager.d.ts +49 -0
  45. package/dist/src/start-manager.d.ts.map +1 -0
  46. package/dist/src/start-manager.js +34 -29
  47. package/dist/src/types.d.ts +41 -0
  48. package/dist/src/types.d.ts.map +1 -0
  49. package/dist/src/utils.d.ts +2 -0
  50. package/dist/src/utils.d.ts.map +1 -0
  51. package/package.json +14 -9
  52. package/dist/src/cli-init.js +0 -1
  53. package/dist/src/commands/process-commands.js +0 -759
  54. package/dist/src/config.js +0 -59
  55. package/dist/src/dev-runner.js +0 -234
  56. package/dist/src/logger-process.js +0 -17
  57. package/dist/src/process-manager.js +0 -669
  58. package/dist/src/watcher.js +0 -245
package/README.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  <div align="center">
3
2
  <a href="https://github.com/Neexjs">
4
3
  <picture>
@@ -11,19 +10,17 @@
11
10
 
12
11
  ### Neex - Modern Fullstack Framework Built on Express and Next.js. Fast to Start, Easy to Build, Ready to Deploy.
13
12
 
14
-
15
13
  [![NPM version](https://img.shields.io/npm/v/neex.svg?style=for-the-badge&labelColor=000000&color=0066FF&borderRadius=8)](https://www.npmjs.com/package/neex)
16
14
  [![Download Count](https://img.shields.io/npm/dt/neex.svg?style=for-the-badge&labelColor=000000&color=0066FF&borderRadius=8)](https://www.npmjs.com/package/neex)
17
15
  [![MIT License](https://img.shields.io/badge/license-MIT-0066FF.svg?style=for-the-badge&labelColor=000000&borderRadius=8)](https://github.com/neexjs/blob/main/LICENSE)
18
16
  [![GitHub](https://img.shields.io/badge/GitHub-Neex-0066FF.svg?style=for-the-badge&logo=github&labelColor=000000&logoWidth=20&borderRadius=8)](https://github.com/Neexjs)
19
- </div>
20
17
 
18
+ </div>
21
19
 
22
20
  ## 🎯 Overview
23
21
 
24
22
  **Neex = nextjs + express 🌱**
25
23
 
26
-
27
24
  **Neex: A Powerful Fusion of Next.js and Express for Fullstack Development**
28
25
 
29
26
  **Neex** is a modern and advanced fullstack framework that combines **Next.js** and **Express** to deliver an exceptional development experience. Designed for speed, simplicity, and scalability, Neex empowers developers to effortlessly build and deploy robust, high-performance applications.
@@ -32,26 +29,24 @@
32
29
 
33
30
  Unlock the full potential of your fullstack projects with Neex’s powerful features, tailored for modern web development:
34
31
 
35
- * πŸ—οΈ **Fullstack Architecture**: Independent codebases for **frontend (Next.js)** and **backend (Express)** with isolated dependencies for maximum flexibility.
36
- * πŸ”„ **Monorepo Workflow**: Enjoy the simplicity of a single repository with clear separation between frontend and backend domains.
37
- * ⚑ **Zero Configuration**: Out-of-the-box setup for **TypeScript**, **Prisma**, and **environment variable management** for instant development readiness.
38
- * πŸ› οΈ **Production-Ready**: Built-in best practices for performance, scalability, and reliability at an enterprise level.
39
- * πŸ“¦ **Isolated Dependencies**: Each part of the stack has its own `package.json` to ensure modular and scalable development.
40
- * 🧩 **Separation of Concerns**: Clearly divided frontend and backend logic leads to cleaner, more maintainable codebases.
41
- * πŸ”’ **Secure Environment Management**: Built-in support for `dotenv` to handle environment variables safely and efficiently.
42
- * πŸ“Š **Database Integration**: Native support for **Prisma ORM** enables fast, type-safe, and efficient database development.
43
- * πŸ› οΈ **Powerful CLI**: Intuitive CLI commands to simplify development, building, and deployment workflows.
32
+ - πŸ—οΈ **Fullstack Architecture**: Independent codebases for **frontend (Next.js)** and **backend (Express)** with isolated dependencies for maximum flexibility.
33
+ - πŸ”„ **Monorepo Workflow**: Enjoy the simplicity of a single repository with clear separation between frontend and backend domains.
34
+ - ⚑ **Zero Configuration**: Out-of-the-box setup for **TypeScript**, **Prisma**, and **environment variable management** for instant development readiness.
35
+ - πŸ› οΈ **Production-Ready**: Built-in best practices for performance, scalability, and reliability at an enterprise level.
36
+ - πŸ“¦ **Isolated Dependencies**: Each part of the stack has its own `package.json` to ensure modular and scalable development.
37
+ - 🧩 **Separation of Concerns**: Clearly divided frontend and backend logic leads to cleaner, more maintainable codebases.
38
+ - πŸ”’ **Secure Environment Management**: Built-in support for `dotenv` to handle environment variables safely and efficiently.
39
+ - πŸ“Š **Database Integration**: Native support for **Prisma ORM** enables fast, type-safe, and efficient database development.
40
+ - πŸ› οΈ **Powerful CLI**: Intuitive CLI commands to simplify development, building, and deployment workflows.
44
41
 
45
42
  With these features, **Neex** is the ideal choice for developers seeking a fullstack framework that’s **SEO-optimized, scalable, efficient, and developer-friendly**. Start building high-performance web applications today with Neex’s robust toolset and clean architecture.
46
43
 
47
-
48
-
49
44
  ## πŸš€ Quick Start
50
45
 
51
46
  ### Create a New Neex Project – Step-by-Step
52
47
 
53
-
54
48
  1. **Run one of the creation commands**:
49
+
55
50
  ```bash
56
51
  npx neex init
57
52
  # or
@@ -69,12 +64,14 @@ With these features, **Neex** is the ideal choice for developers seeking a fulls
69
64
  4. **Wait for the project structure to be created** automatically.
70
65
 
71
66
  5. **Install dependencies**:
67
+
72
68
  ```bash
73
69
  cd my-project
74
70
  npm install # or yarn, pnpm install, bun install
75
71
  ```
76
72
 
77
73
  6. **Start development**:
74
+
78
75
  ```bash
79
76
  npm run dev # or yarn dev, pnpm dev, bun dev
80
77
  ```
@@ -141,11 +138,6 @@ neex compile src
141
138
 
142
139
  Run production-ready applications with advanced process management.
143
140
 
144
-
145
-
146
-
147
-
148
-
149
141
  ```bash
150
142
  # Start production server
151
143
  neex start dist/server.js
@@ -157,8 +149,6 @@ neex start dist/server.js --workers 4
157
149
  neex start dist/server.js --health-port 3001
158
150
  ```
159
151
 
160
-
161
-
162
152
  ### Explanation of Scripts
163
153
 
164
154
  - **`dev`**: Uses `neex p` to run the frontend (`dev:client`) and backend (`dev:server`) development servers in parallel, leveraging Neex's ability to manage concurrent processes with clear output.
@@ -181,7 +171,6 @@ npm run build # Sequentially generates Prisma client, applies migrations,
181
171
  npm run start # Starts frontend and backend in production mode concurrently
182
172
  ```
183
173
 
184
-
185
174
  #### Parallel and Sequential Execution
186
175
 
187
176
  Run multiple scripts efficiently.
@@ -197,8 +186,6 @@ neex s "npm run clean" "npm run build" "npm run deploy"
197
186
  neex p -q "npm run step1" "npm run step2"
198
187
  ```
199
188
 
200
-
201
-
202
189
  ## πŸ“‚ Project Structure
203
190
 
204
191
  Neex creates a polyrepo-in-monorepo structure for clear separation and scalability:
@@ -280,8 +267,6 @@ neex start dist/server.js --inspect
280
267
  neex start dist/server.js --max-memory 1G
281
268
  ```
282
269
 
283
-
284
-
285
270
  ## πŸ’‘ Real-World Scenarios
286
271
 
287
272
  Integrate Neex into your `package.json` to streamline development, building, and deployment workflows for your fullstack projects. Whether you're working with an **Express-only backend** or a combined **Express + Next.js** application, Neex’s powerful CLI and monorepo architecture make it easy to manage your projects efficiently.
@@ -349,9 +334,6 @@ npm run start # Launches frontend and backend in production mode concurrently
349
334
 
350
335
  This configuration is perfect for developers building fullstack applications with **Next.js**, **Express**, and **Prisma**, offering a seamless, scalable, and maintainable development experience. Start using Neex today to simplify your workflow and build high-performance applications with ease!
351
336
 
352
-
353
-
354
-
355
337
  ## πŸ“‹ System Requirements
356
338
 
357
339
  - **Node.js**: 20.0.0 or later
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ export interface RunOptions {
3
+ parallel: boolean;
4
+ maxParallel?: number;
5
+ printOutput: boolean;
6
+ color: boolean;
7
+ showTiming: boolean;
8
+ prefix: boolean;
9
+ stopOnError: boolean;
10
+ }
11
+ export interface RunResult {
12
+ command: string;
13
+ success: boolean;
14
+ code: number | null;
15
+ startTime: Date;
16
+ endTime: Date | null;
17
+ duration?: number;
18
+ error?: Error;
19
+ }
20
+ export interface CommandOutput {
21
+ command: string;
22
+ type: 'stdout' | 'stderr';
23
+ data: string;
24
+ timestamp: Date;
25
+ }
26
+ //# sourceMappingURL=neex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neex.d.ts","sourceRoot":"","sources":["../../bin/neex.ts"],"names":[],"mappings":";AAOA,MAAM,WAAW,UAAU;IAEzB,QAAQ,EAAE,OAAO,CAAC;IAElB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,EAAE,OAAO,CAAC;IAErB,KAAK,EAAE,OAAO,CAAC;IAEf,UAAU,EAAE,OAAO,CAAC;IAEpB,MAAM,EAAE,OAAO,CAAC;IAEhB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;CACjB"}
@@ -0,0 +1,41 @@
1
+ export interface BuildOptions {
2
+ source: string;
3
+ output: string;
4
+ watch: boolean;
5
+ clean: boolean;
6
+ minify: boolean;
7
+ sourcemap: boolean;
8
+ target: string;
9
+ format: string;
10
+ bundle: boolean;
11
+ external: string[];
12
+ tsconfig: string;
13
+ verbose: boolean;
14
+ quiet: boolean;
15
+ color: boolean;
16
+ analyze: boolean;
17
+ }
18
+ export declare class BuildManager {
19
+ private options;
20
+ private watcher;
21
+ private buildProcess;
22
+ private isBuilding;
23
+ private buildCount;
24
+ constructor(options: BuildOptions);
25
+ private cleanOutputDirectory;
26
+ private ensureOutputDirectory;
27
+ private validateTsConfig;
28
+ private copyPackageJson;
29
+ private getTscCommand;
30
+ private runBuild;
31
+ private filterTscErrors;
32
+ private analyzeBuild;
33
+ private stopProcess;
34
+ private formatBytes;
35
+ private setupWatcher;
36
+ private debouncedBuild;
37
+ private debounce;
38
+ build(): Promise<void>;
39
+ stop(): Promise<void>;
40
+ }
41
+ //# sourceMappingURL=build-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-manager.d.ts","sourceRoot":"","sources":["../../src/build-manager.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAK;gBAEX,OAAO,EAAE,YAAY;YAInB,oBAAoB;YAmBpB,qBAAqB;YAUrB,gBAAgB;YAQhB,eAAe;IA4C7B,OAAO,CAAC,aAAa;YA+BP,QAAQ;IAwGtB,OAAO,CAAC,eAAe;YAmBT,YAAY;YAmDZ,WAAW;IAkDzB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,YAAY;IA8DpB,OAAO,CAAC,cAAc,CAAgD;IAEtE,OAAO,CAAC,QAAQ;IAYH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAsBnC"}
@@ -14,12 +14,12 @@ const path_1 = __importDefault(require("path"));
14
14
  const promises_1 = __importDefault(require("fs/promises"));
15
15
  const fs_1 = require("fs");
16
16
  class BuildManager {
17
+ options;
18
+ watcher = null;
19
+ buildProcess = null;
20
+ isBuilding = false;
21
+ buildCount = 0;
17
22
  constructor(options) {
18
- this.watcher = null;
19
- this.buildProcess = null;
20
- this.isBuilding = false;
21
- this.buildCount = 0;
22
- this.debouncedBuild = this.debounce(this.runBuild.bind(this), 300);
23
23
  this.options = options;
24
24
  }
25
25
  async cleanOutputDirectory() {
@@ -49,7 +49,6 @@ class BuildManager {
49
49
  }
50
50
  }
51
51
  async copyPackageJson() {
52
- var _a;
53
52
  const packageJsonPath = path_1.default.join(process.cwd(), 'package.json');
54
53
  const outputPackageJsonPath = path_1.default.join(this.options.output, 'package.json');
55
54
  if ((0, fs_1.existsSync)(packageJsonPath)) {
@@ -60,13 +59,13 @@ class BuildManager {
60
59
  name: packageJson.name,
61
60
  version: packageJson.version,
62
61
  description: packageJson.description,
63
- main: ((_a = packageJson.main) === null || _a === void 0 ? void 0 : _a.replace(/^src\//, '')) || 'index.js',
62
+ main: packageJson.main?.replace(/^src\//, '') || 'index.js',
64
63
  type: this.options.format === 'esm' ? 'module' : 'commonjs',
65
64
  scripts: {
66
- start: 'node index.js'
65
+ start: 'node index.js',
67
66
  },
68
67
  dependencies: packageJson.dependencies || {},
69
- engines: packageJson.engines
68
+ engines: packageJson.engines,
70
69
  };
71
70
  await promises_1.default.writeFile(outputPackageJsonPath, JSON.stringify(prodPackageJson, null, 2));
72
71
  if (this.options.verbose) {
@@ -86,7 +85,7 @@ class BuildManager {
86
85
  this.options.output,
87
86
  '--target',
88
87
  this.options.target,
89
- '--declaration'
88
+ '--declaration',
90
89
  ];
91
90
  if (this.options.sourcemap) {
92
91
  args.push('--sourceMap');
@@ -119,25 +118,24 @@ class BuildManager {
119
118
  logger_manager_js_1.loggerManager.printLine(`Executing: ${command} ${args.join(' ')}`, 'info');
120
119
  }
121
120
  return new Promise((resolve, reject) => {
122
- var _a, _b;
123
121
  this.buildProcess = (0, child_process_1.spawn)(command, args, {
124
122
  stdio: ['ignore', 'pipe', 'pipe'], // Capture stdout and stderr
125
123
  shell: false,
126
124
  env: {
127
125
  ...process.env,
128
- FORCE_COLOR: '0' // Disable TSC colors to avoid log pollution
129
- }
126
+ FORCE_COLOR: '0', // Disable TSC colors to avoid log pollution
127
+ },
130
128
  });
131
129
  let stdout = '';
132
130
  let stderr = '';
133
131
  // Capture all output but don't display TSC logs
134
- (_a = this.buildProcess.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
132
+ this.buildProcess.stdout?.on('data', data => {
135
133
  stdout += data.toString();
136
134
  });
137
- (_b = this.buildProcess.stderr) === null || _b === void 0 ? void 0 : _b.on('data', (data) => {
135
+ this.buildProcess.stderr?.on('data', data => {
138
136
  stderr += data.toString();
139
137
  });
140
- this.buildProcess.on('error', (error) => {
138
+ this.buildProcess.on('error', error => {
141
139
  this.buildProcess = null;
142
140
  this.isBuilding = false;
143
141
  reject(new Error(`Build process error: ${error.message}`));
@@ -183,21 +181,24 @@ class BuildManager {
183
181
  const meaningfulLines = lines.filter(line => {
184
182
  const trimmed = line.trim();
185
183
  // Filter out TSC verbose output, keep only actual errors
186
- return trimmed &&
184
+ return (trimmed &&
187
185
  !trimmed.includes('message TS') &&
188
186
  !trimmed.includes('Found 0 errors') &&
189
187
  !trimmed.match(/^\s*\d+\s*$/) && // Filter line numbers
190
- !trimmed.includes('Watching for file changes');
188
+ !trimmed.includes('Watching for file changes'));
191
189
  });
192
190
  return meaningfulLines.join('\n').trim();
193
191
  }
194
192
  async analyzeBuild() {
195
193
  try {
196
- const files = await promises_1.default.readdir(this.options.output, { withFileTypes: true });
194
+ const files = await promises_1.default.readdir(this.options.output, {
195
+ withFileTypes: true,
196
+ });
197
197
  let totalSize = 0;
198
198
  const fileStats = [];
199
199
  for (const file of files) {
200
- if (file.isFile() && (file.name.endsWith('.js') || file.name.endsWith('.d.ts'))) {
200
+ if (file.isFile() &&
201
+ (file.name.endsWith('.js') || file.name.endsWith('.d.ts'))) {
201
202
  const filePath = path_1.default.join(this.options.output, file.name);
202
203
  const stat = await promises_1.default.stat(filePath);
203
204
  totalSize += stat.size;
@@ -224,7 +225,7 @@ class BuildManager {
224
225
  if (!this.buildProcess) {
225
226
  return;
226
227
  }
227
- return new Promise((resolve) => {
228
+ return new Promise(resolve => {
228
229
  if (!this.buildProcess) {
229
230
  resolve();
230
231
  return;
@@ -276,7 +277,7 @@ class BuildManager {
276
277
  `${this.options.source}/**/*.tsx`,
277
278
  `${this.options.source}/**/*.js`,
278
279
  `${this.options.source}/**/*.jsx`,
279
- this.options.tsconfig
280
+ this.options.tsconfig,
280
281
  ];
281
282
  this.watcher = (0, chokidar_1.watch)(watchPatterns, {
282
283
  ignoreInitial: true,
@@ -288,8 +289,8 @@ class BuildManager {
288
289
  '**/.git/**',
289
290
  `**/${this.options.output}/**`,
290
291
  '**/*.log',
291
- '**/*.map'
292
- ]
292
+ '**/*.map',
293
+ ],
293
294
  });
294
295
  this.watcher.on('change', (filePath) => {
295
296
  if (this.options.verbose) {
@@ -316,6 +317,7 @@ class BuildManager {
316
317
  logger_manager_js_1.loggerManager.printLine(`Watching: ${watchPatterns.join(', ')}`, 'info');
317
318
  }
318
319
  }
320
+ debouncedBuild = this.debounce(this.runBuild.bind(this), 300);
319
321
  debounce(func, wait) {
320
322
  let timeout;
321
323
  return function executedFunction(...args) {
@@ -0,0 +1,2 @@
1
+ export default function cli(): void;
2
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,GAAG,IAAI,IAAI,CA4ElC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from 'commander';
2
+ export declare function addBuildCommands(program: Command): {
3
+ cleanupBuild: () => void;
4
+ };
5
+ //# sourceMappingURL=build-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/build-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG;IAClD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAwJA"}
@@ -46,7 +46,7 @@ function addBuildCommands(program) {
46
46
  verbose: options.verbose,
47
47
  quiet: options.quiet,
48
48
  color: options.color,
49
- analyze: options.analyze
49
+ analyze: options.analyze,
50
50
  });
51
51
  // --- Signal Handlers for Build ---
52
52
  const cleanupAndExit = (signal) => {
@@ -102,7 +102,7 @@ function addBuildCommands(program) {
102
102
  verbose: false,
103
103
  quiet: false,
104
104
  color: true,
105
- analyze: false
105
+ analyze: false,
106
106
  });
107
107
  await buildManager.build();
108
108
  logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.green(figures_1.default.tick)} Compilation completed`, 'info');
@@ -0,0 +1,5 @@
1
+ import { Command } from 'commander';
2
+ export declare function addDevCommands(program: Command): {
3
+ cleanupDev: () => void;
4
+ };
5
+ //# sourceMappingURL=dev-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/dev-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG;IAAE,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAgS3E"}
@@ -19,7 +19,7 @@ function addDevCommands(program) {
19
19
  .option('-e, --ext <extensions>', 'File extensions to watch', 'ts,tsx,js,jsx')
20
20
  .option('-d, --delay <ms>', 'Restart delay in milliseconds', parseInt, 100)
21
21
  .option('--fast', 'Ultra-fast mode (50ms delay)')
22
- .option('--no-clear', 'Don\'t clear console on restart')
22
+ .option('--no-clear', "Don't clear console on restart")
23
23
  .option('--no-color', 'Disable colored output')
24
24
  .option('-q, --quiet', 'Minimal output')
25
25
  .option('-v, --verbose', 'Verbose logging')
@@ -56,7 +56,9 @@ function addDevCommands(program) {
56
56
  tsConfig: options.tsconfig,
57
57
  sourceMaps: options.sourceMaps,
58
58
  transpileOnly: options.transpileOnly,
59
- nodeArgs: options.nodeArgs ? options.nodeArgs.split(',').map((arg) => arg.trim()) : []
59
+ nodeArgs: options.nodeArgs
60
+ ? options.nodeArgs.split(',').map((arg) => arg.trim())
61
+ : [],
60
62
  });
61
63
  // --- Signal Handlers for Dev ---
62
64
  let isShuttingDown = false;
@@ -120,7 +122,7 @@ function addDevCommands(program) {
120
122
  .command('dev:check')
121
123
  .description('Check TypeScript configuration')
122
124
  .option('--tsconfig <path>', 'TypeScript config file path')
123
- .action((options) => {
125
+ .action(options => {
124
126
  const path = require('path');
125
127
  const fs = require('fs');
126
128
  const configPath = options.tsconfig || 'tsconfig.json';
@@ -0,0 +1,7 @@
1
+ export * from './run-commands.js';
2
+ export * from './dev-commands.js';
3
+ export * from './server-commands.js';
4
+ export * from './start-commands.js';
5
+ export * from './build-commands.js';
6
+ export { runInit } from './init-commands.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function runInit(args: string[]): void;
2
+ //# sourceMappingURL=init-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/init-commands.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAgB5C"}
@@ -7,13 +7,13 @@ function runInit(args) {
7
7
  // No extra logs, just run the command.
8
8
  const child = (0, child_process_1.spawn)('npx', ['create-neex', ...args], {
9
9
  stdio: 'inherit', // This will show the output of create-neex directly
10
- shell: true
10
+ shell: true,
11
11
  });
12
- child.on('close', (code) => {
12
+ child.on('close', code => {
13
13
  // The process exit code will be inherited from the child process.
14
- process.exit(code !== null && code !== void 0 ? code : 1);
14
+ process.exit(code ?? 1);
15
15
  });
16
- child.on('error', (err) => {
16
+ child.on('error', err => {
17
17
  console.error('Failed to start npx create-neex:', err);
18
18
  process.exit(1);
19
19
  });
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function addRunCommands(program: Command): void;
3
+ //# sourceMappingURL=run-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/run-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsGrD"}
@@ -11,16 +11,16 @@ function addRunCommands(program) {
11
11
  let cleanupRunner = null;
12
12
  // Main command for sequential execution (similar to run-s)
13
13
  program
14
- .command("s <commands...>")
15
- .alias("seq")
16
- .alias("sequential")
17
- .description("Run commands sequentially")
18
- .option("-c, --no-color", "Disable colored output")
19
- .option("-t, --no-timing", "Hide timing information")
20
- .option("-p, --no-prefix", "Hide command prefix")
21
- .option("-s, --stop-on-error", "Stop on first error")
22
- .option("-o, --no-output", "Hide command output")
23
- .option("-m, --minimal", "Use minimal output format")
14
+ .command('s <commands...>')
15
+ .alias('seq')
16
+ .alias('sequential')
17
+ .description('Run commands sequentially')
18
+ .option('-c, --no-color', 'Disable colored output')
19
+ .option('-t, --no-timing', 'Hide timing information')
20
+ .option('-p, --no-prefix', 'Hide command prefix')
21
+ .option('-s, --stop-on-error', 'Stop on first error')
22
+ .option('-o, --no-output', 'Hide command output')
23
+ .option('-m, --minimal', 'Use minimal output format')
24
24
  .action(async (commands, options) => {
25
25
  try {
26
26
  await (0, index_js_1.run)(commands, {
@@ -31,7 +31,7 @@ function addRunCommands(program) {
31
31
  stopOnError: options.stopOnError,
32
32
  printOutput: options.output,
33
33
  minimalOutput: options.minimal,
34
- registerCleanup: (cleanup) => {
34
+ registerCleanup: cleanup => {
35
35
  cleanupRunner = cleanup;
36
36
  },
37
37
  });
@@ -48,20 +48,20 @@ function addRunCommands(program) {
48
48
  });
49
49
  // runx command: parallel execution by default (with alias 'p'), can run sequentially with -q
50
50
  program
51
- .command("p <commands...>", { isDefault: true })
52
- .alias("par")
53
- .alias("parallel")
54
- .description("Run commands in parallel (default) or sequentially with -q. This is the default command.")
55
- .option("-c, --no-color", "Disable colored output")
56
- .option("-t, --no-timing", "Hide timing information")
57
- .option("-p, --no-prefix", "Hide command prefix")
58
- .option("-s, --stop-on-error", "Stop on first error")
59
- .option("-o, --no-output", "Hide command output")
60
- .option("-m, --minimal", "Use minimal output format")
61
- .option("-x, --max-parallel <number>", "Maximum number of parallel processes", parseInt)
62
- .option("-q, --sequential", "Run commands sequentially instead of in parallel")
63
- .option("--retry <count>", "Number of times to retry a failed command", parseInt)
64
- .option("--retry-delay <ms>", "Delay in milliseconds between retries", parseInt)
51
+ .command('p <commands...>', { isDefault: true })
52
+ .alias('par')
53
+ .alias('parallel')
54
+ .description('Run commands in parallel (default) or sequentially with -q. This is the default command.')
55
+ .option('-c, --no-color', 'Disable colored output')
56
+ .option('-t, --no-timing', 'Hide timing information')
57
+ .option('-p, --no-prefix', 'Hide command prefix')
58
+ .option('-s, --stop-on-error', 'Stop on first error')
59
+ .option('-o, --no-output', 'Hide command output')
60
+ .option('-m, --minimal', 'Use minimal output format')
61
+ .option('-x, --max-parallel <number>', 'Maximum number of parallel processes', parseInt)
62
+ .option('-q, --sequential', 'Run commands sequentially instead of in parallel')
63
+ .option('--retry <count>', 'Number of times to retry a failed command', parseInt)
64
+ .option('--retry-delay <ms>', 'Delay in milliseconds between retries', parseInt)
65
65
  .action(async (commands, options) => {
66
66
  try {
67
67
  await (0, index_js_1.run)(commands, {
@@ -75,7 +75,7 @@ function addRunCommands(program) {
75
75
  minimalOutput: options.minimal,
76
76
  retry: options.retry,
77
77
  retryDelay: options.retryDelay,
78
- registerCleanup: (cleanup) => {
78
+ registerCleanup: cleanup => {
79
79
  cleanupRunner = cleanup;
80
80
  },
81
81
  });
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function addServerCommands(program: Command): void;
3
+ //# sourceMappingURL=server-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/server-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqDxD"}
@@ -31,9 +31,11 @@ function addServerCommands(program) {
31
31
  prefix: options.prefix,
32
32
  stopOnError: options.stopOnError,
33
33
  printOutput: true,
34
- registerCleanup: (cleanup) => { cleanupRunner = cleanup; },
34
+ registerCleanup: cleanup => {
35
+ cleanupRunner = cleanup;
36
+ },
35
37
  groupOutput: options.groupOutput,
36
- isServerMode: true
38
+ isServerMode: true,
37
39
  });
38
40
  }
39
41
  catch (error) {
@@ -0,0 +1,5 @@
1
+ import { Command } from 'commander';
2
+ export declare function addStartCommands(program: Command): {
3
+ cleanupStart: () => void;
4
+ };
5
+ //# sourceMappingURL=start-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/start-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG;IAClD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAkMA"}
@@ -58,7 +58,7 @@ function addStartCommands(program) {
58
58
  'build/index.js',
59
59
  'server.js',
60
60
  'app.js',
61
- 'index.js'
61
+ 'index.js',
62
62
  ];
63
63
  let found = false;
64
64
  for (const location of commonLocations) {
@@ -128,7 +128,7 @@ function addStartCommands(program) {
128
128
  gracefulTimeout: options.gracefulTimeout,
129
129
  inspect: options.inspect,
130
130
  inspectBrk: options.inspectBrk,
131
- nodeArgs: options.nodeArgs
131
+ nodeArgs: options.nodeArgs,
132
132
  });
133
133
  // --- Signal Handlers for Start ---
134
134
  const cleanupAndExit = (signal) => {