function diagnostics() {
    const RED = uib.RED
    const myroot = uib.nodeRoot === '' ? '/' : uib.nodeRoot
    let serverLocation
    if (uib.customServer.isCustom === true ) {
        serverLocation = [
            `${uib.customServer.type}://${uib.customServer.host}:${uib.customServer.port}${uib.nodeRoot}`,
            `${uib.customServer.type}://localhost:${uib.customServer.port}${myroot}`
        ]
    } else {
        [
            `${RED.settings.https ? 'https' : 'http'}://${RED.settings.uiHost}:${RED.settings.uiPort}${myroot}`,
        ]
    }
    return {
        version: uib.version,
        rootFolder: uib.rootFolder,
        configFolder: uib.configFolder,
        commonFolder: uib.commonFolder,
        serverLocation: serverLocation,
        installedLibraries: Object.keys(packageMgt.uibPackageJson.uibuilder.packages),
        uib: uib,
    }
}
Return diagnostics information as JSON
@returns {object} An object containing diagnostics information