Full configuration export/import system for Homarr with excellent DX: - Export/import boards, apps, integrations (with re-encrypted secrets), users (with bcrypt hashes), groups (with permissions and memberships), search engines, and server settings - Homepage services.yaml import with widget-type mapping - Generic resolveEntities() utility eliminates per-entity boilerplate - Declarative entity-fields.ts: adding a new user preference requires only one line change (no export/import/schema edits needed) - User schema uses .catchall(z.unknown()) for forward-compatible prefs - groupByKey() utility replaces manual Map-building - CONFIG_ENTITY_KEYS as single source of truth for entity metadata - Reuse existing entities (apps by name+icon+href, integrations by kind+name+url, users by email, groups by name, boards by name) - Skip duplicates with warnings rather than failing - Onboarding flow skips user creation step when config includes users - Reuse existing admin group during onboarding after config import
26 lines
1.4 KiB
TypeScript
26 lines
1.4 KiB
TypeScript
export {
|
|
CONFIG_BUNDLE_FORMAT_VERSION,
|
|
assessBundleCompatibility,
|
|
parseAndValidateBundle,
|
|
parseConfigBundleJson,
|
|
} from "./src/config-bundle-compat";
|
|
export { USER_DIRECT_FIELDS, USER_REF_FIELDS, GROUP_REF_FIELDS } from "./src/entity-fields";
|
|
export { resolveEntities, groupByKey, type EntityResolverDef, type ResolveResult } from "./src/resolve-entities";
|
|
export { homarrBundleSchema, homarrConfigBundleSchema, type HomarrBundle, type HomarrConfigBundle, type ConfigBundleUser } from "./src/schema";
|
|
export type { ConfigEntityCounts, ConfigEntityKey, ConfigExportPreview, ConfigImportPreview } from "./src/types";
|
|
export { CONFIG_ENTITY_KEYS, emptyCounts } from "./src/types";
|
|
export { exportBoardBundleAsync, bundleFilenameForBoard } from "./src/export";
|
|
export { exportFullConfigAsync } from "./src/export/export-full-config";
|
|
export { previewExportFullConfigAsync } from "./src/export/preview-export-full-config";
|
|
export { parseBundleJson, importBoardBundleAsync, type BundleImportReport } from "./src/import";
|
|
export { importFullConfigAsync, type ConfigImportReport } from "./src/import/import-full-config";
|
|
export { previewImportFullConfigAsync } from "./src/import/plan-full-config-import";
|
|
export {
|
|
parseServicesYaml,
|
|
importHomepageServicesAsync,
|
|
homepageWidgetMap,
|
|
type HomepageService,
|
|
type HomepageImportReport,
|
|
type ParseServicesYamlResult,
|
|
} from "./src/homepage";
|