|
UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
|
Client-side mirror of the permission expression language. More...
import type;Functions | |
| function export | globMatches (pattern:string, value:string) |
Same wildcard semantics as glob_matches in vault-core. | |
| function export parse(src:string) | if (pos !==toks.length) throw new Error('trailing input after the end of the expression') |
| Parses an expression. | |
Variables | |
| const | UNIVERSAL = 'Universal' |
| export type | Field = 'vault' | 'project' | 'category' | 'tag' | 'env' | 'type' |
| const | FIELD_ALIASES |
| export const | FIELDS |
| export const | project |
| export const | category |
| export const | tag |
| export const | env |
| export const | type |
| export type | Expr |
| type | Tok |
| return | expr |
Client-side mirror of the permission expression language.
Advisory only. This exists so the permission editor can validate syntax as you type and show "matches N of M entries" without a round trip. Enforcement lives in vault-core/src/permex.rs and is the only thing that decides real access — a browser can always lie about what it evaluated.
Semantics are kept deliberately identical to the Rust implementation: precedence NOT > AND > OR, field:* is unconditional, and a specific project predicate is never satisfied by the Universal catch-all.
| function export globMatches | ( | pattern:string, | |
| value:string | |||
| ) |
Same wildcard semantics as glob_matches in vault-core.
|
new |
Parses an expression.
Throws with a readable message on malformed input.
| const UNIVERSAL = 'Universal' |
| const FIELD_ALIASES |
| export const FIELDS |
| export const project |
| export const category |
| export const tag |
| export const env |
| export const type |
| export type Expr |
| type Tok |
| return expr |