DuskCoreApi
What the core plugin exposes to tests and tools.
What the core plugin exposes to tests and tools.
Import#
ts
import type { DuskCoreApi } from "@shadow-js/dusk/vite";
Signature#
ts
interface DuskCoreApi {
/** The server functions of the project (scans on first use). */
getServerFns(): Promise<readonly ServerFnRecord[]>;
/** The assets of the last client build, once there was one. */
readonly builtAssets: BuiltAssets | undefined;
/** The project layout (after `configResolved`). */
readonly layout: ProjectLayout | undefined;
/** The name of the adapter in `dusk({ adapter })`, or undefined without one. */
readonly adapterName: string | undefined;
/** The env files loaded for the mode, by name, in the order they are read (names only, never values). */
readonly envFiles: readonly string[];
/** `build.budgets` of `dusk.config.ts`, when the file sets them. */
readonly buildBudgets: DuskBuildBudgets | undefined;
/** The summary of the last production build, once there was one. */
readonly buildReport: BuildReport | undefined;
}
Members#
| Name | Type | Description |
|---|---|---|
getServerFns |
getServerFns(): Promise<readonly ServerFnRecord[]> |
The server functions of the project (scans on first use). |
builtAssets |
readonly builtAssets: BuiltAssets | undefined |
The assets of the last client build, once there was one. |
layout |
readonly layout: ProjectLayout | undefined |
The project layout (after configResolved). |
adapterName |
readonly adapterName: string | undefined |
The name of the adapter in dusk({ adapter }), or undefined without one. |
envFiles |
readonly envFiles: readonly string[] |
The env files loaded for the mode, by name, in the order they are read (names only, never values). |
buildBudgets |
readonly buildBudgets: DuskBuildBudgets | undefined |
build.budgets of dusk.config.ts, when the file sets them. |
buildReport |
readonly buildReport: BuildReport | undefined |
The summary of the last production build, once there was one. |