Changelog
[1.31.2]
FIXES:
- fixed printed empty string when referencing multi-line strings including line breaks using
_HT*
. Referenced strings via_HT*
are now bytewise interpreted and printed including newlines usingprintf "%s" ($value | quote)
instead of just$value
. This transports original string as they are literally specified. - partially fixed referencing large numbers in their original form. Previously if a string contains large numbers > 999999 or values resembling scientific notation, any reference via
_HT*
to the source field interpreted the strings as numbers and converted them to usually undesired scientific notation, chaning their value and meaning. Side effect of usingprintf "%s" ($value | quote)
for string references, all strings are now transported unchanged. Essentially this makes the JSON hack mentioned in this issue obsolete when the source value is in string form.
CHANGES:
- using
tpl
transformations with_HT!
now allows in-place serialization of the result usingtoJson
,toPrettyJson
,toRawJson
,toYaml
ortoString
. This adds another serialization possibility besides the existing_HT/
include and_HT*
get transformation result serialization capabilities. Thanks ievgenii-shepeliuk for the feature request here. - made previously required dictionary wrapping of array contents for include/
_HT/
transformations obsolete by correctly making use of tofromYamlArray
Helm function. If an array was to be returned by a_HT/
transformation, previously it was needed to wrap it in a dictionary and grab the result from the chosen dictionary key. For example, an transformation like_HT/result/hull.transformation.do.something
would essentially return an array if the include produces a dictionary with a keyresult
that has an array value. Starting with this version, it is possible to call_HT/hull.transformation.do.something
and the resulting include can directly produce the array. - restructured documentation on transformations in the
hull/doc/transformation.md
file and removed references to obsolete legacy syntax for transformations.