Files
stats/packages/db/code-migrations/helpers.ts
Carl-Gerhard Lindesvärd a1eb4a296f feature(dashboard): refactor overview
fix(lint)
2025-03-20 09:40:01 +01:00

33 lines
704 B
TypeScript

export function printBoxMessage(title: string, lines: (string | unknown)[]) {
console.log('┌──┐');
console.log('│');
if (title) {
console.log(`${title}`);
if (lines.length) {
console.log('│');
}
}
lines.forEach((line) => {
console.log(`${line}`);
});
console.log('│');
console.log('└──┘');
}
export function getIsCluster() {
const args = process.argv;
const noClusterArg = args.includes('--no-cluster');
if (noClusterArg) {
return false;
}
return !getIsSelfHosting();
}
export function getIsSelfHosting() {
return !!process.env.SELF_HOSTED;
}
export function getIsDry() {
return process.argv.includes('--dry');
}