mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-02-22 12:08:48 +00:00
Compare commits
2 Commits
0.25.21.be
...
0.25.21.be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51dc44bfb0 | ||
|
|
7c4f2bf78a |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-livesync",
|
||||
"name": "Self-hosted LiveSync",
|
||||
"version": "0.25.21.beta1",
|
||||
"version": "0.25.21.beta2",
|
||||
"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",
|
||||
|
||||
18
package-lock.json
generated
18
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "obsidian-livesync",
|
||||
"version": "0.25.21b1",
|
||||
"version": "0.25.21.beta2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "obsidian-livesync",
|
||||
"version": "0.25.21b1",
|
||||
"version": "0.25.21.beta2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.808.0",
|
||||
@@ -19,7 +19,7 @@
|
||||
"fflate": "^0.8.2",
|
||||
"idb": "^8.0.3",
|
||||
"minimatch": "^10.0.2",
|
||||
"octagonal-wheels": "^0.1.40",
|
||||
"octagonal-wheels": "^0.1.41",
|
||||
"qrcode-generator": "^1.4.4",
|
||||
"trystero": "github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
|
||||
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
|
||||
@@ -8605,9 +8605,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/octagonal-wheels": {
|
||||
"version": "0.1.40",
|
||||
"resolved": "https://registry.npmjs.org/octagonal-wheels/-/octagonal-wheels-0.1.40.tgz",
|
||||
"integrity": "sha512-qZkPnuVGCqpfLfu8xtZIxfQRVvmE5BmdzMF/rySriGi5JoctGhMNDjF0aLU/4GWUD5yW1X3io6VhJW4a7k1ieA==",
|
||||
"version": "0.1.41",
|
||||
"resolved": "https://registry.npmjs.org/octagonal-wheels/-/octagonal-wheels-0.1.41.tgz",
|
||||
"integrity": "sha512-cIvdXsyiSCxknyxTwGrNnDKsaYpgZdXeKAy9cXIAk2Jy7T1z6bLjU4s5z47OySNPVPSr32x5r8hSz7hAYYv7qA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"idb": "^8.0.3"
|
||||
@@ -17148,9 +17148,9 @@
|
||||
}
|
||||
},
|
||||
"octagonal-wheels": {
|
||||
"version": "0.1.40",
|
||||
"resolved": "https://registry.npmjs.org/octagonal-wheels/-/octagonal-wheels-0.1.40.tgz",
|
||||
"integrity": "sha512-qZkPnuVGCqpfLfu8xtZIxfQRVvmE5BmdzMF/rySriGi5JoctGhMNDjF0aLU/4GWUD5yW1X3io6VhJW4a7k1ieA==",
|
||||
"version": "0.1.41",
|
||||
"resolved": "https://registry.npmjs.org/octagonal-wheels/-/octagonal-wheels-0.1.41.tgz",
|
||||
"integrity": "sha512-cIvdXsyiSCxknyxTwGrNnDKsaYpgZdXeKAy9cXIAk2Jy7T1z6bLjU4s5z47OySNPVPSr32x5r8hSz7hAYYv7qA==",
|
||||
"requires": {
|
||||
"idb": "^8.0.3"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "obsidian-livesync",
|
||||
"version": "0.25.21.beta1",
|
||||
"version": "0.25.21.beta2",
|
||||
"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",
|
||||
@@ -93,7 +93,7 @@
|
||||
"fflate": "^0.8.2",
|
||||
"idb": "^8.0.3",
|
||||
"minimatch": "^10.0.2",
|
||||
"octagonal-wheels": "^0.1.40",
|
||||
"octagonal-wheels": "^0.1.41",
|
||||
"qrcode-generator": "^1.4.4",
|
||||
"trystero": "github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
|
||||
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
|
||||
|
||||
2
src/lib
2
src/lib
Submodule src/lib updated: 6972cf45b3...6c2a72d9cc
@@ -94,10 +94,14 @@ export class ModuleFileHandler extends AbstractModule {
|
||||
let readFile: UXFileInfo | undefined = undefined;
|
||||
if (!shouldApplied) {
|
||||
readFile = await this.readFileFromStub(file);
|
||||
if (!readFile) {
|
||||
this._log(`File ${file.path} is not exist on the storage`, LOG_LEVEL_NOTICE);
|
||||
return false;
|
||||
}
|
||||
if (await isDocContentSame(getDocDataAsArray(entry.data), readFile.body)) {
|
||||
// Timestamp is different but the content is same. therefore, two timestamps should be handled as same.
|
||||
// So, mark the changes are same.
|
||||
markChangesAreSame(file, file.stat.mtime, entry.mtime);
|
||||
markChangesAreSame(readFile, readFile.stat.mtime, entry.mtime);
|
||||
} else {
|
||||
shouldApplied = true;
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ export class ModuleFileAccessObsidian extends AbstractObsidianModule implements
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async readStubContent(stub: UXFileInfoStub): Promise<UXFileInfo | false> {
|
||||
const file = this.vaultAccess.getAbstractFileByPath(stub.path);
|
||||
if (!(file instanceof TFile)) {
|
||||
@@ -231,6 +232,7 @@ export class ModuleFileAccessObsidian extends AbstractObsidianModule implements
|
||||
const data = await this.vaultAccess.vaultReadAuto(file);
|
||||
return {
|
||||
...stub,
|
||||
...TFileToUXFileInfoStub(file),
|
||||
body: createBlob(data),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ export class StorageEventManagerObsidian extends StorageEventManager {
|
||||
concurrentProcessing = Semaphore(5);
|
||||
waitedSince = new Map<FilePath | FilePathWithPrefix, number>();
|
||||
async startStandingBy(filename: FilePath) {
|
||||
// If waited, cancel previous waiting.
|
||||
// If waited, no need to start again (looping inside the function)
|
||||
await skipIfDuplicated(`storage-event-manager-${filename}`, async () => {
|
||||
Logger(`Processing ${filename}: Starting`, LOG_LEVEL_DEBUG);
|
||||
const release = await this.concurrentProcessing.acquire();
|
||||
@@ -315,6 +315,7 @@ export class StorageEventManagerObsidian extends StorageEventManager {
|
||||
// continue;
|
||||
// }
|
||||
const type = target.type;
|
||||
// If already cancelled by other operation, skip this.
|
||||
if (target.cancelled) {
|
||||
Logger(`Processing ${filename}: Cancelled (scheduled): ${operationType}`, LOG_LEVEL_DEBUG);
|
||||
this.cancelStandingBy(target);
|
||||
|
||||
19
updates.md
19
updates.md
@@ -8,6 +8,25 @@ 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.21.beta2
|
||||
|
||||
8th October, 2025
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed wrong event type bindings (which caused some events not to be handled correctly).
|
||||
- Fixed detected a timing issue in StorageEventManager
|
||||
- When multiple events for the same file are fired in quick succession, metadata has been kept older information. This induces unexpected wrong notifications and write prevention.
|
||||
|
||||
## 0.25.21.beta1
|
||||
|
||||
6th October, 2025
|
||||
|
||||
### Refactored
|
||||
|
||||
- Event handling now does not rely on 'convention over configuration'.
|
||||
- Services.ts now have a proper event handler registration system.
|
||||
|
||||
## 0.25.20
|
||||
|
||||
26th September, 2025
|
||||
|
||||
Reference in New Issue
Block a user