viza 1.9.5 → 1.9.7
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.
|
@@ -7,8 +7,7 @@ function formatDateTime(iso) {
|
|
|
7
7
|
const dd = String(d.getDate()).padStart(2, "0");
|
|
8
8
|
const hh = String(d.getHours()).padStart(2, "0");
|
|
9
9
|
const mi = String(d.getMinutes()).padStart(2, "0");
|
|
10
|
-
|
|
11
|
-
return `${yyyy}-${mm}-${dd} ${hh}:${mi}:${ss}`;
|
|
10
|
+
return `${yyyy}-${mm}-${dd} ${hh}:${mi}`;
|
|
12
11
|
}
|
|
13
12
|
function formatAge(iso) {
|
|
14
13
|
const diff = Date.now() - new Date(iso).getTime();
|
|
@@ -61,13 +60,20 @@ export async function showDispatchRuns(result) {
|
|
|
61
60
|
pad("STATUS", 18),
|
|
62
61
|
pad("CONCLUSION", 15),
|
|
63
62
|
pad("COMMITTER", 18),
|
|
64
|
-
pad("CREATED_AT",
|
|
65
|
-
pad("AGE",
|
|
66
|
-
pad("DURATION",
|
|
63
|
+
pad("CREATED_AT", 22),
|
|
64
|
+
pad("AGE", 13),
|
|
65
|
+
pad("DURATION", 13),
|
|
67
66
|
"ATTEMPT",
|
|
68
67
|
].join(" ");
|
|
69
68
|
console.log(header);
|
|
70
69
|
console.log("─".repeat(131));
|
|
70
|
+
if (runs.length === 0) {
|
|
71
|
+
const emptyRow = chalk.gray(" (no dispatch runs found)");
|
|
72
|
+
console.log(emptyRow);
|
|
73
|
+
console.log("─".repeat(131));
|
|
74
|
+
console.log();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
71
77
|
for (const run of runs) {
|
|
72
78
|
let status;
|
|
73
79
|
let conclusion;
|
|
@@ -113,9 +119,9 @@ export async function showDispatchRuns(result) {
|
|
|
113
119
|
pad(status, 18),
|
|
114
120
|
pad(conclusion, 14),
|
|
115
121
|
pad(committer, 18),
|
|
116
|
-
pad(formatDateTime(run.createdAt),
|
|
117
|
-
pad(age,
|
|
118
|
-
pad(duration,
|
|
122
|
+
pad(formatDateTime(run.createdAt), 22),
|
|
123
|
+
pad(age, 13),
|
|
124
|
+
pad(duration, 13),
|
|
119
125
|
`#${run.attempt}`,
|
|
120
126
|
].join(" ");
|
|
121
127
|
console.log(row);
|
|
@@ -134,6 +140,9 @@ export async function showDispatchRuns(result) {
|
|
|
134
140
|
console.log();
|
|
135
141
|
console.log("💡 " + "\x1b[1mQuick Hint\x1b[0m");
|
|
136
142
|
console.log();
|
|
143
|
+
console.log(chalk.gray(" 👉 To quickly list fewer runs, use --limit:"));
|
|
144
|
+
console.log(` ${renderCommandInline(`${bin} dispatch runs --limit <n>`)}`);
|
|
145
|
+
console.log();
|
|
137
146
|
console.log(chalk.gray(" 👉 To view detailed logs for a specific run, use:"));
|
|
138
147
|
console.log(` ${renderCommandInline(`${bin} dispatch logs <runId>`)}`);
|
|
139
148
|
console.log();
|
package/dist/src/ui/banner.js
CHANGED
|
@@ -12,7 +12,7 @@ function pickBannerConfig(env) {
|
|
|
12
12
|
return cfg;
|
|
13
13
|
return {
|
|
14
14
|
title: `Viza CLI`,
|
|
15
|
-
color: "
|
|
15
|
+
color: "gray"
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
@@ -43,7 +43,7 @@ export function showDispatchBanner(input, meta, status) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
export function showBanner(opts) {
|
|
46
|
-
const { title, commandType, status, color = "
|
|
46
|
+
const { title, commandType, status, color = "gray", intent, runner, meta } = opts;
|
|
47
47
|
process.stdout.write("\u001b[2J\u001b[3J\u001b[H");
|
|
48
48
|
const font = opts.env === "prod"
|
|
49
49
|
? "Ogre"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viza",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Viza unified command line interface",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"release:full": "rm -rf dist && npx npm-check-updates -u && npm install && git add package.json package-lock.json && git commit -m 'chore(deps): auto update dependencies before release' || echo 'No changes' && node versioning.js && npm login && npm publish --tag latest --access public && git push"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@vizamodo/viza-dispatcher": "^1.5.
|
|
25
|
+
"@vizamodo/viza-dispatcher": "^1.5.46",
|
|
26
26
|
"adm-zip": "^0.5.16",
|
|
27
27
|
"chalk": "^5.6.2",
|
|
28
28
|
"clipboardy": "^5.3.1",
|