|
UnENVerse 0.84.0
Local-first desktop secrets manager — TypeScript frontend
|
Functions | |
| function export | getDescendantProjectIds (projectId:string) |
| function export | buildProjectTree (projects:Project[]) |
| function export | parseSearch (q:string) |
| function export | getFiltered () |
| function | dateCompare (a:string|null|undefined, b:string|null|undefined, dir:1|-1,) |
| Compare two optional dates; a missing or unparsable one sorts after every real one. | |
Variables | |
| import | type { VaultEntry, Project } from './types' |
| import { st } from './state' | |
| 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 | ( | ) |
Compare two optional dates; a missing or unparsable one sorts after every real one.
| import type { VaultEntry, Project } from './types' |
| import { st } from './state' |
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(' ') } |