augteam 1.1.2 → 1.1.3
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/package.json +1 -1
- package/src/commands/status.js +2 -2
package/package.json
CHANGED
package/src/commands/status.js
CHANGED
|
@@ -20,7 +20,7 @@ async function statusCommand() {
|
|
|
20
20
|
if (data.current.creditTotal) {
|
|
21
21
|
const remaining = data.current.creditRemaining || 0;
|
|
22
22
|
const total = data.current.creditTotal;
|
|
23
|
-
const used = total - remaining;
|
|
23
|
+
const used = Math.round(total - remaining);
|
|
24
24
|
const pct = Math.round((used / total) * 100);
|
|
25
25
|
const barWidth = 30;
|
|
26
26
|
const filled = Math.round((pct / 100) * barWidth);
|
|
@@ -29,7 +29,7 @@ async function statusCommand() {
|
|
|
29
29
|
const reset = "\x1b[0m";
|
|
30
30
|
const bar = `${color}${"█".repeat(filled)}${"\x1b[90m"}${"░".repeat(empty)}${reset}`;
|
|
31
31
|
console.log(
|
|
32
|
-
` Credit: ${
|
|
32
|
+
` Credit: ${used.toLocaleString()} / ${total.toLocaleString()} (${pct}%)`,
|
|
33
33
|
);
|
|
34
34
|
console.log(
|
|
35
35
|
` ${bar} ${color}${pct}% used${reset}`,
|