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,6 @@
|
||||
import { App } from "@/deps.ts";
|
||||
import ObsidianLiveSyncPlugin from "@/main";
|
||||
import { DEFAULT_SETTINGS, type ObsidianLiveSyncSettings } from "@/lib/src/common/types";
|
||||
import { DEFAULT_SETTINGS, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
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/src/common/types";
|
||||
import type { P2PSyncSetting } from "@lib/common/types";
|
||||
import { delay } from "octagonal-wheels/promises";
|
||||
import type { BrowserContext, Page } from "playwright";
|
||||
import type { Plugin } from "vitest/config";
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { page } from "vitest/browser";
|
||||
import { delay } from "@/lib/src/common/utils";
|
||||
import { delay } from "@lib/common/utils";
|
||||
|
||||
export async function waitForDialogShown(dialogText: string, timeout = 500) {
|
||||
const ttl = Date.now() + timeout;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { delay } from "@/lib/src/common/utils";
|
||||
import { delay } from "@lib/common/utils";
|
||||
|
||||
export async function waitTaskWithFollowups<T>(
|
||||
task: Promise<T>,
|
||||
|
||||
@@ -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/src/common/types";
|
||||
import type { FilePath } from "@lib/common/types";
|
||||
import { isDocContentSame, readContent } from "@lib/common/utils.database";
|
||||
import { waitForIdle, type LiveSyncHarness } from "../harness/harness";
|
||||
import { expect } from "vitest";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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/src/common/types";
|
||||
import { DEFAULT_SETTINGS, type FilePath, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
import { isDocContentSame, readContent } from "@lib/common/utils.database";
|
||||
import { DummyFileSourceInisialised, generateBinaryFile, generateFile, init } from "../utils/dummyfile";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// 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/src/common/types";
|
||||
import { RemoteTypes, type FilePath, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
|
||||
import {
|
||||
DummyFileSourceInisialised,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
generateFile,
|
||||
} from "../utils/dummyfile";
|
||||
import { checkStoredFileInDB, testFileRead, testFileWrite } from "./db_common";
|
||||
import { delay } from "@/lib/src/common/utils";
|
||||
import { delay } from "@lib/common/utils";
|
||||
import { commands } from "vitest/browser";
|
||||
import { closeReplication, performReplication, prepareRemote } from "./sync_common";
|
||||
import type { DataWriteOptions } from "@/deps.ts";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@/lib/src/common/types";
|
||||
} from "@lib/common/types";
|
||||
|
||||
import { defaultFileOption } from "./db_common";
|
||||
import { syncBasicCase } from "./sync.senario.basic.ts";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@/lib/src/common/types";
|
||||
} from "@lib/common/types";
|
||||
|
||||
import { defaultFileOption } from "./db_common";
|
||||
import { syncBasicCase } from "./sync.senario.basic.ts";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { expect } from "vitest";
|
||||
import { waitForIdle, type LiveSyncHarness } from "../harness/harness";
|
||||
import { RemoteTypes, type ObsidianLiveSyncSettings } from "@/lib/src/common/types";
|
||||
import { RemoteTypes, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
|
||||
import { delay, fireAndForget } from "@/lib/src/common/utils";
|
||||
import { delay, fireAndForget } from "@lib/common/utils";
|
||||
import { commands } from "vitest/browser";
|
||||
import { LiveSyncTrysteroReplicator } from "@/lib/src/replication/trystero/LiveSyncTrysteroReplicator";
|
||||
import { LiveSyncTrysteroReplicator } from "@lib/replication/trystero/LiveSyncTrysteroReplicator";
|
||||
import { waitTaskWithFollowups } from "../lib/util";
|
||||
async function waitForP2PPeers(harness: LiveSyncHarness) {
|
||||
if (harness.plugin.core.settings.remoteType === RemoteTypes.REMOTE_P2P) {
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { DoctorRegulation } from "@/lib/src/common/configForDoc";
|
||||
import {
|
||||
DEFAULT_SETTINGS,
|
||||
ChunkAlgorithms,
|
||||
AutoAccepting,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@/lib/src/common/types";
|
||||
import { DoctorRegulation } from "@lib/common/configForDoc";
|
||||
import { DEFAULT_SETTINGS, ChunkAlgorithms, AutoAccepting, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
export const env = (import.meta as any).env;
|
||||
export const settingBase = {
|
||||
...DEFAULT_SETTINGS,
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
import { expect } from "vitest";
|
||||
import { waitForIdle, type LiveSyncHarness } from "../harness/harness";
|
||||
import { RemoteTypes, type ObsidianLiveSyncSettings } from "@/lib/src/common/types";
|
||||
import { delay } from "@/lib/src/common/utils";
|
||||
import { LiveSyncTrysteroReplicator } from "@/lib/src/replication/trystero/LiveSyncTrysteroReplicator";
|
||||
import { RemoteTypes, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
import { delay } from "@lib/common/utils";
|
||||
import { LiveSyncTrysteroReplicator } from "@lib/replication/trystero/LiveSyncTrysteroReplicator";
|
||||
import { waitTaskWithFollowups } from "../lib/util";
|
||||
|
||||
const P2P_REPLICATION_TIMEOUT_MS = 180000;
|
||||
|
||||
@@ -15,10 +15,10 @@ import {
|
||||
type FilePath,
|
||||
type ObsidianLiveSyncSettings,
|
||||
AutoAccepting,
|
||||
} from "@/lib/src/common/types";
|
||||
} from "@lib/common/types";
|
||||
import { DummyFileSourceInisialised, generateBinaryFile, generateFile } from "../utils/dummyfile";
|
||||
import { defaultFileOption, testFileRead } from "../suite/db_common";
|
||||
import { delay } from "@/lib/src/common/utils";
|
||||
import { delay } from "@lib/common/utils";
|
||||
import { closeReplication, performReplication } from "./sync_common_p2p";
|
||||
import { settingBase } from "../suite/variables";
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
AutoAccepting,
|
||||
} from "@/lib/src/common/types";
|
||||
} from "@lib/common/types";
|
||||
import {
|
||||
DummyFileSourceInisialised,
|
||||
FILE_SIZE_BINS,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
generateFile,
|
||||
} from "../utils/dummyfile";
|
||||
import { checkStoredFileInDB, defaultFileOption, testFileWrite } from "../suite/db_common";
|
||||
import { delay } from "@/lib/src/common/utils";
|
||||
import { delay } from "@lib/common/utils";
|
||||
import { closeReplication, performReplication } from "./sync_common_p2p";
|
||||
import { settingBase } from "../suite/variables";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
RemoteTypes,
|
||||
type ObsidianLiveSyncSettings,
|
||||
} from "@/lib/src/common/types";
|
||||
} from "@lib/common/types";
|
||||
|
||||
import { settingBase } from "../suite/variables.ts";
|
||||
import { defaultFileOption } from "../suite/db_common";
|
||||
|
||||
@@ -3,12 +3,12 @@ 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/src/common/types";
|
||||
import { ChunkAlgorithms, DEFAULT_SETTINGS, type ObsidianLiveSyncSettings } from "@lib/common/types";
|
||||
|
||||
import { DummyFileSourceInisialised } from "../utils/dummyfile";
|
||||
|
||||
import { page } from "vitest/browser";
|
||||
import { DoctorRegulation } from "@/lib/src/common/configForDoc";
|
||||
import { DoctorRegulation } from "@lib/common/configForDoc";
|
||||
import { waitForDialogHidden, waitForDialogShown } from "../lib/ui";
|
||||
const env = (import.meta as any).env;
|
||||
const dialog_setting_base = {
|
||||
|
||||
Reference in New Issue
Block a user