Skip to content

Commit bc563e5

Browse files
committed
✨ feat: improve theme building messages and format allowed vars
1 parent edbaf1a commit bc563e5

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

src/Console/Command/Theme/BuildCommand.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ private function processBuildThemes(
167167
$currentTheme = $index + 1;
168168
// Show which theme is currently being built
169169
$themeNameCyan = sprintf("<fg=cyan>%s</>", $themeCode);
170-
$spinner = new Spinner(sprintf("Building %s (%d of %d) ...", $themeNameCyan, $currentTheme, $totalThemes));
170+
$spinner = new Spinner(
171+
sprintf("Building %s (%d of %d) ...", $themeNameCyan, $currentTheme, $totalThemes)
172+
);
171173
$success = false;
172174

173175
$spinner->spin(function () use ($themeCode, $io, $output, $isVerbose, &$successList, &$success) {
@@ -177,10 +179,14 @@ private function processBuildThemes(
177179

178180
if ($success) {
179181
// Show that the theme was successfully built
180-
$io->writeln(sprintf(" Building %s (%d of %d) ... <fg=green>done</>", $themeNameCyan, $currentTheme, $totalThemes));
182+
$io->writeln(
183+
sprintf(" Building %s (%d of %d) ... <fg=green>done</>", $themeNameCyan, $currentTheme, $totalThemes)
184+
);
181185
} else {
182186
// Show that an error occurred while building the theme
183-
$io->writeln(sprintf(" Building %s (%d of %d) ... <fg=red>failed</>", $themeNameCyan, $currentTheme, $totalThemes));
187+
$io->writeln(
188+
sprintf(" Building %s (%d of %d) ... <fg=red>failed</>", $themeNameCyan, $currentTheme, $totalThemes)
189+
);
184190
}
185191
}
186192
}
@@ -321,7 +327,9 @@ private function getCachedEnvironmentVariables(): array
321327
if ($cachedEnv === null) {
322328
$cachedEnv = [];
323329
// Only cache the specific variables we need
324-
$allowedVars = ['COLUMNS', 'LINES', 'TERM', 'CI', 'GITHUB_ACTIONS', 'GITLAB_CI', 'JENKINS_URL', 'TEAMCITY_VERSION'];
330+
$allowedVars = [
331+
'COLUMNS', 'LINES', 'TERM', 'CI', 'GITHUB_ACTIONS', 'GITLAB_CI', 'JENKINS_URL', 'TEAMCITY_VERSION'
332+
];
325333

326334
foreach ($allowedVars as $var) {
327335
// Check secure storage first

src/Service/HyvaTokens/TokenProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public function process(string $themePath): array
3232
if (!$this->configReader->hasTokenSource($themePath, $config)) {
3333
return [
3434
'success' => false,
35-
'message' => "No token source found. Create a {$config['src']} file or add 'values' to hyva.config.json",
35+
'message' => "No token source found. Create a {$config['src']} file " .
36+
"or add 'values' to hyva.config.json",
3637
'outputPath' => null,
3738
];
3839
}

0 commit comments

Comments
 (0)