@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Function resolveSecret

    • Resolve a credential value that may be a $ENV:VAR reference.

      • Literal strings pass through unchanged.
      • $ENV:VAR reads process.env.VAR and returns it. Throws MissingEnvSecretError with reason: 'unset' if the variable is not set, and reason: 'empty' if it is set to the empty string. We treat empty as missing to catch .env typos — a compliance run should loudly fail rather than silently POST an empty secret.

      Whitespace around the variable name ($ENV: FOO) is tolerated — a common copy/paste mistake that we don't want to punish at runtime.

      Parameters

      • value: string

      Returns string