mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-02-28 15:08:47 +00:00
Compare commits
19 Commits
0.25.43-pa
...
beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be1642f1c1 | ||
|
|
c9a71e2076 | ||
|
|
2199c1ebd3 | ||
|
|
278935f85d | ||
|
|
010631f553 | ||
|
|
8c0c65307a | ||
|
|
988cb34d7c | ||
|
|
6eec8117f5 | ||
|
|
9f6a909143 | ||
|
|
09f283721a | ||
|
|
235c702223 | ||
|
|
b923b43b6b | ||
|
|
fdcf3be0f9 | ||
|
|
25dd907591 | ||
|
|
80c049d276 | ||
|
|
e961f01187 | ||
|
|
14b4c3cd50 | ||
|
|
f4d8c0a8db | ||
|
|
48b0d22da6 |
17
devs.md
17
devs.md
@@ -11,13 +11,28 @@ The plugin uses a dynamic module system to reduce coupling and improve maintaina
|
||||
|
||||
- **Service Hub**: Central registry for services using dependency injection
|
||||
- Services are registered, and accessed via `this.services` (in most modules)
|
||||
- **Module Loading**: All modules extend `AbstractModule` or `AbstractObsidianModule` (which extends `AbstractModule`). These modules are loaded in main.ts and some modules
|
||||
- **Module Loading**: All modules extend `AbstractModule` or `AbstractObsidianModule` (which extends `AbstractModule`). These modules are loaded in main.ts and some modules.
|
||||
- **Module Categories** (by directory):
|
||||
- `core/` - Platform-independent core functionality
|
||||
- `coreObsidian/` - Obsidian-specific core (e.g., `ModuleFileAccessObsidian`)
|
||||
- `essential/` - Required modules (e.g., `ModuleMigration`, `ModuleKeyValueDB`)
|
||||
- `features/` - Optional features (e.g., `ModuleLog`, `ModuleObsidianSettings`)
|
||||
- `extras/` - Development/testing tools (e.g., `ModuleDev`, `ModuleIntegratedTest`)
|
||||
- **Services**: Core services (e.g., `database`, `replicator`, `storageAccess`) are registered in `ServiceHub` and accessed by modules. They provide an extension point for add new behaviour without modifying existing code.
|
||||
- For example, checks before the replication can be added to the `replication.onBeforeReplicate` handler, and the handlers can be return `false` to prevent replication-starting. `vault.isTargetFile` also can be used to prevent processing specific files.
|
||||
- **ServiceModule**: A new type of module that directly depends on services.
|
||||
|
||||
#### Note on Module vs Service
|
||||
|
||||
After v0.25.44 refactoring, the Service will henceforth, as a rule, cease to use setHandler, that is to say, simple lazy binding. - They will be implemented directly in the service. - However, not everything will be middlewarised. Modules that maintain state or make decisions based on the results of multiple handlers are permitted.
|
||||
|
||||
Hence, the new feature should be implemented as follows:
|
||||
|
||||
- If it is a simple extension point (e.g., adding a check before replication), it should be implemented as a handler in the service (e.g., `replication.onBeforeReplicate`).
|
||||
- If it requires maintaining state or making decisions based on multiple handlers, it should be implemented as a serviceModule dependent on the relevant services explicitly.
|
||||
- If you have to implement a new feature without much modification, you can extent existing modules, but it is recommended to implement a new module or serviceModule for better maintainability.
|
||||
- Refactoring existing modules to services is also always welcome!
|
||||
- Please write tests for new features, you will notice that the simple handler approach is quite testable.
|
||||
|
||||
### Key Architectural Components
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-livesync",
|
||||
"name": "Self-hosted LiveSync",
|
||||
"version": "0.25.43-patched-9",
|
||||
"version": "0.25.44",
|
||||
"minAppVersion": "0.9.12",
|
||||
"description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
||||
"author": "vorotamoroz",
|
||||
|
||||
3719
package-lock.json
generated
3719
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
68
package.json
68
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "obsidian-livesync",
|
||||
"version": "0.25.43-patched-9",
|
||||
"version": "0.25.44",
|
||||
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
||||
"main": "main.js",
|
||||
"type": "module",
|
||||
@@ -48,9 +48,9 @@
|
||||
"test:docker-p2p:start": "npm run test:docker-p2p:up && sleep 3 && npm run test:docker-p2p:init",
|
||||
"test:docker-p2p:down": "npx dotenv-cli -e .env -e .test.env -- ./test/shell/p2p-stop.sh",
|
||||
"test:docker-p2p:stop": "npm run test:docker-p2p:down",
|
||||
"test:docker-all:up": "npm run test:docker-couchdb:up && npm run test:docker-s3:up && npm run test:docker-p2p:up",
|
||||
"test:docker-all:init": "npm run test:docker-couchdb:init && npm run test:docker-s3:init && npm run test:docker-p2p:init",
|
||||
"test:docker-all:down": "npm run test:docker-couchdb:down && npm run test:docker-s3:down && npm run test:docker-p2p:down",
|
||||
"test:docker-all:up": "npm run test:docker-couchdb:up ; npm run test:docker-s3:up ; npm run test:docker-p2p:up",
|
||||
"test:docker-all:init": "npm run test:docker-couchdb:init ; npm run test:docker-s3:init ; npm run test:docker-p2p:init",
|
||||
"test:docker-all:down": "npm run test:docker-couchdb:down ; npm run test:docker-s3:down ; npm run test:docker-p2p:down",
|
||||
"test:docker-all:start": "npm run test:docker-all:up && sleep 5 && npm run test:docker-all:init",
|
||||
"test:docker-all:stop": "npm run test:docker-all:down",
|
||||
"test:full": "npm run test:docker-all:start && vitest run --coverage && npm run test:docker-all:stop"
|
||||
@@ -59,15 +59,15 @@
|
||||
"author": "vorotamoroz",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@chialab/esbuild-plugin-worker": "^0.18.1",
|
||||
"@eslint/compat": "^1.2.7",
|
||||
"@eslint/eslintrc": "^3.3.0",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
||||
"@tsconfig/svelte": "^5.0.5",
|
||||
"@types/deno": "^2.3.0",
|
||||
"@chialab/esbuild-plugin-worker": "^0.19.0",
|
||||
"@eslint/compat": "^2.0.2",
|
||||
"@eslint/eslintrc": "^3.3.4",
|
||||
"@eslint/js": "^9.39.3",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
||||
"@tsconfig/svelte": "^5.0.8",
|
||||
"@types/deno": "^2.5.0",
|
||||
"@types/diff-match-patch": "^1.0.36",
|
||||
"@types/node": "^22.13.8",
|
||||
"@types/node": "^24.10.13",
|
||||
"@types/pouchdb": "^6.4.2",
|
||||
"@types/pouchdb-adapter-http": "^6.1.6",
|
||||
"@types/pouchdb-adapter-idb": "^6.1.7",
|
||||
@@ -76,25 +76,25 @@
|
||||
"@types/pouchdb-mapreduce": "^6.1.10",
|
||||
"@types/pouchdb-replication": "^6.4.7",
|
||||
"@types/transform-pouch": "^1.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "8.46.2",
|
||||
"@typescript-eslint/parser": "8.46.2",
|
||||
"@typescript-eslint/eslint-plugin": "8.56.1",
|
||||
"@typescript-eslint/parser": "8.56.1",
|
||||
"@vitest/browser": "^4.0.16",
|
||||
"@vitest/browser-playwright": "^4.0.16",
|
||||
"@vitest/coverage-v8": "^4.0.16",
|
||||
"builtin-modules": "5.0.0",
|
||||
"dotenv": "^17.2.3",
|
||||
"dotenv": "^17.3.1",
|
||||
"dotenv-cli": "^11.0.0",
|
||||
"esbuild": "0.25.0",
|
||||
"esbuild-plugin-inline-worker": "^0.1.1",
|
||||
"esbuild-svelte": "^0.9.3",
|
||||
"eslint": "^9.38.0",
|
||||
"esbuild-svelte": "^0.9.4",
|
||||
"eslint": "^9.39.3",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-svelte": "^3.12.4",
|
||||
"eslint-plugin-svelte": "^3.15.0",
|
||||
"events": "^3.3.0",
|
||||
"glob": "^11.0.3",
|
||||
"obsidian": "^1.8.7",
|
||||
"playwright": "^1.57.0",
|
||||
"postcss": "^8.5.3",
|
||||
"glob": "^13.0.6",
|
||||
"obsidian": "^1.12.3",
|
||||
"playwright": "^1.58.2",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"pouchdb-adapter-http": "^9.0.0",
|
||||
"pouchdb-adapter-idb": "^9.0.0",
|
||||
@@ -107,32 +107,32 @@
|
||||
"pouchdb-merge": "^9.0.0",
|
||||
"pouchdb-replication": "^9.0.0",
|
||||
"pouchdb-utils": "^9.0.0",
|
||||
"prettier": "3.5.2",
|
||||
"prettier": "3.8.1",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
"svelte": "5.41.1",
|
||||
"svelte-check": "^4.3.3",
|
||||
"svelte-check": "^4.4.3",
|
||||
"svelte-preprocess": "^6.0.3",
|
||||
"terser": "^5.39.0",
|
||||
"transform-pouch": "^2.0.0",
|
||||
"tslib": "^2.8.1",
|
||||
"tsx": "^4.20.6",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "5.9.3",
|
||||
"vite": "^7.3.0",
|
||||
"vite": "^7.3.1",
|
||||
"vitest": "^4.0.16",
|
||||
"webdriverio": "^9.23.0",
|
||||
"yaml": "^2.8.0"
|
||||
"webdriverio": "^9.24.0",
|
||||
"yaml": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.808.0",
|
||||
"@smithy/fetch-http-handler": "^5.0.2",
|
||||
"@smithy/md5-js": "^4.0.2",
|
||||
"@smithy/middleware-apply-body-checksum": "^4.1.0",
|
||||
"@smithy/protocol-http": "^5.1.0",
|
||||
"@smithy/querystring-builder": "^4.0.2",
|
||||
"@smithy/fetch-http-handler": "^5.3.10",
|
||||
"@smithy/md5-js": "^4.2.9",
|
||||
"@smithy/middleware-apply-body-checksum": "^4.3.9",
|
||||
"@smithy/protocol-http": "^5.3.9",
|
||||
"@smithy/querystring-builder": "^4.2.9",
|
||||
"diff-match-patch": "^1.0.5",
|
||||
"fflate": "^0.8.2",
|
||||
"idb": "^8.0.3",
|
||||
"minimatch": "^10.0.2",
|
||||
"minimatch": "^10.2.2",
|
||||
"octagonal-wheels": "^0.1.45",
|
||||
"qrcode-generator": "^1.4.4",
|
||||
"trystero": "^0.22.0",
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"eslint-plugin-svelte": "^3.12.4",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
||||
"@tsconfig/svelte": "^5.0.5",
|
||||
"eslint-plugin-svelte": "^3.15.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
||||
"@tsconfig/svelte": "^5.0.8",
|
||||
"svelte": "5.41.1",
|
||||
"svelte-check": "^4.3.3",
|
||||
"svelte-check": "^443.3",
|
||||
"typescript": "5.9.3",
|
||||
"vite": "^7.3.0"
|
||||
"vite": "^7.3.1"
|
||||
},
|
||||
"imports": {
|
||||
"../../src/worker/bgWorker.ts": "../../src/worker/bgWorker.mock.ts",
|
||||
|
||||
2
src/lib
2
src/lib
Submodule src/lib updated: d038ee5149...1c176da469
@@ -15,6 +15,7 @@ import { ReplicateResultProcessor } from "./ReplicateResultProcessor";
|
||||
import { UnresolvedErrorManager } from "@lib/services/base/UnresolvedErrorManager";
|
||||
import { clearHandlers } from "@lib/replication/SyncParamsHandler";
|
||||
import type { NecessaryServices } from "@/serviceFeatures/types";
|
||||
import { MARK_LOG_NETWORK_ERROR } from "@lib/services/lib/logUtils";
|
||||
|
||||
function isOnlineAndCanReplicate(
|
||||
errorManager: UnresolvedErrorManager,
|
||||
@@ -44,7 +45,9 @@ async function canReplicateWithPBKDF2(
|
||||
return false;
|
||||
}
|
||||
errorManager.clearError(errorMessage);
|
||||
const ensureMessage = "Failed to initialise the encryption key, preventing replication.";
|
||||
// Showing message is false: that because be shown here. (And it is a fatal error, no way to hide it).
|
||||
// tagged as network error at beginning for error filtering with NetworkWarningStyles
|
||||
const ensureMessage = `${MARK_LOG_NETWORK_ERROR}Failed to initialise the encryption key, preventing replication.`;
|
||||
const ensureResult = await replicator.ensurePBKDF2Salt(currentSettings, showMessage, true);
|
||||
if (!ensureResult) {
|
||||
errorManager.showError(ensureMessage, showMessage ? LOG_LEVEL_NOTICE : LOG_LEVEL_INFO);
|
||||
|
||||
@@ -18,6 +18,7 @@ import { PouchDB } from "../../lib/src/pouchdb/pouchdb-browser.ts";
|
||||
import { AuthorizationHeaderGenerator } from "../../lib/src/replication/httplib.ts";
|
||||
import type { LiveSyncCore } from "../../main.ts";
|
||||
import { EVENT_ON_UNRESOLVED_ERROR, eventHub } from "../../common/events.ts";
|
||||
import { MARK_LOG_NETWORK_ERROR } from "@lib/services/lib/logUtils.ts";
|
||||
|
||||
setNoticeClass(Notice);
|
||||
|
||||
@@ -236,7 +237,7 @@ export class ModuleObsidianAPI extends AbstractObsidianModule {
|
||||
} catch (ex: any) {
|
||||
this._log(`HTTP:${method}${size} to:${localURL} -> failed`, LOG_LEVEL_VERBOSE);
|
||||
const msg = ex instanceof Error ? `${ex?.name}:${ex?.message}` : ex?.toString();
|
||||
this.showError(`Failed to fetch: ${msg}`); // Do not show notice, due to throwing below
|
||||
this.showError(`${MARK_LOG_NETWORK_ERROR}Network Error: Failed to fetch: ${msg}`); // Do not show notice, due to throwing below
|
||||
this._log(ex, LOG_LEVEL_VERBOSE);
|
||||
// limit only in bulk_docs.
|
||||
if (url.toString().indexOf("_bulk_docs") !== -1) {
|
||||
|
||||
@@ -39,7 +39,8 @@ import {
|
||||
isValidFilenameInDarwin,
|
||||
isValidFilenameInWidows,
|
||||
} from "@lib/string_and_binary/path.ts";
|
||||
import { MARK_LOG_SEPARATOR } from "@lib/services/lib/logUtils.ts";
|
||||
import { MARK_LOG_NETWORK_ERROR, MARK_LOG_SEPARATOR } from "@lib/services/lib/logUtils.ts";
|
||||
import { NetworkWarningStyles } from "@lib/common/models/setting.const.ts";
|
||||
|
||||
// This module cannot be a core module because it depends on the Obsidian UI.
|
||||
|
||||
@@ -282,7 +283,20 @@ export class ModuleLog extends AbstractObsidianModule {
|
||||
const fileStatus = this.activeFileStatus.value;
|
||||
if (fileStatus && !this.settings.hideFileWarningNotice) messageLines.push(fileStatus);
|
||||
const messages = (await this.services.appLifecycle.getUnresolvedMessages()).flat().filter((e) => e);
|
||||
messageLines.push(...messages);
|
||||
const stringMessages = messages.filter((m): m is string => typeof m === "string"); // for 'startsWith'
|
||||
const networkMessages = stringMessages.filter((m) => m.startsWith(MARK_LOG_NETWORK_ERROR));
|
||||
const otherMessages = stringMessages.filter((m) => !m.startsWith(MARK_LOG_NETWORK_ERROR));
|
||||
|
||||
messageLines.push(...otherMessages);
|
||||
|
||||
if (
|
||||
this.settings.networkWarningStyle !== NetworkWarningStyles.ICON &&
|
||||
this.settings.networkWarningStyle !== NetworkWarningStyles.HIDDEN
|
||||
) {
|
||||
messageLines.push(...networkMessages);
|
||||
} else if (this.settings.networkWarningStyle === NetworkWarningStyles.ICON) {
|
||||
if (networkMessages.length > 0) messageLines.push("🔗❌");
|
||||
}
|
||||
this.messageArea.innerText = messageLines.map((e) => `⚠️ ${e}`).join("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import { LiveSyncSetting as Setting } from "./LiveSyncSetting.ts";
|
||||
import type { ObsidianLiveSyncSettingTab } from "./ObsidianLiveSyncSettingTab.ts";
|
||||
import type { PageFunctions } from "./SettingPane.ts";
|
||||
import { visibleOnly } from "./SettingPane.ts";
|
||||
import { EVENT_ON_UNRESOLVED_ERROR, eventHub } from "@/common/events.ts";
|
||||
import { NetworkWarningStyles } from "@lib/common/models/setting.const.ts";
|
||||
export function paneGeneral(
|
||||
this: ObsidianLiveSyncSettingTab,
|
||||
paneEl: HTMLElement,
|
||||
@@ -24,6 +26,16 @@ export function paneGeneral(
|
||||
});
|
||||
new Setting(paneEl).autoWireToggle("showStatusOnStatusbar");
|
||||
new Setting(paneEl).autoWireToggle("hideFileWarningNotice");
|
||||
new Setting(paneEl).autoWireDropDown("networkWarningStyle", {
|
||||
options: {
|
||||
[NetworkWarningStyles.BANNER]: "Show full banner",
|
||||
[NetworkWarningStyles.ICON]: "Show icon only",
|
||||
[NetworkWarningStyles.HIDDEN]: "Hide completely",
|
||||
},
|
||||
});
|
||||
this.addOnSaved("networkWarningStyle", () => {
|
||||
eventHub.emitEvent(EVENT_ON_UNRESOLVED_ERROR);
|
||||
});
|
||||
});
|
||||
void addPanel(paneEl, $msg("obsidianLiveSyncSettingTab.titleLogging")).then((paneEl) => {
|
||||
paneEl.addClass("wizardHidden");
|
||||
|
||||
@@ -45,5 +45,5 @@ export const terserOption: TerserOptions = {
|
||||
ecma: 2020,
|
||||
safari10: true,
|
||||
webkit: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -481,8 +481,14 @@ export class Plugin {
|
||||
}
|
||||
|
||||
export class Notice {
|
||||
private _key:number;
|
||||
private static _counter = 0;
|
||||
constructor(message: string) {
|
||||
console.log("Notice:", message);
|
||||
this._key = Notice._counter++;
|
||||
console.log(`Notice [${this._key}]:`, message);
|
||||
}
|
||||
setMessage(message: string) {
|
||||
console.log(`Notice [${this._key}]:`, message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
287
updates.md
287
updates.md
@@ -3,223 +3,62 @@ Since 19th July, 2025 (beta1 in 0.25.0-beta1, 13th July, 2025)
|
||||
|
||||
The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md). Because 0.25 got a lot of updates, thankfully, compatibility is kept and we do not need breaking changes! In other words, when get enough stabled. The next version will be v1.0.0. Even though it my hope.
|
||||
|
||||
## 0.25.43-patched-9 a.ka. 0.25.44-rc1
|
||||
## 0.25.44
|
||||
|
||||
We are finally ready for release. I think I will go ahead and release it after using it for a few days.
|
||||
24th February, 2026
|
||||
|
||||
This release represents a significant architectural overhaul of the plug-in, focusing on modularity, testability, and stability. While many changes are internal, they pave the way for more robust features and easier maintenance.
|
||||
However, as this update is very substantial, please do feel free to let me know if you encounter any issues.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Hidden file synchronisation now works!
|
||||
- Now Hidden file synchronisation respects `.ignore` files.
|
||||
- Replicator initialisation during rebuilding now works correctly.
|
||||
- Ignore files (e.g., `.ignore`) are now handled efficiently.
|
||||
- Replication & Database:
|
||||
- Replication statistics are now correctly reset after switching replicators.
|
||||
- Fixed `File already exists` for .md files has been merged (PR #802) So thanks @waspeer for the contribution!
|
||||
|
||||
### Improved
|
||||
|
||||
- Now we can configure network-error banners as icons, or hide them completely with the new `Network Warning Style` setting in the `General` pane of the settings dialogue. (#770, PR #804)
|
||||
- Thanks so much to @A-wry!
|
||||
|
||||
### Refactored
|
||||
|
||||
- Some methods naming have been changed for better clarity, i.e., `_isTargetFileByLocalDB` is now `_isTargetAcceptedByLocalDB`.
|
||||
#### Architectural Overhaul:
|
||||
|
||||
### Follow-up tasks memo (After 0.25.44)
|
||||
- A major transition from Class-based Modules to a Service/Middleware architecture has begun.
|
||||
- Many modules (for example, `ModulePouchDB`, `ModuleLocalDatabaseObsidian`, `ModuleKeyValueDB`) have been removed or integrated into specific Services (`database`, `keyValueDB`, etc.).
|
||||
- Reduced reliance on dynamic binding and inverted dependencies; dependencies are now explicit.
|
||||
- `ObsidianLiveSyncPlugin` properties (`replicator`, `localDatabase`, `storageAccess`, etc.) have been moved to their respective services for better separation of concerns.
|
||||
- In this refactoring, the Service will henceforth, as a rule, cease to use setHandler, that is to say, simple lazy binding.
|
||||
- They will be implemented directly in the service.
|
||||
- However, not everything will be middlewarised. Modules that maintain state or make decisions based on the results of multiple handlers are permitted.
|
||||
- Lifecycle:
|
||||
- Application LifeCycle now starts in `Main` rather than `ServiceHub` or `ObsidianMenuModule`, ensuring smoother startup coordination.
|
||||
|
||||
Going forward, functionality that does not span multiple events is expected to be implemented as middleware-style functions rather than modules based on classes.
|
||||
#### New Services & Utilities:
|
||||
|
||||
Consequently, the existing modules will likely be gradually dismantled.
|
||||
For reference, `ModuleReplicator.ts` has extracted several functionalities as functions.
|
||||
- Added a `control` service to orchestrate other services (for example, handling stop/start logic during settings realisation).
|
||||
- Added `UnresolvedErrorManager` to handle and display unresolved errors in a unified way.
|
||||
- Added `logUtils` to unify logging injection and formatting.
|
||||
- `VaultService.isTargetFile` now uses multiple, distinct checkers for better extensibility.
|
||||
|
||||
However, this does not negate object-oriented design. Where lifecycles and state are present, and the Liskov Substitution Principle can be upheld, we design using classes. After all, a visible state is preferable to a hidden state. In other words, the handler still accepts both functions and member methods, so formally there is no change.
|
||||
#### Code Separation:
|
||||
|
||||
As undertaking this for everything would be a bit longer task, I intend to release it at this stage.
|
||||
- Separated Obsidian-specific logic from base logic for `StorageEventManager` and `FileAccess` modules.
|
||||
- Moved reactive state values and statistics from the main plug-in instance to the services responsible for them.
|
||||
|
||||
Note: I left using `setHandler`s that as a mark of `need to be refactored`. Basically, they should be implemented in the service itself. That because it is just only a mis-designed separated implementation.
|
||||
#### Internal Cleanups:
|
||||
|
||||
## 0.25.43-patched-8
|
||||
- Many functions have been renamed for clarity (for example, `_isTargetFileByLocalDB` is now `_isTargetAcceptedByLocalDB`).
|
||||
- Added `override` keywords to overridden items and removed dynamic binding for clearer code inheritance.
|
||||
- Moved common functions to the common library.
|
||||
|
||||
I really must thank you all. You know that it seems we have just a little more to do.
|
||||
Note: This version is not fully tested yet. Be careful to use this. Very dogfood-y one.
|
||||
#### Dependencies:
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now the device name is saved correctly.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Add `override` keyword to all overridden items.
|
||||
- More dynamic binding has been removed.
|
||||
- The number of inverted dependencies has decreased much more.
|
||||
- Some check-logic; i.e., like pre-replication check is now separated into check functions and added to the service as handlers, layered.
|
||||
- This may help with better testing and better maintainability.
|
||||
|
||||
|
||||
## 0.25.43-patched-7
|
||||
|
||||
19th February, 2026
|
||||
|
||||
Right then, let us make a decision already.
|
||||
|
||||
Last time, since I found a bug, I ended up doing a few other things as well, but next time I intend to release it with just the bug fix. It is quite substantial, after all.
|
||||
|
||||
Customisation Sync has mostly been verified. Hidden file synchronisation has not been done yet.
|
||||
|
||||
Vite's build system is not in the production. However, I possibly migrate to it in the future.
|
||||
|
||||
And, the `daily-progress` will be tidied on releasing 0.25.44. Do not worry!
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an issue where the StorageEventManager was not correctly loading the settings.
|
||||
- Replication statistics are now correctly reset after switching replicators.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now, many reactive values which keep the state or statistics of the plugin are moved to the services which have the responsibility for these states.
|
||||
- `serviceFeatures` are now able to be added to the services; this is not a class module, but a function which accepts dependencies and returns an addHandler-able function. This is for better separation of concerns, better maintainability, and testability.
|
||||
- `control` service; is a meta-service which is responsible for orchestrating services has been added.
|
||||
- Don't you think stopping replication or something occurs during `settingService.realiseSetting` is quite weird? It may be done by the control service, which can orchestrate the setting service and the replicator service.
|
||||
-
|
||||
- Some functions on services have been moved. e.g., `getSystemVaultName` is now on the API service.
|
||||
- Setting Service is now responsible for the setting, no longer using dynamic binding for the modules.
|
||||
|
||||
## 0.25.43-patched-6
|
||||
|
||||
18th February, 2026
|
||||
|
||||
Let me confess that I have lied about `now all ambiguous properties`... I have found some more implicit calling.
|
||||
|
||||
Note: I have not checked hidden file sync and customisation sync yet. Please report if you find any unexpected behaviour in these features.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now ReplicatorService responds to database reset and database initialisation events to dispose of the active replicator.
|
||||
- Fixes some unlocking issues during rebuilding.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now `StorageEventManagerBase` is separated from `StorageEventManagerObsidian` following their concerns.
|
||||
- No longer using `ObsidianFileAccess` indirectly during checking duplicated-file events.
|
||||
- Last event memorisation is now moved into the StorageAccessManager, just like the file processing interlocking.
|
||||
- These methods, i.e., `ObsidianFileAccess.touch`. `StorageEventManager.recentlyTouched`, and `StorageEventManager.touch` are still available, but simply call the StorageAccessManager's methods.
|
||||
- Now `FileAccessBase` is separated from `FileAccessObsidian` following their concerns.
|
||||
|
||||
## 0.25.43-patched-5
|
||||
|
||||
17th February, 2026
|
||||
|
||||
Yes, we mostly have got refactored!
|
||||
|
||||
### Refactored
|
||||
|
||||
- Following properties of `ObsidianLiveSyncPlugin` are now initialised more explicitly:
|
||||
|
||||
- property : what is responsible
|
||||
- `storageAccess` : `ServiceFileAccessObsidian`
|
||||
- `databaseFileAccess` : `ServiceDatabaseFileAccess`
|
||||
- `fileHandler` : `ServiceFileHandler`
|
||||
- `rebuilder` : `ServiceRebuilder`
|
||||
- Not so long from now, ServiceFileAccessObsidian might be abstracted to a more general FileAccessService, and make more testable and maintainable.
|
||||
- These properties are initialised in `initialiseServiceModules` on `ObsidianLiveSyncPlugin`.
|
||||
- They are `ServiceModule`s.
|
||||
- Which means they do not use dynamic binding themselves, but they use bound services.
|
||||
- ServiceModules are in src/lib/src/serviceModules for common implementations, and src/serviceModules for Obsidian-specific implementations.
|
||||
- Hence, now all ambiguous properties of `ObsidianLiveSyncPlugin` are initialised explicitly. We can proceed to testing.
|
||||
- Well, I will release v0.25.44 after testing this.
|
||||
|
||||
- Conflict service is now responsible for `resolveAllConflictedFilesByNewerOnes` function, which has been in the rebuilder.
|
||||
- New functions `updateSettings`, and `applyPartial` have been added to the setting service. We should use these functions instead of directly writing the settings on `ObsidianLiveSyncPlugin.setting`.
|
||||
- Some interfaces for services have been moved to src/lib/src/interfaces.
|
||||
- `RemoteService.tryResetDatabase` and `tryCreateDatabase` are now moved to the replicator service.
|
||||
- You know that these functions are surely performed by the replicator.
|
||||
- Probably, most of the functions in `RemoteService` should be moved to the replicator service, but for now, these two functions are moved as they are the most related ones, to rewrite the rebuilder service.
|
||||
- Common functions are gradually moved to the common library.
|
||||
- Now, binding functions on modules have been delayed until the services and service modules are initialised, to avoid fragile behaviour.
|
||||
|
||||
## 0.25.43-patched-4
|
||||
|
||||
16th February, 2026
|
||||
|
||||
I have been working on it little by little in my spare time. Sorry for the delayed response for issues! ! However, thanks for your patience, we seems the `revert to 0.25.43` is not necessary, and I will keep going with this version.
|
||||
|
||||
### Refactored
|
||||
|
||||
- No longer `DatabaseService` is an injectable service. It is now actually a service which has its own handlers. No dynamic binding for necessary functions.
|
||||
- Now the following properties of `ObsidianLiveSyncPlugin` belong to each service:
|
||||
- `replicator` : `services.replicator` (still we can access `ObsidianLiveSyncPlugin.replicator` for the active replicator)
|
||||
- A Handy class `UnresolvedErrorManager` has been added, which is responsible for managing unresolved errors and their handlers (we will see `unresolved errors` on a red-background-banner in the editor when they occur).
|
||||
- This manager can be used to handle unresolved errors in a unified way, and it can also be used to display notifications or something when unresolved errors occur.
|
||||
|
||||
## 0.25.43-patched-3
|
||||
|
||||
16th February, 2026
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now following properties of `ObsidianLiveSyncPlugin` belong to each service:
|
||||
- property : service (still we can access these properties from `ObsidianLiveSyncPlugin` for better usability, but probably we should access these from services to clarify the dependencies)
|
||||
- `localDatabase` : `services.database`
|
||||
- `managers` : `services.database`
|
||||
- `simpleStore` : `services.keyValueDB`
|
||||
- `kvDB`: `services.keyValueDB`
|
||||
- Initialising modules, addOns, and services are now explicitly separated in the `_startUp` function of the main plug-in class.
|
||||
- LiveSyncLocalDB now depends more explicitly on specified services, not the whole `ServiceHub`.
|
||||
- New service `keyValueDB` has been added. This had been separated from the `database` service.
|
||||
- Non-trivial modules, such as `ModuleExtraSyncObsidian` (which only holds deviceAndVaultName), are simply implemented in the service.
|
||||
- Add `logUtils` for unifying logging method injection and formatting. This utility is able to accept the API service for log writing.
|
||||
- `ModuleKeyValueDB` has been removed, and its functionality is now implemented in the `keyValueDB` service.
|
||||
- `ModulePouchDB` and `ModuleLocalDatabaseObsidian` have been removed, and their functionality is now implemented in the `database` service.
|
||||
- Please be aware that you have overridden createPouchDBInstance or something by dynamic binding; you should now override the createPouchDBInstance in the database service instead of using the module.
|
||||
- You can refer to the `DirectFileManipulatorV2` for an example of how to override the createPouchDBInstance function in the database service.
|
||||
|
||||
## 0.25.43-patched-2
|
||||
|
||||
14th February, 2026
|
||||
|
||||
### Fixed
|
||||
|
||||
- Application LifeCycle has now started in Main, not ServiceHub.
|
||||
- Indeed, ServiceHub cannot be known other things in main have got ready, so it is quite natural to start the lifecycle in main.
|
||||
|
||||
## 0.25.43-patched-1
|
||||
|
||||
13th February, 2026
|
||||
|
||||
**NOTE: Hidden File Sync and Customisation Sync may not work in this version.**
|
||||
|
||||
Just a heads-up: this is a patch version, which is essentially a beta release. Do not worry about the following memos, as they are indeed freaking us out. I trust that you have thought this was too large; you're right.
|
||||
|
||||
If this cannot be stable, I will revert to 0.24.43 and try again.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now resolving unexpected and inexplicable dependency order issues...
|
||||
- The function which is able to implement to the service is now moved to each service.
|
||||
- AppLifecycleService.performRestart
|
||||
- VaultService.isTargetFile is now using multiple checkers instead of a single function.
|
||||
- This change allows better separation of concerns and easier extension in the future.
|
||||
- Application LifeCycle has now started in ServiceHub, not ObsidianMenuModule.
|
||||
|
||||
- It was in a QUITE unexpected place..., isn't it?
|
||||
- Instead of, we should call `await this.services.appLifecycle.onReady()` in other platforms.
|
||||
- As in the browser platform, it will be called at `DOMContentLoaded` event.
|
||||
|
||||
- ModuleTargetFilter, which is responsible for parsing ignore files, has been refined.
|
||||
- This should be separated to a TargetFilter and an IgnoreFileFilter for better maintainability.
|
||||
- Using `API.addCommand` or some Obsidian API and shimmer APIs, Many modules have been refactored to be derived to AbstractModule from AbstractObsidianModule, to clarify the dependencies. (we should make `app` usage clearer...)
|
||||
- Fixed initialising `storageAccess` too late in `FileAccessObsidian` module (I am still wondering why it worked before...).
|
||||
- Remove some redundant overrides in modules.
|
||||
|
||||
### Planned
|
||||
|
||||
- Some services have an ambiguous name, such as `Injectable`. These will be renamed in the future for better clarity.
|
||||
- Following properties of `ObsidianLiveSyncPlugin` should be initialised more explicitly:
|
||||
- property : where it is initialised currently
|
||||
- `localDatabase` : `ModuleLocalDatabaseObsidian`
|
||||
- `managers` : `ModuleLocalDatabaseObsidian`
|
||||
- `replicator` : `ModuleReplicator`
|
||||
- `simpleStore` : `ModuleKeyValueDB`
|
||||
- `storageAccess` : `ModuleFileAccessObsidian`
|
||||
- `databaseFileAccess` : `ModuleDatabaseFileAccess`
|
||||
- `fileHandler` : `ModuleFileHandler`
|
||||
- `rebuilder` : `ModuleRebuilder`
|
||||
- `kvDB`: `ModuleKeyValueDB`
|
||||
- And I think that having a feature in modules directly is not good for maintainability, these should be separated to some module (loader) and implementation (not only service, but also independent something).
|
||||
- Plug-in statuses such as requestCount, responseCount... should be moved to a status service or somewhere for better separation of concerns.
|
||||
- Bumped dependencies simply to a point where they can be considered problem-free (by human-powered-artefacts-diff).
|
||||
- Svelte, terser, and more something will be bumped later. They have a significant impact on the diff and paint it totally.
|
||||
- You may be surprised, but when I bump the library, I am actually checking for any unintended code.
|
||||
|
||||
## 0.25.43
|
||||
|
||||
@@ -379,49 +218,5 @@ Sorry for a small release! I would like to keep things moving along like this if
|
||||
- Storage application process has been refactored.
|
||||
- Please report if you find any unexpected behaviour after this update. A bit of large refactoring.
|
||||
|
||||
## 0.25.33
|
||||
|
||||
05th December, 2025
|
||||
|
||||
### New feature
|
||||
|
||||
- We can analyse the local database with the `Analyse database usage` command.
|
||||
- This command makes a TSV-style report of the database usage, which can be pasted into spreadsheet applications.
|
||||
- The report contains the number of unique chunks and shared chunks for each document revision.
|
||||
- Unique chunks indicate the actual consumption.
|
||||
- Shared chunks indicate the reference counts from other chunks with no consumption.
|
||||
- We can find which notes or files are using large amounts of storage in the database. Or which notes cannot share chunks effectively.
|
||||
- This command is useful when optimising the database size or investigating an unexpectedly large database size.
|
||||
- We can reset the notification threshold and check the remote usage at once with the `Reset notification threshold and check the remote database usage` command.
|
||||
- Commands are available from the Command Palette, or `Hatch` pane in the settings dialogue.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now the plug-in resets the remote size notification threshold after rebuild.
|
||||
|
||||
## 0.25.32
|
||||
|
||||
02nd December, 2025
|
||||
|
||||
Now I am back from a short (?) break! Thank you all for your patience. (It is nothing major, but the first half of the year has finally come to an end).
|
||||
Anyway, I will release the things a bit by bit. I think that we need a rehabilitation or getting gears in again.
|
||||
|
||||
### Improved
|
||||
|
||||
- Now the plugin warns when we are in several file-related situations that may cause unexpected behaviour (#300).
|
||||
- These errors are displayed alongside issues such as file size exceeding limits.
|
||||
- Such situations include:
|
||||
- When the document has a name which is not supported by some file systems.
|
||||
- When the vault has the same file names with different letter cases.
|
||||
|
||||
## 0.25.31
|
||||
|
||||
18th November, 2025
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now fetching configuration from the server can handle the empty remote correctly (reported on #756).
|
||||
- No longer asking to switch adapters during rebuilding.
|
||||
|
||||
Older notes are in
|
||||
Full notes are in
|
||||
[updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md).
|
||||
|
||||
428
updates_old.md
428
updates_old.md
@@ -1,4 +1,431 @@
|
||||
# 0.25
|
||||
Since 19th July, 2025 (beta1 in 0.25.0-beta1, 13th July, 2025)
|
||||
|
||||
The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md). Because 0.25 got a lot of updates, thankfully, compatibility is kept and we do not need breaking changes! In other words, when get enough stabled. The next version will be v1.0.0. Even though it my hope.
|
||||
|
||||
## 0.25.43-patched-9 a.k.a. 0.25.44-rc1
|
||||
|
||||
We are finally ready for release. I think I will go ahead and release it after using it for a few days.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Hidden file synchronisation now works!
|
||||
- Now Hidden file synchronisation respects `.ignore` files.
|
||||
- Replicator initialisation during rebuilding now works correctly.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Some methods naming have been changed for better clarity, i.e., `_isTargetFileByLocalDB` is now `_isTargetAcceptedByLocalDB`.
|
||||
|
||||
### Follow-up tasks memo (After 0.25.44)
|
||||
|
||||
Going forward, functionality that does not span multiple events is expected to be implemented as middleware-style functions rather than modules based on classes.
|
||||
|
||||
Consequently, the existing modules will likely be gradually dismantled.
|
||||
For reference, `ModuleReplicator.ts` has extracted several functionalities as functions.
|
||||
|
||||
However, this does not negate object-oriented design. Where lifecycles and state are present, and the Liskov Substitution Principle can be upheld, we design using classes. After all, a visible state is preferable to a hidden state. In other words, the handler still accepts both functions and member methods, so formally there is no change.
|
||||
|
||||
As undertaking this for everything would be a bit longer task, I intend to release it at this stage.
|
||||
|
||||
Note: I left using `setHandler`s that as a mark of `need to be refactored`. Basically, they should be implemented in the service itself. That is because it is just a mis-designed, separated implementation.
|
||||
|
||||
## 0.25.43-patched-8
|
||||
|
||||
I really must thank you all. You know that it seems we have just a little more to do.
|
||||
Note: This version is not fully tested yet. Be careful to use this. Very dogfood-y one.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now the device name is saved correctly.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Add `override` keyword to all overridden items.
|
||||
- More dynamic binding has been removed.
|
||||
- The number of inverted dependencies has decreased much more.
|
||||
- Some check-logic; i.e., like pre-replication check is now separated into check functions and added to the service as handlers, layered.
|
||||
- This may help with better testing and better maintainability.
|
||||
|
||||
|
||||
## 0.25.43-patched-7
|
||||
|
||||
19th February, 2026
|
||||
|
||||
Right then, let us make a decision already.
|
||||
|
||||
Last time, since I found a bug, I ended up doing a few other things as well, but next time I intend to release it with just the bug fix. It is quite substantial, after all.
|
||||
|
||||
Customisation Sync has mostly been verified. Hidden file synchronisation has not been done yet.
|
||||
|
||||
Vite's build system is not in the production. However, I possibly migrate to it in the future.
|
||||
|
||||
And, the `daily-progress` will be tidied on releasing 0.25.44. Do not worry!
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an issue where the StorageEventManager was not correctly loading the settings.
|
||||
- Replication statistics are now correctly reset after switching replicators.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now, many reactive values which keep the state or statistics of the plugin are moved to the services which have the responsibility for these states.
|
||||
- `serviceFeatures` are now able to be added to the services; this is not a class module, but a function which accepts dependencies and returns an addHandler-able function. This is for better separation of concerns, better maintainability, and testability.
|
||||
- `control` service; is a meta-service which is responsible for orchestrating services has been added.
|
||||
- Don't you think stopping replication or something occurs during `settingService.realiseSetting` is quite weird? It may be done by the control service, which can orchestrate the setting service and the replicator service.
|
||||
-
|
||||
- Some functions on services have been moved. e.g., `getSystemVaultName` is now on the API service.
|
||||
- Setting Service is now responsible for the setting, no longer using dynamic binding for the modules.
|
||||
|
||||
## 0.25.43-patched-6
|
||||
|
||||
18th February, 2026
|
||||
|
||||
Let me confess that I have lied about `now all ambiguous properties`... I have found some more implicit calling.
|
||||
|
||||
Note: I have not checked hidden file sync and customisation sync yet. Please report if you find any unexpected behaviour in these features.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now ReplicatorService responds to database reset and database initialisation events to dispose of the active replicator.
|
||||
- Fixes some unlocking issues during rebuilding.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now `StorageEventManagerBase` is separated from `StorageEventManagerObsidian` following their concerns.
|
||||
- No longer using `ObsidianFileAccess` indirectly during checking duplicated-file events.
|
||||
- Last event memorisation is now moved into the StorageAccessManager, just like the file processing interlocking.
|
||||
- These methods, i.e., `ObsidianFileAccess.touch`. `StorageEventManager.recentlyTouched`, and `StorageEventManager.touch` are still available, but simply call the StorageAccessManager's methods.
|
||||
- Now `FileAccessBase` is separated from `FileAccessObsidian` following their concerns.
|
||||
|
||||
## 0.25.43-patched-5
|
||||
|
||||
17th February, 2026
|
||||
|
||||
Yes, we mostly have got refactored!
|
||||
|
||||
### Refactored
|
||||
|
||||
- Following properties of `ObsidianLiveSyncPlugin` are now initialised more explicitly:
|
||||
|
||||
- property : what is responsible
|
||||
- `storageAccess` : `ServiceFileAccessObsidian`
|
||||
- `databaseFileAccess` : `ServiceDatabaseFileAccess`
|
||||
- `fileHandler` : `ServiceFileHandler`
|
||||
- `rebuilder` : `ServiceRebuilder`
|
||||
- Not so long from now, ServiceFileAccessObsidian might be abstracted to a more general FileAccessService, and make more testable and maintainable.
|
||||
- These properties are initialised in `initialiseServiceModules` on `ObsidianLiveSyncPlugin`.
|
||||
- They are `ServiceModule`s.
|
||||
- Which means they do not use dynamic binding themselves, but they use bound services.
|
||||
- ServiceModules are in src/lib/src/serviceModules for common implementations, and src/serviceModules for Obsidian-specific implementations.
|
||||
- Hence, now all ambiguous properties of `ObsidianLiveSyncPlugin` are initialised explicitly. We can proceed to testing.
|
||||
- Well, I will release v0.25.44 after testing this.
|
||||
|
||||
- Conflict service is now responsible for `resolveAllConflictedFilesByNewerOnes` function, which has been in the rebuilder.
|
||||
- New functions `updateSettings`, and `applyPartial` have been added to the setting service. We should use these functions instead of directly writing the settings on `ObsidianLiveSyncPlugin.setting`.
|
||||
- Some interfaces for services have been moved to src/lib/src/interfaces.
|
||||
- `RemoteService.tryResetDatabase` and `tryCreateDatabase` are now moved to the replicator service.
|
||||
- You know that these functions are surely performed by the replicator.
|
||||
- Probably, most of the functions in `RemoteService` should be moved to the replicator service, but for now, these two functions are moved as they are the most related ones, to rewrite the rebuilder service.
|
||||
- Common functions are gradually moved to the common library.
|
||||
- Now, binding functions on modules have been delayed until the services and service modules are initialised, to avoid fragile behaviour.
|
||||
|
||||
## 0.25.43-patched-4
|
||||
|
||||
16th February, 2026
|
||||
|
||||
I have been working on it little by little in my spare time. Sorry for the delayed response for issues! ! However, thanks for your patience, we seems the `revert to 0.25.43` is not necessary, and I will keep going with this version.
|
||||
|
||||
### Refactored
|
||||
|
||||
- No longer `DatabaseService` is an injectable service. It is now actually a service which has its own handlers. No dynamic binding for necessary functions.
|
||||
- Now the following properties of `ObsidianLiveSyncPlugin` belong to each service:
|
||||
- `replicator` : `services.replicator` (still we can access `ObsidianLiveSyncPlugin.replicator` for the active replicator)
|
||||
- A Handy class `UnresolvedErrorManager` has been added, which is responsible for managing unresolved errors and their handlers (we will see `unresolved errors` on a red-background-banner in the editor when they occur).
|
||||
- This manager can be used to handle unresolved errors in a unified way, and it can also be used to display notifications or something when unresolved errors occur.
|
||||
|
||||
## 0.25.43-patched-3
|
||||
|
||||
16th February, 2026
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now following properties of `ObsidianLiveSyncPlugin` belong to each service:
|
||||
- property : service (still we can access these properties from `ObsidianLiveSyncPlugin` for better usability, but probably we should access these from services to clarify the dependencies)
|
||||
- `localDatabase` : `services.database`
|
||||
- `managers` : `services.database`
|
||||
- `simpleStore` : `services.keyValueDB`
|
||||
- `kvDB`: `services.keyValueDB`
|
||||
- Initialising modules, addOns, and services are now explicitly separated in the `_startUp` function of the main plug-in class.
|
||||
- LiveSyncLocalDB now depends more explicitly on specified services, not the whole `ServiceHub`.
|
||||
- New service `keyValueDB` has been added. This had been separated from the `database` service.
|
||||
- Non-trivial modules, such as `ModuleExtraSyncObsidian` (which only holds deviceAndVaultName), are simply implemented in the service.
|
||||
- Add `logUtils` for unifying logging method injection and formatting. This utility is able to accept the API service for log writing.
|
||||
- `ModuleKeyValueDB` has been removed, and its functionality is now implemented in the `keyValueDB` service.
|
||||
- `ModulePouchDB` and `ModuleLocalDatabaseObsidian` have been removed, and their functionality is now implemented in the `database` service.
|
||||
- Please be aware that you have overridden createPouchDBInstance or something by dynamic binding; you should now override the createPouchDBInstance in the database service instead of using the module.
|
||||
- You can refer to the `DirectFileManipulatorV2` for an example of how to override the createPouchDBInstance function in the database service.
|
||||
|
||||
## 0.25.43-patched-2
|
||||
|
||||
14th February, 2026
|
||||
|
||||
### Fixed
|
||||
|
||||
- Application LifeCycle has now started in Main, not ServiceHub.
|
||||
- Indeed, ServiceHub cannot be known other things in main have got ready, so it is quite natural to start the lifecycle in main.
|
||||
|
||||
## 0.25.43-patched-1
|
||||
|
||||
13th February, 2026
|
||||
|
||||
**NOTE: Hidden File Sync and Customisation Sync may not work in this version.**
|
||||
|
||||
Just a heads-up: this is a patch version, which is essentially a beta release. Do not worry about the following memos, as they are indeed freaking us out. I trust that you have thought this was too large; you're right.
|
||||
|
||||
If this cannot be stable, I will revert to 0.24.43 and try again.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now resolving unexpected and inexplicable dependency order issues...
|
||||
- The function which is able to implement to the service is now moved to each service.
|
||||
- AppLifecycleService.performRestart
|
||||
- VaultService.isTargetFile is now using multiple checkers instead of a single function.
|
||||
- This change allows better separation of concerns and easier extension in the future.
|
||||
- Application LifeCycle has now started in ServiceHub, not ObsidianMenuModule.
|
||||
|
||||
- It was in a QUITE unexpected place..., isn't it?
|
||||
- Instead of, we should call `await this.services.appLifecycle.onReady()` in other platforms.
|
||||
- As in the browser platform, it will be called at `DOMContentLoaded` event.
|
||||
|
||||
- ModuleTargetFilter, which is responsible for parsing ignore files, has been refined.
|
||||
- This should be separated to a TargetFilter and an IgnoreFileFilter for better maintainability.
|
||||
- Using `API.addCommand` or some Obsidian API and shimmer APIs, Many modules have been refactored to be derived to AbstractModule from AbstractObsidianModule, to clarify the dependencies. (we should make `app` usage clearer...)
|
||||
- Fixed initialising `storageAccess` too late in `FileAccessObsidian` module (I am still wondering why it worked before...).
|
||||
- Remove some redundant overrides in modules.
|
||||
|
||||
### Planned
|
||||
|
||||
- Some services have an ambiguous name, such as `Injectable`. These will be renamed in the future for better clarity.
|
||||
- Following properties of `ObsidianLiveSyncPlugin` should be initialised more explicitly:
|
||||
- property : where it is initialised currently
|
||||
- `localDatabase` : `ModuleLocalDatabaseObsidian`
|
||||
- `managers` : `ModuleLocalDatabaseObsidian`
|
||||
- `replicator` : `ModuleReplicator`
|
||||
- `simpleStore` : `ModuleKeyValueDB`
|
||||
- `storageAccess` : `ModuleFileAccessObsidian`
|
||||
- `databaseFileAccess` : `ModuleDatabaseFileAccess`
|
||||
- `fileHandler` : `ModuleFileHandler`
|
||||
- `rebuilder` : `ModuleRebuilder`
|
||||
- `kvDB`: `ModuleKeyValueDB`
|
||||
- And I think that having a feature in modules directly is not good for maintainability, these should be separated to some module (loader) and implementation (not only service, but also independent something).
|
||||
- Plug-in statuses such as requestCount, responseCount... should be moved to a status service or somewhere for better separation of concerns.
|
||||
|
||||
## 0.25.43
|
||||
|
||||
5th, February, 2026
|
||||
|
||||
### Fixed
|
||||
|
||||
- Encryption/decryption issues when using Object Storage as remote have been fixed.
|
||||
- Now the plug-in falls back to V1 encryption/decryption when V2 fails (if not configured as ForceV1).
|
||||
- This may fix the issue reported in #772.
|
||||
|
||||
### Notice
|
||||
|
||||
Quite a few packages have been updated in this release. Please report if you find any unexpected behaviour after this update.
|
||||
|
||||
## 0.25.42
|
||||
|
||||
2nd, February, 2026
|
||||
|
||||
This release is identical to 0.25.41-patched-3, except for the version number.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Now the service context is `protected` instead of `private` in `ServiceBase`.
|
||||
- This change allows derived classes to access the context directly.
|
||||
- Some dynamically bound services have been moved to services for better dependency management.
|
||||
- `WebPeer` has been moved to the main repository from the sub repository `livesync-commonlib` for correct dependency management.
|
||||
- Migrated from the outdated, unstable platform abstraction layer to services.
|
||||
- A bit more services will be added in the future for better maintainability.
|
||||
|
||||
## 0.25.41
|
||||
|
||||
24th January, 2026
|
||||
|
||||
### Fixed
|
||||
|
||||
- No longer `No available splitter for settings!!` errors occur after fetching old remote settings while rebuilding local database. (#748)
|
||||
|
||||
### Improved
|
||||
|
||||
- Boot sequence warning is now kept in the in-editor notification area.
|
||||
|
||||
### New feature
|
||||
|
||||
- We can now set the maximum modified time for reflect events in the settings. (for #754)
|
||||
- This setting can be configured from `Patches` -> `Remediation` in the settings dialogue.
|
||||
- Enabling this setting will restrict the propagation from the database to storage to only those changes made before the specified date and time.
|
||||
- This feature is primarily intended for recovery purposes. After placing `redflag.md` in an empty vault and importing the Self-hosted LiveSync configuration, please perform this configuration, and then fetch the local database from the remote.
|
||||
- This feature is useful when we want to prevent recent unwanted changes from being reflected in the local storage.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Module to service refactoring has been started for better maintainability:
|
||||
- UI module has been moved to UI service.
|
||||
|
||||
### Behaviour change
|
||||
|
||||
- Default chunk splitter version has been changed to `Rabin-Karp` for new installations.
|
||||
|
||||
## 0.25.40
|
||||
|
||||
23rd January, 2026
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an issue where some events were not triggered correctly after the refactoring in 0.25.39.
|
||||
|
||||
## 0.25.39
|
||||
|
||||
23rd January, 2026
|
||||
|
||||
Also no behaviour changes or fixes in this release. Just refactoring for better maintainability. Thank you for your patience! I will address some of the reported issues soon.
|
||||
However, this is not a minor refactoring, so please be careful. Let me know if you find any unexpected behaviour after this update.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Rewrite the service's binding/handler assignment systems
|
||||
- Removed loopholes that allowed traversal between services to clarify dependencies.
|
||||
- Consolidated the hidden state-related state, the handler, and the addition of bindings to the handler into a single object.
|
||||
- Currently, functions that can have handlers added implement either addHandler or setHandler directly on the function itself.
|
||||
I understand there are differing opinions on this, but for now, this is how it stands.
|
||||
- Services now possess a Context. Please ensure each platform has a class that inherits from ServiceContext.
|
||||
- To permit services to be dynamically bound, the services themselves are now defined by interfaces.
|
||||
|
||||
## 0.25.38
|
||||
|
||||
17th January, 2026
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an issue where indexedDB would not close correctly on some environments, causing unexpected errors during database operations.
|
||||
|
||||
## 0.25.37
|
||||
|
||||
15th January, 2026
|
||||
|
||||
Thank you for your patience until my return!
|
||||
|
||||
This release contains minor changes discovered and fixed during test implementation.
|
||||
There are no changes affecting usage.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Logging system has been slightly refactored to improve maintainability.
|
||||
- Some import statements have been unified.
|
||||
|
||||
## 0.25.36
|
||||
|
||||
25th December, 2025
|
||||
|
||||
### Improved
|
||||
|
||||
- Now the garbage collector (V3) has been implemented. (Beta)
|
||||
- This garbage collector ensures that all devices are synchronised to the latest progress to prevent inconsistencies.
|
||||
- In other words, it makes sure that no new conflicts would have arisen.
|
||||
- This feature requires additional information (via node information), but it should be more reliable.
|
||||
- This feature requires all devices have v0.25.36 or later.
|
||||
- After the garbage collector runs, the database size may be reduced (Compaction will be run automatically after GC).
|
||||
- We should have an administrative privilege on the remote database to run this garbage collector.
|
||||
- Now the plug-in and device information is stored in the remote database.
|
||||
- This information is used for the garbage collector (V3).
|
||||
- Some additional features may be added in the future using this information.
|
||||
|
||||
## 0.25.35
|
||||
|
||||
24th December, 2025
|
||||
|
||||
Sorry for a small release! I would like to keep things moving along like this if possible. After all, the holidays seem to be starting soon. I will be doubled by my business until the 27th though, indeed.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now the conflict resolution dialogue shows correctly which device only has older APIs (#764).
|
||||
|
||||
## 0.25.34
|
||||
|
||||
10th December, 2025
|
||||
|
||||
### Behaviour change
|
||||
|
||||
- The plug-in automatically fetches the missing chunks even if `Fetch chunks on demand` is disabled.
|
||||
- This change is to avoid loss of data when receiving a bulk of revisions.
|
||||
- This can be prevented by enabling `Use Only Local Chunks` in the settings.
|
||||
- Storage application now saved during each event and restored on startup.
|
||||
- Synchronisation result application is also now saved during each event and restored on startup.
|
||||
- These may avoid some unexpected loss of data when the editor crashes.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now the plug-in waits for the application of pended batch changes before the synchronisation starts.
|
||||
- This may avoid some unexpected loss or unexpected conflicts.
|
||||
Plug-in sends custom headers correctly when RequestAPI is used.
|
||||
- No longer causing unexpected chunk creation during `Reset synchronisation on This Device` with bucket sync.
|
||||
|
||||
### Refactored
|
||||
|
||||
- Synchronisation result application process has been refactored.
|
||||
- Storage application process has been refactored.
|
||||
- Please report if you find any unexpected behaviour after this update. A bit of large refactoring.
|
||||
|
||||
## 0.25.33
|
||||
|
||||
05th December, 2025
|
||||
|
||||
### New feature
|
||||
|
||||
- We can analyse the local database with the `Analyse database usage` command.
|
||||
- This command makes a TSV-style report of the database usage, which can be pasted into spreadsheet applications.
|
||||
- The report contains the number of unique chunks and shared chunks for each document revision.
|
||||
- Unique chunks indicate the actual consumption.
|
||||
- Shared chunks indicate the reference counts from other chunks with no consumption.
|
||||
- We can find which notes or files are using large amounts of storage in the database. Or which notes cannot share chunks effectively.
|
||||
- This command is useful when optimising the database size or investigating an unexpectedly large database size.
|
||||
- We can reset the notification threshold and check the remote usage at once with the `Reset notification threshold and check the remote database usage` command.
|
||||
- Commands are available from the Command Palette, or `Hatch` pane in the settings dialogue.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now the plug-in resets the remote size notification threshold after rebuild.
|
||||
|
||||
## 0.25.32
|
||||
|
||||
02nd December, 2025
|
||||
|
||||
Now I am back from a short (?) break! Thank you all for your patience. (It is nothing major, but the first half of the year has finally come to an end).
|
||||
Anyway, I will release the things a bit by bit. I think that we need a rehabilitation or getting gears in again.
|
||||
|
||||
### Improved
|
||||
|
||||
- Now the plugin warns when we are in several file-related situations that may cause unexpected behaviour (#300).
|
||||
- These errors are displayed alongside issues such as file size exceeding limits.
|
||||
- Such situations include:
|
||||
- When the document has a name which is not supported by some file systems.
|
||||
- When the vault has the same file names with different letter cases.
|
||||
|
||||
## 0.25.31
|
||||
|
||||
18th November, 2025
|
||||
|
||||
### Fixed
|
||||
|
||||
- Now fetching configuration from the server can handle the empty remote correctly (reported on #756).
|
||||
- No longer asking to switch adapters during rebuilding.
|
||||
|
||||
# 0.25
|
||||
|
||||
(0.25.0 through 0.25.30)
|
||||
|
||||
Since 19th July, 2025 (beta1 in 0.25.0-beta1, 13th July, 2025)
|
||||
|
||||
@@ -9,6 +436,7 @@ I have now rewritten the E2EE code to be more robust and easier to understand. I
|
||||
As a result, this is the first time in a while that forward compatibility has been broken. We have also taken the opportunity to change all metadata to use encryption rather than obfuscation. Furthermore, the `Dynamic Iteration Count` setting is now redundant and has been moved to the `Patches` pane in the settings. Thanks to Rabin-Karp, the eden setting is also no longer necessary and has been relocated accordingly. Therefore, v0.25.0 represents a legitimate and correct evolution.
|
||||
|
||||
---
|
||||
|
||||
## 0.25.30
|
||||
|
||||
17th November, 2025
|
||||
|
||||
@@ -89,7 +89,6 @@ if (PATH_TEST_INSTALL) {
|
||||
}
|
||||
import { terserOption } from "./terser_vite.config";
|
||||
export default defineConfig(({ mode }) => {
|
||||
|
||||
const prod = mode === "production" || mode === "original";
|
||||
let minify = prod ? "terser" : false;
|
||||
let outFile = `main_vite.${prod ? "prod" : "dev"}.js`;
|
||||
@@ -129,7 +128,7 @@ export default defineConfig(({ mode }) => {
|
||||
},
|
||||
},
|
||||
build: {
|
||||
target: 'es2018',
|
||||
target: "es2018",
|
||||
commonjsOptions: {},
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, "src/main.ts"),
|
||||
@@ -160,5 +159,5 @@ export default defineConfig(({ mode }) => {
|
||||
worker: {
|
||||
format: "iife",
|
||||
},
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user