diff --git a/src/common/SvelteItemView.ts b/src/common/SvelteItemView.ts index 3998367..3b8f788 100644 --- a/src/common/SvelteItemView.ts +++ b/src/common/SvelteItemView.ts @@ -1,4 +1,4 @@ -import { ItemView } from "obsidian"; +import { ItemView } from "@/deps.ts"; import { type mount, unmount } from "svelte"; export abstract class SvelteItemView extends ItemView { diff --git a/src/deps.ts b/src/deps.ts index c7c3778..29e2a18 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -24,6 +24,10 @@ export { parseYaml, ItemView, WorkspaceLeaf, + Menu, + request, + getLanguage, + ButtonComponent, } from "obsidian"; export type { DataWriteOptions, diff --git a/src/features/ConfigSync/PluginCombo.svelte b/src/features/ConfigSync/PluginCombo.svelte index e172b4e..ceb9256 100644 --- a/src/features/ConfigSync/PluginCombo.svelte +++ b/src/features/ConfigSync/PluginCombo.svelte @@ -10,7 +10,7 @@ import { getDocData, timeDeltaToHumanReadable, unique } from "../../lib/src/common/utils"; import type ObsidianLiveSyncPlugin from "../../main"; // import { askString } from "../../common/utils"; - import { Menu } from "obsidian"; + import { Menu } from "@/deps.ts"; export let list: IPluginDataExDisplay[] = []; export let thisTerm = ""; diff --git a/src/features/ConfigSync/PluginPane.svelte b/src/features/ConfigSync/PluginPane.svelte index 07df53c..a7a2e61 100644 --- a/src/features/ConfigSync/PluginPane.svelte +++ b/src/features/ConfigSync/PluginPane.svelte @@ -10,7 +10,7 @@ pluginV2Progress, } from "./CmdConfigSync.ts"; import PluginCombo from "./PluginCombo.svelte"; - import { Menu, type PluginManifest } from "obsidian"; + import { Menu, type PluginManifest } from "@/deps.ts"; import { unique } from "../../lib/src/common/utils"; import { MODE_SELECTIVE, diff --git a/src/features/P2PSync/P2PReplicator/P2PReplicatorPaneView.ts b/src/features/P2PSync/P2PReplicator/P2PReplicatorPaneView.ts index b401ece..b22c4bc 100644 --- a/src/features/P2PSync/P2PReplicator/P2PReplicatorPaneView.ts +++ b/src/features/P2PSync/P2PReplicator/P2PReplicatorPaneView.ts @@ -1,4 +1,4 @@ -import { Menu, WorkspaceLeaf } from "obsidian"; +import { Menu, WorkspaceLeaf } from "@/deps.ts"; import ReplicatorPaneComponent from "./P2PReplicatorPane.svelte"; import type ObsidianLiveSyncPlugin from "../../../main.ts"; import { mount } from "svelte"; diff --git a/src/main.ts b/src/main.ts index 9159a79..ba47d13 100644 --- a/src/main.ts +++ b/src/main.ts @@ -71,31 +71,6 @@ import type { LiveSyncManagers } from "./lib/src/managers/LiveSyncManagers.ts"; import { ObsidianServiceHub } from "./modules/services/ObsidianServices.ts"; import type { InjectableServiceHub } from "./lib/src/services/InjectableServices.ts"; -// function throwShouldBeOverridden(): never { -// throw new Error("This function should be overridden by the module."); -// } -// const InterceptiveAll = Promise.resolve(true); -// const InterceptiveEvery = Promise.resolve(true); -// const InterceptiveAny = Promise.resolve(undefined); - -/** - * All $prefixed functions are hooked by the modules. Be careful to call them directly. - * Please refer to the module's source code to understand the function. - * $$ : Completely overridden functions. - * $all : Process all modules and return all results. - * $every : Process all modules until the first failure. - * $any : Process all modules until the first success. - * $ : Other interceptive points. You should manually assign the module - * All of above performed on injectModules function. - * - * No longer used! See AppLifecycleService in Services.ts. - * For a while, just commented out some previously used code. (sorry, some are deleted...) - * 'Convention over configuration' was a lie for me. At least, very lack of refactor-ability. - * - * Still some modules are separated, and connected by `ThroughHole` class. - * However, it is not a good design. I am going to manage the modules in a more explicit way. - */ - export default class ObsidianLiveSyncPlugin extends Plugin implements @@ -184,10 +159,6 @@ export default class ObsidianLiveSyncPlugin } throw new Error(`Module ${constructor} not found or not loaded.`); } - // injected = injectModules(this, [...this.modules, ...this.addOns] as ICoreModule[]); - // <-- Module System - - // Following are plugged by the modules. settings!: ObsidianLiveSyncSettings; localDatabase!: LiveSyncLocalDB; @@ -232,436 +203,6 @@ export default class ObsidianLiveSyncPlugin syncStatus: "CLOSED" as DatabaseConnectingStatus, }); - // --> Events - - /* - LifeCycle of the plugin - 0. onunload (Obsidian Kicks.) - 1. onLiveSyncLoad - 2. (event) EVENT_PLUGIN_LOADED - 3. $everyOnloadStart - -- Load settings - -- Open database - -- - 3. $everyOnloadAfterLoadSettings - 4. $everyOnload - 5. (addOns) onload - -- - onLiveSyncReady - -- $everyOnLayoutReady - -- EVENT_LAYOUT_READY - (initializeDatabase) - -- $everyOnFirstInitialize - -- realizeSettingSyncMode - -- waitForReplicationOnce (if syncOnStart and not LiveSync) - -- scanStat (Not waiting for the result) - - --- - - Finalization - 0. onunload (Obsidian Kicks.) - 1. onLiveSyncUnload - 2. (event) EVENT_PLUGIN_UNLOADED - 3. $allStartOnUnload - 4. $allOnUnload - 5. (addOns) onunload - 6. localDatabase.onunload - 7. replicator.closeReplication - 8. localDatabase.close - 9. (event) EVENT_PLATFORM_UNLOADED - - */ - - // $everyOnLayoutReady(): Promise { - // //TODO: AppLifecycleService.onLayoutReady - // return InterceptiveEvery; - // } - // $everyOnFirstInitialize(): Promise { - // //TODO: AppLifecycleService.onFirstInitialize - // return InterceptiveEvery; - // } - - // Some Module should call this function to start the plugin. - // $$onLiveSyncReady(): Promise { - // //TODO: AppLifecycleService.onLiveSyncReady - // throwShouldBeOverridden(); - // } - // $$wireUpEvents(): void { - // //TODO: AppLifecycleService.wireUpEvents - // throwShouldBeOverridden(); - // } - // $$onLiveSyncLoad(): Promise { - // //TODO: AppLifecycleService.onLoad - // throwShouldBeOverridden(); - // } - - // $$onLiveSyncUnload(): Promise { - // //TODO: AppLifecycleService.onAppUnload - // throwShouldBeOverridden(); - // } - - // $allScanStat(): Promise { - // //TODO: AppLifecycleService.scanStartupIssues - // return InterceptiveAll; - // } - // $everyOnloadStart(): Promise { - // //TODO: AppLifecycleService.onInitialise - // return InterceptiveEvery; - // } - - // $everyOnloadAfterLoadSettings(): Promise { - // //TODO: AppLifecycleService.onApplyStartupLoaded - // return InterceptiveEvery; - // } - - // $everyOnload(): Promise { - // //TODO: AppLifecycleService.onLoaded - // return InterceptiveEvery; - // } - - // $anyHandlerProcessesFileEvent(item: FileEventItem): Promise { - // //TODO: FileProcessingService.processFileEvent - // return InterceptiveAny; - // } - - // $allStartOnUnload(): Promise { - // //TODO: AppLifecycleService.onBeforeUnload - // return InterceptiveAll; - // } - // $allOnUnload(): Promise { - // //TODO: AppLifecycleService.onUnload - // return InterceptiveAll; - // } - - // $$openDatabase(): Promise { - // // DatabaseService.openDatabase - // throwShouldBeOverridden(); - // } - - // $$realizeSettingSyncMode(): Promise { - // // SettingService.realiseSetting - // throwShouldBeOverridden(); - // } - // $$performRestart() { - // // AppLifecycleService.performRestart - // throwShouldBeOverridden(); - // } - - // $$clearUsedPassphrase(): void { - // // SettingService.clearUsedPassphrase - // throwShouldBeOverridden(); - // } - - // $$decryptSettings(settings: ObsidianLiveSyncSettings): Promise { - // // SettingService.decryptSettings - // throwShouldBeOverridden(); - // } - // $$adjustSettings(settings: ObsidianLiveSyncSettings): Promise { - // // SettingService.adjustSettings - // throwShouldBeOverridden(); - // } - - // $$loadSettings(): Promise { - // // SettingService.loadSettings - // throwShouldBeOverridden(); - // } - - // $$saveDeviceAndVaultName(): void { - // // SettingService.saveDeviceAndVaultName - // throwShouldBeOverridden(); - // } - - // $$saveSettingData(): Promise { - // // SettingService.saveSettingData - // throwShouldBeOverridden(); - // } - - // $anyProcessOptionalFileEvent(path: FilePath): Promise { - // // FileProcessingService.processOptionalFileEvent - // return InterceptiveAny; - // } - - // $everyCommitPendingFileEvent(): Promise { - // // FileProcessingService.commitPendingFileEvent - // return InterceptiveEvery; - // } - - // -> - // $anyGetOptionalConflictCheckMethod(path: FilePathWithPrefix): Promise { - // return InterceptiveAny; - // } - - // $$queueConflictCheckIfOpen(file: FilePathWithPrefix): Promise { - // // ConflictEventManager.queueCheckForConflictIfOpen - // throwShouldBeOverridden(); - // } - - // $$queueConflictCheck(file: FilePathWithPrefix): Promise { - // // ConflictEventManager.queueCheckForConflict - // throwShouldBeOverridden(); - // } - - // $$waitForAllConflictProcessed(): Promise { - // // ConflictEventManager.ensureAllConflictProcessed - // throwShouldBeOverridden(); - // } - - //<-- Conflict Check - - // $anyProcessOptionalSyncFiles(doc: LoadedEntry): Promise { - // // ReplicationService.processOptionalSyncFile - // return InterceptiveAny; - // } - - // $anyProcessReplicatedDoc(doc: MetaEntry): Promise { - // // ReplicationService.processReplicatedDocument - // return InterceptiveAny; - // } - - //---> Sync - // $$parseReplicationResult(docs: Array>): void { - // // ReplicationService.parseSynchroniseResult - // throwShouldBeOverridden(); - // } - - // $anyModuleParsedReplicationResultItem(docs: PouchDB.Core.ExistingDocument): Promise { - // // ReplicationService.processVirtualDocument - // return InterceptiveAny; - // } - // $everyBeforeRealizeSetting(): Promise { - // // SettingEventManager.beforeRealiseSetting - // return InterceptiveEvery; - // } - // $everyAfterRealizeSetting(): Promise { - // // SettingEventManager.onSettingRealised - // return InterceptiveEvery; - // } - // $everyRealizeSettingSyncMode(): Promise { - // // SettingEventManager.onRealiseSetting - // return InterceptiveEvery; - // } - - // $everyBeforeSuspendProcess(): Promise { - // // AppLifecycleService.onSuspending - // return InterceptiveEvery; - // } - // $everyOnResumeProcess(): Promise { - // // AppLifecycleService.onResuming - // return InterceptiveEvery; - // } - // $everyAfterResumeProcess(): Promise { - // // AppLifecycleService.onResumed - // return InterceptiveEvery; - // } - - // $$fetchRemotePreferredTweakValues(trialSetting: RemoteDBSettings): Promise { - // //TODO:TweakValueService.fetchRemotePreferred - // throwShouldBeOverridden(); - // } - // $$checkAndAskResolvingMismatchedTweaks(preferred: Partial): Promise<[TweakValues | boolean, boolean]> { - // //TODO:TweakValueService.checkAndAskResolvingMismatched - // throwShouldBeOverridden(); - // } - // $$askResolvingMismatchedTweaks(preferredSource: TweakValues): Promise<"OK" | "CHECKAGAIN" | "IGNORE"> { - // //TODO:TweakValueService.askResolvingMismatched - // throwShouldBeOverridden(); - // } - - // $$checkAndAskUseRemoteConfiguration( - // settings: RemoteDBSettings - // ): Promise<{ result: false | TweakValues; requireFetch: boolean }> { - // // TweakValueService.checkAndAskUseRemoteConfiguration - // throwShouldBeOverridden(); - // } - - // $$askUseRemoteConfiguration( - // trialSetting: RemoteDBSettings, - // preferred: TweakValues - // ): Promise<{ result: false | TweakValues; requireFetch: boolean }> { - // // TweakValueService.askUseRemoteConfiguration - // throwShouldBeOverridden(); - // } - // $everyBeforeReplicate(showMessage: boolean): Promise { - // // ReplicationService.beforeReplicate - // return InterceptiveEvery; - // } - - // $$canReplicate(showMessage: boolean = false): Promise { - // // ReplicationService.isReplicationReady - // throwShouldBeOverridden(); - // } - - // $$replicate(showMessage: boolean = false): Promise { - // // ReplicationService.replicate - // throwShouldBeOverridden(); - // } - // $$replicateByEvent(showMessage: boolean = false): Promise { - // // ReplicationService.replicateByEvent - // throwShouldBeOverridden(); - // } - - // $everyOnDatabaseInitialized(showingNotice: boolean): Promise { - // // DatabaseEventService.onDatabaseInitialised - // throwShouldBeOverridden(); - // } - - // $$initializeDatabase( - // showingNotice: boolean = false, - // reopenDatabase = true, - // ignoreSuspending: boolean = false - // ): Promise { - // // DatabaseEventService.initializeDatabase - // throwShouldBeOverridden(); - // } - - // $anyAfterConnectCheckFailed(): Promise { - // // ReplicationService.checkConnectionFailure - // return InterceptiveAny; - // } - - // $$replicateAllToServer( - // showingNotice: boolean = false, - // sendChunksInBulkDisabled: boolean = false - // ): Promise { - // // RemoteService.replicateAllToRemote - // throwShouldBeOverridden(); - // } - // $$replicateAllFromServer(showingNotice: boolean = false): Promise { - // // RemoteService.replicateAllFromRemote - // throwShouldBeOverridden(); - // } - - // Remote Governing - // $$markRemoteLocked(lockByClean: boolean = false): Promise { - // // RemoteService.markLocked; - // throwShouldBeOverridden(); - // } - - // $$markRemoteUnlocked(): Promise { - // // RemoteService.markUnlocked; - // throwShouldBeOverridden(); - // } - - // $$markRemoteResolved(): Promise { - // // RemoteService.markResolved; - // throwShouldBeOverridden(); - // } - - // <-- Remote Governing - - // $$isFileSizeExceeded(size: number): boolean { - // // VaultService.isFileSizeTooLarge - // throwShouldBeOverridden(); - // } - - // $$performFullScan(showingNotice?: boolean, ignoreSuspending?: boolean): Promise { - // // VaultService.scanVault - // throwShouldBeOverridden(); - // } - - // $anyResolveConflictByUI( - // filename: FilePathWithPrefix, - // conflictCheckResult: diff_result - // ): Promise { - // // ConflictService.resolveConflictByUserInteraction - // return InterceptiveAny; - // } - // $$resolveConflictByDeletingRev( - // path: FilePathWithPrefix, - // deleteRevision: string, - // subTitle = "" - // ): Promise { - // // ConflictService.resolveByDeletingRevision - // throwShouldBeOverridden(); - // } - // $$resolveConflict(filename: FilePathWithPrefix): Promise { - // // ConflictService.resolveConflict - // throwShouldBeOverridden(); - // } - // $anyResolveConflictByNewest(filename: FilePathWithPrefix): Promise { - // // ConflictService.resolveByNewest - // throwShouldBeOverridden(); - // } - - // $$resetLocalDatabase(): Promise { - // // DatabaseService.resetDatabase; - // throwShouldBeOverridden(); - // } - - // $$tryResetRemoteDatabase(): Promise { - // // RemoteService.tryResetDatabase; - // throwShouldBeOverridden(); - // } - - // $$tryCreateRemoteDatabase(): Promise { - // // RemoteService.tryCreateDatabase; - // throwShouldBeOverridden(); - // } - - // $$isIgnoredByIgnoreFiles(file: string | UXFileInfoStub): Promise { - // // VaultService.isIgnoredByIgnoreFiles - // throwShouldBeOverridden(); - // } - - // $$isTargetFile(file: string | UXFileInfoStub, keepFileCheckList = false): Promise { - // // VaultService.isTargetFile - // throwShouldBeOverridden(); - // } - - // $$askReload(message?: string) { - // // AppLifecycleService.askRestart - // throwShouldBeOverridden(); - // } - // $$scheduleAppReload() { - // // AppLifecycleService.scheduleRestart - // throwShouldBeOverridden(); - // } - - //--- Setup - // $allSuspendAllSync(): Promise { - // // SettingEventManager.suspendAllSync - // return InterceptiveAll; - // } - // $allSuspendExtraSync(): Promise { - // // SettingEventManager.suspendExtraSync - // return InterceptiveAll; - // } - - // $allAskUsingOptionalSyncFeature(opt: { enableFetch?: boolean; enableOverwrite?: boolean }): Promise { - // // SettingEventManager.suggestOptionalFeatures - // throwShouldBeOverridden(); - // } - // $anyConfigureOptionalSyncFeature(mode: string): Promise { - // // SettingEventManager.enableOptionalFeature - // throwShouldBeOverridden(); - // } - - // $$showView(viewType: string): Promise { - // // UIManager.showWindow // - // throwShouldBeOverridden(); - // } - - // For Development: Ensure reliability MORE AND MORE. May the this plug-in helps all of us. - // $everyModuleTest(): Promise { - // return InterceptiveEvery; - // } - // $everyModuleTestMultiDevice(): Promise { - // return InterceptiveEvery; - // } - // $$addTestResult(name: string, key: string, result: boolean, summary?: string, message?: string): void { - // throwShouldBeOverridden(); - // } - - // _isThisModuleEnabled(): boolean { - // return true; - // } - - // $anyGetAppId(): Promise { - // // APIService.getAppId - // return InterceptiveAny; - // } - - // Plug-in's overrideable functions onload() { void this.services.appLifecycle.onLoad(); } diff --git a/src/modules/AbstractModule.ts b/src/modules/AbstractModule.ts index 08bb2d4..0cbd402 100644 --- a/src/modules/AbstractModule.ts +++ b/src/modules/AbstractModule.ts @@ -2,138 +2,6 @@ import { LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, LOG_LEVEL_VERBOSE, Logger } from "oct import type { LOG_LEVEL } from "../lib/src/common/types"; import type { LiveSyncCore } from "../main"; import { __$checkInstanceBinding } from "../lib/src/dev/checks"; -// import { unique } from "octagonal-wheels/collection"; -// import type { IObsidianModule } from "./AbstractObsidianModule.ts"; -// import type { -// ICoreModuleBase, -// AllInjectableProps, -// AllExecuteProps, -// EveryExecuteProps, -// AnyExecuteProps, -// ICoreModule, -// } from "./ModuleTypes"; - -// function isOverridableKey(key: string): key is keyof ICoreModuleBase { -// return key.startsWith("$"); -// } - -// function isInjectableKey(key: string): key is keyof AllInjectableProps { -// return key.startsWith("$$"); -// } - -// function isAllExecuteKey(key: string): key is keyof AllExecuteProps { -// return key.startsWith("$all"); -// } -// function isEveryExecuteKey(key: string): key is keyof EveryExecuteProps { -// return key.startsWith("$every"); -// } -// function isAnyExecuteKey(key: string): key is keyof AnyExecuteProps { -// return key.startsWith("$any"); -// } -/** - * All $prefixed functions are hooked by the modules. Be careful to call them directly. - * Please refer to the module's source code to understand the function. - * $$ : Completely overridden functions. - * $all : Process all modules and return all results. - * $every : Process all modules until the first failure. - * $any : Process all modules until the first success. - * $ : Other interceptive points. You should manually assign the module - * All of above performed on injectModules function. - */ -// export function injectModules(target: T, modules: ICoreModule[]) { -// const allKeys = unique([ -// ...Object.keys(Object.getOwnPropertyDescriptors(target)), -// ...Object.keys(Object.getOwnPropertyDescriptors(Object.getPrototypeOf(target))), -// ]).filter((e) => e.startsWith("$")) as (keyof ICoreModule)[]; -// const moduleMap = new Map(); -// for (const module of modules) { -// for (const key of allKeys) { -// if (isOverridableKey(key)) { -// if (key in module) { -// const list = moduleMap.get(key) || []; -// if (typeof module[key] === "function") { -// module[key] = module[key].bind(module) as any; -// } -// list.push(module); -// moduleMap.set(key, list); -// } -// } -// } -// } -// Logger(`Injecting modules for ${target.constructor.name}`, LOG_LEVEL_VERBOSE); -// for (const key of allKeys) { -// const modules = moduleMap.get(key) || []; -// if (isInjectableKey(key)) { -// if (modules.length == 0) { -// throw new Error(`No module injected for ${key}. This is a fatal error.`); -// } -// target[key] = modules[0][key]! as any; -// Logger(`[${modules[0].constructor.name}]: Injected ${key} `, LOG_LEVEL_VERBOSE); -// } else if (isAllExecuteKey(key)) { -// const modules = moduleMap.get(key) || []; -// target[key] = async (...args: any) => { -// for (const module of modules) { -// try { -// //@ts-ignore -// await module[key]!(...args); -// } catch (ex) { -// Logger(`[${module.constructor.name}]: All handler for ${key} failed`, LOG_LEVEL_VERBOSE); -// Logger(ex, LOG_LEVEL_VERBOSE); -// } -// } -// return true; -// }; -// for (const module of modules) { -// Logger(`[${module.constructor.name}]: Injected (All) ${key} `, LOG_LEVEL_VERBOSE); -// } -// } else if (isEveryExecuteKey(key)) { -// target[key] = async (...args: any) => { -// for (const module of modules) { -// try { -// //@ts-ignore:2556 -// const ret = await module[key]!(...args); -// if (ret !== undefined && !ret) { -// // Failed then return that falsy value. -// return ret; -// } -// } catch (ex) { -// Logger(`[${module.constructor.name}]: Every handler for ${key} failed`); -// Logger(ex, LOG_LEVEL_VERBOSE); -// } -// } -// return true; -// }; -// for (const module of modules) { -// Logger(`[${module.constructor.name}]: Injected (Every) ${key} `, LOG_LEVEL_VERBOSE); -// } -// } else if (isAnyExecuteKey(key)) { -// //@ts-ignore -// target[key] = async (...args: any[]) => { -// for (const module of modules) { -// try { -// //@ts-ignore:2556 -// const ret = await module[key](...args); -// // If truly value returned, then return that value. -// if (ret) { -// return ret; -// } -// } catch (ex) { -// Logger(`[${module.constructor.name}]: Any handler for ${key} failed`); -// Logger(ex, LOG_LEVEL_VERBOSE); -// } -// } -// return false; -// }; -// for (const module of modules) { -// Logger(`[${module.constructor.name}]: Injected (Any) ${key} `, LOG_LEVEL_VERBOSE); -// } -// } else { -// Logger(`No injected handler for ${key} `, LOG_LEVEL_VERBOSE); -// } -// } -// Logger(`Injected modules for ${target.constructor.name}`, LOG_LEVEL_VERBOSE); -// return true; -// } export abstract class AbstractModule { _log = (msg: any, level: LOG_LEVEL = LOG_LEVEL_INFO, key?: string) => { diff --git a/src/modules/coreObsidian/UILib/dialogs.ts b/src/modules/coreObsidian/UILib/dialogs.ts index 1dca977..832fea6 100644 --- a/src/modules/coreObsidian/UILib/dialogs.ts +++ b/src/modules/coreObsidian/UILib/dialogs.ts @@ -1,4 +1,4 @@ -import { ButtonComponent } from "obsidian"; +import { ButtonComponent } from "@/deps.ts"; import { App, FuzzySuggestModal, MarkdownRenderer, Modal, Plugin, Setting } from "../../../deps.ts"; import { EVENT_PLUGIN_UNLOADED, eventHub } from "../../../common/events.ts"; diff --git a/src/modules/extras/devUtil/TestPaneView.ts b/src/modules/extras/devUtil/TestPaneView.ts index 4f8952f..9b15fa6 100644 --- a/src/modules/extras/devUtil/TestPaneView.ts +++ b/src/modules/extras/devUtil/TestPaneView.ts @@ -1,4 +1,4 @@ -import { ItemView, WorkspaceLeaf } from "obsidian"; +import { ItemView, WorkspaceLeaf } from "@/deps.ts"; import TestPaneComponent from "./TestPane.svelte"; import type ObsidianLiveSyncPlugin from "../../../main.ts"; import type { ModuleDev } from "../ModuleDev.ts"; diff --git a/src/modules/features/Log/LogPaneView.ts b/src/modules/features/Log/LogPaneView.ts index 6e8237f..b68c491 100644 --- a/src/modules/features/Log/LogPaneView.ts +++ b/src/modules/features/Log/LogPaneView.ts @@ -1,4 +1,4 @@ -import { WorkspaceLeaf } from "obsidian"; +import { WorkspaceLeaf } from "@/deps.ts"; import LogPaneComponent from "./LogPane.svelte"; import type ObsidianLiveSyncPlugin from "../../../main.ts"; import { SvelteItemView } from "../../../common/SvelteItemView.ts"; diff --git a/src/modules/features/ModuleObsidianDocumentHistory.ts b/src/modules/features/ModuleObsidianDocumentHistory.ts index 95f2211..2de7d41 100644 --- a/src/modules/features/ModuleObsidianDocumentHistory.ts +++ b/src/modules/features/ModuleObsidianDocumentHistory.ts @@ -1,4 +1,4 @@ -import { type TFile } from "obsidian"; +import { type TFile } from "@/deps.ts"; import { eventHub } from "../../common/events.ts"; import { EVENT_REQUEST_SHOW_HISTORY } from "../../common/obsidianEvents.ts"; import type { FilePathWithPrefix, LoadedEntry, DocumentID } from "../../lib/src/common/types.ts"; diff --git a/src/modules/features/ModuleObsidianSetting.ts b/src/modules/features/ModuleObsidianSetting.ts index 3c4902c..cf3eaeb 100644 --- a/src/modules/features/ModuleObsidianSetting.ts +++ b/src/modules/features/ModuleObsidianSetting.ts @@ -14,7 +14,7 @@ import { import { LOG_LEVEL_NOTICE, LOG_LEVEL_URGENT } from "octagonal-wheels/common/logger"; import { $msg, setLang } from "../../lib/src/common/i18n.ts"; import { isCloudantURI } from "../../lib/src/pouchdb/utils_couchdb.ts"; -import { getLanguage } from "obsidian"; +import { getLanguage } from "@/deps.ts"; import { SUPPORTED_I18N_LANGS, type I18N_LANGS } from "../../lib/src/common/rosetta.ts"; import { decryptString, encryptString } from "@/lib/src/encryption/stringEncryption.ts"; import type { LiveSyncCore } from "../../main.ts"; diff --git a/src/modules/features/SettingDialogue/PaneSetup.ts b/src/modules/features/SettingDialogue/PaneSetup.ts index 4e12fd8..03f21c4 100644 --- a/src/modules/features/SettingDialogue/PaneSetup.ts +++ b/src/modules/features/SettingDialogue/PaneSetup.ts @@ -12,7 +12,7 @@ import type { ObsidianLiveSyncSettingTab } from "./ObsidianLiveSyncSettingTab.ts import type { PageFunctions } from "./SettingPane.ts"; import { visibleOnly } from "./SettingPane.ts"; import { DEFAULT_SETTINGS } from "../../../lib/src/common/types.ts"; -import { request } from "obsidian"; +import { request } from "@/deps.ts"; import { SetupManager, UserMode } from "../SetupManager.ts"; export function paneSetup( this: ObsidianLiveSyncSettingTab,