Skip to content

@xtandard/flags/snapshot

Snapshot compilation, versioning, and storage operations.

A snapshot is an immutable, versioned freeze of a draft for one project/environment. Publishing writes a new snapshots/{version} and flips active_version; rollback flips active_version back to an earlier snapshot. The runtime provider reads whole snapshots — never individual flags.

import { … } from "@xtandard/flags/snapshot";
Name Summary
compileDraft Compile a draft into an immutable snapshot. Does not persist anything.
nextVersion Compute the next v{n} version given the set of existing version strings.
Name Summary
SnapshotStore Storage-backed snapshot operations. Constructed over any FlagsStorage. The runtime provider uses only the read methods.
Name Summary
CompileOptions Options for compileDraft.