neex 0.6.67 → 0.6.70

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/dist/src/cli.js CHANGED
@@ -18,6 +18,7 @@ function cli() {
18
18
  .description('Professional script runner with nodemon and PM2 functionality')
19
19
  .version(version);
20
20
  // Add all command groups
21
+ (0, index_js_1.addInitCommand)(program);
21
22
  (0, index_js_1.addRunCommands)(program);
22
23
  (0, index_js_1.addServerCommands)(program);
23
24
  const devCommands = (0, index_js_1.addDevCommands)(program);
@@ -20,3 +20,4 @@ __exportStar(require("./dev-commands.js"), exports);
20
20
  __exportStar(require("./server-commands.js"), exports);
21
21
  __exportStar(require("./start-commands.js"), exports);
22
22
  __exportStar(require("./build-commands"), exports);
23
+ __exportStar(require("./init-commands.js"), exports);
@@ -0,0 +1,36 @@
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.addInitCommand = void 0;
7
+ const child_process_1 = require("child_process");
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const figures_1 = __importDefault(require("figures"));
10
+ function addInitCommand(program) {
11
+ program
12
+ .command('init')
13
+ .description('Initialize a new neex project by running `npx create-neex`')
14
+ .action(() => {
15
+ console.log(chalk_1.default.green(`${figures_1.default.pointer} Running npx create-neex...`));
16
+ const command = 'npx';
17
+ const args = ['create-neex'];
18
+ // Use spawn to execute the command and stream the output
19
+ const child = (0, child_process_1.spawn)(command, args, {
20
+ stdio: 'inherit',
21
+ shell: true // Needed for 'npx' on some systems, especially Windows
22
+ });
23
+ child.on('close', (code) => {
24
+ if (code !== 0) {
25
+ console.error(chalk_1.default.red(`${figures_1.default.cross} Error initializing project. 'npx create-neex' exited with code ${code}`));
26
+ }
27
+ else {
28
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Project initialized successfully!`));
29
+ }
30
+ });
31
+ child.on('error', (error) => {
32
+ console.error(chalk_1.default.red(`${figures_1.default.cross} Failed to start command: ${error.message}`));
33
+ });
34
+ });
35
+ }
36
+ exports.addInitCommand = addInitCommand;
@@ -97,8 +97,9 @@ function addStartCommands(program) {
97
97
  }
98
98
  // Startup logging
99
99
  const mode = isDevelopment ? 'development' : 'production';
100
- const clusterInfo = options.workers > 1 ? ` (${options.workers} workers)` : '';
101
- logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.green(figures_1.default.play)} Starting ${mode} server${clusterInfo}`, 'info');
100
+ const workerText = options.workers === 1 ? 'worker' : 'workers';
101
+ const clusterInfo = `(${options.workers} ${workerText})`;
102
+ logger_manager_js_1.loggerManager.printLine(`${chalk_1.default.green(figures_1.default.play)} Starting ${mode} server ${clusterInfo}`, 'info');
102
103
  if (options.verbose) {
103
104
  logger_manager_js_1.loggerManager.printLine(`File: ${path_1.default.relative(process.cwd(), resolvedFile)}`);
104
105
  logger_manager_js_1.loggerManager.printLine(`Working Directory: ${options.dir}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neex",
3
- "version": "0.6.67",
3
+ "version": "0.6.70",
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",