genbox 1.0.114 → 1.0.115
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/commands/list.js +19 -3
- package/package.json +1 -1
package/dist/commands/list.js
CHANGED
|
@@ -93,9 +93,15 @@ exports.listCommand = new commander_1.Command('list')
|
|
|
93
93
|
endHourInfo = chalk_1.default.red(' hour ending...');
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
// Show auto-destroy status
|
|
96
|
+
// Show auto-destroy status (not applicable for stopped/terminated)
|
|
97
97
|
let protectedInfo = '';
|
|
98
|
-
if (genbox.
|
|
98
|
+
if (genbox.status === 'stopped') {
|
|
99
|
+
protectedInfo = chalk_1.default.dim(' → gb start to resume');
|
|
100
|
+
}
|
|
101
|
+
else if (genbox.status === 'terminated') {
|
|
102
|
+
// No extra info for terminated
|
|
103
|
+
}
|
|
104
|
+
else if (genbox.autoDestroyOnInactivity === false) {
|
|
99
105
|
protectedInfo = chalk_1.default.yellow(' [protected]');
|
|
100
106
|
}
|
|
101
107
|
else if (genbox.protectedUntil) {
|
|
@@ -115,7 +121,17 @@ exports.listCommand = new commander_1.Command('list')
|
|
|
115
121
|
}
|
|
116
122
|
const namePart = chalk_1.default.cyan(nameWithProject.padEnd(nameWidth));
|
|
117
123
|
const statusPart = statusColor(genbox.status.padEnd(statusWidth));
|
|
118
|
-
|
|
124
|
+
// Show appropriate IP text based on status
|
|
125
|
+
let ipText = genbox.ipAddress || 'Pending IP';
|
|
126
|
+
if (!genbox.ipAddress) {
|
|
127
|
+
if (genbox.status === 'stopped') {
|
|
128
|
+
ipText = '(paused)';
|
|
129
|
+
}
|
|
130
|
+
else if (genbox.status === 'terminated') {
|
|
131
|
+
ipText = '-';
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const ipPart = chalk_1.default.dim(ipText.padEnd(ipWidth));
|
|
119
135
|
const sizePart = `(${genbox.size})`.padEnd(sizeWidth);
|
|
120
136
|
const extraInfo = endHourInfo + protectedInfo;
|
|
121
137
|
console.log(`${namePart} ${statusPart} ${ipPart} ${sizePart}${extraInfo}`);
|