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

Variables

import type { Project, SecretChunk } from './types'
 Read a rendered config back into a project's chunks (Phase 35 and 34 leftovers): "restore this snapshot", and "take what the node actually has".
 import
family __pad0__
 Every chunk type the format owns, so a type absent from the file is removed too.
const READERS
const Reader

Variable Documentation

◆ type

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

Read a rendered config back into a project's chunks (Phase 35 and 34 leftovers): "restore this snapshot", and "take what the node actually has".

The parsers are the app's own import parsers (chunks/parsers.ts), so a restored config is read exactly the way an imported one is. There is deliberately no Rust twin: the .env case has one (env_import_plan), and a second implementation of six config formats would be six chances for the app and the CLI to disagree about what a file meant. The capability map records it as a UI-only half with that reason.

What it replaces is the family of chunk types the format produces, not the whole project: restoring wg0.conf replaces the interface and peers and leaves a note or an unrelated chunk alone. Values arrive as literal text (the file had no references in it), so the caller says so before applying.

◆ import

import
Initial value:
{
} from './chunks/parsers'
function export parseHaproxyConf(text:string)
Definition parsers.ts:68
function export parseDockerCompose(text:string)
Definition parsers.ts:151
function export parseApacheConf(text:string)
Definition parsers.ts:14
function export parseNginxConf(text:string)
Definition parsers.ts:319
function export parseWgConf(text:string)
Definition parsers.ts:105
function export parseSshConfig(text:string)
Definition parsers.ts:300

◆ __pad0__

family __pad0__

Every chunk type the format owns, so a type absent from the file is removed too.

◆ READERS

const READERS

◆ Reader

const Reader
Initial value:
= {
wireguard: { parse: parseWgConf, family: ['wg_interface', 'wg_peer'] },
nginx: {
family: ['nginx_server', 'nginx_upstream', 'nginx_location'],
},
apache: { parse: parseApacheConf, family: ['apache_vhost', 'apache_directory'] },
family: ['haproxy_global', 'haproxy_frontend', 'haproxy_backend'],
},
compose: {
family: ['docker_service', 'docker_network', 'docker_volume'],
},
ssh: { parse: parseSshConfig, family: ['ssh_host'] },
}
export const apache
Definition types.ts:894
export const nginx
Definition types.ts:890
export const haproxy
Definition types.ts:895
export const wireguard
Definition types.ts:888