improved module manager's secrets extraction, updated plugins
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user