UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
tools.ts File Reference
import buildBundle;

Functions

function asImportRecord (value:unknown)
 
function stringValue (value:unknown)
 
function normalizeImported(raw:unknown) copyOrExplain (v:string)
 Force an imported object into a shape the rest of the app can render.
 

Variables

type ImportRecord = Record<string, unknown>
 

Function Documentation

◆ asImportRecord()

function asImportRecord (   value:unknown)

◆ stringValue()

function stringValue (   value:unknown)

◆ copyOrExplain()

function normalizeImported(raw:unknown) copyOrExplain (   v:string)

Force an imported object into a shape the rest of the app can render.

The json and yaml branches above hand back whatever was in the file. An object with no provider reached sorted(), which calls a.provider.localeCompare(...) and threw — a malformed import took the whole grid down rather than being rejected. Missing arrays caused the same class of failure further in. The Copy buttons on the generator and converter panes. They used to be if (v) clipboardWrite(v): nothing happened with an empty output, and nothing visible happened with a full one either, because clipboardWrite does not toast. Phase 32's efficacy probe found 14 of them. A control must say what it did, including when it did nothing.

One finding. id/secretType/field are present for entry-scoped findings — everything except the stale-${ref} and orphan-project checks, which are about a chunk or a project rather than one entry and have nowhere to jump to. Grouping and the type-badge filter both key off id; a finding without one renders in the flat "Other" section instead.

Extracted from the click handler so a filter change can re-render against the last scan without re-running it.

high > med > low, worst first — an entry's group sorts by its own worst finding, and within a group findings sort the same way.

Selected entries, resolved fresh from ids at the moment of the action.

Expand one cron field into the exact set of values it matches. Handles wildcards, ranges (a-b), lists (a,b,c) and steps (a-b/n, a/n, wildcard-with-step), in any combination. Returns null when the field is malformed or out of range.

Next count fire times for a 5-field cron expression.

Walks forward skipping whole months/days/hours that cannot match, instead of testing 10 000 consecutive minutes one at a time — the old version could not see past ~7 days and so returned nothing at all for anything monthly or rarer.

Variable Documentation

◆ ImportRecord

type ImportRecord = Record<string, unknown>