AshVault.Transformers.ExpandAttributes (AshVault v0.2.0)

Copy Markdown View Source

Expands the attributes [:a, :b] sugar into real %AshVault.Encrypted{} entities.

Names that already have an explicit encrypt entity are skipped, so options set there win. Entities are appended (type: :append) — Spark.Dsl.Transformer.add_entity/4 prepends by default, which would silently reverse field order relative to the explicit entities.

The attributes option is left in place afterwards; AshVault.Info.encrypted_fields/1 de-duplicates against the entities, so running this transformer is idempotent and nothing downstream depends on whether it has run yet.

Summary

Functions

after?(_)

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

after_compile?()

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