viza 1.9.6 → 1.9.9
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/src/commands/dispatch/runs/show-runs.js +10 -0
- package/dist/src/commands/infra/deploy/command-hub/command-hub.js +15 -1
- package/dist/src/commands/infra/deploy/command-hub/descriptor.js +14 -0
- package/dist/src/ui/banner.js +2 -2
- package/dist/src/ui/infraLogRenderer.js +1 -1
- package/package.json +2 -2
|
@@ -67,6 +67,13 @@ export async function showDispatchRuns(result) {
|
|
|
67
67
|
].join(" ");
|
|
68
68
|
console.log(header);
|
|
69
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
|
+
}
|
|
70
77
|
for (const run of runs) {
|
|
71
78
|
let status;
|
|
72
79
|
let conclusion;
|
|
@@ -133,6 +140,9 @@ export async function showDispatchRuns(result) {
|
|
|
133
140
|
console.log();
|
|
134
141
|
console.log("💡 " + "\x1b[1mQuick Hint\x1b[0m");
|
|
135
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();
|
|
136
146
|
console.log(chalk.gray(" 👉 To view detailed logs for a specific run, use:"));
|
|
137
147
|
console.log(` ${renderCommandInline(`${bin} dispatch logs <runId>`)}`);
|
|
138
148
|
console.log();
|
|
@@ -19,6 +19,18 @@ export async function deployCommandHubCommand(options) {
|
|
|
19
19
|
// Resolve allowed teams for the current environment only.
|
|
20
20
|
// CLI performs a fail-fast UX check but must still respect env boundaries.
|
|
21
21
|
const allowedTeams = Array.from(policy.byEnv[env]);
|
|
22
|
+
// Derive workerIntent from CLI flags (exactly one required)
|
|
23
|
+
const flags = [options.control, options.infra, options.biz].filter(Boolean);
|
|
24
|
+
if (flags.length !== 1) {
|
|
25
|
+
throw new Error("Must specify exactly one of --control | --infra | --biz");
|
|
26
|
+
}
|
|
27
|
+
let workerIntent;
|
|
28
|
+
if (options.control)
|
|
29
|
+
workerIntent = "control";
|
|
30
|
+
else if (options.infra)
|
|
31
|
+
workerIntent = "infra";
|
|
32
|
+
else
|
|
33
|
+
workerIntent = "biz";
|
|
22
34
|
// 5) Dispatch intent (freeze)
|
|
23
35
|
await dispatchIntentAndWait({
|
|
24
36
|
intent,
|
|
@@ -31,7 +43,9 @@ export async function deployCommandHubCommand(options) {
|
|
|
31
43
|
flowGates: {
|
|
32
44
|
secrets: true,
|
|
33
45
|
},
|
|
34
|
-
payload: {
|
|
46
|
+
payload: {
|
|
47
|
+
workerIntent
|
|
48
|
+
}
|
|
35
49
|
}, {
|
|
36
50
|
status: options.status === true,
|
|
37
51
|
log: "show",
|
|
@@ -3,6 +3,20 @@ import { deployCommandHubCommand } from "./command-hub.js";
|
|
|
3
3
|
const descriptor = {
|
|
4
4
|
command: "infra deploy command-hub",
|
|
5
5
|
description: "Deploy command hub worker to Cloudflare",
|
|
6
|
+
options: [
|
|
7
|
+
{
|
|
8
|
+
flags: "--control",
|
|
9
|
+
description: "Deploy control hub worker"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
flags: "--infra",
|
|
13
|
+
description: "Deploy infra hub worker"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
flags: "--biz",
|
|
17
|
+
description: "Deploy biz hub worker"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
6
20
|
run: deployCommandHubCommand
|
|
7
21
|
};
|
|
8
22
|
registerCommand(descriptor);
|
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"
|
|
@@ -182,7 +182,7 @@ export function parseAndPrintDeployLog(zipBuffer) {
|
|
|
182
182
|
.replace(RUNNER_TIMESTAMP_REGEX, "")
|
|
183
183
|
.replace(/\x1b\[[0-9;]*m/g, "");
|
|
184
184
|
if (!line.trim()) {
|
|
185
|
-
const ln = chalk.gray(String(displayIdx++).padStart(
|
|
185
|
+
const ln = chalk.gray(String(displayIdx++).padStart(5, " "));
|
|
186
186
|
console.log(`${ln} `);
|
|
187
187
|
continue;
|
|
188
188
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viza",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Viza unified command line interface",
|
|
6
6
|
"bin": {
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"@types/node": "^25.5.0",
|
|
38
38
|
"@types/prompts": "^2.4.9",
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
|
-
"typescript": "^
|
|
40
|
+
"typescript": "^6.0.2"
|
|
41
41
|
}
|
|
42
42
|
}
|