|
UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
|
import type;Functions | |
| function | readQuoted (source:string) |
| if (q &&/^\s *(?:#.*)?$/.test(q.rest)) | |
| else | if (/^[-+]?(?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+) $/.test(source)) |
| else | if (/^[-+]?\d+$/.test(source)) |
| else | if (/^[-+]?(?:\d+\.\d *|\.\d+|\d+)(?:[eE][-+]?\d+)?$/.test(source)) |
| else | if (source==='True'||source==='False') |
| Parses an expression. | |
| if (taken.has(name)) | |
| for (const [from, { to, n }] of rewrites) warnings.push(`$ | |
| function | convertFString (body:string, bound:Map< string, string >,) |
{name} holes only. | |
| for (let i=0;i< body.length;i++) | |
Variables | |
| export interface | ImportedVar |
| Import a Python config module as bundle-local variables (Phase 24.1). | |
| value | __pad0__ |
| kind | __pad1__ |
| __pad2__ | |
| Safe to print: a prefix, a colour, a title, a link with no credential in it. | |
| export interface | BundleImport |
| warnings | __pad3__ |
| const | IDENT = /^[A-Za-z_]\w*$/ |
| null | |
| let | value |
| let | kind = 'string' |
| let | extraWarning = '' |
| const | q = readQuoted(source) |
| else | |
| imported as source | text |
| __pad4__ | |
| let | key = name |
| const | isPub = isPublic(name, kind, value, publicKeys) |
| later | reference$ {n === 1 ? '' : 's'} to ${from} now ${n === 1 ? 'uses' : 'use'} ${to}` |
| later | return { vars, warnings } |
| const | rewrote |
| const | string [] = [] |
| function readQuoted | ( | source:string | ) |
| if | ( | q &&/^\s *?:#.*)?$/.test(q.rest | ) |
| else if | ( | /^?(?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+) $/.test(source)[-+] | ) |
| else if | ( | /^?\d+$/. | test(source)[-+] | ) |
| else if | ( | /^?(?:\d+\.\d *|\.\d+|\d+)(?:[eE][-+]?\d+)?$/.test(source)[-+] | ) |
|
new |
Parses an expression.
Throws with a readable message on malformed input.
| if | ( | taken. | hasname | ) |
| for | ( | const of | rewrites[from, { to, n }] | ) |
| function convertFString | ( | body:string, | |
| bound:Map< string, string > | |||
| ) |
{name} holes only.
Returns null when anything else is inside braces.
| for | ( | ) |
| export interface ImportedVar |
Import a Python config module as bundle-local variables (Phase 24.1).
Reads the assignment subset only: string and f-string literals, ints (decimal, hex, binary, octal), floats, True/False/None. Nothing is executed. Any other right-hand side is imported as its source text with a warning naming the line, never dropped.
Rules that exist because the alternative is a silent wrong value:
name_2; every f-string written after the second assignment is rewritten to {name_2}, because that is the value Python bound at that point. All three facts are reported. "Last one wins" would hand the line between the two assignments the wrong key.large_id); a JS number would round it.template over {name} holes. An f-string that holds anything but plain names ({x!r}, {x:>5}, {a + b}) cannot be a template, so it is kept as a string and reported.Twin of vault_core::bundle_import, pinned by tests/fixtures/parity/bundle-import.json.
| value __pad0__ |
| kind __pad1__ |
| __pad2__ |
Safe to print: a prefix, a colour, a title, a link with no credential in it.
Set only when the importer is sure; everything else stays masked (redaction is fail-closed). Absent, not false, when not public.
| export interface BundleImport |
| warnings __pad3__ |
| const IDENT = /^[A-Za-z_]\w*$/ |
| return null |
| let value |
| kind = 'string' |
| extraWarning = '' |
| const q = readQuoted(source) |
| else |
| imported as source text |
| __pad4__ |
| let key = name |
| later reference$ {n === 1 ? '' : 's'} to ${from} now ${n === 1 ? 'uses' : 'use'} ${to}` |
| return { vars, warnings } |
| const rewrote |
| const string[] = [] |