Cherry.Theme.Drift (cherry v0.4.0)

Copy Markdown View Source

Managed drift (DESIGN.md, "the piece nobody ships"): because theme.eject recorded provenance, a theme upgrade is a mechanical three-way comparison — the base you ejected from, the installed upstream, and your copy.

statusmeaning
:currentupstream unchanged since eject — nothing to do
:auto_updatableupstream moved, you didn't touch it — safe to re-eject
:conflictboth moved — a human (or agent) resolves
:untrackedno provenance header — a hand copy we cannot manage
:rewrittena .heex rewrite — a different language, yours outright; no three-way merge is possible or expected
:shadowedan .eex overlay a .heex rewrite outranks — inert until the rewrite is removed

Summary

Functions

Drift entries for every template this site overlays, manifest order.

Re-ejects an :auto_updatable overlay from the installed theme, stamping fresh provenance. Refuses any other status — a conflict or hand copy is never silently overwritten.

Functions

entries(site, theme)

Drift entries for every template this site overlays, manifest order.

update(entry, theme)

@spec update(Cherry.Theme.Drift.Entry.t(), Cherry.Theme.t()) ::
  :ok | {:error, String.t()}

Re-ejects an :auto_updatable overlay from the installed theme, stamping fresh provenance. Refuses any other status — a conflict or hand copy is never silently overwritten.