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

Functions

function export renameBundleRefs (entries:VaultEntry[], projects:Project[], oldName:string, newName:string,)
 Cascade a bundle-name change through bundle selectors in stored templates.
 
 for (const entry of entries)
 
 for (const project of projects)
 
function secretValue (value:unknown, secret:boolean)
 Resolve {local} and {slot.field}.
 
 for (const e of entries)
 
return[...groups.entries()] filter (([, list])=> list.length >=2) .map(([
 

Variables

export interface ScopedValue
 Bundle-local template resolution (Phase 24.1, step 4).
 
secret __pad0__
 
export interface BundleReferenceSite
 
template __pad1__
 
const scopedRef = new RegExp(`\\{${slotName}\\.[A-Za-z_][A-Za-z0-9_]*\\}`)
 
const sites
 
const seen = new Set<string>()
 
const add
 
export type ScopeError
 
export type ScopeResult
 
export type BundleCompositeResult
 
const MAX_DEPTH = 4
 
const groups = new Map<string, VaultEntry[]>()
 
return[...groups.entries()] list => ({ provider: list[0].provider, entries: list }))
 

Function Documentation

◆ renameBundleRefs()

function export renameBundleRefs (   entries:VaultEntry[],
  projects:Project[],
  oldName:string,
  newName:string 
)

Cascade a bundle-name change through bundle selectors in stored templates.

Cascade a slot rename through scoped and globally addressed templates. Cascade a local-variable rename through bundle templates and global selectors. Find bundle-scope templates that would become unresolved after member deletion.

◆ for() [1/3]

for ( const entry of  entries)

◆ for() [2/3]

for ( const project of  projects)

◆ secretValue()

function secretValue (   value:unknown,
  secret:boolean 
)

Resolve {local} and {slot.field}.

Missing or hidden inputs fail closed. Resolve bundle references into synthetic parts, then use the zone-aware composite renderer so each reference is encoded in its own URL position. Attach members to a new bundle entry named name. Mutates the members and returns the bundle; the caller pushes it and persists once (B14). Slots come from each member's label or provider, made valid and unique. Providers (case-folded) with two or more unbundled, un-pooled entries that have not been dismissed. Suggested, never automatic.

◆ for() [3/3]

for ( const e of  entries)

◆ filter()

return[...groups.entries()] filter (   ([, list]),
list.length >=  2 
)

Variable Documentation

◆ ScopedValue

export interface ScopedValue
Initial value:
{
value: string
let value
Definition bundle-import.ts:195

Bundle-local template resolution (Phase 24.1, step 4).

◆ __pad0__

secret __pad0__

◆ BundleReferenceSite

export interface BundleReferenceSite
Initial value:
{
label: string
label label
Definition settings-panel.ts:55

◆ __pad1__

template __pad1__

◆ scopedRef

const scopedRef = new RegExp(`\\{${slotName}\\.[A-Za-z_][A-Za-z0-9_]*\\}`)

◆ sites

return sites

◆ seen

const seen = new Set<string>()

◆ add

const add
Initial value:
= (label: string, template: string, scoped: boolean) => {
if (!(scoped ? scopedRef.test(template) : globalRef.test(template))) return;
const key = `${label}\0${template}`;
if (seen.has(key)) return;
seen.add(key);
sites.push({ label, template });
}
const string
Definition auth-panel.ts:37
later return
Definition bundle-import.ts:272
let key
Definition bundle-import.ts:252
const sites
Definition bundle-scope.ts:153
const seen
Definition bundle-scope.ts:154
const scopedRef
Definition bundle-scope.ts:152
const $
Tools -> Config history (Phase 35): the app side of unv history ....
Definition history-pane.ts:20

◆ ScopeError

export type ScopeError
Initial value:
=
| { kind: 'unresolved'; reference: string }
| { kind: 'cycle'; path: string[] }
| { kind: 'depth'; reference: string }
| { kind: 'invalid'; message: string }
let kind
Definition bundle-import.ts:196

◆ ScopeResult

export type ScopeResult
Initial value:
=
| { ok: true; value: ScopedValue; warnings: string[] }
| { ok: false; error: ScopeError; warnings: string[] }
export interface ScopedValue
Bundle-local template resolution (Phase 24.1, step 4).
Definition bundle-scope.ts:7
export type ScopeError
Definition bundle-scope.ts:187

◆ BundleCompositeResult

export type BundleCompositeResult
Initial value:
=
| { ok: true; value: string; secret: boolean; warnings: string[] }
| { ok: false; error: ScopeError | RenderError; warnings: string[] }
export type RenderError
Definition composite.ts:47

◆ MAX_DEPTH

const MAX_DEPTH = 4

◆ groups

const groups = new Map<string, VaultEntry[]>()

◆ list

return[...groups.entries()] list => ({ provider: list[0].provider, entries: list }))