The controlled facet vocabulary that steps declare with use Composer.Step.
Facets describe a step instead of encoding meaning in its module path:
action- what the step does: [:add, :remove, :gen, :config, :patch]frameworks- the frameworks it targetscapability- the capabilities it addsphase- an advisory position in a run (list order still decides)stability- how settled the step is
An unknown facet value is a compile-time warning, never an error, so a
cookbook can run ahead of composer's vocabulary. A value of the wrong
type (for example tags: "x") is an error.
requires entries are checked before a run:
"cookbook:path"- another step that should run earlier{:executable, "bun"}- an executable onPATH{:package, :phoenix, "~> 1.8"}- a version requirement on a dependency the target app declares
Summary
Types
A requires entry.
Functions
Every option use Composer.Step accepts.
The order of the phase facet, earliest first.
True for a well-formed requires entry.
Validates and normalizes step options.
Returns the values known for facet.
Returns the seed vocabulary as %{facet => [value]}.
Types
Functions
@spec known() :: [atom()]
Every option use Composer.Step accepts.
@spec phases() :: [atom()]
The order of the phase facet, earliest first.
True for a well-formed requires entry.
Validates and normalizes step options.
Returns {:ok, normalized, warnings}, where normalized is a map with
every known key (list facets default to [], single facets to nil), or
{:error, message} for an unknown option or a value of the wrong type.
Warnings are strings naming each unknown facet value.
Returns the values known for facet.
Returns the seed vocabulary as %{facet => [value]}.