viza 1.8.32 → 1.8.34
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/ui/banner.js +6 -6
- package/package.json +1 -1
package/dist/src/ui/banner.js
CHANGED
|
@@ -2,8 +2,8 @@ import chalk from "chalk";
|
|
|
2
2
|
import figlet from "figlet";
|
|
3
3
|
import { getCommand } from "../context/command.js";
|
|
4
4
|
const ENV_BANNER_CONFIG = {
|
|
5
|
-
"dev": { title: "Viza Development", color: "
|
|
6
|
-
"prod": { title: "Viza Production", color: "
|
|
5
|
+
"dev": { title: "Viza Development", color: "gray" },
|
|
6
|
+
"prod": { title: "Viza Production", color: "yellow" },
|
|
7
7
|
};
|
|
8
8
|
function pickBannerConfig(env) {
|
|
9
9
|
const cfg = ENV_BANNER_CONFIG[env];
|
|
@@ -11,7 +11,7 @@ function pickBannerConfig(env) {
|
|
|
11
11
|
return cfg;
|
|
12
12
|
return {
|
|
13
13
|
title: `Viza CLI`,
|
|
14
|
-
color: "
|
|
14
|
+
color: "cyan"
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -57,7 +57,7 @@ function formatCommandTokens(cmd, maxLen = 90) {
|
|
|
57
57
|
return { kept, remaining };
|
|
58
58
|
}
|
|
59
59
|
function renderCommand(cmd, status) {
|
|
60
|
-
const { kept, remaining } = formatCommandTokens(cmd,
|
|
60
|
+
const { kept, remaining } = formatCommandTokens(cmd, 102);
|
|
61
61
|
// semantic highlight: [bin] [subcommand] [rest...]
|
|
62
62
|
const main = kept[0] ?? "";
|
|
63
63
|
const sub = kept[1];
|
|
@@ -95,7 +95,7 @@ export function showBanner(opts) {
|
|
|
95
95
|
// Environment line removed; replaced by user-friendly info line below
|
|
96
96
|
if (runner) {
|
|
97
97
|
if (runner.type === "github") {
|
|
98
|
-
console.log(chalk.gray("Runner:"), chalk.
|
|
98
|
+
console.log(chalk.gray("Runner:"), chalk.gray("GitHub-hosted"), intent ? chalk.dim(`(${intent})`) : "");
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
console.log(chalk.gray("Runner:"), chalk.yellowBright("Self-hosted"), intent ? chalk.gray(`(${intent})`) : "", runner.label ? chalk.gray(" | label:") : "", runner.label ? chalk.cyan(runner.label) : "");
|
|
@@ -106,7 +106,7 @@ export function showBanner(opts) {
|
|
|
106
106
|
const parts = [];
|
|
107
107
|
parts.push(`Viza CLI`);
|
|
108
108
|
if (meta?.version) {
|
|
109
|
-
parts.push(`Version: ${chalk.
|
|
109
|
+
parts.push(`Version: ${chalk.gray(meta.version)}`);
|
|
110
110
|
}
|
|
111
111
|
parts.push(`Install: ${chalk.gray(`npm i -g viza`)}`);
|
|
112
112
|
if (parts.length) {
|