@spacefast/build-output
v0.5.0
Published
The spacefast.buildoutput.v1 contract and the classification manifest adapters emit for the Spacefast CLI classifier.
Readme
@spacefast/build-output
The two on-disk contracts of Automagic Publish, defined once and imported by both sides:
spacefast.buildoutput.v1— the manifest describing what a build produced: static tree with content hashes, immutable assets, the worker bundle, route claims, prerenders with their revalidation facts, route rules, tag→path index, capabilities, env var names, and Durable Object cache seeding. Loaded withloadBuildOutput(path).- Classification manifest (
.spacefast/build.json) — the shared fact format adapters emit and the CLI classifier consumes: routes and their framework-declared render classes, middleware matchers, route rules, prerendered files, and implicit endpoints. Loaded withloadClassificationManifest(path).
Adapters emit facts only — how the framework built the app — never platform policy. Serving decisions belong to the classifier and the platform.
Both loaders are fail-closed and answer a three-way question: null means the
file does not exist, a parsed document means it validated in full, and
anything else — unreadable, malformed JSON, an unknown schema version, or a
shape violation — throws a ContractFileError whose reason says which.
