@manta-eu/horns-client/vite
Reference for @manta-eu/horns-client/vite in @manta-eu/horns-client 0.2.3.
Variables
componentApiModuleId
constcomponentApiModuleId:"virtual:horns/component-api"="virtual:horns/component-api"
shapeCatalogModuleId
constshapeCatalogModuleId:"virtual:horns/shape-catalog"="virtual:horns/shape-catalog"
Functions
hornsComponentApi()
hornsComponentApi():
Plugin
What each surfaced component takes, as virtual:horns/component-api, read from @manta-eu/react’s .d.ts.
A worker has no filesystem, so the declarations arrive as data, the way the shape catalog does.
Returns
Plugin
hornsPlugins()
hornsPlugins(
realm):Plugin[]
Every build-time input the worker needs, in one line. One realm per build: the SDK resolves its own at load.
Parameters
realm
"hiremanta-com" | "journey-travel"
Returns
Plugin[]
hornsShapeCatalog()
hornsShapeCatalog(
realm):Plugin
The realm’s shape catalog as virtual:horns/shape-catalog, built from @manta-eu/ldo at build time.
A worker cannot import the SDK’s schema entry without stopping workerd, so the catalog has to arrive as data. One realm per build, because the SDK resolves its realm at module load.
Parameters
realm
"hiremanta-com" | "journey-travel"
Returns
Plugin
hornsWorkerSafe()
hornsWorkerSafe(
also?):Plugin
Keeps the worker bootable.
None of pnpm verify, vite build or wrangler deploy --dry-run evaluates the worker’s modules, so a
dependency that throws at load passes all three and then dies on the first request. boot:check is what
proves the worker starts; this is what keeps the known offenders from stopping it.
Parameters
also?
Readonly<Record<string, string>>
Returns
Plugin
References
hornsTypecheckFs
Re-exports hornsTypecheckFs
typecheckFsModuleId
Re-exports typecheckFsModuleId