genbox 1.0.85 → 1.0.87

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.
@@ -391,21 +391,24 @@ exports.statusCommand = new commander_1.Command('status')
391
391
  sshAvailable = true;
392
392
  // Check if cloud-init is still running
393
393
  if (status.includes('running')) {
394
- // Get timing breakdown
395
- const timing = getTimingBreakdown(target.ipAddress, keyPath);
396
- if (timing.total !== null) {
397
- console.log(chalk_1.default.yellow(`[INFO] Setup in progress... (elapsed: ${formatDuration(timing.total)})`));
398
- }
399
- else {
400
- console.log(chalk_1.default.yellow('[INFO] Setup in progress...'));
401
- }
394
+ // Calculate total elapsed from genbox creation time (DB timestamp)
395
+ const createdAt = target.createdAt;
396
+ const totalElapsedSecs = createdAt
397
+ ? Math.floor((Date.now() - new Date(createdAt).getTime()) / 1000)
398
+ : Math.floor((Date.now() - startTime) / 1000); // Fallback to CLI start time
399
+ console.log(chalk_1.default.yellow(`[INFO] Setup in progress... (elapsed: ${formatDuration(totalElapsedSecs)})`));
402
400
  console.log('');
403
- // Show timing breakdown so far
404
- if (timing.sshReady !== null) {
405
- console.log(chalk_1.default.blue('[INFO] === Timing So Far ==='));
406
- console.log(` SSH Ready: ${formatDuration(timing.sshReady)}`);
401
+ // Show timing breakdown
402
+ const timing = getTimingBreakdown(target.ipAddress, keyPath);
403
+ if (timing.total !== null || createdAt) {
404
+ console.log(chalk_1.default.blue('[INFO] === Timing Breakdown ==='));
405
+ // Provisioning time = total elapsed - server uptime
406
+ if (timing.total !== null && createdAt) {
407
+ const provisioningSecs = Math.max(0, totalElapsedSecs - timing.total);
408
+ console.log(` Provisioning: ${formatDuration(provisioningSecs)} (before boot)`);
409
+ }
407
410
  if (timing.total !== null) {
408
- console.log(` Elapsed: ${formatDuration(timing.total)}`);
411
+ console.log(` Server Uptime: ${formatDuration(timing.total)}`);
409
412
  }
410
413
  console.log('');
411
414
  }
@@ -487,21 +490,29 @@ exports.statusCommand = new commander_1.Command('status')
487
490
  }
488
491
  // Cloud-init still running
489
492
  if (status.includes('running')) {
490
- // Get timing breakdown
493
+ // Calculate total elapsed from genbox creation time (DB timestamp)
494
+ const createdAt = target.createdAt;
491
495
  const timing = getTimingBreakdown(target.ipAddress, keyPath);
492
- if (timing.total !== null) {
493
- console.log(chalk_1.default.yellow(`[INFO] Setup in progress... (elapsed: ${formatDuration(timing.total)})`));
496
+ const totalElapsedSecs = createdAt
497
+ ? Math.floor((Date.now() - new Date(createdAt).getTime()) / 1000)
498
+ : timing.total; // Fallback to server uptime
499
+ if (totalElapsedSecs !== null) {
500
+ console.log(chalk_1.default.yellow(`[INFO] Setup in progress... (elapsed: ${formatDuration(totalElapsedSecs)})`));
494
501
  }
495
502
  else {
496
503
  console.log(chalk_1.default.yellow('[INFO] Setup in progress...'));
497
504
  }
498
505
  console.log('');
499
- // Show timing breakdown so far
500
- if (timing.sshReady !== null) {
501
- console.log(chalk_1.default.blue('[INFO] === Timing So Far ==='));
502
- console.log(` SSH Ready: ${formatDuration(timing.sshReady)}`);
506
+ // Show timing breakdown
507
+ if (timing.total !== null || createdAt) {
508
+ console.log(chalk_1.default.blue('[INFO] === Timing Breakdown ==='));
509
+ // Provisioning time = total elapsed - server uptime
510
+ if (timing.total !== null && totalElapsedSecs !== null) {
511
+ const provisioningSecs = Math.max(0, totalElapsedSecs - timing.total);
512
+ console.log(` Provisioning: ${formatDuration(provisioningSecs)} (before boot)`);
513
+ }
503
514
  if (timing.total !== null) {
504
- console.log(` Elapsed: ${formatDuration(timing.total)}`);
515
+ console.log(` Server Uptime: ${formatDuration(timing.total)}`);
505
516
  }
506
517
  console.log('');
507
518
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.85",
3
+ "version": "1.0.87",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {