Runtime state struct shared by every command.
A Marea.Config.t/0 is produced by make_config/1 during service init
and threaded through the Marea.Plugins.Base.marea_cmd/2 plugin chain. It carries the
validated marea.yaml, the parsed CLI command/options/flags, the
loaded configs/ and secrets/ files, and persisted last values.
Summary
Functions
Returns the current Marea.Config.t/0 from the running service.
Builds the initial config used by Marea.Service during init.
Types
@type t() :: %Marea.Config{ cmd_prefix: %{optional(atom()) => String.t()} | nil, cmds: [atom()] | nil, configs: %{optional(String.t()) => term()} | nil, flags: map() | nil, marea_config: map() | nil, marea_config_file: String.t() | nil, marea_dir: String.t() | nil, optimus: Optimus.t() | nil, options: map() | nil, secrets: %{optional(String.t()) => term()} | nil, state_dir: String.t() | nil, values: map() | nil }
Runtime state struct shared by every command.
Fields:
:marea_config_file— path the YAML was read from.:marea_config— validated YAML (output of theZoischema).:optimus— theOptimusparser used for:usagefallbacks.:cmds— parsed subcommand chain (e.g.[:build, :docker]).:options,:flags— parsed CLI options/flags.:configs— files loaded from<marea_dir>/configs/.:secrets— files loaded from<marea_dir>/secrets/(YAML decoded).:values— persisted state from.marea/last_valuesplus command-derived values (e.g.:deploy,:release,:git_vsn).:marea_dir,:state_dir,:cmd_prefix— resolved from YAML.
Functions
@spec get_config() :: t()
Returns the current Marea.Config.t/0 from the running service.
Builds the initial config used by Marea.Service during init.
Runs the Marea.Plugins.Base.marea_deploy_types/1,
Marea.Plugins.Base.marea_release_types/1,
Marea.Plugins.Base.marea_config_schema/1 and
Marea.Plugins.Base.marea_config_args/1 plugin chains,
validates the YAML against the resulting schema, parses the CLI args
with Optimus, loads configs/ and secrets/, and restores values
persisted in .marea/last_values.