mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-23 13:02:58 +00:00
Preserve legacy settings across same-profile upgrades
This commit is contained in:
@@ -287,19 +287,7 @@ export async function configureObjectStorage(
|
||||
settings: ObjectStorageConfig & { bucketPrefix: string },
|
||||
overrides: Record<string, unknown> = {}
|
||||
): Promise<ConfiguredSettings> {
|
||||
const nextSettings = {
|
||||
remoteType: "MINIO",
|
||||
endpoint: settings.endpoint,
|
||||
accessKey: settings.accessKey,
|
||||
secretKey: settings.secretKey,
|
||||
bucket: settings.bucket,
|
||||
region: settings.region,
|
||||
forcePathStyle: settings.forcePathStyle,
|
||||
bucketPrefix: settings.bucketPrefix,
|
||||
bucketCustomHeaders: "",
|
||||
...E2E_PREFERRED_SETTINGS,
|
||||
...overrides,
|
||||
};
|
||||
const nextSettings = createE2eObjectStoragePluginData(settings, overrides);
|
||||
return await evalObsidianJson<ConfiguredSettings>(
|
||||
cliBinary,
|
||||
[
|
||||
@@ -328,6 +316,25 @@ export async function configureObjectStorage(
|
||||
);
|
||||
}
|
||||
|
||||
export function createE2eObjectStoragePluginData(
|
||||
settings: ObjectStorageConfig & { bucketPrefix: string },
|
||||
overrides: Record<string, unknown> = {}
|
||||
): Record<string, unknown> {
|
||||
return {
|
||||
remoteType: "MINIO",
|
||||
endpoint: settings.endpoint,
|
||||
accessKey: settings.accessKey,
|
||||
secretKey: settings.secretKey,
|
||||
bucket: settings.bucket,
|
||||
region: settings.region,
|
||||
forcePathStyle: settings.forcePathStyle,
|
||||
bucketPrefix: settings.bucketPrefix,
|
||||
bucketCustomHeaders: "",
|
||||
...E2E_PREFERRED_SETTINGS,
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
export async function waitForLiveSyncCoreReady(
|
||||
cliBinary: string,
|
||||
env: NodeJS.ProcessEnv,
|
||||
|
||||
Reference in New Issue
Block a user