viza 1.7.42 → 1.7.45
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/cli/options.js +2 -1
- package/dist/src/commands/github/secrets/restore/register.js +4 -0
- package/dist/src/commands/github/secrets/restore/restore.js +13 -1
- package/dist/src/commands/infra/command-hub/command-hub.js +3 -2
- package/dist/src/context/hubIntent.js +6 -0
- package/package.json +2 -2
package/dist/src/cli/options.js
CHANGED
|
@@ -2,5 +2,6 @@ export function registerGlobalOptions(program) {
|
|
|
2
2
|
program
|
|
3
3
|
.option("--status", "Show status only (no execution)")
|
|
4
4
|
.option("--remove-log", "Remove execution logs after completion", false)
|
|
5
|
-
.option("--self-hosted", "Use self-hosted runner (viza-builder)", false)
|
|
5
|
+
.option("--self-hosted", "Use self-hosted runner (viza-builder)", false)
|
|
6
|
+
.option("--cloud-runner", "Use cloud managed runner (GitHub-hosted)", false);
|
|
6
7
|
}
|
|
@@ -10,6 +10,10 @@ export function registerGithubSecretsRestoreCommand(program) {
|
|
|
10
10
|
.description("Restore GitHub secrets and environment variables to AWS SSM")
|
|
11
11
|
.option("--prod", "Use production environment")
|
|
12
12
|
.option("--dev", "Use development environment")
|
|
13
|
+
.option("--vars", "Restore only GitHub environment variables")
|
|
14
|
+
.option("--secrets", "Restore only GitHub secrets")
|
|
15
|
+
.option("--exception", "Restore only exception vars/secrets")
|
|
16
|
+
.option("--all", "Restore vars, secrets and exceptions (default if no flag provided)")
|
|
13
17
|
.action(async (_opts, command) => {
|
|
14
18
|
const fullOpts = getResolvedOptions(command);
|
|
15
19
|
await restoreGithubSecretsCommand(fullOpts);
|
|
@@ -8,9 +8,11 @@ import { dispatchIntentAndWait } from "../../../../core/dispatch.js";
|
|
|
8
8
|
*/
|
|
9
9
|
const TARGET_TEAMS = {
|
|
10
10
|
"dev": [
|
|
11
|
+
"viza-admin",
|
|
11
12
|
"viza-super"
|
|
12
13
|
],
|
|
13
14
|
"prod": [
|
|
15
|
+
"viza-admin",
|
|
14
16
|
"viza-super"
|
|
15
17
|
]
|
|
16
18
|
};
|
|
@@ -37,6 +39,16 @@ export async function restoreGithubSecretsCommand(options) {
|
|
|
37
39
|
...TARGET_TEAMS.prod,
|
|
38
40
|
]))
|
|
39
41
|
: TARGET_TEAMS[env];
|
|
42
|
+
// Resolve restore scope flags (forward to hub)
|
|
43
|
+
const payload = {};
|
|
44
|
+
if (options.vars)
|
|
45
|
+
payload.vars = true;
|
|
46
|
+
if (options.secrets)
|
|
47
|
+
payload.secrets = true;
|
|
48
|
+
if (options.exception)
|
|
49
|
+
payload.exception = true;
|
|
50
|
+
if (options.all)
|
|
51
|
+
payload.all = true;
|
|
40
52
|
// 5) Dispatch intent (freeze)
|
|
41
53
|
await dispatchIntentAndWait({
|
|
42
54
|
intent,
|
|
@@ -49,7 +61,7 @@ export async function restoreGithubSecretsCommand(options) {
|
|
|
49
61
|
flowGates: {
|
|
50
62
|
secrets: true,
|
|
51
63
|
},
|
|
52
|
-
payload
|
|
64
|
+
payload
|
|
53
65
|
}, {
|
|
54
66
|
status: options.status === true,
|
|
55
67
|
log: "show",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveEnv } from "../../../context/env.js";
|
|
2
|
-
import {
|
|
2
|
+
import { resolveHubIntent } 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,8 @@ const TARGET_TEAMS = {
|
|
|
29
29
|
export async function deployCommandHubCommand(options) {
|
|
30
30
|
// 1) Resolve environment
|
|
31
31
|
const env = resolveEnv(options);
|
|
32
|
-
const
|
|
32
|
+
const cloudRunner = options.cloudRunner === true;
|
|
33
|
+
const intent = resolveHubIntent(env, cloudRunner);
|
|
33
34
|
// Resolve allowed teams
|
|
34
35
|
// - Dispatch mode: restrict by targetEnv
|
|
35
36
|
// - Status mode: allow union of all env teams (read-only query)
|
|
@@ -27,3 +27,9 @@ export function resolveAppHubIntent(env) {
|
|
|
27
27
|
export function resolveRuntimeHubIntent() {
|
|
28
28
|
return RUNTIME_HUB_INTENT;
|
|
29
29
|
}
|
|
30
|
+
export function resolveHubIntent(env, cloudRunner) {
|
|
31
|
+
if (cloudRunner) {
|
|
32
|
+
return resolveAppHubIntent(env);
|
|
33
|
+
}
|
|
34
|
+
return resolveResourceHubIntent(env);
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viza",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Viza unified command line interface",
|
|
6
6
|
"bin": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/adm-zip": "^0.5.7",
|
|
31
31
|
"@types/figlet": "^1.7.0",
|
|
32
|
-
"@types/node": "^25.
|
|
32
|
+
"@types/node": "^25.5.0",
|
|
33
33
|
"@types/prompts": "^2.4.9",
|
|
34
34
|
"ts-node": "^10.9.2",
|
|
35
35
|
"typescript": "^5.9.3"
|