API Reference svelixir v#0.61.2

Copy Markdown

Modules

Adds a child to a project's supervision tree, structurally.

Raised when a supervision tree a component must extend cannot be located.

Provenance and drift checking for the checked-in generator baselines.

The wall clock, as the one module under lib/ allowed to read it.

Reads and writes component.exs — a component's manifest (SDD 7.1).

Installs a derived component into a target project (SDD 7.3).

Decides what a hunk means (SDD 7.3).

Turns an observed diff into a component (SDD R1, 10).

Compares a meta project against its baseline (SDD R1).

Reads what a raw working project changed in mix.exs (SDD R1, D10).

Records an applied component in the target's fireside.exs (SDD 8.2, R5, R6).

The whole scaffolder config for one project, as a struct — one child struct per section of the templates in priv/templates.

The :api project preset — priv/templates/base_api_app.exs as code.

Which asset surfaces are generated — the assets: section.

API surface detail — the assets.api: block.

UI surface detail — the assets.ui: block.

Authentication surfaces — the auth: section.

Caching backend and client mode — the cache: section.

Container tooling — the container: section. Type-independent: podman and docker are valid for :otp and :web alike.

Sidecar containers to generate — the container.sidecars: block.

The closed domains the config sections draw their atom values from.

Optional capability toggles — the features: section.

Raised when a config section is given a key it does not declare, a value outside that key's domain, or a combination the canonical rules forbid.

The :otp project preset — priv/templates/base_otp_app.exs as code.

Identity of the project being scaffolded — the project: section.

Shared behaviour for the sections of Svelixir.Config.Otp.

Encryption and secret sourcing — the security: section. Type-independent: it applies to :otp and :web alike.

Supervision tree and repo ownership — the otp: section.

The :web project preset — priv/templates/base_web_app.exs as code.

Places a contribution inside a config/*.exs, by that file's own rules.

Raised when a config/*.exs site a component must contribute to cannot be located.

Codec for the plain-data .exs files Svelixir owns — svelixir.exs and fireside.exs.

Raised when an .exs file is not the plain data Svelixir expects.

Raised when a term cannot be written as re-readable .exs source.

Content hashing for manifest file entries.

Reads and writes fireside.exs — the generated lock file (SDD 8.2).

One component's entry in fireside.exs (SDD 8.2): what it is, which version of it was applied, where that version came from, when it was applied, and every file it owns or contributes to.

One file a component owns or contributes to (SDD 7.3).

Raised when fireside.exs is plain data of the wrong shape — a missing or unknown key, an unsupported schema_version, or a field whose value is outside its domain.

Locates and patches constructs in a mix.exs, structurally (SDD R5, R6).

Raised when a mix.exs construct a component must edit cannot be located.

A validated, absolute path to the project Svelixir is acting on.

Raised when a project-relative path would escape the target root.

Raised when a path is not a usable project root.

Converts a meta-project file into a name-agnostic EEx template, and back.

Mix Tasks

Builds a DERIVED baseline from a generator baseline plus a component.

Rewrites priv/baselines.exs and emits the content-addressed snapshot.

Fails while any unresolved :manual region remains.

Applies a derived component to a target project.

Derives a component from a raw working project (SDD 10).