* Support standard Docker Compose command/entrypoint semantics and One-Click v5 catalog
* Address PR review: simplify helpers/tests, reject NUL args, validate template response
* Address follow-up PR comments and wire Docker Swarm test into CI
* fix: allow mapping-form depends_on in service type
* fix: sort mapping-form service dependencies by key
* test: cover list and mapping-form dependency ordering
As requested in review, keep the existing substitution for values that
are already valid JSON string contents and only escape values that
would fail to parse. Escaping every value broke overrides escaped by
hand, such as {\"text\":\"hello\"} with an empty default, which master
passes as {"text":"hello"}.
Add a regression test for that case, and expect the existing decoding
for the path and regex cases that contain valid JSON escapes.
Unescaping \" in every value turned a backslash-quote pair typed by a
user, such as C:\data\"secret, into a plain quote. Keep every entered
value as is, and only unescape \" when the value is the variable's
unchanged default, which is where templates such as remark42 escape
quotes by hand.
Values that were already valid inside a JSON string were inserted
as-is, so backslash sequences such as \n in C:\new or \b in a regex
were still decoded. JSON-escape every value instead, and only unescape
\" first, which the remark42 template and the workaround from #1328
rely on. Values are converted to strings first because the deploy
route does not enforce string values.
One-click values are inserted into the stringified template without
escaping, so a value containing a quote, a newline or a stray
backslash made the template fail to parse. Escape such values before
inserting them. Values that are already valid inside a JSON string,
including values escaped by hand such as \", are inserted unchanged so
existing templates keep working.
Fixescaprover/caprover-frontend#104
A one-click deploy with more than one service checked each app name only
when it registered that app. A later name that was too long or already
taken failed after the project and the earlier apps were created, and
those stayed behind. Check every name before the first step instead, and
say the length limit in the error.
Fixes#2504