MishkaGervaz.Form.Transformers.BuildRuntimeConfig (MishkaGervaz v0.0.1-alpha.2)

Copy Markdown View Source

Compiles the form DSL state into a single runtime-friendly map and persists it under :mishka_gervaz_form_config.

Runs last in the form transformer pipeline (after MishkaGervaz.Form.Transformers.ResolveFields). The compiled config is read at runtime through MishkaGervaz.Resource.Info.Form.config/1 and the surrounding accessors on that module.

Each build_<section>/n helper takes the DSL state and returns the shape that lands under that key in the persisted config. UI sub-entities flow through one shared maybe_ui/1 that drops empty structs to nil so accessors don't have to check for placeholder zero-value structs at runtime.

Summary

Functions

after_compile?()

Callback implementation for Spark.Dsl.Transformer.after_compile?/0.

before?(_)

Callback implementation for Spark.Dsl.Transformer.before?/1.