Skip to main content

Module qapp_publish

Module qapp_publish 

Source
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 empty wasm_filename defaults to app.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 manifest and write every file under target_dir. Returns the list of written (bundle-relative) paths. Rejects an invalid manifest and any unsafe bundle path.