diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 1837d188..ea239998 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1479,7 +1479,7 @@ dependencies = [ [[package]] name = "reconcile" -version = "0.0.17" +version = "0.0.18" dependencies = [ "insta", "pretty_assertions", @@ -1489,7 +1489,7 @@ dependencies = [ [[package]] name = "reconcile-fuzz" -version = "0.0.17" +version = "0.0.18" dependencies = [ "libfuzzer-sys", "reconcile", @@ -2104,7 +2104,7 @@ dependencies = [ [[package]] name = "sync_lib" -version = "0.0.17" +version = "0.0.18" dependencies = [ "base64 0.22.1", "console_error_panic_hook", @@ -2117,7 +2117,7 @@ dependencies = [ [[package]] name = "sync_server" -version = "0.0.17" +version = "0.0.18" dependencies = [ "aide", "anyhow", diff --git a/backend/fuzz/Cargo.toml b/backend/fuzz/Cargo.toml index 2a405db4..a7dfe8e6 100644 --- a/backend/fuzz/Cargo.toml +++ b/backend/fuzz/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reconcile-fuzz" -version = "0.0.17" +version = "0.0.18" publish = false edition = "2021" diff --git a/backend/reconcile/Cargo.toml b/backend/reconcile/Cargo.toml index 88c2d239..e873e20f 100644 --- a/backend/reconcile/Cargo.toml +++ b/backend/reconcile/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reconcile" -version = "0.0.17" +version = "0.0.18" edition = "2021" [dependencies] diff --git a/backend/sync_lib/Cargo.toml b/backend/sync_lib/Cargo.toml index 9001ddbc..f8a06a80 100644 --- a/backend/sync_lib/Cargo.toml +++ b/backend/sync_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sync_lib" -version = "0.0.17" +version = "0.0.18" authors = ["Andras Schmelczer "] edition = "2018" diff --git a/backend/sync_server/Cargo.toml b/backend/sync_server/Cargo.toml index 73d31087..6f7bfb8a 100644 --- a/backend/sync_server/Cargo.toml +++ b/backend/sync_server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sync_server" -version = "0.0.17" +version = "0.0.18" edition = "2021" [dependencies] diff --git a/manifest.json b/manifest.json index cc191879..85ec8595 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "vault-link", "name": "VaultLink", - "version": "0.0.17", + "version": "0.0.18", "minAppVersion": "0.0.0", "description": "Self-hosted synchronization and collaboration for your Vault.", "author": "Andras Schmelczer", diff --git a/plugin/manifest.json b/plugin/manifest.json index cc191879..85ec8595 100644 --- a/plugin/manifest.json +++ b/plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "vault-link", "name": "VaultLink", - "version": "0.0.17", + "version": "0.0.18", "minAppVersion": "0.0.0", "description": "Self-hosted synchronization and collaboration for your Vault.", "author": "Andras Schmelczer", diff --git a/plugin/package-lock.json b/plugin/package-lock.json index d77e7c4c..197ac860 100644 --- a/plugin/package-lock.json +++ b/plugin/package-lock.json @@ -1,12 +1,12 @@ { "name": "vault-link-obsidian-plugin", - "version": "0.0.17", + "version": "0.0.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vault-link-obsidian-plugin", - "version": "0.0.17", + "version": "0.0.18", "license": "MIT", "devDependencies": { "@types/jest": "^29.5.14", @@ -46,7 +46,7 @@ }, "../backend/sync_lib/pkg": { "name": "sync_lib", - "version": "0.0.17", + "version": "0.0.18", "dev": true }, "node_modules/@ampproject/remapping": { diff --git a/plugin/package.json b/plugin/package.json index 200e1365..69218f69 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "vault-link-obsidian-plugin", - "version": "0.0.17", + "version": "0.0.18", "description": "This is a sample plugin for Obsidian (https://obsidian.md)", "main": "main.js", "scripts": { diff --git a/plugin/src/events/obisidan-event-handler.ts b/plugin/src/events/obisidan-event-handler.ts index 2eae62ff..0d4461fc 100644 --- a/plugin/src/events/obisidan-event-handler.ts +++ b/plugin/src/events/obisidan-event-handler.ts @@ -50,6 +50,10 @@ export class ObsidianFileEventHandler implements FileEventHandler { public async onModify(file: TAbstractFile): Promise { if (file instanceof TFile) { + if (file.basename.startsWith("console-log.iPhone")) { + return; + } + Logger.getInstance().info(`File modified: ${file.path}`); await this.syncer.syncLocallyUpdatedFile({ diff --git a/plugin/src/file-operations/obsidian-file-operations.ts b/plugin/src/file-operations/obsidian-file-operations.ts index 6a82006f..6353079f 100644 --- a/plugin/src/file-operations/obsidian-file-operations.ts +++ b/plugin/src/file-operations/obsidian-file-operations.ts @@ -8,21 +8,29 @@ export class ObsidianFileOperations implements FileOperations { public constructor(private readonly vault: Vault) {} public async listAllFiles(): Promise { + console.log("before getFiles"); const files = this.vault.getFiles(); + console.log("after getFiles"); + console.log(files); return files.map((file) => file.path); } public async read(path: RelativePath): Promise { - return new Uint8Array( + console.log("before readBinary"); + const result = new Uint8Array( await this.vault.adapter.readBinary(normalizePath(path)) ); + console.log("after readBinary"); + return result; } public async getModificationTime(path: RelativePath): Promise { + console.log("before stat"); const file = await this.vault.adapter.stat(normalizePath(path)); if (!file) { throw new Error(`File not found: ${path}`); } + console.log("after stat"); return new Date(file.mtime); } diff --git a/plugin/src/services/sync-service.ts b/plugin/src/services/sync-service.ts index d9c34109..fdda9322 100644 --- a/plugin/src/services/sync-service.ts +++ b/plugin/src/services/sync-service.ts @@ -98,7 +98,7 @@ export class SyncService { Logger.getInstance().debug( `Created document ${JSON.stringify( - response.data.relativePath + response.data )} with id ${response.data.documentId}` ); @@ -146,7 +146,7 @@ export class SyncService { } Logger.getInstance().debug( - `Updated document ${response.data.relativePath} with id ${response.data.documentId}` + `Updated document ${JSON.stringify(response.data)} with id ${response.data.documentId}` ); return response.data;