|
UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
|
ENV chunk <-> vault linking — match plain KEY=value env-file fields against existing vault entries so they can be replaced by ${ref} placeholders, and suggest new entries for the ones that have no match.
More...
import type;Functions | |
| function | _findBestVaultMatch (key:string, value:string,) |
| for (const e of st.vault.api_keys) | |
| function | _suggestCreateEntry (key:string) |
| if (suffixMatch) return | |
| Parses an expression. | |
| function export | buildEnvLinkMatches (chunk:SecretChunk) |
Variables | |
| export interface | EnvLinkMatch |
| rawValue | __pad0__ |
| alreadyLinked | __pad1__ |
| existingRef | __pad2__ |
| match | __pad3__ |
| ref | __pad4__ |
| field | __pad5__ |
| confidence | __pad6__ |
| suggestCreate | __pad7__ |
| keyId | __pad8__ |
| secretType | __pad9__ |
| null | |
| let | tiedWith |
A second entry with the same score as best. | |
| const | _providerRef = (e: VaultEntry) => (e.key_id ? `${e.provider}_${e.key_id}` : e.provider) |
| return best &&best | confidence = 63 ? best : null |
| let | secretType |
| const | suffixMatch |
| return { provider: key, secretType } | |
ENV chunk <-> vault linking — match plain KEY=value env-file fields against existing vault entries so they can be replaced by ${ref} placeholders, and suggest new entries for the ones that have no match.
| function _findBestVaultMatch | ( | key:string, | |
| value:string | |||
| ) |
| for | ( | const e of st.vault. | api_keys | ) |
| function _suggestCreateEntry | ( | key:string | ) |
|
new |
Parses an expression.
Throws with a readable message on malformed input.
| function export buildEnvLinkMatches | ( | chunk:SecretChunk | ) |
| rawValue __pad0__ |
| alreadyLinked __pad1__ |
| existingRef __pad2__ |
| match __pad3__ |
| ref __pad4__ |
| field __pad5__ |
| confidence __pad6__ |
| suggestCreate __pad7__ |
| keyId __pad8__ |
| secretType __pad9__ |
| null |
| let tiedWith |
A second entry with the same score as best.
Its presence refuses the link.
| const _providerRef = (e: VaultEntry) => (e.key_id ? `${e.provider}_${e.key_id}` : e.provider) |
| let secretType |
| const suffixMatch |
| return { provider: key, secretType } |