Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MiniBrowserEndpoint

Hierarchy

  • MiniBrowserEndpoint

Implements

Index

Constructors

constructor

Properties

Private attachRequestHandlerPromise

attachRequestHandlerPromise: Promise<void>

Protected Readonly contributions

contributions: ContributionProvider<MiniBrowserEndpointHandler>

Protected Readonly handlers

handlers: Map<string, MiniBrowserEndpointHandler> = ...

Protected Readonly logger

logger: ILogger

Static HANDLE_PATH

HANDLE_PATH: string = '/mini-browser/'

Endpoint path to handle the request for the given resource.

deprecated

since 1.8.0

Methods

Protected attachRequestHandler

  • attachRequestHandler(app: Application): Promise<void>

configure

  • configure(app: Application): void

Protected defaultHandler

  • defaultHandler(): (statWithContent: FileStatWithContent, response: Response<any, Record<string, any>>) => MaybePromise<Response<any, Record<string, any>>>

Protected errorHandler

  • errorHandler(): (error: any, uri: string, response: Response<any, Record<string, any>>) => MaybePromise<Response<any, Record<string, any>>>
  • Returns (error: any, uri: string, response: Response<any, Record<string, any>>) => MaybePromise<Response<any, Record<string, any>>>

      • (error: any, uri: string, response: Response<any, Record<string, any>>): MaybePromise<Response<any, Record<string, any>>>
      • Parameters

        • error: any
        • uri: string
        • response: Response<any, Record<string, any>>

        Returns MaybePromise<Response<any, Record<string, any>>>

Protected getContributions

Protected getUri

  • getUri(request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>): MaybePromise<string>

Protected getVirtualHostRegExp

  • getVirtualHostRegExp(): Promise<RegExp>

Protected missingResourceHandler

  • missingResourceHandler(): (uri: string, response: Response<any, Record<string, any>>) => MaybePromise<Response<any, Record<string, any>>>
  • Returns (uri: string, response: Response<any, Record<string, any>>) => MaybePromise<Response<any, Record<string, any>>>

      • (uri: string, response: Response<any, Record<string, any>>): MaybePromise<Response<any, Record<string, any>>>
      • Parameters

        • uri: string
        • response: Response<any, Record<string, any>>

        Returns MaybePromise<Response<any, Record<string, any>>>

onStart

  • onStart(): Promise<void>

Protected readContent

Protected response

  • response(uri: string, response: Response<any, Record<string, any>>): Promise<Response<any, Record<string, any>>>

supportedFileExtensions

  • supportedFileExtensions(): Promise<Readonly<{ extension: string; priority: number }>[]>