summary refs log tree commit diff
path: root/src/bundle
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2024-10-29 20:12:38 +0100
committerRory& <root@rory.gay>2025-07-27 15:49:37 +0200
commita26e84296e66e097a38172c9fa004175b0a2a366 (patch)
treecfeb497f03411367524bb3a9546b60b2bb45e8f4 /src/bundle
parentWIP logo/terminal stuff (diff)
downloadserver-ts-a26e84296e66e097a38172c9fa004175b0a2a366.tar.xz
Kitty stuff works now
Diffstat (limited to 'src/bundle')
-rw-r--r--src/bundle/start.ts36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/bundle/start.ts b/src/bundle/start.ts

index 33465abc..fb844f2f 100644 --- a/src/bundle/start.ts +++ b/src/bundle/start.ts
@@ -24,7 +24,7 @@ moduleAlias(__dirname + "../../../package.json"); import "reflect-metadata"; import cluster, { Worker } from "cluster"; import os from "os"; -import { red, bold, yellow, cyan } from "picocolors"; +import { red, bold, yellow, cyan, blueBright, redBright } from "picocolors"; import { initStats } from "./stats"; import { config } from "dotenv"; @@ -44,28 +44,24 @@ function getCommitOrFail() { if (cluster.isPrimary) { const commit = getCommitOrFail(); - Logo.printLogo(); + // Logo.printLogo(); + const unformatted = `spacebar-server | ! Pre-release build !`; + const formatted = `${blueBright("spacebar-server")} | ${redBright("⚠️ Pre-release build ⚠️")}`; console.log( - bold(` -${centerString( - `spacebar-server | ${yellow( - `Pre-release (${ - commit !== null - ? commit.slice(0, 7) - : "Unknown (Git cannot be found)" - })`, - )}`, - 64, -)} + bold(centerString(unformatted, 64).replace(unformatted, formatted)), + ); -Commit Hash: ${ - commit !== null - ? `${cyan(commit)} (${yellow(commit.slice(0, 7))})` - : "Unknown (Git cannot be found)" - } -Cores: ${cyan(os.cpus().length)} (Using ${cores} thread(s).) -`), + const unformattedGitHeader = `Commit Hash: ${commit !== null ? commit : "Unknown (Git cannot be found)"}`; + const formattedGitHeader = `Commit Hash: ${commit !== null ? `${cyan(commit)} (${yellow(commit.slice(0, 7))})` : "Unknown (Git cannot be found)"}`; + console.log( + bold( + centerString(unformattedGitHeader, 64).replace( + unformattedGitHeader, + formattedGitHeader, + ), + ), ); + console.log(`Cores: ${cyan(os.cpus().length)} (Using ${cores} thread(s).)`); if (commit == null) { console.log(yellow(`Warning: Git is not installed or not in PATH.`));