feature(dashboard): refactor overview
fix(lint)
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
b035c0d586
commit
a1eb4a296f
@@ -3,7 +3,9 @@ export function printBoxMessage(title: string, lines: (string | unknown)[]) {
|
||||
console.log('│');
|
||||
if (title) {
|
||||
console.log(`│ ${title}`);
|
||||
console.log('│');
|
||||
if (lines.length) {
|
||||
console.log('│');
|
||||
}
|
||||
}
|
||||
lines.forEach((line) => {
|
||||
console.log(`│ ${line}`);
|
||||
@@ -11,3 +13,20 @@ export function printBoxMessage(title: string, lines: (string | unknown)[]) {
|
||||
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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user