mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Update dependencies
This commit is contained in:
@@ -160,7 +160,7 @@ export class AppRunner {
|
||||
typeChecking: false,
|
||||
};
|
||||
|
||||
const configs = params.config.map(resolveAssetPath);
|
||||
const configs = (params.config as string[]).map(resolveAssetPath);
|
||||
|
||||
// Create the Components.js manager used to build components from the provided config
|
||||
let componentsManager: ComponentsManager<any>;
|
||||
|
||||
@@ -21,7 +21,7 @@ export class BaseUrlExtractor extends ShorthandExtractor {
|
||||
if (typeof args.socket === 'string') {
|
||||
throw new Error('BaseUrl argument should be provided when using Unix Domain Sockets.');
|
||||
}
|
||||
const port = args.port ?? this.defaultPort;
|
||||
const port = (args.port as string) ?? this.defaultPort;
|
||||
const url = new URL('http://localhost/');
|
||||
url.port = `${port}`;
|
||||
return url.href;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import type { Server } from 'http';
|
||||
import { createServer as createHttpServer } from 'http';
|
||||
import type { ServerOptions } from 'https';
|
||||
import { createServer as createHttpsServer } from 'https';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import type { HttpServerFactory } from './HttpServerFactory';
|
||||
@@ -46,17 +47,16 @@ export class BaseServerFactory implements HttpServerFactory {
|
||||
* Creates an HTTP(S) server.
|
||||
*/
|
||||
public async createServer(): Promise<Server> {
|
||||
const createServer = this.options.https ? createHttpsServer : createHttpServer;
|
||||
const options = this.createServerOptions();
|
||||
|
||||
const server = createServer(options);
|
||||
const server = this.options.https ? createHttpsServer(options) : createHttpServer(options);
|
||||
|
||||
await this.configurator.handleSafe(server);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
private createServerOptions(): BaseServerFactoryOptions {
|
||||
private createServerOptions(): ServerOptions {
|
||||
const options = { ...this.options };
|
||||
for (const id of [ 'key', 'cert', 'pfx' ] as const) {
|
||||
const val = options[id];
|
||||
|
||||
Reference in New Issue
Block a user