peertube-plugin-livechat/server/lib/diagnostic/utils.ts
John Livingston c010758164
eslint 8.57 WIP:
* tweaking rules
* fixing issues
2024-09-09 18:47:21 +02:00

38 lines
799 B
TypeScript

// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
//
// SPDX-License-Identifier: AGPL-3.0-only
type NextValue = 'backend' | 'debug' | 'webchat-video' | 'prosody'
| 'external-auth-custom-oidc' | 'external-auth-google-oidc' | 'external-auth-facebook-oidc'
| 'everything-ok'
interface MessageWithLevel {
level: 'info' | 'warning' | 'error'
message: string
help?: {
url: string
text: 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,
ok: false,
messages: [],
debug: [],
next: null
}
}