X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fui-server%2FUIServerFactory.ts;h=1bdd9dad8b9f73393fb76d043db5e833bb05f1f7;hb=5edd8ba0f8978cfb3ca9d80f299d9748c6c5970e;hp=2e5245329b9b70485a8796f92bd2b661124c602d;hpb=976d11ec6d2d38a5a82440de79f059638e28cdbd;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ui-server/UIServerFactory.ts b/src/charging-station/ui-server/UIServerFactory.ts index 2e524532..1bdd9dad 100644 --- a/src/charging-station/ui-server/UIServerFactory.ts +++ b/src/charging-station/ui-server/UIServerFactory.ts @@ -1,26 +1,25 @@ import chalk from 'chalk'; -import type { UIServerConfiguration } from '../../types/ConfigurationData'; -import { ApplicationProtocol } from '../../types/UIProtocol'; -import Configuration from '../../utils/Configuration'; import type { AbstractUIServer } from './AbstractUIServer'; -import { UIServiceUtils } from './ui-services/UIServiceUtils'; -import UIHttpServer from './UIHttpServer'; -import UIWebSocketServer from './UIWebSocketServer'; +import { UIHttpServer } from './UIHttpServer'; +import { UIServerUtils } from './UIServerUtils'; +import { UIWebSocketServer } from './UIWebSocketServer'; +import { ApplicationProtocol, type UIServerConfiguration } from '../../types'; +import { Configuration } from '../../utils'; -export default class UIServerFactory { +export class UIServerFactory { private constructor() { // This is intentional } public static getUIServerImplementation( - uiServerConfiguration?: UIServerConfiguration + uiServerConfiguration?: UIServerConfiguration, ): AbstractUIServer | null { - if (UIServiceUtils.isLoopback(uiServerConfiguration.options?.host) === false) { + if (UIServerUtils.isLoopback(uiServerConfiguration.options?.host) === false) { console.warn( - chalk.magenta( - 'Loopback address not detected in UI server configuration. This is not recommended.' - ) + chalk.yellow( + 'Loopback address not detected in UI server configuration. This is not recommended.', + ), ); } switch (uiServerConfiguration?.type ?? Configuration.getUIServer().type) {