@vizamodo/viza-cli 1.3.3 → 1.3.6

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.
@@ -6,22 +6,26 @@ export function devLoginAwsCommand(ctx) {
6
6
  aws
7
7
  .description("Login AWS via remote dispatcher (SSO/session bootstrap)")
8
8
  .option("--status", "Check status only (do not dispatch new run)")
9
+ .option("--keep-log", "Keep source workflow logs for debugging")
9
10
  .action(async (opts) => {
10
11
  await awsLogin({
11
12
  intent: "hub-dev",
12
13
  targetTeam: ctx.targetTeam,
13
14
  mode: opts.status ? "status" : "dispatch",
15
+ keepLog: opts.keepLog === true,
14
16
  });
15
17
  });
16
18
  aws
17
19
  .command("sso-url")
18
20
  .description("Create AWS SSO login URL via remote dispatcher")
19
21
  .option("--status", "Check status only (do not dispatch new run)")
22
+ .option("--keep-log", "Keep source workflow logs for debugging")
20
23
  .action(async (opts) => {
21
24
  await awsCreateSsoUrl({
22
25
  intent: "hub-dev",
23
26
  targetTeam: ctx.targetTeam,
24
27
  mode: opts.status ? "status" : "dispatch",
28
+ keepLog: opts.keepLog === true,
25
29
  });
26
30
  });
27
31
  return aws;
@@ -25,6 +25,7 @@ async function dispatchIntent(input, mode = "dispatch") {
25
25
  infraKey: input.infraKey,
26
26
  payload: input.payload,
27
27
  runnerLabel: input.runnerLabel,
28
+ keepLog: input.keepLog
28
29
  };
29
30
  const handle = await dispatcherDispatch(dispatchInput, {
30
31
  auth: {
@@ -45,8 +46,6 @@ export async function dispatchIntentAndWait(input, opts = {}) {
45
46
  const cliVersion = getCliVersion();
46
47
  const meta = {
47
48
  cliVersion,
48
- subtitle: input.commandType,
49
- clearScreen: true,
50
49
  };
51
50
  showDispatchBanner(input, meta);
52
51
  const handle = await dispatchIntent(input, mode);
@@ -12,6 +12,7 @@ export async function awsLogin(ctx) {
12
12
  commandType: "viza.aws.login",
13
13
  targetTeam: ctx.targetTeam,
14
14
  runnerLabel: "native",
15
+ keepLog: ctx.keepLog === true,
15
16
  payload: plainPayload,
16
17
  }, { log: "show", mode: ctx.mode ?? "dispatch" });
17
18
  }
@@ -26,6 +27,7 @@ export async function awsCreateSsoUrl(ctx) {
26
27
  commandType: "viza.aws.sso-url",
27
28
  targetTeam: ctx.targetTeam,
28
29
  runnerLabel: "native",
30
+ keepLog: ctx.keepLog === true,
29
31
  payload: plainPayload,
30
32
  }, { log: "show", mode: ctx.mode ?? "dispatch" });
31
33
  }
@@ -41,8 +41,8 @@ function pickBannerConfig(targetTeam) {
41
41
  */
42
42
  export function showDispatchBanner(input, meta) {
43
43
  const cfg = pickBannerConfig(input.targetTeam);
44
- // Default subtitle: event type (or caller-provided subtitle)
45
- const subtitle = meta?.subtitle ?? `Command: ${input.commandType}`;
44
+ // Default subtitle: commandType (or caller-provided subtitle)
45
+ const subtitle = `Command: ${input.commandType}`;
46
46
  showBanner({
47
47
  title: cfg.title,
48
48
  subtitle,
@@ -56,15 +56,12 @@ export function showDispatchBanner(input, meta) {
56
56
  },
57
57
  meta: {
58
58
  version: meta?.cliVersion,
59
- },
60
- clearScreen: meta?.clearScreen ?? true,
59
+ }
61
60
  });
62
61
  }
63
62
  export function showBanner(opts) {
64
- const { title, subtitle, color = "cyanBright", env, runner, meta, clearScreen = true, } = opts;
65
- if (clearScreen) {
66
- process.stdout.write("\u001b[2J\u001b[3J\u001b[H");
67
- }
63
+ const { title, subtitle, color = "cyanBright", env, runner, meta } = opts;
64
+ process.stdout.write("\u001b[2J\u001b[3J\u001b[H");
68
65
  const bannerText = figlet.textSync(title, { font: "Standard" });
69
66
  console.log(chalk[color](bannerText));
70
67
  if (subtitle) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizamodo/viza-cli",
3
- "version": "1.3.3",
3
+ "version": "1.3.6",
4
4
  "type": "module",
5
5
  "description": "Viza unified command line interface",
6
6
  "bin": {
@@ -16,7 +16,7 @@
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.53",
19
+ "@vizamodo/viza-dispatcher": "^1.4.56",
20
20
  "adm-zip": "^0.5.16",
21
21
  "chalk": "^5.6.2",
22
22
  "commander": "^14.0.2",