juxt

2020-02-14T14:43:26.010800Z

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]}}

p-himik 2020-02-14T15:09:52.010900Z

#or [#profile {...} #ref [...]] should work.

2020-02-14T15:19:18.011100Z

well.. that's embarrassingly obvious lol. thanks!

👍 1
dharrigan 2020-02-14T15:30:44.011600Z

there is also :default

👍 1
💯 1
2020-02-14T15:59:53.015200Z

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 reason

2020-02-14T16:00:13.015500Z

it looks like it's working btw

1