viza 1.6.3 → 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.
@@ -1,5 +1,5 @@
1
1
  import { resolveEnv } from "../../../../context/env.js";
2
- import { resolveHubIntent } from "../../../../context/hubIntent.js";
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 = resolveHubIntent(env);
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 { resolveHubIntent } from "../../../../context/hubIntent.js";
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 = resolveHubIntent(env);
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 { resolveHubIntent } from "../../../../context/hubIntent.js";
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 = resolveHubIntent(env);
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: "aws",
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 { resolveHubIntent } from "../../../context/hubIntent.js";
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 = resolveHubIntent(env);
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
- export const HUB_INTENT_BY_ENV = {
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
- export function resolveHubIntent(env) {
7
- return HUB_INTENT_BY_ENV[env];
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",
3
+ "version": "1.6.8",
4
4
  "type": "module",
5
5
  "description": "Viza unified command line interface",
6
6
  "bin": {
@@ -16,10 +16,10 @@
16
16
  "release:prod": "rm -rf dist && npx npm-check-updates -u && npm install && git add package.json package-lock.json && git commit -m 'chore(deps): auto update dependencies before release' || echo 'No changes' && node versioning.js && npm login && npm publish --tag latest --access public && git push"
17
17
  },
18
18
  "dependencies": {
19
- "@vizamodo/viza-dispatcher": "^1.4.95",
19
+ "@vizamodo/viza-dispatcher": "^1.4.98",
20
20
  "adm-zip": "^0.5.16",
21
21
  "chalk": "^5.6.2",
22
- "clipboardy": "^5.3.0",
22
+ "clipboardy": "^5.3.1",
23
23
  "commander": "^14.0.3",
24
24
  "figlet": "^1.10.0",
25
25
  "open": "^11.0.0",