sup! I'm starting to use aero and got a question: is there a way of defining a default behavior for #profile
? just to avoid this type of repetition:
{:jwt-pub-key #profile {:local #pub-key "auth/jwt_id_rsa.pub.pem"
:dev #ref [:secrets :jwt-pub-key]
:sandbox #ref [:secrets :jwt-pub-key]
:prod #ref [:secrets :jwt-pub-key]}}
#or [#profile {...} #ref [...]]
should work.
well.. that's embarrassingly obvious lol. thanks!
there is also :default
awesome, thanks! btw, can I get a "code review" here? 😂 just to check if I'm not doing something wrong: https://gist.github.com/caioaao/d8aefd60b110d92ab89b7aef28e34aa4 the motivating example is under the implementation and it's something like this config that I wanted to support:
{:jwt-priv-key #priv-key #profile {:dev #io/resource "jwt_key.pem"
:default {:path #join [#env HOME "/.keys/jwt_key.pem"]
:passphrase #ref [:secrets :jwt-priv-key :passphrase]}}}
my two doubts are if I'm implementing the priv-key
literal right (the config can either be a path or a map containing :path
and :passphrase
) and if the #io/resource
+ aero/root-resolver
combination is an anti-pattern for some reasonit looks like it's working btw