Expand description
WP2 — Package & Publish: turn a QappManifest into an installable PWA bundle on disk.
Reuses [qualia_cooperative_core::qapp_package::generate_pwa] (the P0 foundation) and writes
the generated bundle to a caller-chosen directory, path-traversal-safe. Producing the bytes is
WP2; serving them over a secure origin so a phone can install is a later stage (P1, see the
companion-PWA plan). This module is the authoring → artifact bridge.
Functions§
- build_
manifest - Build a [
QappManifest] from discrete author-supplied fields. The wasm bundle is referenced by filename only (its hash/size are filled by the build stage, P3); an emptywasm_filenamedefaults toapp.wasm. - parse_
capability - Parse a capability token to a [
Capability] (extensible: unknown →Custom). - parse_
kind - Parse a kind string to a [
QappKind] (extensible: unknown →Custom). - write_
pwa_ bundle - Generate the PWA bundle for
manifestand write every file undertarget_dir. Returns the list of written (bundle-relative) paths. Rejects an invalid manifest and any unsafe bundle path.