improved module manager's secrets extraction, updated plugins

This commit is contained in:
dswbx
2025-09-05 13:31:20 +02:00
parent 94e168589d
commit bdcc81b2f1
10 changed files with 154 additions and 47 deletions
+3 -1
View File
@@ -3,12 +3,14 @@ import { App, type AppConfig, type AppPlugin } from "bknd";
export type SyncConfigOptions = {
enabled?: boolean;
includeSecrets?: boolean;
includeFirstBoot?: boolean;
write: (config: AppConfig) => Promise<void>;
};
export function syncConfig({
enabled = true,
includeSecrets = false,
includeFirstBoot = false,
write,
}: SyncConfigOptions): AppPlugin {
let firstBoot = true;
@@ -26,7 +28,7 @@ export function syncConfig({
},
);
if (firstBoot) {
if (firstBoot && includeFirstBoot) {
firstBoot = false;
await write?.(app.toJSON(includeSecrets));
}