From dd6f63f357fb9c55edc7a242e536c8c1d33ac7e7 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Wed, 19 Feb 2025 20:47:52 +0000 Subject: [PATCH] Move files --- .gitignore | 4 ++-- .vscode/settings.json | 5 +++- .../eslint.config.mjs | 0 manifest.json => frontend/manifest.json | 0 .../obsidian-plugin}/.hotreload | 0 .../obsidian-plugin}/README.md | 0 .../obsidian-plugin}/manifest.json | 0 .../obsidian-plugin}/package.json | 0 .../src/obisidan-event-handler.ts | 0 .../src/obsidian-file-operations.ts | 7 ++++-- .../obsidian-plugin}/src/styles.scss | 0 .../obsidian-plugin}/src/vault-link-plugin.ts | 11 ++++++--- .../src/views/history-view.ts | 17 ++++++------- .../obsidian-plugin}/src/views/logs-view.ts | 0 .../src/views/settings-tab.ts | 0 .../obsidian-plugin}/src/views/status-bar.ts | 0 .../src/views/status-description.ts | 0 frontend/obsidian-plugin/tsconfig.json | 14 +++++++++++ .../obsidian-plugin}/version-bump.mjs | 0 .../obsidian-plugin}/webpack.config.js | 0 .../package-lock.json | 12 +++++++--- package.json => frontend/package.json | 2 +- .../sync-client}/jest.config.js | 0 .../sync-client}/package.json | 6 ++--- .../sync-client}/src/database/database.ts | 0 .../src/database/document-metadata.ts | 0 .../src/database/sync-settings.ts | 0 .../sync-client}/src/file-operations.ts | 0 .../sync-client}/src/index.ts | 0 .../sync-client}/src/services/sync-service.ts | 0 .../sync-client}/src/services/types.ts | 0 .../apply-remote-changes-locally.ts | 0 .../src/sync-operations/document-lock.test.ts | 2 +- .../src/sync-operations/document-lock.ts | 2 +- .../src/sync-operations/syncer.ts | 0 .../sync-client}/src/tracing/logger.ts | 0 .../sync-client}/src/tracing/sync-history.ts | 0 .../src/utils/deserialize.test.ts | 2 +- .../sync-client}/src/utils/deserialize.ts | 0 .../sync-client}/src/utils/hash.ts | 0 .../src/utils/is-equal-bytes.test.ts | 0 .../sync-client}/src/utils/is-equal-bytes.ts | 0 .../sync-client}/src/utils/retried-fetch.ts | 0 .../sync-client}/src/utils/serialize.test.ts | 2 +- .../sync-client}/src/utils/serialize.ts | 0 frontend/sync-client/tsconfig.json | 15 ++++++++++++ .../sync-client}/webpack.config.js | 0 obsidian-plugin/manifest.json | 10 -------- obsidian-plugin/tsconfig.json | 24 ------------------- sync-client/tsconfig.json | 15 ------------ 50 files changed, 72 insertions(+), 78 deletions(-) rename eslint.config.mjs => frontend/eslint.config.mjs (100%) rename manifest.json => frontend/manifest.json (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/.hotreload (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/README.md (100%) rename {obsidian-plugin/dist => frontend/obsidian-plugin}/manifest.json (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/package.json (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/obisidan-event-handler.ts (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/obsidian-file-operations.ts (97%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/styles.scss (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/vault-link-plugin.ts (94%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/views/history-view.ts (89%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/views/logs-view.ts (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/views/settings-tab.ts (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/views/status-bar.ts (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/src/views/status-description.ts (100%) create mode 100644 frontend/obsidian-plugin/tsconfig.json rename {obsidian-plugin => frontend/obsidian-plugin}/version-bump.mjs (100%) rename {obsidian-plugin => frontend/obsidian-plugin}/webpack.config.js (100%) rename package-lock.json => frontend/package-lock.json (99%) rename package.json => frontend/package.json (77%) rename {sync-client => frontend/sync-client}/jest.config.js (100%) rename {sync-client => frontend/sync-client}/package.json (87%) rename {sync-client => frontend/sync-client}/src/database/database.ts (100%) rename {sync-client => frontend/sync-client}/src/database/document-metadata.ts (100%) rename {sync-client => frontend/sync-client}/src/database/sync-settings.ts (100%) rename {sync-client => frontend/sync-client}/src/file-operations.ts (100%) rename {sync-client => frontend/sync-client}/src/index.ts (100%) rename {sync-client => frontend/sync-client}/src/services/sync-service.ts (100%) rename {sync-client => frontend/sync-client}/src/services/types.ts (100%) rename {sync-client => frontend/sync-client}/src/sync-operations/apply-remote-changes-locally.ts (100%) rename {sync-client => frontend/sync-client}/src/sync-operations/document-lock.test.ts (96%) rename {sync-client => frontend/sync-client}/src/sync-operations/document-lock.ts (93%) rename {sync-client => frontend/sync-client}/src/sync-operations/syncer.ts (100%) rename {sync-client => frontend/sync-client}/src/tracing/logger.ts (100%) rename {sync-client => frontend/sync-client}/src/tracing/sync-history.ts (100%) rename {sync-client => frontend/sync-client}/src/utils/deserialize.test.ts (91%) rename {sync-client => frontend/sync-client}/src/utils/deserialize.ts (100%) rename {sync-client => frontend/sync-client}/src/utils/hash.ts (100%) rename {sync-client => frontend/sync-client}/src/utils/is-equal-bytes.test.ts (100%) rename {sync-client => frontend/sync-client}/src/utils/is-equal-bytes.ts (100%) rename {sync-client => frontend/sync-client}/src/utils/retried-fetch.ts (100%) rename {sync-client => frontend/sync-client}/src/utils/serialize.test.ts (91%) rename {sync-client => frontend/sync-client}/src/utils/serialize.ts (100%) create mode 100644 frontend/sync-client/tsconfig.json rename {sync-client => frontend/sync-client}/webpack.config.js (100%) delete mode 100644 obsidian-plugin/manifest.json delete mode 100644 obsidian-plugin/tsconfig.json delete mode 100644 sync-client/tsconfig.json diff --git a/.gitignore b/.gitignore index ca750fec..691f30d8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ node_modules # Rust build folder backend/target -obsidian-plugin/dist -sync-client/dist +frontend/obsidian-plugin/dist +frontend/sync-client/dist backend/db.sqlite3* backend/config.yml diff --git a/.vscode/settings.json b/.vscode/settings.json index 11cfe5c0..d611f4d3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,7 @@ { "jest.jestCommandLine": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest", - "jest.rootPath": "plugin" + "jest.rootPath": "plugin", + "files.exclude": { + "**/node_modules": true + } } \ No newline at end of file diff --git a/eslint.config.mjs b/frontend/eslint.config.mjs similarity index 100% rename from eslint.config.mjs rename to frontend/eslint.config.mjs diff --git a/manifest.json b/frontend/manifest.json similarity index 100% rename from manifest.json rename to frontend/manifest.json diff --git a/obsidian-plugin/.hotreload b/frontend/obsidian-plugin/.hotreload similarity index 100% rename from obsidian-plugin/.hotreload rename to frontend/obsidian-plugin/.hotreload diff --git a/obsidian-plugin/README.md b/frontend/obsidian-plugin/README.md similarity index 100% rename from obsidian-plugin/README.md rename to frontend/obsidian-plugin/README.md diff --git a/obsidian-plugin/dist/manifest.json b/frontend/obsidian-plugin/manifest.json similarity index 100% rename from obsidian-plugin/dist/manifest.json rename to frontend/obsidian-plugin/manifest.json diff --git a/obsidian-plugin/package.json b/frontend/obsidian-plugin/package.json similarity index 100% rename from obsidian-plugin/package.json rename to frontend/obsidian-plugin/package.json diff --git a/obsidian-plugin/src/obisidan-event-handler.ts b/frontend/obsidian-plugin/src/obisidan-event-handler.ts similarity index 100% rename from obsidian-plugin/src/obisidan-event-handler.ts rename to frontend/obsidian-plugin/src/obisidan-event-handler.ts diff --git a/obsidian-plugin/src/obsidian-file-operations.ts b/frontend/obsidian-plugin/src/obsidian-file-operations.ts similarity index 97% rename from obsidian-plugin/src/obsidian-file-operations.ts rename to frontend/obsidian-plugin/src/obsidian-file-operations.ts index 395f42ef..b124322d 100644 --- a/obsidian-plugin/src/obsidian-file-operations.ts +++ b/frontend/obsidian-plugin/src/obsidian-file-operations.ts @@ -56,7 +56,10 @@ export class ObsidianFileOperations implements FileOperations { } await this.createParentDirectories(normalizePath(path)); - await this.vault.adapter.writeBinary(normalizePath(path), newContent); + await this.vault.adapter.writeBinary( + normalizePath(path), + newContent.buffer as ArrayBuffer + ); } public async write( @@ -78,7 +81,7 @@ export class ObsidianFileOperations implements FileOperations { ); await this.vault.adapter.writeBinary( normalizePath(path), - newContent + newContent.buffer as ArrayBuffer ); return newContent; } diff --git a/obsidian-plugin/src/styles.scss b/frontend/obsidian-plugin/src/styles.scss similarity index 100% rename from obsidian-plugin/src/styles.scss rename to frontend/obsidian-plugin/src/styles.scss diff --git a/obsidian-plugin/src/vault-link-plugin.ts b/frontend/obsidian-plugin/src/vault-link-plugin.ts similarity index 94% rename from obsidian-plugin/src/vault-link-plugin.ts rename to frontend/obsidian-plugin/src/vault-link-plugin.ts index 989126ac..db11658f 100644 --- a/obsidian-plugin/src/vault-link-plugin.ts +++ b/frontend/obsidian-plugin/src/vault-link-plugin.ts @@ -123,8 +123,7 @@ export default class VaultLinkPlugin extends Plugin { database.getSettings().fetchChangesUpdateIntervalMs ); - // eslint-disable-next-line @typescript-eslint/no-misused-promises - database.addOnSettingsChangeHandlers(async (settings, oldSettings) => { + database.addOnSettingsChangeHandlers((settings, oldSettings) => { this.registerRemoteEventListener( database, syncService, @@ -133,7 +132,13 @@ export default class VaultLinkPlugin extends Plugin { ); if (!oldSettings.isSyncEnabled && settings.isSyncEnabled) { - await syncer.scheduleSyncForOfflineChanges(); + syncer + .scheduleSyncForOfflineChanges() + .catch((_error: unknown) => { + Logger.getInstance().error( + "Failed to schedule sync for offline changes" + ); + }); } }); diff --git a/obsidian-plugin/src/views/history-view.ts b/frontend/obsidian-plugin/src/views/history-view.ts similarity index 89% rename from obsidian-plugin/src/views/history-view.ts rename to frontend/obsidian-plugin/src/views/history-view.ts index bb501d77..3fe14256 100644 --- a/obsidian-plugin/src/views/history-view.ts +++ b/frontend/obsidian-plugin/src/views/history-view.ts @@ -2,13 +2,8 @@ import type { IconName, WorkspaceLeaf } from "obsidian"; import { ItemView, setIcon } from "obsidian"; import { intlFormatDistance } from "date-fns"; -import type { - SyncHistory, - HistoryEntry, - Database, - RelativePath -} from "sync-client"; -import { SyncType, SyncSource, SyncStatus } from "sync-client"; +import type { SyncHistory, HistoryEntry, Database } from "sync-client"; +import { SyncType, SyncSource, SyncStatus, Logger } from "sync-client"; export class HistoryView extends ItemView { public static readonly TYPE = "history-view"; @@ -23,9 +18,10 @@ export class HistoryView extends ItemView { super(leaf); this.icon = HistoryView.ICON; - // eslint-disable-next-line @typescript-eslint/no-misused-promises - history.addSyncHistoryUpdateListener(async () => { - await this.updateView(); + history.addSyncHistoryUpdateListener(() => { + this.updateView().catch((_error: unknown) => { + Logger.getInstance().error("Failed to update history view"); + }); }); } @@ -65,6 +61,7 @@ export class HistoryView extends ItemView { } element.createEl("span", { + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion text: entry.relativePath }); diff --git a/obsidian-plugin/src/views/logs-view.ts b/frontend/obsidian-plugin/src/views/logs-view.ts similarity index 100% rename from obsidian-plugin/src/views/logs-view.ts rename to frontend/obsidian-plugin/src/views/logs-view.ts diff --git a/obsidian-plugin/src/views/settings-tab.ts b/frontend/obsidian-plugin/src/views/settings-tab.ts similarity index 100% rename from obsidian-plugin/src/views/settings-tab.ts rename to frontend/obsidian-plugin/src/views/settings-tab.ts diff --git a/obsidian-plugin/src/views/status-bar.ts b/frontend/obsidian-plugin/src/views/status-bar.ts similarity index 100% rename from obsidian-plugin/src/views/status-bar.ts rename to frontend/obsidian-plugin/src/views/status-bar.ts diff --git a/obsidian-plugin/src/views/status-description.ts b/frontend/obsidian-plugin/src/views/status-description.ts similarity index 100% rename from obsidian-plugin/src/views/status-description.ts rename to frontend/obsidian-plugin/src/views/status-description.ts diff --git a/frontend/obsidian-plugin/tsconfig.json b/frontend/obsidian-plugin/tsconfig.json new file mode 100644 index 00000000..c5247938 --- /dev/null +++ b/frontend/obsidian-plugin/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "module": "ESNext", + "target": "ES2023", + "noImplicitAny": true, + "moduleResolution": "bundler", + "strictNullChecks": true, + "lib": [ + "DOM", + "ESNext" + ] + } +} \ No newline at end of file diff --git a/obsidian-plugin/version-bump.mjs b/frontend/obsidian-plugin/version-bump.mjs similarity index 100% rename from obsidian-plugin/version-bump.mjs rename to frontend/obsidian-plugin/version-bump.mjs diff --git a/obsidian-plugin/webpack.config.js b/frontend/obsidian-plugin/webpack.config.js similarity index 100% rename from obsidian-plugin/webpack.config.js rename to frontend/obsidian-plugin/webpack.config.js diff --git a/package-lock.json b/frontend/package-lock.json similarity index 99% rename from package-lock.json rename to frontend/package-lock.json index d7290bae..bcf52bb3 100644 --- a/package-lock.json +++ b/frontend/package-lock.json @@ -17,12 +17,18 @@ "typescript-eslint": "8.24.1" } }, - "backend/sync_lib/pkg": { + "../backend/sync_lib/pkg": { "name": "sync_lib", "version": "0.0.30", "dev": true, "license": "MIT" }, + "backend/sync_lib/pkg": { + "name": "sync_lib", + "version": "0.0.30", + "extraneous": true, + "license": "MIT" + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -6584,7 +6590,7 @@ } }, "node_modules/sync_lib": { - "resolved": "backend/sync_lib/pkg", + "resolved": "../backend/sync_lib/pkg", "link": true }, "node_modules/sync-client": { @@ -7485,7 +7491,7 @@ "openapi-fetch": "0.13.4", "openapi-typescript": "7.6.1", "p-queue": "^8.1.0", - "sync_lib": "file:../backend/sync_lib/pkg", + "sync_lib": "file:../../backend/sync_lib/pkg", "ts-jest": "^29.2.5", "ts-loader": "^9.5.2", "tslib": "2.8.1", diff --git a/package.json b/frontend/package.json similarity index 77% rename from package.json rename to frontend/package.json index ae2f2780..314c24e2 100644 --- a/package.json +++ b/frontend/package.json @@ -15,7 +15,7 @@ "build": "npm run build --workspaces", "dev": "npm run dev --workspaces", "test": "npm run test --workspaces", - "lint": "eslint --fix sync-client obsidian-plugin; prettier --write \"sync-client/**/*.(ts|scss|json|html)\" \"obsidian-plugin/**/*.(ts|scss|json|html)\"", + "lint": "rm -rf **/dist/index.js && eslint --fix sync-client obsidian-plugin; prettier --write \"sync-client/**/*.(ts|scss|json|html)\" \"obsidian-plugin/**/*.(ts|scss|json|html)\"", "update": "ncu -u -ws" }, "devDependencies": { diff --git a/sync-client/jest.config.js b/frontend/sync-client/jest.config.js similarity index 100% rename from sync-client/jest.config.js rename to frontend/sync-client/jest.config.js diff --git a/sync-client/package.json b/frontend/sync-client/package.json similarity index 87% rename from sync-client/package.json rename to frontend/sync-client/package.json index ce4ccc97..b4493c99 100644 --- a/sync-client/package.json +++ b/frontend/sync-client/package.json @@ -2,7 +2,7 @@ "name": "sync-client", "version": "1.0.0", "main": "dist/index.js", - "types": "dist/types/src/index.d.ts", + "types": "dist/types/index.d.ts", "scripts": { "dev": "webpack watch --mode development", "build": "webpack --mode production", @@ -11,7 +11,7 @@ "devDependencies": { "tslib": "2.8.1", "typescript": "5.7.3", - "sync_lib": "file:../backend/sync_lib/pkg", + "sync_lib": "file:../../backend/sync_lib/pkg", "@types/jest": "^29.5.14", "@types/node": "^22.13.4", "jest": "^29.7.0", @@ -25,4 +25,4 @@ "webpack": "^5.98.0", "webpack-cli": "^6.0.1" } -} +} \ No newline at end of file diff --git a/sync-client/src/database/database.ts b/frontend/sync-client/src/database/database.ts similarity index 100% rename from sync-client/src/database/database.ts rename to frontend/sync-client/src/database/database.ts diff --git a/sync-client/src/database/document-metadata.ts b/frontend/sync-client/src/database/document-metadata.ts similarity index 100% rename from sync-client/src/database/document-metadata.ts rename to frontend/sync-client/src/database/document-metadata.ts diff --git a/sync-client/src/database/sync-settings.ts b/frontend/sync-client/src/database/sync-settings.ts similarity index 100% rename from sync-client/src/database/sync-settings.ts rename to frontend/sync-client/src/database/sync-settings.ts diff --git a/sync-client/src/file-operations.ts b/frontend/sync-client/src/file-operations.ts similarity index 100% rename from sync-client/src/file-operations.ts rename to frontend/sync-client/src/file-operations.ts diff --git a/sync-client/src/index.ts b/frontend/sync-client/src/index.ts similarity index 100% rename from sync-client/src/index.ts rename to frontend/sync-client/src/index.ts diff --git a/sync-client/src/services/sync-service.ts b/frontend/sync-client/src/services/sync-service.ts similarity index 100% rename from sync-client/src/services/sync-service.ts rename to frontend/sync-client/src/services/sync-service.ts diff --git a/sync-client/src/services/types.ts b/frontend/sync-client/src/services/types.ts similarity index 100% rename from sync-client/src/services/types.ts rename to frontend/sync-client/src/services/types.ts diff --git a/sync-client/src/sync-operations/apply-remote-changes-locally.ts b/frontend/sync-client/src/sync-operations/apply-remote-changes-locally.ts similarity index 100% rename from sync-client/src/sync-operations/apply-remote-changes-locally.ts rename to frontend/sync-client/src/sync-operations/apply-remote-changes-locally.ts diff --git a/sync-client/src/sync-operations/document-lock.test.ts b/frontend/sync-client/src/sync-operations/document-lock.test.ts similarity index 96% rename from sync-client/src/sync-operations/document-lock.test.ts rename to frontend/sync-client/src/sync-operations/document-lock.test.ts index 1b79a225..5b28de18 100644 --- a/sync-client/src/sync-operations/document-lock.test.ts +++ b/frontend/sync-client/src/sync-operations/document-lock.test.ts @@ -1,9 +1,9 @@ +import { RelativePath } from "../database/document-metadata"; import { tryLockDocument, waitForDocumentLock, unlockDocument } from "./document-lock"; -import type { RelativePath } from "src/database/document-metadata"; describe("Document Lock Operations", () => { const testPath: RelativePath = "test/document/path"; diff --git a/sync-client/src/sync-operations/document-lock.ts b/frontend/sync-client/src/sync-operations/document-lock.ts similarity index 93% rename from sync-client/src/sync-operations/document-lock.ts rename to frontend/sync-client/src/sync-operations/document-lock.ts index a8a3b356..db657afc 100644 --- a/sync-client/src/sync-operations/document-lock.ts +++ b/frontend/sync-client/src/sync-operations/document-lock.ts @@ -1,4 +1,4 @@ -import type { RelativePath } from "src/database/document-metadata"; +import { RelativePath } from "../database/document-metadata"; const locked = new Set(); const waiters = new Map void)[]>(); diff --git a/sync-client/src/sync-operations/syncer.ts b/frontend/sync-client/src/sync-operations/syncer.ts similarity index 100% rename from sync-client/src/sync-operations/syncer.ts rename to frontend/sync-client/src/sync-operations/syncer.ts diff --git a/sync-client/src/tracing/logger.ts b/frontend/sync-client/src/tracing/logger.ts similarity index 100% rename from sync-client/src/tracing/logger.ts rename to frontend/sync-client/src/tracing/logger.ts diff --git a/sync-client/src/tracing/sync-history.ts b/frontend/sync-client/src/tracing/sync-history.ts similarity index 100% rename from sync-client/src/tracing/sync-history.ts rename to frontend/sync-client/src/tracing/sync-history.ts diff --git a/sync-client/src/utils/deserialize.test.ts b/frontend/sync-client/src/utils/deserialize.test.ts similarity index 91% rename from sync-client/src/utils/deserialize.test.ts rename to frontend/sync-client/src/utils/deserialize.test.ts index fa50a2cd..b053c2a3 100644 --- a/sync-client/src/utils/deserialize.test.ts +++ b/frontend/sync-client/src/utils/deserialize.test.ts @@ -4,7 +4,7 @@ import fs from "fs"; describe("deserialize", () => { it("should serialize a Uint8Array to a base64 string", async () => { const wasmBin = fs.readFileSync( - "../backend/sync_lib/pkg/sync_lib_bg.wasm" + "../../backend/sync_lib/pkg/sync_lib_bg.wasm" ); await init({ module_or_path: wasmBin }); diff --git a/sync-client/src/utils/deserialize.ts b/frontend/sync-client/src/utils/deserialize.ts similarity index 100% rename from sync-client/src/utils/deserialize.ts rename to frontend/sync-client/src/utils/deserialize.ts diff --git a/sync-client/src/utils/hash.ts b/frontend/sync-client/src/utils/hash.ts similarity index 100% rename from sync-client/src/utils/hash.ts rename to frontend/sync-client/src/utils/hash.ts diff --git a/sync-client/src/utils/is-equal-bytes.test.ts b/frontend/sync-client/src/utils/is-equal-bytes.test.ts similarity index 100% rename from sync-client/src/utils/is-equal-bytes.test.ts rename to frontend/sync-client/src/utils/is-equal-bytes.test.ts diff --git a/sync-client/src/utils/is-equal-bytes.ts b/frontend/sync-client/src/utils/is-equal-bytes.ts similarity index 100% rename from sync-client/src/utils/is-equal-bytes.ts rename to frontend/sync-client/src/utils/is-equal-bytes.ts diff --git a/sync-client/src/utils/retried-fetch.ts b/frontend/sync-client/src/utils/retried-fetch.ts similarity index 100% rename from sync-client/src/utils/retried-fetch.ts rename to frontend/sync-client/src/utils/retried-fetch.ts diff --git a/sync-client/src/utils/serialize.test.ts b/frontend/sync-client/src/utils/serialize.test.ts similarity index 91% rename from sync-client/src/utils/serialize.test.ts rename to frontend/sync-client/src/utils/serialize.test.ts index ae2016e5..d01fae18 100644 --- a/sync-client/src/utils/serialize.test.ts +++ b/frontend/sync-client/src/utils/serialize.test.ts @@ -5,7 +5,7 @@ import fs from "fs"; describe("serialize", () => { it("should serialize a Uint8Array to a base64 string", async () => { const wasmBin = fs.readFileSync( - "../backend/sync_lib/pkg/sync_lib_bg.wasm" + "../../backend/sync_lib/pkg/sync_lib_bg.wasm" ); await init({ module_or_path: wasmBin }); diff --git a/sync-client/src/utils/serialize.ts b/frontend/sync-client/src/utils/serialize.ts similarity index 100% rename from sync-client/src/utils/serialize.ts rename to frontend/sync-client/src/utils/serialize.ts diff --git a/frontend/sync-client/tsconfig.json b/frontend/sync-client/tsconfig.json new file mode 100644 index 00000000..e0875e31 --- /dev/null +++ b/frontend/sync-client/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "module": "ESNext", + "target": "ESNext", + "noImplicitAny": true, + "moduleResolution": "bundler", + "strictNullChecks": true, + "allowSyntheticDefaultImports": true, + "lib": [ + "DOM", + "ESNext" + ] + }, +} \ No newline at end of file diff --git a/sync-client/webpack.config.js b/frontend/sync-client/webpack.config.js similarity index 100% rename from sync-client/webpack.config.js rename to frontend/sync-client/webpack.config.js diff --git a/obsidian-plugin/manifest.json b/obsidian-plugin/manifest.json deleted file mode 100644 index 7b7ca8c8..00000000 --- a/obsidian-plugin/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "vault-link", - "name": "VaultLink", - "version": "0.0.30", - "minAppVersion": "0.0.0", - "description": "Self-hosted synchronization and collaboration for your Vault.", - "author": "Andras Schmelczer", - "authorUrl": "https://schmelczer.dev", - "isDesktopOnly": false -} diff --git a/obsidian-plugin/tsconfig.json b/obsidian-plugin/tsconfig.json deleted file mode 100644 index 85523ed4..00000000 --- a/obsidian-plugin/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "inlineSourceMap": true, - "inlineSources": true, - "module": "ESNext", - "target": "ES6", - "noImplicitAny": true, - "moduleResolution": "bundler", - "isolatedModules": true, - "strictNullChecks": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "lib": [ - "DOM", - "ES5", - "ES6", - "ES7" - ] - }, - "include": [ - "**/*.ts" - ] -} \ No newline at end of file diff --git a/sync-client/tsconfig.json b/sync-client/tsconfig.json deleted file mode 100644 index 63ebf589..00000000 --- a/sync-client/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "target": "ES2022", - "noImplicitAny": true, - "moduleResolution": "node", - "strictNullChecks": true, - "esModuleInterop": true, - "lib": [ - "DOM", - "ESNext" - ] - } -} \ No newline at end of file