mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-12 01:10:15 +00:00
fix imports
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { App } from "@/deps.ts";
|
||||
import ObsidianLiveSyncPlugin from "@/main";
|
||||
import { DEFAULT_SETTINGS, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
import { DEFAULT_SETTINGS } from "@lib/common/models/setting.const.defaults";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { LOG_LEVEL_VERBOSE, setGlobalLogFunction } from "@lib/common/logger";
|
||||
import { SettingCache } from "./obsidian-mock";
|
||||
import { delay, fireAndForget, promiseWithResolvers } from "octagonal-wheels/promises";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { P2PSyncSetting } from "@lib/common/types";
|
||||
import type { P2PSyncSetting } from "@lib/common/models/setting.type";
|
||||
import { delay } from "octagonal-wheels/promises";
|
||||
import type { BrowserContext, Page } from "playwright";
|
||||
import type { Plugin } from "vitest/config";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { compareMTime } from "@lib/common/utils.database";
|
||||
import { EVEN } from "@/common/utils";
|
||||
import { TFile, type DataWriteOptions } from "@/deps";
|
||||
import type { FilePath } from "@lib/common/types";
|
||||
import type { FilePath } from "@lib/common/models/db.type";
|
||||
import { isDocContentSame, readContent } from "@lib/common/utils.database";
|
||||
import { waitForIdle, type LiveSyncHarness } from "../harness/harness";
|
||||
import { expect } from "vitest";
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { beforeAll, describe, expect, it, test } from "vitest";
|
||||
import { generateHarness, waitForIdle, waitForReady, type LiveSyncHarness } from "../harness/harness";
|
||||
import { TFile } from "@/deps.ts";
|
||||
import { DEFAULT_SETTINGS, type FilePath, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
import { DEFAULT_SETTINGS } from "@lib/common/models/setting.const.defaults";
|
||||
import type { FilePath } from "@lib/common/models/db.type";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { isDocContentSame, readContent } from "@lib/common/utils.database";
|
||||
import { DummyFileSourceInisialised, generateBinaryFile, generateFile, init } from "../utils/dummyfile";
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
// and edge, resolving conflicts, etc. will be covered in separate test suites.
|
||||
import { afterAll, beforeAll, describe, expect, it, test } from "vitest";
|
||||
import { generateHarness, waitForIdle, waitForReady, type LiveSyncHarness } from "../harness/harness";
|
||||
import { RemoteTypes, type FilePath, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { FilePath } from "@lib/common/models/db.type";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import {
|
||||
DummyFileSourceInisialised,
|
||||
FILE_SIZE_BINS,
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
// This test suite only covers main functional cases of synchronisation. Event handling, error cases,
|
||||
// and edge, resolving conflicts, etc. will be covered in separate test suites.
|
||||
import { describe } from "vitest";
|
||||
import {
|
||||
PREFERRED_JOURNAL_SYNC,
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@lib/common/types";
|
||||
|
||||
import { PREFERRED_JOURNAL_SYNC, PREFERRED_SETTING_SELF_HOSTED } from "@lib/common/models/setting.const.preferred";
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { defaultFileOption } from "./db_common";
|
||||
import { syncBasicCase } from "./sync.senario.basic.ts";
|
||||
import { settingBase } from "./variables.ts";
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
// This test suite only covers main functional cases of synchronisation. Event handling, error cases,
|
||||
// and edge, resolving conflicts, etc. will be covered in separate test suites.
|
||||
import { describe } from "vitest";
|
||||
import {
|
||||
PREFERRED_JOURNAL_SYNC,
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@lib/common/types";
|
||||
|
||||
import { PREFERRED_JOURNAL_SYNC, PREFERRED_SETTING_SELF_HOSTED } from "@lib/common/models/setting.const.preferred";
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { defaultFileOption } from "./db_common";
|
||||
import { syncBasicCase } from "./sync.senario.basic.ts";
|
||||
import { settingBase } from "./variables.ts";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from "vitest";
|
||||
import { waitForIdle, type LiveSyncHarness } from "../harness/harness";
|
||||
import { RemoteTypes, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { delay, fireAndForget } from "@lib/common/utils";
|
||||
import { commands } from "vitest/browser";
|
||||
import { LiveSyncTrysteroReplicator } from "@lib/replication/trystero/LiveSyncTrysteroReplicator";
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { DoctorRegulation } from "@lib/common/configForDoc";
|
||||
import { DEFAULT_SETTINGS, ChunkAlgorithms, AutoAccepting, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
import { DEFAULT_SETTINGS } from "@lib/common/models/setting.const.defaults";
|
||||
import { ChunkAlgorithms } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { AutoAccepting } from "@lib/common/models/setting.type";
|
||||
export const env = (import.meta as any).env;
|
||||
export const settingBase = {
|
||||
...DEFAULT_SETTINGS,
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
*/
|
||||
import { expect } from "vitest";
|
||||
import { waitForIdle, type LiveSyncHarness } from "../harness/harness";
|
||||
import { RemoteTypes, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { delay } from "@lib/common/utils";
|
||||
import { LiveSyncTrysteroReplicator } from "@lib/replication/trystero/LiveSyncTrysteroReplicator";
|
||||
import { waitTaskWithFollowups } from "../lib/util";
|
||||
|
||||
@@ -9,13 +9,11 @@
|
||||
*/
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, test } from "vitest";
|
||||
import { generateHarness, waitForIdle, waitForReady, type LiveSyncHarness } from "../harness/harness";
|
||||
import {
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type FilePath,
|
||||
type ObsidianLiveSyncSettings,
|
||||
AutoAccepting,
|
||||
} from "@lib/common/types";
|
||||
import { PREFERRED_SETTING_SELF_HOSTED } from "@lib/common/models/setting.const.preferred";
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { FilePath } from "@lib/common/models/db.type";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { AutoAccepting } from "@lib/common/models/setting.type";
|
||||
import { DummyFileSourceInisialised, generateBinaryFile, generateFile } from "../utils/dummyfile";
|
||||
import { defaultFileOption, testFileRead } from "../suite/db_common";
|
||||
import { delay } from "@lib/common/utils";
|
||||
|
||||
@@ -12,12 +12,10 @@
|
||||
*/
|
||||
import { afterAll, beforeAll, describe, expect, it, test } from "vitest";
|
||||
import { generateHarness, waitForIdle, waitForReady, type LiveSyncHarness } from "../harness/harness";
|
||||
import {
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
AutoAccepting,
|
||||
} from "@lib/common/types";
|
||||
import { PREFERRED_SETTING_SELF_HOSTED } from "@lib/common/models/setting.const.preferred";
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { AutoAccepting } from "@lib/common/models/setting.type";
|
||||
import {
|
||||
DummyFileSourceInisialised,
|
||||
FILE_SIZE_BINS,
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
// This test suite only covers main functional cases of synchronisation. Event handling, error cases,
|
||||
// and edge, resolving conflicts, etc. will be covered in separate test suites.
|
||||
import { describe } from "vitest";
|
||||
import {
|
||||
PREFERRED_JOURNAL_SYNC,
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@lib/common/types";
|
||||
|
||||
import { PREFERRED_JOURNAL_SYNC, PREFERRED_SETTING_SELF_HOSTED } from "@lib/common/models/setting.const.preferred";
|
||||
import { RemoteTypes } from "@lib/common/models/setting.const";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { settingBase } from "../suite/variables.ts";
|
||||
import { defaultFileOption } from "../suite/db_common";
|
||||
import { syncBasicCase } from "../suite/sync.senario.basic.ts";
|
||||
|
||||
@@ -3,8 +3,9 @@ import { beforeAll, describe, expect, it } from "vitest";
|
||||
import { commands } from "vitest/browser";
|
||||
|
||||
import { generateHarness, waitForIdle, waitForReady, type LiveSyncHarness } from "../harness/harness";
|
||||
import { ChunkAlgorithms, DEFAULT_SETTINGS, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
|
||||
import { ChunkAlgorithms } from "@lib/common/models/setting.const";
|
||||
import { DEFAULT_SETTINGS } from "@lib/common/models/setting.const.defaults";
|
||||
import type { ObsidianLiveSyncSettings } from "@lib/common/models/setting.type";
|
||||
import { DummyFileSourceInisialised } from "../utils/dummyfile";
|
||||
|
||||
import { page } from "vitest/browser";
|
||||
|
||||
Reference in New Issue
Block a user