viza 1.7.49 → 1.8.1
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/aws/rolesanywhere/bootstrap/bootstrap.js +2 -2
- package/dist/src/commands/aws/rolesanywhere/rebootstrap/rebootstrap.js +2 -2
- package/dist/src/commands/aws/rolesanywhere/rotate/rotate.js +2 -2
- package/dist/src/commands/aws/rolesanywhere/update-role/update-role.js +2 -2
- package/dist/src/commands/billing/login/aws/aws.js +2 -2
- package/dist/src/commands/dispatch/logs/logs.js +2 -2
- package/dist/src/commands/dispatch/runs/runs.js +2 -2
- package/dist/src/commands/github/secrets/backup/backup.js +2 -2
- package/dist/src/commands/github/secrets/restore/restore.js +2 -2
- package/dist/src/commands/infra/command-hub/command-hub.js +1 -1
- package/dist/src/commands/login/aws/aws.js +2 -2
- package/dist/src/context/hubIntent.js +9 -20
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
/**
|
|
5
5
|
* Target teams for `viza login aws`.
|
|
@@ -29,7 +29,7 @@ const TARGET_TEAMS = {
|
|
|
29
29
|
export async function bootstrapAgeCommand(options) {
|
|
30
30
|
// 1) Resolve environment
|
|
31
31
|
const env = resolveEnv(options);
|
|
32
|
-
const intent =
|
|
32
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
33
33
|
// Resolve allowed teams
|
|
34
34
|
// - Dispatch mode: restrict by targetEnv
|
|
35
35
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
/**
|
|
5
5
|
* Target teams for `viza aws rolesanywhere bootstrap`.
|
|
@@ -22,7 +22,7 @@ const TARGET_TEAMS = {
|
|
|
22
22
|
export async function bootstrapAwsRolesAnywhereCommand(options) {
|
|
23
23
|
// 1) Resolve environment
|
|
24
24
|
const env = resolveEnv(options);
|
|
25
|
-
const intent =
|
|
25
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
26
26
|
// 2) Resolve allowed teams (no status mode for bootstrap)
|
|
27
27
|
const allowedTeams = TARGET_TEAMS[env];
|
|
28
28
|
// 3) Dispatch intent (freeze)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
/**
|
|
5
5
|
* Target teams for `viza aws rolesanywhere bootstrap`.
|
|
@@ -26,7 +26,7 @@ const TARGET_TEAMS = {
|
|
|
26
26
|
export async function rebootstrapAwsRolesAnywhereCommand(options) {
|
|
27
27
|
// 1) Resolve environment
|
|
28
28
|
const env = resolveEnv(options);
|
|
29
|
-
const intent =
|
|
29
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
30
30
|
// 2) Resolve allowed teams (no status mode for bootstrap)
|
|
31
31
|
const allowedTeams = TARGET_TEAMS[env];
|
|
32
32
|
// 3) Dispatch intent (freeze)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
/**
|
|
5
5
|
* Target teams for `viza aws rolesanywhere rotate`.
|
|
@@ -29,7 +29,7 @@ const TARGET_TEAMS = {
|
|
|
29
29
|
export async function rotateAwsRolesAnywhereCommand(options) {
|
|
30
30
|
// 1) Resolve environment
|
|
31
31
|
const env = resolveEnv(options);
|
|
32
|
-
const intent =
|
|
32
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
33
33
|
// 2) Resolve allowed teams (no status mode for rotate)
|
|
34
34
|
const allowedTeams = TARGET_TEAMS[env];
|
|
35
35
|
// 3) Dispatch intent (freeze)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
/**
|
|
5
5
|
* Target teams for `viza aws rolesanywhere update-role`.
|
|
@@ -26,7 +26,7 @@ const TARGET_TEAMS = {
|
|
|
26
26
|
export async function updateAwsRolesAnywhereRoleCommand(options) {
|
|
27
27
|
// 1) Resolve environment
|
|
28
28
|
const env = resolveEnv(options);
|
|
29
|
-
const intent =
|
|
29
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
30
30
|
// 2) Resolve allowed teams (no status mode for rotate)
|
|
31
31
|
const allowedTeams = TARGET_TEAMS[env];
|
|
32
32
|
// 3) Dispatch intent (freeze)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RUNTIME_HUB_INTENT } from "../../../../context/hubIntent.js";
|
|
2
2
|
import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
|
|
3
3
|
import { showSsoLinkMenu } from "../../../../ui/sso/awsLoginMenu.js";
|
|
4
4
|
/**
|
|
@@ -23,7 +23,7 @@ const TARGET_TEAMS = [
|
|
|
23
23
|
*/
|
|
24
24
|
export async function loginBillingAwsCommand(options) {
|
|
25
25
|
// 1) Resolve environment
|
|
26
|
-
const intent =
|
|
26
|
+
const intent = RUNTIME_HUB_INTENT;
|
|
27
27
|
const allowedTeams = TARGET_TEAMS;
|
|
28
28
|
// 5) Dispatch intent (freeze)
|
|
29
29
|
const result = await dispatchIntentAndWait({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
const TARGET_TEAMS = {
|
|
5
5
|
"dev": [
|
|
@@ -26,7 +26,7 @@ const TARGET_TEAMS = {
|
|
|
26
26
|
export async function logsCommand(runId, options) {
|
|
27
27
|
// 1️⃣ Resolve environment
|
|
28
28
|
const env = resolveEnv(options);
|
|
29
|
-
const intent =
|
|
29
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
30
30
|
// Resolve allowed teams (same contract as other commands)
|
|
31
31
|
const allowedTeams = TARGET_TEAMS[env];
|
|
32
32
|
// 2️⃣ Handle --app locally (do NOT dispatch)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RUNTIME_HUB_INTENT } from "../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../core/dispatch.js";
|
|
4
4
|
import { showDispatchRuns } from "./show-runs.js";
|
|
5
5
|
const TARGET_TEAMS = {
|
|
@@ -27,7 +27,7 @@ const TARGET_TEAMS = {
|
|
|
27
27
|
export async function runsCommand(options) {
|
|
28
28
|
// 1️⃣ Resolve environment
|
|
29
29
|
const env = resolveEnv(options);
|
|
30
|
-
const intent =
|
|
30
|
+
const intent = RUNTIME_HUB_INTENT;
|
|
31
31
|
// Resolve allowed teams (same contract as other commands)
|
|
32
32
|
const allowedTeams = TARGET_TEAMS[env];
|
|
33
33
|
// 2️⃣ Handle --app locally (do NOT dispatch)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } 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
|
/**
|
|
5
5
|
* Target teams for `viza login aws`.
|
|
@@ -27,7 +27,7 @@ const TARGET_TEAMS = {
|
|
|
27
27
|
export async function backupGithubSecretsCommand(options) {
|
|
28
28
|
// 1) Resolve environment
|
|
29
29
|
const env = resolveEnv(options);
|
|
30
|
-
const intent =
|
|
30
|
+
const intent = RESOURCE_HUB_INTENT_BY_ENV;
|
|
31
31
|
// Resolve allowed teams
|
|
32
32
|
// - Dispatch mode: restrict by targetEnv
|
|
33
33
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RUNTIME_HUB_INTENT } from "../../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
|
|
4
4
|
/**
|
|
5
5
|
* Target teams for `viza login aws`.
|
|
@@ -29,7 +29,7 @@ const TARGET_TEAMS = {
|
|
|
29
29
|
export async function restoreGithubSecretsCommand(options) {
|
|
30
30
|
// 1) Resolve environment
|
|
31
31
|
const env = resolveEnv(options);
|
|
32
|
-
const intent =
|
|
32
|
+
const intent = RUNTIME_HUB_INTENT;
|
|
33
33
|
// Resolve allowed teams
|
|
34
34
|
// - Dispatch mode: restrict by targetEnv
|
|
35
35
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -30,7 +30,7 @@ export async function deployCommandHubCommand(options) {
|
|
|
30
30
|
// 1) Resolve environment
|
|
31
31
|
const env = resolveEnv(options);
|
|
32
32
|
const cloudRunner = options.cloudRunner === true;
|
|
33
|
-
const intent = resolveHubIntent(
|
|
33
|
+
const intent = resolveHubIntent(cloudRunner);
|
|
34
34
|
// Resolve allowed teams
|
|
35
35
|
// - Dispatch mode: restrict by targetEnv
|
|
36
36
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RUNTIME_HUB_INTENT } from "../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../core/dispatch.js";
|
|
4
4
|
import { showSsoLinkMenu } from "../../../ui/sso/awsLoginMenu.js";
|
|
5
5
|
/**
|
|
@@ -33,7 +33,7 @@ const TARGET_TEAMS = {
|
|
|
33
33
|
export async function loginAwsCommand(options) {
|
|
34
34
|
// 1) Resolve environment
|
|
35
35
|
const env = resolveEnv(options);
|
|
36
|
-
const intent =
|
|
36
|
+
const intent = RUNTIME_HUB_INTENT;
|
|
37
37
|
// Resolve allowed teams
|
|
38
38
|
// - Dispatch mode: restrict by targetEnv
|
|
39
39
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -2,34 +2,23 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Deploy infrastructure resources (hub layer)
|
|
4
4
|
*/
|
|
5
|
-
export const RESOURCE_HUB_INTENT_BY_ENV =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export const RESOURCE_HUB_INTENT_BY_ENV = "hub";
|
|
6
|
+
/**
|
|
7
|
+
* Deploy infrastructure resources (deployer reserved layer)
|
|
8
|
+
*/
|
|
9
|
+
export const RESOURCE_DEPLOYER_INTENT_BY_ENV = "deployer";
|
|
9
10
|
/**
|
|
10
11
|
* Build & publish application layer
|
|
11
12
|
*/
|
|
12
|
-
export const
|
|
13
|
-
dev: "builder",
|
|
14
|
-
prod: "publisher",
|
|
15
|
-
};
|
|
13
|
+
export const RESOURCE_BACKER_INTENT_BY_ENV = "backer";
|
|
16
14
|
/**
|
|
17
15
|
* Runtime command hub (worker layer)
|
|
18
16
|
* Single intent for both dev and prod (env derived at gateway)
|
|
19
17
|
*/
|
|
20
18
|
export const RUNTIME_HUB_INTENT = "hub-worker";
|
|
21
|
-
export function
|
|
22
|
-
return RESOURCE_HUB_INTENT_BY_ENV[env];
|
|
23
|
-
}
|
|
24
|
-
export function resolveAppHubIntent(env) {
|
|
25
|
-
return APP_HUB_INTENT_BY_ENV[env];
|
|
26
|
-
}
|
|
27
|
-
export function resolveRuntimeHubIntent() {
|
|
28
|
-
return RUNTIME_HUB_INTENT;
|
|
29
|
-
}
|
|
30
|
-
export function resolveHubIntent(env, cloudRunner) {
|
|
19
|
+
export function resolveHubIntent(cloudRunner) {
|
|
31
20
|
if (cloudRunner) {
|
|
32
|
-
return
|
|
21
|
+
return RESOURCE_BACKER_INTENT_BY_ENV;
|
|
33
22
|
}
|
|
34
|
-
return
|
|
23
|
+
return RESOURCE_HUB_INTENT_BY_ENV;
|
|
35
24
|
}
|