AshCommanded.Commanded.Transformers.GenerateCommandedApplication (AshCommanded v0.1.0)
View SourceGenerates a Commanded.Application module based on the configuration in the application section.
This transformer:
- Extracts application configuration from the DSL
- Generates a module that uses Commanded.Application
- Configures it with the options from the application section
- Includes supervision tree integration if specified
Summary
Functions
Callback implementation for Spark.Dsl.Transformer.after_compile?/0
.
Callback implementation for Spark.Dsl.Transformer.before?/1
.
Transforms the DSL state by adding the generated Commanded application module.
Functions
Callback implementation for Spark.Dsl.Transformer.after_compile?/0
.
Callback implementation for Spark.Dsl.Transformer.before?/1
.
@spec transform(Spark.Dsl.Transformer.t()) :: {:ok, Spark.Dsl.Transformer.t()} | {:error, term()}
Transforms the DSL state by adding the generated Commanded application module.
Parameters
dsl
- The DSL state to transform.
Returns
The transformed DSL state with the generated Commanded application module added.
Examples
iex> transform(dsl)
%{dsl | modules: dsl.modules ++ [generated_module_ast]}