viza 1.9.7 → 1.9.10

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(3, " "));
185
+ const ln = chalk.gray(String(displayIdx++).padStart(5, " "));
186
186
  console.log(`${ln} `);
187
187
  continue;
188
188
  }
@@ -200,7 +200,10 @@ export function parseAndPrintDeployLog(zipBuffer) {
200
200
  const ln = chalk.gray(String(displayIdx++).padStart(5, " "));
201
201
  if (inGroup) {
202
202
  // Inside a group block — indent and highlight commands
203
- if (/^Run /.test(line)) {
203
+ if (/##\[error\]/i.test(line)) {
204
+ console.log(`${ln} ${chalk.bgRed.redBright(line)}`);
205
+ }
206
+ else if (/^Run /.test(line)) {
204
207
  console.log(`${ln} ${chalk.blue(line)}`);
205
208
  }
206
209
  else if (/^\[ERROR\]/.test(line)) {
@@ -216,7 +219,7 @@ export function parseAndPrintDeployLog(zipBuffer) {
216
219
  }
217
220
  // Normal (non-group) line
218
221
  if (/##\[error\]/i.test(line)) {
219
- console.log(`${ln} ${chalk.redBright(line)}`);
222
+ console.log(`${ln} ${chalk.bgRed.redBright(line)}`);
220
223
  }
221
224
  else if (/^Run /.test(line)) {
222
225
  console.log(`${ln} ${chalk.blueBright(line)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viza",
3
- "version": "1.9.7",
3
+ "version": "1.9.10",
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": "^5.9.3"
40
+ "typescript": "^6.0.2"
41
41
  }
42
42
  }