diff --git a/app/obsidian/manifest-beta.json b/app/obsidian/manifest-beta.json index 462b7b81..59ae0f76 100644 --- a/app/obsidian/manifest-beta.json +++ b/app/obsidian/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "zotlit", "name": "ZotLit", - "version": "1.1.0", + "version": "1.1.1", "minAppVersion": "1.4.4", "versions": { "better-sqlite3": "8.0.1-mod.1" diff --git a/app/obsidian/manifest.json b/app/obsidian/manifest.json index 462b7b81..59ae0f76 100644 --- a/app/obsidian/manifest.json +++ b/app/obsidian/manifest.json @@ -1,7 +1,7 @@ { "id": "zotlit", "name": "ZotLit", - "version": "1.1.0", + "version": "1.1.1", "minAppVersion": "1.4.4", "versions": { "better-sqlite3": "8.0.1-mod.1" diff --git a/app/obsidian/package.json b/app/obsidian/package.json index d9bf6735..439bcb58 100644 --- a/app/obsidian/package.json +++ b/app/obsidian/package.json @@ -1,6 +1,6 @@ { "name": "zotlit", - "version": "1.1.0", + "version": "1.1.1", "description": "Obsidian.md plugin to integrate with Zotero, create literature notes and insert citations from a Zotero library.", "scripts": { "dev": "cross-env BUILD=development node esbuild.config.mjs", diff --git a/app/obsidian/src/services/zotero-db/connector/service2.ts b/app/obsidian/src/services/zotero-db/connector/service2.ts new file mode 100644 index 00000000..9a6529e0 --- /dev/null +++ b/app/obsidian/src/services/zotero-db/connector/service2.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import { Server } from "http"; +import { Service, calc } from "@ophidian/core"; +import { App } from "obsidian"; +import { SettingsService } from "@/settings/base"; +import ZoteroPlugin from "@/zt-main"; +import { DatabaseWorkerPool } from "./worker"; + +export const enum DatabaseStatus { + NotInitialized, + Pending, + Ready, +} + +export default class Database extends Service { + settings = this.use(SettingsService); + app = this.use(App); + plugin = this.use(ZoteroPlugin); + server = this.use(Server); + #instance = new DatabaseWorkerPool({ + minWorkers: 1, + maxWorkers: 1, + }); + get api() { + return this.#instance.proxy; + } + + @calc get zoteroDataDir(): string { + return this.settings.current?.zoteroDataDir; + } + + #status = DatabaseStatus.NotInitialized; +} diff --git a/app/obsidian/versions.json b/app/obsidian/versions.json index 3afbf33e..fef6b8f8 100755 --- a/app/obsidian/versions.json +++ b/app/obsidian/versions.json @@ -29,5 +29,6 @@ "1.1.0-beta.13": "1.4.4", "1.1.0-beta.14": "1.4.4", "1.1.0-beta.15": "1.4.4", - "1.1.0": "1.4.4" + "1.1.0": "1.4.4", + "1.1.1": "1.4.4" } \ No newline at end of file diff --git a/manifest-beta.json b/manifest-beta.json index 462b7b81..59ae0f76 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "zotlit", "name": "ZotLit", - "version": "1.1.0", + "version": "1.1.1", "minAppVersion": "1.4.4", "versions": { "better-sqlite3": "8.0.1-mod.1" diff --git a/manifest.json b/manifest.json index 462b7b81..59ae0f76 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "zotlit", "name": "ZotLit", - "version": "1.1.0", + "version": "1.1.1", "minAppVersion": "1.4.4", "versions": { "better-sqlite3": "8.0.1-mod.1" diff --git a/versions.json b/versions.json index 3afbf33e..fef6b8f8 100755 --- a/versions.json +++ b/versions.json @@ -29,5 +29,6 @@ "1.1.0-beta.13": "1.4.4", "1.1.0-beta.14": "1.4.4", "1.1.0-beta.15": "1.4.4", - "1.1.0": "1.4.4" + "1.1.0": "1.4.4", + "1.1.1": "1.4.4" } \ No newline at end of file