viza 1.9.31 ā 1.9.33
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.
|
@@ -13,7 +13,7 @@ export async function showDispatchRuns(result) {
|
|
|
13
13
|
throw new Error("invalid_dispatch_runs_result_shape");
|
|
14
14
|
}
|
|
15
15
|
console.log("\nš Dispatch Runs");
|
|
16
|
-
console.log("ā".repeat(131));
|
|
16
|
+
console.log(chalk.gray("ā".repeat(131)));
|
|
17
17
|
const header = [
|
|
18
18
|
pad("RUN", 15),
|
|
19
19
|
pad("STATUS", 18),
|
|
@@ -25,11 +25,11 @@ export async function showDispatchRuns(result) {
|
|
|
25
25
|
"ATTEMPT",
|
|
26
26
|
].join(" ");
|
|
27
27
|
console.log(header);
|
|
28
|
-
console.log("ā".repeat(131));
|
|
28
|
+
console.log(chalk.gray("ā".repeat(131)));
|
|
29
29
|
if (runs.length === 0) {
|
|
30
30
|
const emptyRow = chalk.gray(" (no dispatch runs found)");
|
|
31
31
|
console.log(emptyRow);
|
|
32
|
-
console.log("ā".repeat(131));
|
|
32
|
+
console.log(chalk.gray("ā".repeat(131)));
|
|
33
33
|
console.log();
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
@@ -85,7 +85,7 @@ export async function showDispatchRuns(result) {
|
|
|
85
85
|
].join(" ");
|
|
86
86
|
console.log(row);
|
|
87
87
|
}
|
|
88
|
-
console.log("ā".repeat(131));
|
|
88
|
+
console.log(chalk.gray("ā".repeat(131)));
|
|
89
89
|
console.log();
|
|
90
90
|
// Hint section
|
|
91
91
|
if (runs.length > 0) {
|
|
@@ -14,7 +14,7 @@ export async function showRuntimeUsage(result) {
|
|
|
14
14
|
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
15
15
|
if (data?.usage) {
|
|
16
16
|
console.log("\nš Usage by Month");
|
|
17
|
-
console.log("ā".repeat(120));
|
|
17
|
+
console.log(chalk.gray("ā".repeat(120)));
|
|
18
18
|
const usage = [...data.usage].sort((a, b) => a.month.localeCompare(b.month));
|
|
19
19
|
const latest = usage[usage.length - 1];
|
|
20
20
|
// Header row (months)
|
|
@@ -24,19 +24,19 @@ export async function showRuntimeUsage(result) {
|
|
|
24
24
|
const values = usage.map((m) => {
|
|
25
25
|
const val = `${m.totalMinutes} min`;
|
|
26
26
|
if (m.month === latest?.month) {
|
|
27
|
-
return chalk.bold.
|
|
27
|
+
return chalk.bold.white(pad(val, 24));
|
|
28
28
|
}
|
|
29
29
|
return pad(val, 24);
|
|
30
30
|
}).join("");
|
|
31
31
|
console.log(values);
|
|
32
|
-
console.log("ā".repeat(120));
|
|
32
|
+
console.log(chalk.gray("ā".repeat(120)));
|
|
33
33
|
}
|
|
34
34
|
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
35
35
|
// 1.1 Usage by OS (separate view)
|
|
36
36
|
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
37
37
|
if (data?.usage && data.usage.some((m) => Array.isArray(m.byOS))) {
|
|
38
38
|
console.log("\nš„ļø Usage by OS");
|
|
39
|
-
console.log("ā".repeat(60));
|
|
39
|
+
console.log(chalk.gray("ā".repeat(60)));
|
|
40
40
|
const usage = [...data.usage].sort((a, b) => a.month.localeCompare(b.month));
|
|
41
41
|
const latest = usage[usage.length - 1];
|
|
42
42
|
for (const osName of ["linux", "windows", "macos"]) {
|
|
@@ -46,7 +46,7 @@ export async function showRuntimeUsage(result) {
|
|
|
46
46
|
return null;
|
|
47
47
|
const text = `${m.month}: ${os.minutes} min`;
|
|
48
48
|
if (m.month === latest?.month) {
|
|
49
|
-
return chalk.bold.
|
|
49
|
+
return chalk.bold.white(text);
|
|
50
50
|
}
|
|
51
51
|
return chalk.gray(text);
|
|
52
52
|
}).filter(Boolean);
|
|
@@ -58,14 +58,14 @@ export async function showRuntimeUsage(result) {
|
|
|
58
58
|
}
|
|
59
59
|
console.log();
|
|
60
60
|
}
|
|
61
|
-
console.log("ā".repeat(60));
|
|
61
|
+
console.log(chalk.gray("ā".repeat(60)));
|
|
62
62
|
}
|
|
63
63
|
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
64
64
|
// 2. Render usage by org + month (horizontal)
|
|
65
65
|
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
66
66
|
if (data?.byOrg) {
|
|
67
67
|
console.log("\nš¢ Usage by Organization");
|
|
68
|
-
console.log("ā".repeat(120));
|
|
68
|
+
console.log(chalk.gray("ā".repeat(120)));
|
|
69
69
|
for (const org of data.byOrg) {
|
|
70
70
|
console.log(`\n${chalk.bold(org.org)}`);
|
|
71
71
|
const months = [...(org.months || [])].sort((a, b) => a.month.localeCompare(b.month));
|
|
@@ -75,13 +75,13 @@ export async function showRuntimeUsage(result) {
|
|
|
75
75
|
const values = months.map((m) => {
|
|
76
76
|
const val = `${m.totalMinutes} min`;
|
|
77
77
|
if (m.month === latest?.month) {
|
|
78
|
-
return chalk.bold.
|
|
78
|
+
return chalk.bold.magentaBright(pad(val, 24));
|
|
79
79
|
}
|
|
80
80
|
return pad(val, 24);
|
|
81
81
|
}).join("");
|
|
82
82
|
console.log(values);
|
|
83
83
|
}
|
|
84
|
-
console.log("ā".repeat(120));
|
|
84
|
+
console.log(chalk.gray("ā".repeat(120)));
|
|
85
85
|
}
|
|
86
86
|
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
87
87
|
// 4. Raw hint (optional)
|