viza 1.8.44 → 1.8.46

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.
@@ -1,5 +1,5 @@
1
1
  import { getEnv } from "../../../context/env.js";
2
- import { resolvePrivateHubIntent } from "../../../context/hubIntent.js";
2
+ import { RESOURCE_HUB_INTENT_BY_ENV } from "../../../context/hubIntent.js";
3
3
  import { dispatchIntentAndWait } from "../../../core/dispatch.js";
4
4
  import { policy } from "./policy.js";
5
5
  /**
@@ -15,7 +15,7 @@ import { policy } from "./policy.js";
15
15
  export async function bootstrapAgeCommand(options) {
16
16
  // 1) Resolve environment
17
17
  const env = getEnv();
18
- const intent = resolvePrivateHubIntent();
18
+ const intent = RESOURCE_HUB_INTENT_BY_ENV;
19
19
  // Resolve allowed teams
20
20
  // - Dispatch mode: restrict by targetEnv
21
21
  // - Status mode: allow union of all env teams (read-only query)
@@ -13,7 +13,7 @@ import { policy } from "./policy.js";
13
13
  export async function logsCommand(runId, options) {
14
14
  // 1️⃣ Resolve environment
15
15
  const env = getEnv();
16
- const intent = resolveHubIntent();
16
+ const intent = resolveHubIntent(false);
17
17
  // Resolve allowed teams (same contract as other commands)
18
18
  const allowedTeams = Array.from(policy.byEnv[env]);
19
19
  // 3️⃣ Dispatch intent to hub
@@ -94,8 +94,8 @@ export async function showDispatchRuns(result) {
94
94
  }
95
95
  }
96
96
  else if (run.status === "in_progress") {
97
- status = "🟡 in_progress";
98
- conclusion = "-";
97
+ status = " in progress";
98
+ conclusion = "...";
99
99
  }
100
100
  else {
101
101
  status = "⏳ queued";
@@ -1,5 +1,5 @@
1
1
  import { getEnv } from "../../../../context/env.js";
2
- import { resolvePrivateHubIntent } from "../../../../context/hubIntent.js";
2
+ import { RESOURCE_HUB_INTENT_BY_ENV } from "../../../../context/hubIntent.js";
3
3
  import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
4
4
  import { policy } from "./policy.js";
5
5
  /**
@@ -15,7 +15,7 @@ import { policy } from "./policy.js";
15
15
  export async function backupGithubSecretsCommand(options) {
16
16
  // 1) Resolve environment
17
17
  const env = getEnv();
18
- const intent = resolvePrivateHubIntent();
18
+ const intent = RESOURCE_HUB_INTENT_BY_ENV;
19
19
  // Resolve allowed teams
20
20
  // - Dispatch mode: restrict by targetEnv
21
21
  // - Status mode: allow union of all env teams (read-only query)
@@ -15,7 +15,7 @@ import { policy } from "./policy.js";
15
15
  export async function deployCommandHubCommand(options) {
16
16
  // 1) Resolve environment from global CLI context
17
17
  const env = getEnv();
18
- const intent = resolveHubIntent();
18
+ const intent = resolveHubIntent(options.selfHosted === true);
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]);
@@ -9,7 +9,7 @@ export function getRunner() {
9
9
  /**
10
10
  * Deploy infrastructure resources (hub layer)
11
11
  */
12
- const RESOURCE_HUB_INTENT_BY_ENV = "hub";
12
+ export const RESOURCE_HUB_INTENT_BY_ENV = "hub";
13
13
  /**
14
14
  * Deploy infrastructure resources (deployer reserved layer)
15
15
  */
@@ -23,7 +23,10 @@ const RESOURCE_BUILDER_INTENT_BY_ENV = "builder";
23
23
  * Single intent for both dev and prod (env derived at gateway)
24
24
  */
25
25
  const RUNTIME_HUB_INTENT = "hub-worker";
26
- export function resolveHubIntent() {
26
+ export function resolveHubIntent(selfHosted) {
27
+ if (selfHosted) {
28
+ return RESOURCE_HUB_INTENT_BY_ENV;
29
+ }
27
30
  const r = currentRunner;
28
31
  switch (r) {
29
32
  case "builder":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viza",
3
- "version": "1.8.44",
3
+ "version": "1.8.46",
4
4
  "type": "module",
5
5
  "description": "Viza unified command line interface",
6
6
  "bin": {