mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-06 16:28:18 +00:00
Merge CouchDB cache compatibility changes into Journal recovery
This commit is contained in:
commit
0ded0bcea5
16 files changed
+735
-85
No files matched your search
@@ -3167,7 +3167,7 @@ export const allMessages: Readonly<Record<string, Readonly<Record<string, string
|
||||
"zh-tw": "若啟用「自動啟動 P2P 連線」,外掛啟動時會自動建立 P2P 連線。",
|
||||
},
|
||||
"If disabled(toggled), chunks will be split on the UI thread (Previous behaviour).": {
|
||||
def: "If disabled(toggled), chunks will be split on the UI thread (Previous behaviour).",
|
||||
def: "When enabled, chunks are split on the UI thread (the previous behaviour).",
|
||||
es: "Si se desactiva, los chunks se dividen en el hilo de UI (comportamiento anterior)",
|
||||
fr: "Si désactivé, les fragments seront découpés sur le thread UI (comportement précédent).",
|
||||
he: "אם מכובה, נתחים יפוצלו בשרשור ממשק המשתמש (התנהגות קודמת).",
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
"I understand the risks and will proceed without a backup.": "I understand the risks and will proceed without a backup.",
|
||||
"I Understand, Overwrite Server": "I Understand, Overwrite Server",
|
||||
"If \"Auto Start P2P Connection\" is enabled, the P2P connection will be started automatically when the plug-in launches.": "If \"Auto Start P2P Connection\" is enabled, the P2P connection will be started automatically when the plug-in launches.",
|
||||
"If disabled(toggled), chunks will be split on the UI thread (Previous behaviour).": "If disabled(toggled), chunks will be split on the UI thread (Previous behaviour).",
|
||||
"If disabled(toggled), chunks will be split on the UI thread (Previous behaviour).": "When enabled, chunks are split on the UI thread (the previous behaviour).",
|
||||
"If enabled per-filed efficient customization sync will be used. We need a small migration when enabling this. And all devices should be updated to v0.23.18. Once we enabled this, we lost a compatibility with old versions.": "If enabled per-filed efficient customization sync will be used. We need a small migration when enabling this. And all devices should be updated to v0.23.18. Once we enabled this, we lost a compatibility with old versions.",
|
||||
"If enabled, changes will be automatically broadcasted to all connected peers. Notified peers will start fetching the changes.": "If enabled, changes will be automatically broadcasted to all connected peers. Notified peers will start fetching the changes.",
|
||||
"If enabled, chunks will be split into no more than 100 items. However, dedupe is slightly weaker.": "If enabled, chunks will be split into no more than 100 items. However, dedupe is slightly weaker.",
|
||||
|
||||
@@ -437,8 +437,7 @@ If "Auto Start P2P Connection" is enabled, the P2P connection will be started au
|
||||
If "Auto Start P2P Connection" is enabled, the P2P connection will be
|
||||
started automatically when the plug-in launches.
|
||||
If disabled(toggled), chunks will be split on the UI thread (Previous behaviour).:
|
||||
If disabled(toggled), chunks will be split on the UI thread (Previous
|
||||
behaviour).
|
||||
When enabled, chunks are split on the UI thread (the previous behaviour).
|
||||
If enabled per-filed efficient customization sync will be used. We need a small migration when enabling this. And all devices should be updated to v0.23.18. Once we enabled this, we lost a compatibility with old versions.:
|
||||
If enabled per-filed efficient customization sync will be used. We need a
|
||||
small migration when enabling this. And all devices should be updated to
|
||||
|
||||
@@ -82,6 +82,7 @@ export function getCouchDBReplicatorConfigurationIdentity(settings: RemoteDBSett
|
||||
authentication,
|
||||
projectHeaders(settings.couchDB_CustomHeaders),
|
||||
settings.useRequestAPI,
|
||||
settings.useCouchDBCacheControlHeadersOnly === true,
|
||||
settings.disableRequestURI,
|
||||
projectRemoteSecurity(settings),
|
||||
usesEncryptedInternalMetadata(settings),
|
||||
|
||||
@@ -7,6 +7,17 @@ import {
|
||||
} from "./replicatorConfigurationIdentity";
|
||||
|
||||
describe("active Replicator configuration identity", () => {
|
||||
it("treats an absent headers-only CouchDB cache switch as off and leaves Object Storage unaffected", () => {
|
||||
const absent = configuredSettings();
|
||||
Reflect.deleteProperty(absent, "useCouchDBCacheControlHeadersOnly");
|
||||
expect(getCouchDBReplicatorConfigurationIdentity({ ...absent, useCouchDBCacheControlHeadersOnly: false })).toBe(
|
||||
getCouchDBReplicatorConfigurationIdentity(absent)
|
||||
);
|
||||
expect(getObjectStorageReplicatorConfigurationIdentity({ ...absent, useCouchDBCacheControlHeadersOnly: true })).toBe(
|
||||
getObjectStorageReplicatorConfigurationIdentity(absent)
|
||||
);
|
||||
});
|
||||
|
||||
it("replaces a connection when the path identity mode changes", () => {
|
||||
const previous = configuredSettings({ pathNormalizationVersion: 0 });
|
||||
const next = { ...previous, pathNormalizationVersion: 1 as const };
|
||||
@@ -73,6 +84,7 @@ describe("active Replicator configuration identity", () => {
|
||||
["couchDB_PASSWORD", "secret-b"],
|
||||
["couchDB_CustomHeaders", "X-First: changed"],
|
||||
["useRequestAPI", true],
|
||||
["useCouchDBCacheControlHeadersOnly", true],
|
||||
["disableRequestURI", true],
|
||||
["encrypt", false],
|
||||
["passphrase", "encryption-b"],
|
||||
|
||||
Reference in new issue
Block a user