b4dabfeeb9
Debug mode is no more triggered by the NODE_ENV value, but by testing the existance of a file in the plugin data directory.
28 lines
515 B
TypeScript
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
|
|
}
|
|
}
|