viza 1.9.26 → 1.9.28
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 +6 -4
- package/dist/src/commands/aws/rolesanywhere/bootstrap/bootstrap.js +6 -4
- package/dist/src/commands/aws/rolesanywhere/rebootstrap/rebootstrap.js +6 -4
- package/dist/src/commands/aws/rolesanywhere/rotate/rotate.js +6 -4
- package/dist/src/commands/aws/rolesanywhere/update-role/update-role.js +6 -4
- package/dist/src/commands/billing/login/aws/aws.js +1 -0
- package/dist/src/commands/dispatch/logs/logs.js +1 -1
- package/dist/src/commands/dispatch/runs/runs.js +1 -1
- package/dist/src/commands/dispatch/runs/show-runs.js +1 -1
- package/dist/src/commands/github/secrets/backup/backup.js +6 -4
- package/dist/src/commands/github/secrets/restore/restore.js +1 -1
- package/dist/src/commands/infra/deploy/command-hub/command-hub.js +6 -3
- package/dist/src/commands/insight/actions/usage/usage.js +1 -1
- package/dist/src/commands/login/aws/aws.js +1 -1
- package/dist/src/context/normalizeBin.js +2 -2
- package/dist/src/core/dispatch.js +2 -3
- package/dist/src/ui/theme.js +16 -13
- package/package.json +4 -2
- package/dist/src/core/resolveExecutionMode.js +0 -5
|
@@ -33,11 +33,13 @@ export async function bootstrapAgeCommand(options) {
|
|
|
33
33
|
flowGates: {
|
|
34
34
|
secrets: true,
|
|
35
35
|
},
|
|
36
|
-
payload: {
|
|
37
|
-
action: options.cancel ? "cancel" : "start"
|
|
38
|
-
}
|
|
36
|
+
payload: {}
|
|
39
37
|
}, {
|
|
40
|
-
|
|
38
|
+
mode: options.cancel === true
|
|
39
|
+
? "cancel"
|
|
40
|
+
: options.status === true
|
|
41
|
+
? "status"
|
|
42
|
+
: "dispatch",
|
|
41
43
|
log: "show",
|
|
42
44
|
});
|
|
43
45
|
}
|
|
@@ -31,11 +31,13 @@ export async function bootstrapAwsRolesAnywhereCommand(options) {
|
|
|
31
31
|
flowGates: {
|
|
32
32
|
secrets: true,
|
|
33
33
|
},
|
|
34
|
-
payload: {
|
|
35
|
-
action: options.cancel ? "cancel" : "start"
|
|
36
|
-
}
|
|
34
|
+
payload: {}
|
|
37
35
|
}, {
|
|
38
|
-
|
|
36
|
+
mode: options.cancel === true
|
|
37
|
+
? "cancel"
|
|
38
|
+
: options.status === true
|
|
39
|
+
? "status"
|
|
40
|
+
: "dispatch",
|
|
39
41
|
log: "show",
|
|
40
42
|
});
|
|
41
43
|
}
|
|
@@ -31,11 +31,13 @@ export async function rebootstrapAwsRolesAnywhereCommand(options) {
|
|
|
31
31
|
flowGates: {
|
|
32
32
|
secrets: true,
|
|
33
33
|
},
|
|
34
|
-
payload: {
|
|
35
|
-
action: options.cancel ? "cancel" : "start"
|
|
36
|
-
}
|
|
34
|
+
payload: {}
|
|
37
35
|
}, {
|
|
38
|
-
|
|
36
|
+
mode: options.cancel === true
|
|
37
|
+
? "cancel"
|
|
38
|
+
: options.status === true
|
|
39
|
+
? "status"
|
|
40
|
+
: "dispatch",
|
|
39
41
|
log: "show",
|
|
40
42
|
});
|
|
41
43
|
}
|
|
@@ -31,11 +31,13 @@ export async function rotateAwsRolesAnywhereCommand(options) {
|
|
|
31
31
|
flowGates: {
|
|
32
32
|
secrets: true,
|
|
33
33
|
},
|
|
34
|
-
payload: {
|
|
35
|
-
action: options.cancel ? "cancel" : "start"
|
|
36
|
-
}
|
|
34
|
+
payload: {}
|
|
37
35
|
}, {
|
|
38
|
-
|
|
36
|
+
mode: options.cancel === true
|
|
37
|
+
? "cancel"
|
|
38
|
+
: options.status === true
|
|
39
|
+
? "status"
|
|
40
|
+
: "dispatch",
|
|
39
41
|
log: "show",
|
|
40
42
|
});
|
|
41
43
|
}
|
|
@@ -31,11 +31,13 @@ export async function updateAwsRolesAnywhereRoleCommand(options) {
|
|
|
31
31
|
flowGates: {
|
|
32
32
|
secrets: true,
|
|
33
33
|
},
|
|
34
|
-
payload: {
|
|
35
|
-
action: options.cancel ? "cancel" : "start"
|
|
36
|
-
}
|
|
34
|
+
payload: {}
|
|
37
35
|
}, {
|
|
38
|
-
|
|
36
|
+
mode: options.cancel === true
|
|
37
|
+
? "cancel"
|
|
38
|
+
: options.status === true
|
|
39
|
+
? "status"
|
|
40
|
+
: "dispatch",
|
|
39
41
|
log: "show",
|
|
40
42
|
});
|
|
41
43
|
}
|
|
@@ -99,7 +99,7 @@ export async function showDispatchRuns(result) {
|
|
|
99
99
|
console.log();
|
|
100
100
|
console.log("💡 " + "\x1b[1mQuick Hint\x1b[0m");
|
|
101
101
|
console.log();
|
|
102
|
-
console.log(chalk.gray(" 👉 To
|
|
102
|
+
console.log(chalk.gray(" 👉 To list fewer or more runs, use --limit:"));
|
|
103
103
|
console.log(` ${renderCommandInline(`${bin} dispatch runs --limit <n>`)}`);
|
|
104
104
|
console.log();
|
|
105
105
|
console.log(chalk.gray(" 👉 To view detailed logs for a specific run, use:"));
|
|
@@ -33,11 +33,13 @@ export async function backupGithubSecretsCommand(options) {
|
|
|
33
33
|
flowGates: {
|
|
34
34
|
secrets: true,
|
|
35
35
|
},
|
|
36
|
-
payload: {
|
|
37
|
-
action: options.cancel ? "cancel" : "start"
|
|
38
|
-
}
|
|
36
|
+
payload: {}
|
|
39
37
|
}, {
|
|
40
|
-
|
|
38
|
+
mode: options.cancel === true
|
|
39
|
+
? "cancel"
|
|
40
|
+
: options.status === true
|
|
41
|
+
? "status"
|
|
42
|
+
: "dispatch",
|
|
41
43
|
log: "show",
|
|
42
44
|
});
|
|
43
45
|
}
|
|
@@ -45,11 +45,14 @@ export async function deployCommandHubCommand(options) {
|
|
|
45
45
|
secrets: true,
|
|
46
46
|
},
|
|
47
47
|
payload: {
|
|
48
|
-
workerIntent
|
|
49
|
-
action: options.cancel ? "cancel" : "start"
|
|
48
|
+
workerIntent
|
|
50
49
|
}
|
|
51
50
|
}, {
|
|
52
|
-
|
|
51
|
+
mode: options.cancel === true
|
|
52
|
+
? "cancel"
|
|
53
|
+
: options.status === true
|
|
54
|
+
? "status"
|
|
55
|
+
: "dispatch",
|
|
53
56
|
log: "show",
|
|
54
57
|
});
|
|
55
58
|
}
|
|
@@ -4,7 +4,6 @@ import { startSpinner, stopSpinner } from "../ui/spinner.js";
|
|
|
4
4
|
import { renderLog } from "../ui/infraLogRenderer.js";
|
|
5
5
|
import { showDispatchBanner } from "../ui/banner.js";
|
|
6
6
|
import { getCliVersion, checkForCliUpdateSoft } from "./version.js";
|
|
7
|
-
import { resolveExecutionMode } from "./resolveExecutionMode.js";
|
|
8
7
|
import { renderRuntimeLog } from "../ui/runtimeLogRenderer.js";
|
|
9
8
|
import { formatDateTime } from "../ui/primitives/render-command.js";
|
|
10
9
|
/**
|
|
@@ -137,9 +136,9 @@ async function dispatchIntent(input, mode = "dispatch") {
|
|
|
137
136
|
*/
|
|
138
137
|
export async function dispatchIntentAndWait(input, opts = {}) {
|
|
139
138
|
const policy = opts.log ?? "hide";
|
|
140
|
-
const mode =
|
|
139
|
+
const mode = opts.mode ?? "dispatch";
|
|
141
140
|
const cliVersion = getCliVersion();
|
|
142
|
-
showDispatchBanner(input, { cliVersion },
|
|
141
|
+
showDispatchBanner(input, { cliVersion }, mode === "status");
|
|
143
142
|
// Show dispatch timestamp for log correlation
|
|
144
143
|
const ts = formatDateTime(new Date().toISOString());
|
|
145
144
|
console.log(chalk.dim(`🕒 Dispatch at`), chalk.white(`${ts}`));
|
package/dist/src/ui/theme.js
CHANGED
|
@@ -5,20 +5,23 @@ export function formatAge(iso) {
|
|
|
5
5
|
if (sec < 60)
|
|
6
6
|
return `${sec}s`;
|
|
7
7
|
const min = Math.floor(sec / 60);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// < 60 minutes → "Xm"
|
|
13
|
-
if (min < 60)
|
|
14
|
-
return `${min}m`;
|
|
8
|
+
if (min < 60) {
|
|
9
|
+
const remSec = sec % 60;
|
|
10
|
+
return remSec > 0 ? `${min}m ${remSec}s` : `${min}m`;
|
|
11
|
+
}
|
|
15
12
|
const hr = Math.floor(min / 60);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
if (hr < 24) {
|
|
14
|
+
const remMin = min % 60;
|
|
15
|
+
return remMin > 0 ? `${hr}h ${remMin}m` : `${hr}h`;
|
|
16
|
+
}
|
|
17
|
+
const day = Math.floor(hr / 24);
|
|
18
|
+
const remHr = hr % 24;
|
|
19
|
+
// ≥ 3 days → "Xd" (rounded down, ignore hours)
|
|
20
|
+
if (day >= 3) {
|
|
21
|
+
return `${day}d`;
|
|
22
|
+
}
|
|
23
|
+
// < 3 days → "Xd Yh"
|
|
24
|
+
return remHr > 0 ? `${day}d ${remHr}h` : `${day}d`;
|
|
22
25
|
}
|
|
23
26
|
export function formatDuration(start, end) {
|
|
24
27
|
const diff = new Date(end).getTime() - new Date(start).getTime();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viza",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Viza unified command line interface",
|
|
6
6
|
"bin": {
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
"x": "dist/bin/viza.js",
|
|
17
17
|
"x-builder": "dist/bin/viza.js",
|
|
18
18
|
"x-deployer": "dist/bin/viza.js",
|
|
19
|
+
"v1": "dist/bin/viza.js",
|
|
19
20
|
"v2": "dist/bin/viza.js",
|
|
20
21
|
"v3": "dist/bin/viza.js",
|
|
22
|
+
"x1": "dist/bin/viza.js",
|
|
21
23
|
"x2": "dist/bin/viza.js",
|
|
22
24
|
"x3": "dist/bin/viza.js"
|
|
23
25
|
},
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
"release:full": "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"
|
|
33
35
|
},
|
|
34
36
|
"dependencies": {
|
|
35
|
-
"@vizamodo/viza-dispatcher": "^1.5.
|
|
37
|
+
"@vizamodo/viza-dispatcher": "^1.5.54",
|
|
36
38
|
"adm-zip": "^0.5.16",
|
|
37
39
|
"chalk": "^5.6.2",
|
|
38
40
|
"clipboardy": "^5.3.1",
|