genbox 1.0.95 → 1.0.97

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.
@@ -446,16 +446,30 @@ exports.statusCommand = new commander_1.Command('status')
446
446
  console.log(chalk_1.default.green('[SUCCESS] Setup completed!'));
447
447
  const finalTiming = getTimingBreakdown(target.ipAddress, keyPath);
448
448
  displayTimingBreakdown(finalTiming);
449
+ // Show URLs if available
450
+ if (target.urls && Object.keys(target.urls).length > 0) {
451
+ console.log(chalk_1.default.blue('[INFO] === Service URLs ==='));
452
+ for (const [service, url] of Object.entries(target.urls)) {
453
+ console.log(` ${service}: ${chalk_1.default.cyan(url)}`);
454
+ }
455
+ console.log('');
456
+ }
457
+ console.log(chalk_1.default.dim('Run `gb connect` to SSH into the genbox.'));
458
+ process.exit(0);
449
459
  }
450
460
  else if (finalStatus.includes('error')) {
451
461
  console.log(chalk_1.default.red('[ERROR] Setup encountered an error!'));
452
462
  console.log(chalk_1.default.dim(' Run `gb connect` to investigate.'));
463
+ process.exit(1);
453
464
  }
454
465
  else if (finalStatus.includes('running')) {
455
466
  console.log(chalk_1.default.yellow('[INFO] Setup still in progress...'));
467
+ console.log(chalk_1.default.dim(' Run `gb status -w` again to continue watching.'));
468
+ process.exit(0);
456
469
  }
457
470
  else {
458
471
  console.log(chalk_1.default.yellow(`[INFO] Final status: ${finalStatus}`));
472
+ process.exit(0);
459
473
  }
460
474
  }
461
475
  }
@@ -66,6 +66,8 @@ class ProjectScanner {
66
66
  const apps = await this.discoverApps(root, structure, compose, options.exclude);
67
67
  // Layer 5.5: Apply framework detection to apps (ports, commands, etc.)
68
68
  await this.applyFrameworkDefaults(root, apps, frameworks);
69
+ // Layer 5.6: Ensure unique ports for all apps (avoid collisions)
70
+ this.ensureUniquePorts(apps);
69
71
  // Layer 6: Analyze environment variables (skip if option set)
70
72
  const envAnalysis = options.skipEnv
71
73
  ? { required: [], optional: [], secrets: [], references: [], sources: [] }
@@ -382,6 +384,28 @@ class ProjectScanner {
382
384
  }
383
385
  }
384
386
  }
387
+ /**
388
+ * Ensure all apps have unique ports.
389
+ * When multiple apps have the same port, increment subsequent ones.
390
+ */
391
+ ensureUniquePorts(apps) {
392
+ const usedPorts = new Set();
393
+ for (const app of apps) {
394
+ // Skip libraries and apps without ports
395
+ if (app.type === 'library' || !app.port)
396
+ continue;
397
+ let port = app.port;
398
+ // If port is already used, find the next available one
399
+ while (usedPorts.has(port)) {
400
+ port++;
401
+ }
402
+ // Update app port if it changed
403
+ if (port !== app.port) {
404
+ app.port = port;
405
+ }
406
+ usedPorts.add(port);
407
+ }
408
+ }
385
409
  async detectGit(root) {
386
410
  const { execSync } = require('child_process');
387
411
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.95",
3
+ "version": "1.0.97",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {