Marea.Service (marea v0.0.1-rc.1)

Copy Markdown View Source

The Malla.Service that backs the running CLI.

Started by Marea.main/1, it owns the validated Marea.Config.t/0 and exposes execute/0 (escript) and execute_inline/0 (Mix task), each of which runs the Marea.Plugins.Base.marea_cmd/2 plugin chain and turns its return value into a side effect (deferred command, error, usage, etc.).

Summary

Functions

Run the parsed command for the escript path; writes deferred command to .marea/next_cmd.

Run the parsed command for mix marea; returns {:exec, cmd} instead of writing to next_cmd.

Build the initial service config; runs during service_init.

Functions

execute()

@spec execute() :: :ok | no_return()

Run the parsed command for the escript path; writes deferred command to .marea/next_cmd.

execute_inline()

@spec execute_inline() :: :ok | {:exec, String.t()} | no_return()

Run the parsed command for mix marea; returns {:exec, cmd} instead of writing to next_cmd.

service_config_malla_service(config)

@spec service_config_malla_service(any()) :: any()

Build the initial service config; runs during service_init.

Intercepts the standard service_config/1 callback from Malla.Plugins.Base to delegate to Marea.Config.make_config/1.