viza 1.6.4 → 1.6.8
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/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 +3 -3
- package/dist/src/commands/login/aws/aws.js +2 -2
- package/dist/src/context/hubIntent.js +24 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { resolveResourceHubIntent } 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 = resolveResourceHubIntent(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 { resolveResourceHubIntent } from "../../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
|
|
4
4
|
/**
|
|
5
5
|
* Target teams for `viza aws rolesanywhere bootstrap`.
|
|
@@ -28,7 +28,7 @@ const TARGET_TEAMS = {
|
|
|
28
28
|
export async function rebootstrapAwsRolesAnywhereCommand(options) {
|
|
29
29
|
// 1) Resolve environment
|
|
30
30
|
const env = resolveEnv(options);
|
|
31
|
-
const intent =
|
|
31
|
+
const intent = resolveResourceHubIntent(env);
|
|
32
32
|
// 2) Resolve allowed teams (no status mode for bootstrap)
|
|
33
33
|
const allowedTeams = TARGET_TEAMS[env];
|
|
34
34
|
// 3) Dispatch intent (freeze)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { resolveResourceHubIntent } from "../../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
|
|
4
4
|
/**
|
|
5
5
|
* Target teams for `viza aws rolesanywhere rotate`.
|
|
@@ -28,14 +28,14 @@ const TARGET_TEAMS = {
|
|
|
28
28
|
export async function rotateAwsRolesAnywhereCommand(options) {
|
|
29
29
|
// 1) Resolve environment
|
|
30
30
|
const env = resolveEnv(options);
|
|
31
|
-
const intent =
|
|
31
|
+
const intent = resolveResourceHubIntent(env);
|
|
32
32
|
// 2) Resolve allowed teams (no status mode for rotate)
|
|
33
33
|
const allowedTeams = TARGET_TEAMS[env];
|
|
34
34
|
// 3) Dispatch intent (freeze)
|
|
35
35
|
await dispatchIntentAndWait({
|
|
36
36
|
intent,
|
|
37
37
|
commandType: "aws.rolesanywhere.rotate.manual",
|
|
38
|
-
infraKey: "
|
|
38
|
+
infraKey: "core",
|
|
39
39
|
targetEnv: env,
|
|
40
40
|
allowedTeams,
|
|
41
41
|
// Canonical CLI contract (explicit, non-magical)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { resolveRuntimeHubIntent } from "../../../context/hubIntent.js";
|
|
3
3
|
import { dispatchIntentAndWait } from "../../../core/dispatch.js";
|
|
4
4
|
import { showSsoLinkMenu } from "../../../ui/sso/awsLoginMenu.js";
|
|
5
5
|
function parseAwsLoginResult(buffer) {
|
|
@@ -47,7 +47,7 @@ const TARGET_TEAMS = {
|
|
|
47
47
|
export async function loginAwsCommand(options) {
|
|
48
48
|
// 1) Resolve environment
|
|
49
49
|
const env = resolveEnv(options);
|
|
50
|
-
const intent =
|
|
50
|
+
const intent = resolveRuntimeHubIntent();
|
|
51
51
|
// Resolve allowed teams
|
|
52
52
|
// - Dispatch mode: restrict by targetEnv
|
|
53
53
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
// src/commands/_shared/hubIntent.ts
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Deploy infrastructure resources (hub layer)
|
|
4
|
+
*/
|
|
5
|
+
export const RESOURCE_HUB_INTENT_BY_ENV = {
|
|
3
6
|
dev: "hub-dev",
|
|
4
7
|
prod: "hub",
|
|
5
8
|
};
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Build & publish application layer
|
|
11
|
+
*/
|
|
12
|
+
export const APP_HUB_INTENT_BY_ENV = {
|
|
13
|
+
dev: "builder",
|
|
14
|
+
prod: "publisher",
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Runtime command hub (worker layer)
|
|
18
|
+
* Single intent for both dev and prod (env derived at gateway)
|
|
19
|
+
*/
|
|
20
|
+
export const RUNTIME_HUB_INTENT = "hub-worker";
|
|
21
|
+
export function resolveResourceHubIntent(env) {
|
|
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;
|
|
8
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viza",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Viza unified command line interface",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@vizamodo/viza-dispatcher": "^1.4.98",
|
|
20
20
|
"adm-zip": "^0.5.16",
|
|
21
21
|
"chalk": "^5.6.2",
|
|
22
|
-
"clipboardy": "^5.3.
|
|
22
|
+
"clipboardy": "^5.3.1",
|
|
23
23
|
"commander": "^14.0.3",
|
|
24
24
|
"figlet": "^1.10.0",
|
|
25
25
|
"open": "^11.0.0",
|