ak4zh / Caprover-API

MIT License
19 stars 9 forks source link

gen_random_hex works across whole one-click-app YAML #6

Closed IamJeffG closed 3 weeks ago

IamJeffG commented 3 weeks ago

This PR contains a couple improvements around the $$cap_gen_random_hex(...) replacement in one-click apps:

  1. gen_random_hex now works across whole YAML, not only under the caproverOneClickApp.variables section.
  2. gen_random_hex(n) generates $n$ ascii characters, not the hex representation of $n$ bytes.

I confirmed both these behaviors now match what the Caprover frontend UI does.

Added a test suite around variable substitution, including bringing the tox invocation up-to-date.

IamJeffG commented 3 weeks ago

This is ready for review & merge.

I'm happy to handle any merge conflicts between #6 and #7, if needed.