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

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

import type { Project, VaultEntry } from './types'
 Bundle-local template resolution (Phase 24.1, step 4).
 import { renderComposite, type CompositeKind, type RenderError } from './composite'
export interface ScopedValue
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

◆ type

import type { Project, VaultEntry } from './types'

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

◆ import

import { renderComposite, type CompositeKind, type RenderError } from './composite'

◆ ScopedValue

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

◆ __pad0__

secret __pad0__

◆ BundleReferenceSite

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

◆ __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:39
let key
Definition bundle-import.ts:260
const sites
Definition bundle-scope.ts:155
const seen
Definition bundle-scope.ts:156
const scopedRef
Definition bundle-scope.ts:154
const $
Definition history-pane.ts:22

◆ 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:198

◆ ScopeResult

export type ScopeResult
Initial value:
=
| { ok: true; value: ScopedValue; warnings: string[] }
| { ok: false; error: ScopeError; warnings: string[] }
export interface ScopedValue
Definition bundle-scope.ts:9
export type ScopeError
Definition bundle-scope.ts:189

◆ 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:49

◆ MAX_DEPTH

const MAX_DEPTH = 4

◆ groups

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

◆ list

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