(x: unknown)
| 51 | |
| 52 | /** Return true when `x` is a SecretRef. */ |
| 53 | export function isSecretRef(x: unknown): x is SecretRef { |
| 54 | return ( |
| 55 | typeof x === 'object' && |
| 56 | x !== null && |
| 57 | typeof (x as Record<string, unknown>)['__secretName'] === 'string' |
| 58 | ) |
| 59 | } |
| 60 | |
| 61 | /** Resolve a SecretRef to its plaintext value using the secrets object. */ |
| 62 | export function resolveSecret(secrets: Secrets, ref: SecretRef): string { |
no outgoing calls
no test coverage detected