Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
class EaCPreactAppHandler
import { EaCPreactAppHandler } from "https://deno.land/x/fathym_eac_runtime@v0.1.32/src/utils/EaCPreactAppHandler.ts";

Constructors

new
EaCPreactAppHandler(
renderHandler: PreactRenderHandler,
eacIslandsClientPath: string,
eacIslandsClientDepsPath: string,
importMap?: Record<string, string>,
options?: Partial<esbuild.BuildOptions>,
)

Properties

protected
configured: Map<string, boolean>
protected
contexts: Map<string, esbuild.BuildContext<esbuild.BuildOptions>>
protected
denoCfg: DenoConfig
protected
denoJsonPath: string
protected
dfsHandlers: Map<string, DFSFileHandler>
protected
dfsIslands: Map<string,
[
string,
boolean,
string,
]
[]>
protected
files: Map<string, Record<string, string>>
protected
hasChanges: Map<string, boolean>
protected
isDev: boolean
protected
pipelines: Map<string, EaCRuntimeHandlerPipeline>

Methods

protected
buildIslandsClient(
options: Partial<esbuild.BuildOptions>,
islandLibraryFiles: Record<string, string>,
importMap?: Record<string, string>,
): Promise<esbuild.BuildResult<esbuild.BuildOptions>>
protected
componentLoader(handlers: (EaCComponentDFSHandler | undefined)[], revision: number)
protected
establishBundleHandler(processor: EaCPreactAppProcessor, bundle: esbuild.BuildResult<esbuild.BuildOptions>): void
protected
establishPipeline(processor: EaCPreactAppProcessor, matches: PathMatch[]): void
protected
layoutLoader(
allPaths: string[],
appDFSLookup: string,
appDFSHandler: DFSFileHandler,
)
protected
loadAppDFSHandler(processor: EaCPreactAppProcessor, dfss: Record<string, EaCDistributedFileSystemAsCode>): Promise<{ DFS: EaCDistributedFileSystemDetails; Handler: DFSFileHandler; }>
protected
loadCompDFS(
dfsLookup: string,
componentFileHandler: DFSFileHandler,
extensions: string[],
revision: number,
)
protected
loadComponent(
compPath: string,
compDFSLookup: string,
componentFileHandler: DFSFileHandler,
): Promise<
[
string,
boolean,
string,
]
| undefined
>
protected
loadComponentDFSHandlers(processor: EaCPreactAppProcessor, dfss: Record<string, EaCDistributedFileSystemAsCode>): Promise<(EaCComponentDFSHandler | undefined)[] | undefined>
protected
loadDefaultBuildOptions(
dfsLookup: string,
preserveRemotes: boolean,
extraFiles?: Record<string, string>,
relativeRoot?: string,
importMap?: Record<string, string>,
): esbuild.BuildOptions
protected
loadImportMap(importMap?: Record<string, string>): Record<string, string>
protected
loadPathMatches(
dfss: Record<string, EaCDistributedFileSystemAsCode>,
revision: number,
): Promise<PathMatch[]>
protected
middlewareLoader(
allPaths: string[],
appDFSLookup: string,
appDFSHandler: DFSFileHandler,
)
protected
prependJSXParts(filePath: string, contents: string): esbuild.OnLoadResult
protected
setupCompIslandsLibrarySource(dfsLookup: string, comps:
[
string,
boolean,
string,
]
[]
): Promise<void>
protected
setupIslandsClientSources(processor: EaCPreactAppProcessor, appDFSRoot: string): Promise<void>
Build(
importMap?: Record<string, string>,
options?: Partial<esbuild.BuildOptions>,
): Promise<void>
Configure(
dfss: Record<string, EaCDistributedFileSystemAsCode>,
revision: number,
): Promise<void>
LoadFetchFile(args: esbuild.OnLoadArgs): Promise<esbuild.OnLoadResult | null>
LoadVirtualFile(args: esbuild.OnLoadArgs, files: Record<string, string>): esbuild.OnLoadResult | null
ResolveImportMapFile(
build: () => esbuild.PluginBuild,
args: esbuild.OnResolveArgs,
preserveRemotes: boolean,
importMap?: Record<string, string>,
): Promise<esbuild.OnResolveResult | null>
ResolveRelativeFile(
args: esbuild.OnResolveArgs,
preserveRemotes: boolean,
relativeRoot?: string,
): esbuild.OnResolveResult | null
ResolveRemoteFile(args: esbuild.OnResolveArgs, preserveRemotes: boolean): esbuild.OnResolveResult | null
ResolveSpecifierFile(build: () => esbuild.PluginBuild, args: esbuild.OnResolveArgs): Promise<esbuild.OnResolveResult | null>
ResolveVirtualFile(args: esbuild.OnResolveArgs, files: Record<string, string>): esbuild.OnResolveResult | null

Static Methods

ConfigurePlugin(
files: Record<string, string>,
preserveRemotes: boolean,
relativeRoot?: string,
importMap?: Record<string, string>,
): esbuild.Plugin