peertube-plugin-livechat/server/lib/diagnostic/utils.ts
John Livingston b4dabfeeb9 New debug mode:
Debug mode is no more triggered by the NODE_ENV value, but by testing
the existance of a file in the plugin data directory.
2023-04-14 11:33:41 +02:00

28 lines
515 B
TypeScript

type nextValue = 'backend' | 'debug' | 'webchat-video' | 'prosody'
interface MessageWithLevel {
level: 'info' | 'warning' | 'error'
message: string
}
export interface TestResult {
label?: string
messages: Array<string | MessageWithLevel>
debug: Array<{
title: string
message: string
}>
next: nextValue | null
ok: boolean
test: string
}
export function newResult (test: string): TestResult {
return {
test: test,
ok: false,
messages: [],
debug: [],
next: null
}
}