X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=src%2Fcharging-station%2Fui-server%2FUIServerFactory.ts;h=a5fb5a5d627c926e9d700c9ec34bbb273acd476d;hb=a1c394ae6f706a51274c4a2adb1d5d89c0913596;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..a5fb5a5d 100644 --- a/src/charging-station/ui-server/UIServerFactory.ts +++ b/src/charging-station/ui-server/UIServerFactory.ts @@ -1,14 +1,13 @@ 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 } @@ -16,9 +15,9 @@ export default class UIServerFactory { public static getUIServerImplementation( uiServerConfiguration?: UIServerConfiguration ): AbstractUIServer | null { - if (UIServiceUtils.isLoopback(uiServerConfiguration.options?.host) === false) { + if (UIServerUtils.isLoopback(uiServerConfiguration.options?.host) === false) { console.warn( - chalk.magenta( + chalk.yellow( 'Loopback address not detected in UI server configuration. This is not recommended.' ) );