Decode a base64:<…> compose payload to UTF-8 without depending on Node
Buffer (tier 1). THE single decoder for embedded compose bytes — every
other decode site is one of the two wrappers below, never its own atob or
Buffer.from. The wrappers exist because the two callers need opposite
things from a malformed payload, and both need something other than a raw
DOMException:
collectComposeFindingsForValue turns it into a FINDING, so
loadStackFile keeps its never-throw invariant and the deploy gate
still refuses the payload;
tryDecodeComposeBase64 yields undefined, for callers that lint
the text opportunistically and must not report on it.
A value with no base64: prefix is returned unchanged.
Parameters
composeFile: string
Returns string
Throws
DOMException from atob on a payload that is not valid base64 —
call a wrapper rather than this directly.
Decode a
base64:<…>compose payload to UTF-8 without depending on NodeBuffer(tier 1). THE single decoder for embedded compose bytes — every other decode site is one of the two wrappers below, never its ownatoborBuffer.from. The wrappers exist because the two callers need opposite things from a malformed payload, and both need something other than a rawDOMException:loadStackFilekeeps its never-throw invariant and the deploy gate still refuses the payload;undefined, for callers that lint the text opportunistically and must not report on it.A value with no
base64:prefix is returned unchanged.