Update dependencies & fix misc formatting errors

This commit is contained in:
2022-09-30 12:02:39 -05:00
parent 52762bd4a1
commit 0484a586bd
23 changed files with 932 additions and 2797 deletions

View File

@@ -41,7 +41,7 @@ export interface ModuleRegistrationFluency {
@Singleton()
export class HTTPKernel extends AppClass {
@Inject()
protected readonly logging!: Logging;
protected readonly logging!: Logging
/**
* Collection of preflight modules to apply.

View File

@@ -12,7 +12,7 @@ export class PoweredByHeaderInjectionHTTPModule extends HTTPKernelModule {
public readonly executeWithBlockingWriteback = true
@Inject()
protected readonly config!: Config;
protected readonly config!: Config
public static register(kernel: HTTPKernel): void {
kernel.register(this).after()

View File

@@ -13,7 +13,7 @@ import {ActivatedRoute} from '../routing/ActivatedRoute'
* Enumeration of different HTTP verbs.
* @todo add others?
*/
export type HTTPMethod = 'post' | 'get' | 'patch' | 'put' | 'delete' | 'unknown';
export type HTTPMethod = 'post' | 'get' | 'patch' | 'put' | 'delete' | 'unknown'
/**
* Returns true if the given item is a valid HTTP verb.
@@ -36,9 +36,9 @@ export interface HTTPProtocol {
* Interface that describes the origin IP address of a request.
*/
export interface HTTPSourceAddress {
address: string;
family: 'IPv4' | 'IPv6';
port: number;
address: string
family: 'IPv4' | 'IPv6'
port: number
}
/**
@@ -55,43 +55,43 @@ export interface DataContainer {
export class Request extends ScopedContainer implements DataContainer {
/** The cookie manager for the request. */
public readonly cookies: HTTPCookieJar;
public readonly cookies: HTTPCookieJar
/** The URL suffix of the request. */
public readonly url: string;
public readonly url: string
/** The fully-qualified URL of the request. */
public readonly fullUrl: string;
public readonly fullUrl: string
/** The HTTP verb of the request. */
public readonly method: HTTPMethod;
public readonly method: HTTPMethod
/** True if the request was made via TLS. */
public readonly secure: boolean;
public readonly secure: boolean
/** The request HTTP protocol version. */
public readonly protocol: HTTPProtocol;
public readonly protocol: HTTPProtocol
/** The URL path, stripped of query params. */
public readonly path: string;
public readonly path: string
/** The raw parsed query data from the request. */
public readonly rawQueryData: {[key: string]: string | string[] | undefined};
public readonly rawQueryData: {[key: string]: string | string[] | undefined}
/** The inferred query data. */
public readonly query: {[key: string]: any};
public readonly query: {[key: string]: any}
/** True if the request was made via XMLHttpRequest. */
public readonly isXHR: boolean;
public readonly isXHR: boolean
/** The origin IP address of the request. */
public readonly address: HTTPSourceAddress;
public readonly address: HTTPSourceAddress
/** The associated response. */
public readonly response: Response;
public readonly response: Response
/** The media types accepted by the client. */
public readonly mediaTypes: string[];
public readonly mediaTypes: string[]
/** Input parsed from the request */
public readonly parsedInput: {[key: string]: any} = {}

View File

@@ -45,7 +45,7 @@ export class SocketRouteBuilder {
* @param key
* @param selector
*/
connected<TKey extends any>(
connected<TKey>(
key: TypedDependencyKey<TKey>,
selector: (x: TKey) => (ws: WebSocketBus) => Awaitable<void>,
): this {
@@ -68,7 +68,7 @@ export class SocketRouteBuilder {
* @param key
* @param selector
*/
event<TState extends JSONState, TKey extends any>(
event<TState extends JSONState, TKey>(
eventClass: Instantiable<StateEvent<TState>>,
key: TypedDependencyKey<TKey>,
selector: (x: TKey) => (state: TState) => Awaitable<void>,