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.
- package/dist/src/commands/age/bootstrap/bootstrap.js +2 -2
- package/dist/src/commands/dispatch/logs/logs.js +1 -1
- package/dist/src/commands/dispatch/runs/show-runs.js +2 -2
- package/dist/src/commands/github/secrets/backup/backup.js +2 -2
- package/dist/src/commands/infra/deploy/command-hub/command-hub.js +1 -1
- package/dist/src/context/hubIntent.js +5 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnv } from "../../../context/env.js";
|
|
2
|
-
import {
|
|
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 =
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnv } from "../../../../context/env.js";
|
|
2
|
-
import {
|
|
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 =
|
|
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":
|