Task: SitePack Exporter
Goal
Generate an unpacked SitePack package and (optionally) pack it into .sitepack (ZIP).
Input
Any site data model (content, assets, config, tables). The exporter decides which profiles are applicable.
Requirements
- Create
sitepack.manifest.jsonandsitepack.catalog.jsonat the root. - Fill
manifest.specandmanifest.package.id. manifest.createdAt— UTC date-time (ISO 8601).manifest.profiles— selected profiles.manifest.artifacts— list of artifact IDs.catalog.artifacts[]— full list of artifacts withid,mediaType,path,size, and (preferably)digest.size— byte length of the file.digest—sha256:<hex>.relationsMUST be emitted as an object mapping relation keys toLink[].- A Link MUST be either a string or an object with
refand optionalmeta. - If producing a split distribution, generate
sitepack.volumes.jsonwithspec.version = 0.4.0,kind = volume-set, and avolumes[]list. maxPartSizeSHOULD be 104857600 bytes (100 MiB) unless the user specifies otherwise.
NDJSON
- One JSON object per line.
- No extra spaces and no empty lines.
Chunked assets
- If an asset is chunked, emit
chunks[]withindex,size,sha256, andpathfor each chunk. - For chunked assets, omit
pathand includechunksat the asset level. - Compute and store both per-chunk sha256 and the overall asset sha256/size.
Profiles (recommendations)
config-only: config only.content-only: entities without assets.content+assets: entities + asset index.full: content + assets + config + recordsets.full+code:full+ code/software manifest.
Output
- Unpacked package directory.
- Optional: ZIP file with
.sitepackextension. reports/export.jsonsummary:
{
"packageId": "...",
"profiles": ["..."],
"artifacts": 0,
"files": 0,
"bytes": 0,
"digests": "sha256"
}