mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-22 09:49:56 +00:00
Kitty stuff works now
This commit is contained in:
committed by
Rory&
parent
bd81cde977
commit
a26e84296e
+17
-21
@@ -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,29 +44,25 @@ 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,
|
||||
)}
|
||||
|
||||
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).)
|
||||
`),
|
||||
bold(centerString(unformatted, 64).replace(unformatted, formatted)),
|
||||
);
|
||||
|
||||
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.`));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user