genbox 1.0.76 → 1.0.77
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/status.js +2 -2
- package/package.json +1 -1
package/dist/commands/status.js
CHANGED
|
@@ -308,11 +308,11 @@ exports.statusCommand = new commander_1.Command('status')
|
|
|
308
308
|
console.log(` Last activity: ${minutesInactive < 1 ? 'just now' : minutesInactive + ' min ago'}`);
|
|
309
309
|
console.log(` Total: ${billing.totalHoursUsed} hour${billing.totalHoursUsed !== 1 ? 's' : ''}, ${billing.totalCreditsUsed} credit${billing.totalCreditsUsed !== 1 ? 's' : ''}`);
|
|
310
310
|
if (billing.autoDestroyOnInactivity && billing.currentHourEnd) {
|
|
311
|
-
// Auto-destroy happens at 58 min mark into billing hour
|
|
311
|
+
// Auto-destroy happens at 58 min mark into billing hour if no activity after 50 min mark
|
|
312
312
|
const currentHourEnd = new Date(billing.currentHourEnd);
|
|
313
313
|
const currentHourStart = new Date(currentHourEnd.getTime() - 60 * 60 * 1000);
|
|
314
314
|
const minutesIntoBillingHour = Math.floor((now.getTime() - currentHourStart.getTime()) / (60 * 1000));
|
|
315
|
-
const minutesUntilDestroy = Math.max(0,
|
|
315
|
+
const minutesUntilDestroy = Math.max(0, 58 - minutesIntoBillingHour);
|
|
316
316
|
if (minutesInactive >= 5) {
|
|
317
317
|
console.log(chalk_1.default.yellow(` Auto-destroy in: ${minutesUntilDestroy} min (inactive)`));
|
|
318
318
|
}
|