neex 0.6.21 → 0.6.22

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.
@@ -110,7 +110,7 @@ function addBuildCommands(program) {
110
110
  .option('-d, --delay <ms>', 'Delay before rebuild in milliseconds', parseInt)
111
111
  .option('--clean', 'Clean output directory before build')
112
112
  .option('--verbose', 'Verbose output')
113
- .option('--info', 'Show detailed information during build')
113
+ .option('--info', 'Show detailed build information')
114
114
  .option('--source-map', 'Generate source maps')
115
115
  .option('--target <target>', 'Target ECMAScript version', 'es2020')
116
116
  .option('--module <module>', 'Module system', 'commonjs')
@@ -129,14 +129,32 @@ function addBuildCommands(program) {
129
129
  process.exit(1);
130
130
  }
131
131
  // Get build configuration
132
- let buildConfig;
133
- try {
134
- buildConfig = await getBuildConfig(file, options.output, showInfo);
135
- }
136
- catch (error) {
137
- console.error(chalk_1.default.red(`${figures_1.default.cross} neex build: ${error instanceof Error ? error.message : 'Unknown error occurred'}`));
138
- process.exit(1);
139
- }
132
+ const buildConfig = await getBuildConfig(file, options.output, showInfo);
133
+ // Create BuildManager instance with all required options
134
+ const buildManager = new build_manager_js_1.BuildManager({
135
+ runnerName: 'neex build',
136
+ inputFile: file,
137
+ outputDir: options.output,
138
+ buildType: buildConfig.buildType,
139
+ buildCommand: buildConfig.buildCommand,
140
+ showInfo: showInfo,
141
+ color: !options.color,
142
+ showTiming: !options.timing,
143
+ watch: options.watch,
144
+ delay: parseInt(options.delay),
145
+ verbose: options.verbose,
146
+ clean: options.clean,
147
+ sourceMap: options.sourceMap,
148
+ target: options.target,
149
+ module: options.module,
150
+ parallel: false,
151
+ groupOutput: false,
152
+ isServerMode: false,
153
+ printOutput: true,
154
+ prefix: true,
155
+ stopOnError: false,
156
+ minimalOutput: false
157
+ });
140
158
  // Setup ignore patterns for watch mode
141
159
  const ignorePatterns = options.ignore || [
142
160
  'node_modules/**',
@@ -168,36 +186,18 @@ function addBuildCommands(program) {
168
186
  console.log(chalk_1.default.green(`${figures_1.default.tick} neex build: Starting build process...`));
169
187
  console.log(chalk_1.default.gray(`${'='.repeat(60)}`));
170
188
  }
171
- // Create BuildManager instance
172
- buildManager = new build_manager_js_1.BuildManager({
173
- runnerName: 'neex build',
174
- inputFile: file,
175
- outputDir: options.output,
176
- buildType: buildConfig.buildType,
177
- buildCommand: buildConfig.buildCommand,
178
- color: options.color,
179
- showTiming: options.timing,
180
- prefix: options.prefix,
181
- stopOnError: options.stopOnError,
182
- printOutput: true,
183
- minimalOutput: options.minimal,
184
- watch: options.watch,
185
- ignore: ignorePatterns,
186
- delay: options.delay || 1000,
187
- verbose: options.verbose,
188
- showInfo: showInfo,
189
- clean: options.clean,
190
- sourceMap: options.sourceMap,
191
- target: options.target,
192
- module: options.module,
193
- parallel: false,
194
- groupOutput: false,
195
- isServerMode: false
196
- });
197
189
  // Start the build process
198
190
  try {
191
+ if (showInfo) {
192
+ console.log(chalk_1.default.blue(`${figures_1.default.info} neex build: Analyzing ${chalk_1.default.cyan(path.basename(file))}`));
193
+ }
199
194
  await buildManager.start();
200
- console.log(chalk_1.default.green(`${figures_1.default.tick} Build completed successfully`));
195
+ if (showInfo) {
196
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Build completed successfully`));
197
+ }
198
+ else {
199
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Build completed`));
200
+ }
201
201
  }
202
202
  catch (error) {
203
203
  console.error(chalk_1.default.red(`${figures_1.default.cross} Build failed`));
@@ -111,10 +111,11 @@ function addStartCommands(program) {
111
111
  .option('--instances <num>', 'Number of cluster instances', '1')
112
112
  .option('--memory <mb>', 'Memory limit (MB)', '0')
113
113
  .option('--cpu <percent>', 'CPU limit (%)', '0')
114
+ .option('--info', 'Show detailed start information')
114
115
  .action(async (file, options) => {
115
116
  try {
116
117
  // Get start command configuration
117
- const startConfig = await getStartCommand(file, true);
118
+ const startConfig = await getStartCommand(file, options.info);
118
119
  // Create StartManager instance
119
120
  const startManager = new start_manager_js_1.StartManager({
120
121
  runnerName: 'neex start',
@@ -123,7 +124,7 @@ function addStartCommands(program) {
123
124
  processName: startConfig.processName,
124
125
  runtime: startConfig.runtime,
125
126
  environment: options.environment,
126
- showInfo: true,
127
+ showInfo: options.info,
127
128
  color: !options.color,
128
129
  showTiming: !options.timing,
129
130
  watch: options.watch,
@@ -142,8 +143,26 @@ function addStartCommands(program) {
142
143
  isServerMode: true
143
144
  });
144
145
  // Start the application
145
- await startManager.start();
146
- console.log(chalk_1.default.green(`${figures_1.default.tick} Application started successfully`));
146
+ try {
147
+ if (options.info) {
148
+ console.log(chalk_1.default.blue(`${figures_1.default.info} neex start: Analyzing ${chalk_1.default.cyan(path.basename(file))}`));
149
+ console.log(chalk_1.default.green(`${figures_1.default.tick} neex start: ${startConfig.runtime} detected, using ${startConfig.runtime} runtime`));
150
+ }
151
+ await startManager.start();
152
+ if (options.info) {
153
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Application started successfully`));
154
+ }
155
+ else {
156
+ console.log(chalk_1.default.green(`${figures_1.default.tick} Application started`));
157
+ }
158
+ }
159
+ catch (error) {
160
+ console.error(chalk_1.default.red(`${figures_1.default.cross} Failed to start application`));
161
+ if (error instanceof Error) {
162
+ console.error(chalk_1.default.red(`Error: ${error.message}`));
163
+ }
164
+ process.exit(1);
165
+ }
147
166
  }
148
167
  catch (error) {
149
168
  console.error(chalk_1.default.red(`${figures_1.default.cross} Failed to start application`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neex",
3
- "version": "0.6.21",
3
+ "version": "0.6.22",
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",