|
UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
|
import type;Functions | |
| function export | getDescendantProjectIds (projectId:string) |
| function export | buildProjectTree (projects:Project[]) |
| function export | parseSearch (q:string) |
| function export | getFiltered () |
| function export | sorted (arr:VaultEntry[]) |
Variables | |
| export type | ProjectTreeNode = Project & { children: ProjectTreeNode[]; virtual: boolean } |
| const | SEARCH_FILTER_KEYS = ['price', 'cat', 'env'] |
| Search prefixes that mean "filter by this field". | |
| const | words |
| return { filters, text: words.join(' ') } | |
| function export getDescendantProjectIds | ( | projectId:string | ) |
| function export buildProjectTree | ( | projects:Project[] | ) |
| function export parseSearch | ( | q:string | ) |
| function export getFiltered | ( | ) |
| function export sorted | ( | arr:VaultEntry[] | ) |
Search prefixes that mean "filter by this field".
Everything else containing a colon is ordinary text.
Without the whitelist, any token with a colon became a filter: searching postgres://user produced the filter postgres="//user", which no branch in getFiltered reads, and left the text query empty — so looking for a connection string silently returned the entire vault instead of the one entry, and looked like everything matched.
| const words |
| return { filters, text: words.join(' ') } |