import chalk from 'chalk';
+import type { AbstractUIServer } from './AbstractUIServer';
+import { UIHttpServer } from './UIHttpServer';
+import { UIServerUtils } from './UIServerUtils';
+import { UIWebSocketServer } from './UIWebSocketServer';
import { ApplicationProtocol, type UIServerConfiguration } from '../../types';
import { Configuration } from '../../utils';
-import { type AbstractUIServer, UIHttpServer, UIServerUtils, UIWebSocketServer } from '../internal';
export class UIServerFactory {
private constructor() {
}
public static getUIServerImplementation(
- uiServerConfiguration?: UIServerConfiguration
+ uiServerConfiguration?: UIServerConfiguration,
): AbstractUIServer | null {
if (UIServerUtils.isLoopback(uiServerConfiguration.options?.host) === false) {
console.warn(
chalk.yellow(
- 'Loopback address not detected in UI server configuration. This is not recommended.'
- )
+ 'Loopback address not detected in UI server configuration. This is not recommended.',
+ ),
);
}
switch (uiServerConfiguration?.type ?? Configuration.getUIServer().type) {