genbox 1.0.105 → 1.0.106

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.
@@ -60,25 +60,31 @@ exports.listCommand = new commander_1.Command('list')
60
60
  // Show project info when listing all
61
61
  const projectSuffix = options.all && genbox.project ? ` [${genbox.project}]` : '';
62
62
  const nameWithProject = genbox.name + projectSuffix;
63
- // Format end hour as relative time
63
+ // Format end hour as relative time (destroy happens at 58 min mark, not 60)
64
64
  let endHourInfo = '';
65
65
  if (genbox.currentHourEnd && genbox.status === 'running') {
66
66
  const endTime = new Date(genbox.currentHourEnd);
67
67
  const now = new Date();
68
- const diffMs = endTime.getTime() - now.getTime();
68
+ // Subtract 2 minutes since auto-destroy happens at 58 min mark
69
+ const destroyTime = endTime.getTime() - (2 * 60 * 1000);
70
+ const diffMs = destroyTime - now.getTime();
69
71
  if (diffMs > 0) {
70
72
  const totalSeconds = Math.floor(diffMs / 1000);
71
73
  const mins = Math.floor(totalSeconds / 60);
72
74
  const secs = totalSeconds % 60;
73
- if (mins > 0) {
74
- endHourInfo = ` hour ends in ${mins}m:${secs.toString().padStart(2, '0')}s`;
75
+ const timeStr = mins > 0
76
+ ? `${mins}m:${secs.toString().padStart(2, '0')}s`
77
+ : `${secs}s`;
78
+ // Red color if less than 5 minutes
79
+ if (mins < 5) {
80
+ endHourInfo = chalk_1.default.red(` hour ends in ${timeStr}`);
75
81
  }
76
82
  else {
77
- endHourInfo = ` hour ends in ${secs}s`;
83
+ endHourInfo = chalk_1.default.dim(` hour ends in ${timeStr}`);
78
84
  }
79
85
  }
80
86
  else {
81
- endHourInfo = ' hour renewing...';
87
+ endHourInfo = chalk_1.default.red(' hour ending...');
82
88
  }
83
89
  }
84
90
  // Show auto-destroy status
@@ -105,7 +111,7 @@ exports.listCommand = new commander_1.Command('list')
105
111
  const statusPart = statusColor(genbox.status.padEnd(statusWidth));
106
112
  const ipPart = chalk_1.default.dim((genbox.ipAddress || 'Pending IP').padEnd(ipWidth));
107
113
  const sizePart = `(${genbox.size})`.padEnd(sizeWidth);
108
- const extraInfo = chalk_1.default.dim(endHourInfo) + protectedInfo;
114
+ const extraInfo = endHourInfo + protectedInfo;
109
115
  console.log(`${namePart} ${statusPart} ${ipPart} ${sizePart}${extraInfo}`);
110
116
  });
111
117
  console.log(chalk_1.default.dim('────────────────────────────────────────────────────'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.105",
3
+ "version": "1.0.106",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {