compmd-host
What every host of CompMD documents shares, whatever its platform: the bundle a host builds before anyone reads (the sandbox's frames under a content hash, the packs it installs, and its manifest.json), the store of packs it gets later, and respond, the serving contract an adapter puts behind its origin. The design, and why each rule is there, is hosting CompMD.
use ;
let bundle = read?; // what @compmd/vite wrote
let store = new;
let response = respond; // for a request on the adapter's origin
Bundlereads a bundle embedded in a binary, in a folder, or made in memory for a test (Bundle::from_files); itsManifestis what@compmd/vitewrote, and a manifest of a format this crate doesn't know is refused, saying what to upgrade.Storeis where a host keeps packs beyond the bundle;FolderStorekeeps them in a folder, by their place, with their integrity.respondanswersGET /frames/<hash>/<path>andGET /packs/<name>@<version>/<path>, with the headers that sandbox them, and refuses anything else, saying why.HostPacks(theprocessorfeature) gives the processor,compmd, the same packs the frames load.
Adapters: tauri-plugin-compmd for Tauri.
Status
In development, released with CompMD's packages at the same version.
Versions:
- 0.7.0: the first version.