class Application
implements ServerApplication
import { Application } from "https://dotland.deno.dev/x/aleph@v0.3.0-alpha.33/server/mod.ts";
The application class for aleph server.
Properties
readonly
config: RequiredConfigreadonly
importMap: ImportMapMethods
private
applyCompilationSideEffect(by: Module, callback: (mod: Module) => void)apply compilation side-effect caused by dependency graph updating.
private
applyModuleSideEffect(url: string)private
cacheModule(module: Module)private
createRouteUpdate(url: string): [string, string, { isIndex?: boolean; withData?: boolean; }]private
hasSSRData(url: string)private
initModule(url: string, unnamed 1?: { source?: Source; forceRefresh?: boolean; }): Promise<Module>private
isScopedModule(url: string)check the changed file whether it is a scoped module that can emit the HMR event.
private
transpileModule(): Promise<void>addModule(url: string, sourceCode?: string): Promise<void>
add a module by given path and optional source code.
analyze(): Promise<void>
fetch(url: string): Promise<{ content: Uint8Array; contentType: string | null; }>
fetch resource by the url.
findModule(predicate: (module: Module) => boolean): Module | null
returns the module of the first one in the modules where predicate is true, and null otherwise..
getAPIRoute(location: { pathname: string; search?: string; }): [RouterURL, Module] | null
get api route by given location.
getModuleJSCode(module: Module): Promise<Uint8Array | null>
importModule(unnamed 0: Module): Promise<any>
loadModule(url: string, data?: any): Promise<Source>
lookupDeps()
url: string,
callback: (dep: DependencyDescriptor) => false | void,
__tracing?: Set<string>,
lookup app deps recurively.