viza 1.9.7 → 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.
|
@@ -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);
|
|
@@ -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
|
}
|