From 497fd04081d03753450d6d2473819e88311e5a06 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 05:29:45 +0100 Subject: [PATCH 1/8] fix global references --- src/common/reportTool.ts | 2 +- src/common/utils.ts | 4 +- src/features/ConfigSync/PluginDialogModal.ts | 8 +- src/lib | 2 +- src/modules/coreObsidian/UILib/dialogs.ts | 30 ++- .../APILib/ObsHttpHandler.ts | 4 +- .../essentialObsidian/ModuleObsidianEvents.ts | 14 +- .../DocumentHistory/DocumentHistoryModal.ts | 10 +- src/modules/features/ModuleLog.ts | 8 +- .../features/SettingDialogue/PaneSetup.ts | 4 +- .../SettingDialogue/utilFixCouchDBSetting.ts | 5 +- .../SetupWizard/dialogs/utilCheckCouchDB.ts | 6 +- utilsdeno/refactor-globals.ts | 210 +++++++++++++++++ utilsdeno/refactor-styles.ts | 214 ++++++++++++++++++ 14 files changed, 479 insertions(+), 42 deletions(-) create mode 100644 utilsdeno/refactor-globals.ts create mode 100644 utilsdeno/refactor-styles.ts diff --git a/src/common/reportTool.ts b/src/common/reportTool.ts index 8eef539..2899528 100644 --- a/src/common/reportTool.ts +++ b/src/common/reportTool.ts @@ -36,7 +36,7 @@ export async function generateReport(settings: ObsidianLiveSyncSettings, core: L const r = await requestToCouchDBWithCredentials( settings.couchDB_URI, credential, - window.origin, + compatGlobal.origin, undefined, undefined, undefined, diff --git a/src/common/utils.ts b/src/common/utils.ts index 8987694..2333b1f 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -132,7 +132,7 @@ export const _requestToCouchDBFetch = async ( method?: string ) => { const utf8str = String.fromCharCode.apply(null, [...writeString(`${username}:${password}`)]); - const encoded = window.btoa(utf8str); + const encoded = compatGlobal.btoa(utf8str); const authHeader = "Basic " + encoded; const transformedHeaders: Record = { authorization: authHeader, @@ -214,7 +214,7 @@ import { BASE_IS_NEW, EVEN, TARGET_IS_NEW } from "@lib/common/models/shared.cons export { BASE_IS_NEW, EVEN, TARGET_IS_NEW }; // Why 2000? : ZIP FILE Does not have enough resolution. import { compareMTime } from "@lib/common/utils.ts"; -import { _fetch } from "@lib/common/coreEnvFunctions.ts"; +import { _fetch, compatGlobal } from "@lib/common/coreEnvFunctions.ts"; export { compareMTime }; function getKey(file: AnyEntry | string | UXFileInfoStub) { const key = typeof file == "string" ? file : stripAllPrefixes(file.path); diff --git a/src/features/ConfigSync/PluginDialogModal.ts b/src/features/ConfigSync/PluginDialogModal.ts index fd79981..34cb27c 100644 --- a/src/features/ConfigSync/PluginDialogModal.ts +++ b/src/features/ConfigSync/PluginDialogModal.ts @@ -16,9 +16,11 @@ export class PluginDialogModal extends Modal { override onOpen() { const { contentEl } = this; - this.contentEl.style.overflow = "auto"; - this.contentEl.style.display = "flex"; - this.contentEl.style.flexDirection = "column"; + this.contentEl.setCssStyles({ + overflow: "auto", + display: "flex", + flexDirection: "column" + }); this.titleEl.setText("Customization Sync (Beta3)"); if (!this.component) { this.component = mount(PluginPane, { diff --git a/src/lib b/src/lib index 2accfbc..3dad956 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 2accfbce497cf5cba06d59f083f594778b15486f +Subproject commit 3dad9565aa2b58dc3190dcb88182d0f2acd8fb87 diff --git a/src/modules/coreObsidian/UILib/dialogs.ts b/src/modules/coreObsidian/UILib/dialogs.ts index 4476c5f..ef94340 100644 --- a/src/modules/coreObsidian/UILib/dialogs.ts +++ b/src/modules/coreObsidian/UILib/dialogs.ts @@ -192,8 +192,10 @@ export class MessageBox extends AutoClosableModal { const { contentEl } = this; this.titleEl.setText(this.title); const div = contentEl.createDiv(); - div.style.userSelect = "text"; - div.style["webkitUserSelect"] = "text"; + div.setCssStyles({ + userSelect: "text", + "webkitUserSelect": "text" + }); void MarkdownRenderer.render(this.plugin.app, this.contentMd, div, "/", this.plugin); const buttonSetting = new Setting(contentEl); const labelWrapper = contentEl.createDiv(); @@ -202,21 +204,23 @@ export class MessageBox extends AutoClosableModal { labelEl.addClass("sls-dialogue-note-countdown"); if (!this.timeout || !this.timer) { labelWrapper.empty(); - labelWrapper.style.display = "none"; + labelWrapper.setCssStyles({ display: "none" }); } - buttonSetting.infoEl.style.display = "none"; - buttonSetting.controlEl.style.flexWrap = "wrap"; + buttonSetting.infoEl.setCssStyles({ display: "none" }); + buttonSetting.controlEl.setCssStyles({ flexWrap: "wrap" }); if (this.wideButton) { - buttonSetting.controlEl.style.flexDirection = "column"; - buttonSetting.controlEl.style.alignItems = "center"; - buttonSetting.controlEl.style.justifyContent = "center"; - buttonSetting.controlEl.style.flexGrow = "1"; + buttonSetting.controlEl.setCssStyles({ + flexDirection: "column", + alignItems: "center", + justifyContent: "center", + flexGrow: "1" + }); } contentEl.addEventListener("click", () => { if (this.timer) { labelWrapper.empty(); - labelWrapper.style.display = "none"; + labelWrapper.setCssStyles({ display: "none" }); compatGlobal.clearInterval(this.timer); this.timer = undefined; this.defaultButtonComponent?.setButtonText(`${this.defaultAction}`); @@ -238,8 +242,10 @@ export class MessageBox extends AutoClosableModal { btn.setCta(); } if (this.wideButton) { - btn.buttonEl.style.flexGrow = "1"; - btn.buttonEl.style.width = "100%"; + btn.buttonEl.setCssStyles({ + flexGrow: "1", + width: "100%" + }); } return btn; }); diff --git a/src/modules/essentialObsidian/APILib/ObsHttpHandler.ts b/src/modules/essentialObsidian/APILib/ObsHttpHandler.ts index 9c1a504..c0dbdcf 100644 --- a/src/modules/essentialObsidian/APILib/ObsHttpHandler.ts +++ b/src/modules/essentialObsidian/APILib/ObsHttpHandler.ts @@ -7,6 +7,8 @@ import { FetchHttpHandler, type FetchHttpHandlerOptions } from "@smithy/fetch-ht import { HttpRequest, HttpResponse, type HttpHandlerOptions } from "@smithy/protocol-http"; import { buildQueryString } from "@smithy/querystring-builder"; import { requestUrl, type RequestUrlParam } from "@/deps.ts"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; + //////////////////////////////////////////////////////////////////////////////// // special handler using Obsidian requestUrl //////////////////////////////////////////////////////////////////////////////// @@ -14,7 +16,7 @@ import { requestUrl, type RequestUrlParam } from "@/deps.ts"; function requestTimeout(timeoutInMs: number = 0): Promise { return new Promise((_, reject) => { if (timeoutInMs) { - window.setTimeout(() => { + compatGlobal.setTimeout(() => { const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); timeoutError.name = "TimeoutError"; reject(timeoutError); diff --git a/src/modules/essentialObsidian/ModuleObsidianEvents.ts b/src/modules/essentialObsidian/ModuleObsidianEvents.ts index 55849e5..612ce9e 100644 --- a/src/modules/essentialObsidian/ModuleObsidianEvents.ts +++ b/src/modules/essentialObsidian/ModuleObsidianEvents.ts @@ -63,12 +63,12 @@ export class ModuleObsidianEvents extends AbstractObsidianModule { // eslint-disable-next-line @typescript-eslint/no-this-alias const _this = this; //@ts-ignore - if (!window.CodeMirrorAdapter) { + if (!compatGlobal.CodeMirrorAdapter) { this._log("CodeMirrorAdapter is not available"); return; } //@ts-ignore - window.CodeMirrorAdapter.commands.save = () => { + compatGlobal.CodeMirrorAdapter.commands.save = () => { //@ts-ignore void _this.app.commands.executeCommandById("editor:save-file"); // _this.app.performCommand('editor:save-file'); @@ -86,14 +86,14 @@ export class ModuleObsidianEvents extends AbstractObsidianModule { // Already bound // eslint-disable-next-line @typescript-eslint/unbound-method this.plugin.registerDomEvent(activeDocument, "visibilitychange", this.watchWindowVisibility); - this.plugin.registerDomEvent(window, "focus", () => this.setHasFocus(true)); - this.plugin.registerDomEvent(window, "blur", () => this.setHasFocus(false)); + this.plugin.registerDomEvent(compatGlobal, "focus", () => this.setHasFocus(true)); + this.plugin.registerDomEvent(compatGlobal, "blur", () => this.setHasFocus(false)); // Already bound // eslint-disable-next-line @typescript-eslint/unbound-method - this.plugin.registerDomEvent(window, "online", this.watchOnline); + this.plugin.registerDomEvent(compatGlobal, "online", this.watchOnline); // Already bound // eslint-disable-next-line @typescript-eslint/unbound-method - this.plugin.registerDomEvent(window, "offline", this.watchOnline); + this.plugin.registerDomEvent(compatGlobal, "offline", this.watchOnline); } hasFocus = true; @@ -114,7 +114,7 @@ export class ModuleObsidianEvents extends AbstractObsidianModule { async watchOnlineAsync() { // If some files were failed to retrieve, scan files again. // TODO:FIXME AT V0.17.31, this logic has been disabled. - if (navigator.onLine && this.localDatabase.needScanning) { + if (compatGlobal.navigator.onLine && this.localDatabase.needScanning) { this.localDatabase.needScanning = false; await this.services.vault.scanVault(); } diff --git a/src/modules/features/DocumentHistory/DocumentHistoryModal.ts b/src/modules/features/DocumentHistory/DocumentHistoryModal.ts index 1aa6fb7..95760a3 100644 --- a/src/modules/features/DocumentHistory/DocumentHistoryModal.ts +++ b/src/modules/features/DocumentHistory/DocumentHistoryModal.ts @@ -367,10 +367,10 @@ export class DocumentHistoryModal extends Modal { */ updateDiffNavVisibility() { if (this.diffNavContainer) { - this.diffNavContainer.style.display = this.showDiff ? "flex" : "none"; + this.diffNavContainer.setCssStyles({ display: this.showDiff ? "flex" : "none" }); } if (this.diffOnlyLabel) { - this.diffOnlyLabel.style.display = this.showDiff ? "inline-block" : "none"; + this.diffOnlyLabel.setCssStyles({ display: this.showDiff ? "inline-block" : "none" }); } } @@ -573,13 +573,13 @@ export class DocumentHistoryModal extends Modal { }); diffOnlyLabel.appendText("Diff only"); diffOnlyLabel.addClass("diff-only-label"); - diffOnlyLabel.style.display = this.showDiff ? "inline-block" : "none"; + diffOnlyLabel.setCssStyles({ display: this.showDiff ? "inline-block" : "none" }); this.diffOnlyLabel = diffOnlyLabel; // Diff navigation buttons this.diffNavContainer = diffOptionsRow.createDiv(""); this.diffNavContainer.addClass("diff-nav"); - this.diffNavContainer.style.display = this.showDiff ? "flex" : "none"; + this.diffNavContainer.setCssStyles({ display: this.showDiff ? "flex" : "none" }); this.diffNavContainer.createEl("button", { text: "\u25B2 Prev" }, (e) => { e.addClass("diff-nav-btn"); @@ -608,7 +608,7 @@ export class DocumentHistoryModal extends Modal { e.addClass("mod-cta"); e.addEventListener("click", () => { fireAndForget(async () => { - await navigator.clipboard.writeText(this.currentText); + await compatGlobal.navigator.clipboard.writeText(this.currentText); Logger(`Old content copied to clipboard`, LOG_LEVEL_NOTICE); }); }); diff --git a/src/modules/features/ModuleLog.ts b/src/modules/features/ModuleLog.ts index ff1fdc1..ecb9e1f 100644 --- a/src/modules/features/ModuleLog.ts +++ b/src/modules/features/ModuleLog.ts @@ -316,7 +316,7 @@ export class ModuleLog extends AbstractObsidianModule { const showStatusOnEditor = this.settings?.showStatusOnEditor ?? false; if (this.statusDiv) { - this.statusDiv.style.display = showStatusOnEditor ? "" : "none"; + this.statusDiv.setCssStyles({ display: showStatusOnEditor ? "" : "none" }); } if (!showStatusOnEditor) { this.messageArea.innerText = ""; @@ -351,7 +351,7 @@ export class ModuleLog extends AbstractObsidianModule { }); } - nextFrameQueue: ReturnType | undefined = undefined; + nextFrameQueue: ReturnType | undefined = undefined; logLines: { ttl: number; message: string }[] = []; applyStatusBarText() { @@ -371,7 +371,7 @@ export class ModuleLog extends AbstractObsidianModule { this.statusBar?.setText(newMsg.split("\n")[0]); if (this.statusDiv) { - this.statusDiv.style.display = this.settings?.showStatusOnEditor ? "" : "none"; + this.statusDiv.setCssStyles({ display: this.settings?.showStatusOnEditor ? "" : "none" }); } if (this.settings?.showStatusOnEditor && this.statusDiv) { if (this.settings.showLongerLogInsideEditor) { @@ -472,7 +472,7 @@ ${stringifyYaml(info)} this.messageArea = this.statusDiv.createDiv({ cls: "livesync-status-messagearea" }); this.logMessage = this.statusDiv.createDiv({ cls: "livesync-status-logmessage" }); this.logHistory = this.statusDiv.createDiv({ cls: "livesync-status-loghistory" }); - this.statusDiv.style.display = this.settings?.showStatusOnEditor ? "" : "none"; + this.statusDiv.setCssStyles({ display: this.settings?.showStatusOnEditor ? "" : "none" }); } eventHub.onEvent(EVENT_LAYOUT_READY, () => this.adjustStatusDivPosition()); if (this.settings?.showStatusOnStatusbar) { diff --git a/src/modules/features/SettingDialogue/PaneSetup.ts b/src/modules/features/SettingDialogue/PaneSetup.ts index 5df4fb9..5737b54 100644 --- a/src/modules/features/SettingDialogue/PaneSetup.ts +++ b/src/modules/features/SettingDialogue/PaneSetup.ts @@ -133,7 +133,7 @@ export function paneSetup( cls: "sls-troubleshoot-preview", }); const loadMarkdownPage = async (pathAll: string, basePathParam: string = "") => { - troubleShootEl.style.minHeight = troubleShootEl.clientHeight + "px"; + troubleShootEl.setCssStyles({ minHeight: troubleShootEl.clientHeight + "px" }); troubleShootEl.empty(); const fullPath = pathAll.startsWith("/") ? pathAll : `${basePathParam}/${pathAll}`; @@ -201,7 +201,7 @@ export function paneSetup( }); }); }); - troubleShootEl.style.minHeight = ""; + troubleShootEl.setCssStyles({ minHeight: "" }); }; void loadMarkdownPage(topPath); }); diff --git a/src/modules/features/SettingDialogue/utilFixCouchDBSetting.ts b/src/modules/features/SettingDialogue/utilFixCouchDBSetting.ts index dd6d703..b9150ba 100644 --- a/src/modules/features/SettingDialogue/utilFixCouchDBSetting.ts +++ b/src/modules/features/SettingDialogue/utilFixCouchDBSetting.ts @@ -5,6 +5,7 @@ import type { ObsidianLiveSyncSettings } from "@lib/common/types"; import { fireAndForget, parseHeaderValues } from "@lib/common/utils"; import { isCloudantURI } from "@lib/pouchdb/utils_couchdb"; import { generateCredentialObject } from "@lib/replication/httplib"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; export const checkConfig = async ( checkResultDiv: HTMLDivElement | undefined, @@ -35,7 +36,7 @@ export const checkConfig = async ( const r = await requestToCouchDBWithCredentials( editingSettings.couchDB_URI, credential, - window.origin, + compatGlobal.origin, undefined, undefined, undefined, @@ -218,7 +219,7 @@ export const checkConfig = async ( isSuccessful = false; } addResult($msg("obsidianLiveSyncSettingTab.msgConnectionCheck"), ["ob-btn-config-head"]); - addResult($msg("obsidianLiveSyncSettingTab.msgCurrentOrigin", { origin: window.location.origin })); + addResult($msg("obsidianLiveSyncSettingTab.msgCurrentOrigin", { origin: compatGlobal.location.origin })); // Request header check const origins = ["app://obsidian.md", "capacitor://localhost", "http://localhost"]; diff --git a/src/modules/features/SetupWizard/dialogs/utilCheckCouchDB.ts b/src/modules/features/SetupWizard/dialogs/utilCheckCouchDB.ts index 0de0a6a..76e725f 100644 --- a/src/modules/features/SetupWizard/dialogs/utilCheckCouchDB.ts +++ b/src/modules/features/SetupWizard/dialogs/utilCheckCouchDB.ts @@ -5,6 +5,8 @@ import type { ObsidianLiveSyncSettings } from "@lib/common/types"; import { parseHeaderValues } from "@lib/common/utils"; import { isCloudantURI } from "@lib/pouchdb/utils_couchdb"; import { generateCredentialObject } from "@lib/replication/httplib"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; + export type ResultMessage = { message: string; classes: string[] }; export type ResultErrorMessage = { message: string; result: "error"; classes: string[] }; export type ResultOk = { message: string; result: "ok"; value?: any }; @@ -93,7 +95,7 @@ export const checkConfig = async (editingSettings: ObsidianLiveSyncSettings) => const r = await requestToCouchDBWithCredentials( editingSettings.couchDB_URI, credential, - window.origin, + compatGlobal.origin, undefined, undefined, undefined, @@ -239,7 +241,7 @@ export const checkConfig = async (editingSettings: ObsidianLiveSyncSettings) => ); } addMessage($msg("obsidianLiveSyncSettingTab.msgConnectionCheck"), ["ob-btn-config-head"]); - addMessage($msg("obsidianLiveSyncSettingTab.msgCurrentOrigin", { origin: window.location.origin })); + addMessage($msg("obsidianLiveSyncSettingTab.msgCurrentOrigin", { origin: compatGlobal.location.origin })); // Request header check const origins = ["app://obsidian.md", "capacitor://localhost", "http://localhost"]; diff --git a/utilsdeno/refactor-globals.ts b/utilsdeno/refactor-globals.ts new file mode 100644 index 0000000..86f35c6 --- /dev/null +++ b/utilsdeno/refactor-globals.ts @@ -0,0 +1,210 @@ +// Refactor global variables (setTimeout, document, navigator, etc.) to use compatGlobal. +// Use this script by running `deno run --allow-read --allow-write --allow-run refactor-globals.ts` from the utilsdeno directory. +// Run with --run flag to apply changes. +import { Project, SyntaxKind, Node } from "npm:ts-morph"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const isDryRun = !Deno.args.includes("--run"); + +if (isDryRun) { + console.log("=== DRY RUN MODE ==="); + console.log( + "To apply changes, run with: deno run --allow-read --allow-write --allow-run refactor-globals.ts --run\n" + ); +} else { + console.log("=== RUN MODE: WILL MODIFY FILES ==="); +} + +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); + +// Manually add files under src/ to ensure those excluded by tsconfig.json are processed if needed. +project.addSourceFilesAtPaths("../src/**/*.ts"); +project.addSourceFilesAtPaths("../src/**/*.svelte"); + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, ".."); + +function toPosixPath(filePath: string): string { + return filePath.replace(/\\/g, "/"); +} + +const posixProjectRoot = toPosixPath(projectRoot); +const posixSrc = `${posixProjectRoot}/src`; +const posixLibSrc = `${posixProjectRoot}/src/lib`; + +const TARGET_GLOBALS = new Set([ + "setTimeout", + "clearTimeout", + "setInterval", + "clearInterval", + "requestAnimationFrame", + "cancelAnimationFrame", + "localStorage", + "navigator", + "location", + "document", + "window" +]); + +let modifiedFilesCount = 0; + +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const posixFilePath = toPosixPath(filePath); + + // Only process files inside the project src directory. + if (!posixFilePath.startsWith(posixSrc)) { + continue; + } + + // Exclude submodule files under src/lib/ + if (posixFilePath.startsWith(posixLibSrc)) { + continue; + } + + // Exclude independent application modules under src/apps/ + if (posixFilePath.startsWith(`${posixSrc}/apps/`)) { + continue; + } + + // Exclude unit and integration test files + if ( + posixFilePath.endsWith(".spec.ts") || + posixFilePath.endsWith(".test.ts") || + posixFilePath.includes("/_test/") + ) { + continue; + } + + // Collect all identifier nodes + const identifiers = sourceFile.getDescendantsOfKind(SyntaxKind.Identifier); + const nodesToReplace: { node: Node; replacement: string }[] = []; + + for (const idNode of identifiers) { + const name = idNode.getText(); + if (!TARGET_GLOBALS.has(name)) { + continue; + } + + const parent = idNode.getParent(); + if (!parent) { + continue; + } + + // 1. Skip if it is the property name in a PropertyAccessExpression (e.g. the "setTimeout" in "obj.setTimeout") + if (parent.getKind() === SyntaxKind.PropertyAccessExpression) { + const propAccess = parent.asKindOrThrow(SyntaxKind.PropertyAccessExpression); + if (propAccess.getNameNode() === idNode) { + continue; + } + } + + // 2. Skip if it is the operand of a typeof expression (e.g. "typeof window") + if (parent.getKind() === SyntaxKind.TypeOfExpression) { + continue; + } + + // 3. Skip if it is a declaration name node + const kind = parent.getKind(); + if ( + kind === SyntaxKind.VariableDeclaration || + kind === SyntaxKind.Parameter || + kind === SyntaxKind.FunctionDeclaration || + kind === SyntaxKind.MethodDeclaration || + kind === SyntaxKind.PropertyDeclaration || + kind === SyntaxKind.ClassDeclaration || + kind === SyntaxKind.InterfaceDeclaration || + kind === SyntaxKind.TypeAliasDeclaration || + kind === SyntaxKind.ImportSpecifier || + kind === SyntaxKind.ExportSpecifier || + kind === SyntaxKind.MethodSignature || + kind === SyntaxKind.PropertySignature || + kind === SyntaxKind.PropertyAssignment + ) { + if ((parent as any).getNameNode?.() === idNode || (parent as any).getName?.() === name) { + continue; + } + } + + // 4. Verify it is a global variable reference using definitions + let isGlobal = false; + try { + const definitions = idNode.getDefinitions(); + isGlobal = + definitions.length === 0 || + definitions.every((def) => { + const sf = def.getSourceFile(); + if (!sf) return true; + const path = sf.getFilePath(); + return path.includes("node_modules/typescript/lib/") || path.includes("node_modules/@types/"); + }); + } catch (_err) { + // If checking definitions fails, assume it is local/imported to be safe + isGlobal = false; + } + + if (!isGlobal) { + continue; + } + + // Determine replacement + let replacement = ""; + if (name === "window" || name === "globalThis") { + replacement = "compatGlobal"; + } else { + replacement = `compatGlobal.${name}`; + } + + nodesToReplace.push({ node: idNode, replacement }); + } + + if (nodesToReplace.length > 0) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + for (const { node, replacement } of nodesToReplace) { + const { line } = sourceFile.getLineAndColumnAtPos(node.getStart()); + console.log(` Line ${line}: "${node.getText()}" -> "${replacement}"`); + } + + if (!isDryRun) { + // Apply replacements + // Note: replaceWithText changes AST, so we replace them directly + for (const { node, replacement } of nodesToReplace) { + node.replaceWithText(replacement); + } + + // Ensure compatGlobal is imported + const hasCompatGlobalImport = sourceFile.getImportDeclarations().some((imp) => { + return imp.getNamedImports().some((ni) => ni.getName() === "compatGlobal"); + }); + + if (!hasCompatGlobalImport) { + const existingImport = sourceFile.getImportDeclarations().find((imp) => { + const spec = imp.getModuleSpecifierValue(); + return spec === "@lib/common/coreEnvFunctions" || spec === "@lib/common/coreEnvFunctions.ts"; + }); + + if (existingImport) { + existingImport.addNamedImport("compatGlobal"); + } else { + sourceFile.addImportDeclaration({ + namedImports: ["compatGlobal"], + moduleSpecifier: "@lib/common/coreEnvFunctions.ts" + }); + } + } + } + + modifiedFilesCount++; + } +} + +console.log(`\nTotal files to modify: ${modifiedFilesCount}`); + +if (!isDryRun) { + project.saveSync(); + console.log("All changes successfully saved."); +} else { + console.log("Dry run complete. No changes were written to files."); +} diff --git a/utilsdeno/refactor-styles.ts b/utilsdeno/refactor-styles.ts new file mode 100644 index 0000000..4851d4c --- /dev/null +++ b/utilsdeno/refactor-styles.ts @@ -0,0 +1,214 @@ +// Refactor element.style.XXXX = YYYY to element.setCssStyles({ XXXX: YYYY }). +// Use this script by running `deno run --allow-read --allow-write --allow-run refactor-styles.ts` from the utilsdeno directory. +// Run with --run flag to apply changes. +import { Project, SyntaxKind, Node, Expression } from "npm:ts-morph"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const isDryRun = !Deno.args.includes("--run"); + +if (isDryRun) { + console.log("=== DRY RUN MODE ==="); + console.log( + "To apply changes, run with: deno run --allow-read --allow-write --allow-run refactor-styles.ts --run\n" + ); +} else { + console.log("=== RUN MODE: WILL MODIFY FILES ==="); +} + +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); + +// Manually add files under src/ to ensure those excluded by tsconfig.json are processed if needed. +project.addSourceFilesAtPaths("../src/**/*.ts"); +project.addSourceFilesAtPaths("../src/**/*.svelte"); + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, ".."); + +function toPosixPath(filePath: string): string { + return filePath.replace(/\\/g, "/"); +} + +const posixProjectRoot = toPosixPath(projectRoot); +const posixSrc = `${posixProjectRoot}/src`; +const posixLibSrc = `${posixProjectRoot}/src/lib`; + +function matchStyleAccess(node: Node): { element: Node; propertyName: string; isComputed: boolean } | undefined { + if (Node.isPropertyAccessExpression(node)) { + const expr = node.getExpression(); + if (Node.isPropertyAccessExpression(expr) && expr.getName() === "style") { + return { + element: expr.getExpression(), + propertyName: node.getName(), + isComputed: false + }; + } + } else if (Node.isElementAccessExpression(node)) { + const expr = node.getExpression(); + if (Node.isPropertyAccessExpression(expr) && expr.getName() === "style") { + const arg = node.getArgumentExpression(); + if (arg) { + return { + element: expr.getExpression(), + propertyName: arg.getText(), + isComputed: true + }; + } + } + } + return undefined; +} + +function getStyleAssignment(statement: Node) { + if (!Node.isExpressionStatement(statement)) return undefined; + const expr = statement.getExpression(); + if (!Node.isBinaryExpression(expr)) return undefined; + if (expr.getOperatorToken().getKind() !== SyntaxKind.EqualsToken) return undefined; + + const styleAccess = matchStyleAccess(expr.getLeft()); + if (!styleAccess) return undefined; + + return { + elementText: styleAccess.element.getText(), + property: styleAccess.propertyName, + valueText: expr.getRight().getText(), + isComputed: styleAccess.isComputed, + statementNode: statement + }; +} + +interface StyleGroup { + elementText: string; + assignments: { + property: string; + valueText: string; + isComputed: boolean; + statementNode: Node; + }[]; +} + +let modifiedFilesCount = 0; + +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const posixFilePath = toPosixPath(filePath); + + // Only process files inside the project src directory. + if (!posixFilePath.startsWith(posixSrc)) { + continue; + } + + // Exclude unit and integration test files + if ( + posixFilePath.endsWith(".spec.ts") || + posixFilePath.endsWith(".test.ts") || + posixFilePath.includes("/_test/") + ) { + continue; + } + + // Collect all blocks, case clauses, and the source file itself + const containers = [ + sourceFile, + ...sourceFile.getDescendantsOfKind(SyntaxKind.Block), + ...sourceFile.getDescendantsOfKind(SyntaxKind.CaseClause), + ...sourceFile.getDescendantsOfKind(SyntaxKind.DefaultClause), + ]; + + const fileGroups: StyleGroup[] = []; + + for (const container of containers) { + const statements = container.getStatements(); + let i = 0; + while (i < statements.length) { + const assignment = getStyleAssignment(statements[i]); + if (assignment) { + const currentGroup: StyleGroup = { + elementText: assignment.elementText, + assignments: [{ + property: assignment.property, + valueText: assignment.valueText, + isComputed: assignment.isComputed, + statementNode: assignment.statementNode + }] + }; + + // Look ahead to collect consecutive assignments to the same element + let j = i + 1; + while (j < statements.length) { + const nextAssignment = getStyleAssignment(statements[j]); + if (nextAssignment && nextAssignment.elementText === assignment.elementText) { + currentGroup.assignments.push({ + property: nextAssignment.property, + valueText: nextAssignment.valueText, + isComputed: nextAssignment.isComputed, + statementNode: nextAssignment.statementNode + }); + j++; + } else { + break; + } + } + fileGroups.push(currentGroup); + i = j; + } else { + i++; + } + } + } + + if (fileGroups.length > 0) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + + // Process groups in reverse order to keep Node references valid when removing + const reversedGroups = [...fileGroups].reverse(); + + for (const group of reversedGroups) { + const props = group.assignments.map((c) => { + if (c.isComputed) { + if ( + (c.property.startsWith("'") && c.property.endsWith("'")) || + (c.property.startsWith('"') && c.property.endsWith('"')) || + (c.property.startsWith("`") && c.property.endsWith("`")) + ) { + return `${c.property}: ${c.valueText}`; + } + return `[${c.property}]: ${c.valueText}`; + } + return `${c.property}: ${c.valueText}`; + }); + + let newText = ""; + if (props.length === 1) { + newText = `${group.elementText}.setCssStyles({ ${props[0]} });`; + } else { + newText = `${group.elementText}.setCssStyles({\n ${props.join(",\n ")}\n});`; + } + + const firstNode = group.assignments[0].statementNode; + const { line } = sourceFile.getLineAndColumnAtPos(firstNode.getStart()); + + console.log(` Line ${line}: Replacing consecutive style assignments on "${group.elementText}" with:`); + console.log(newText.split("\n").map((l) => ` ${l}`).join("\n")); + + if (!isDryRun) { + firstNode.replaceWithText(newText); + for (let k = 1; k < group.assignments.length; k++) { + group.assignments[k].statementNode.remove(); + } + } + } + + modifiedFilesCount++; + } +} + +console.log(`\nTotal files to modify: ${modifiedFilesCount}`); + +if (!isDryRun) { + project.saveSync(); + console.log("All changes successfully saved."); +} else { + console.log("Dry run complete. No changes were written to files."); +} From 2d5cdccf7dd0a507c69d8a2471d298e7093e6d54 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 05:51:01 +0100 Subject: [PATCH 2/8] for automatic review --- src/apps/cli/commands/p2p.ts | 5 +- src/apps/cli/commands/runCommand.ts | 7 +-- src/apps/cli/testdeno/bench-couchdb.ts | 3 +- .../cli/testdeno/helpers/backgroundCli.ts | 5 +- src/apps/cli/testdeno/helpers/cli.ts | 3 +- src/apps/cli/testdeno/helpers/docker.ts | 4 +- src/apps/cli/testdeno/helpers/net.ts | 8 +-- src/apps/cli/testdeno/helpers/p2p.ts | 3 +- .../testdeno/test-sync-two-local-databases.ts | 3 +- src/apps/webapp/bootstrap.ts | 21 ++++---- src/apps/webapp/main.ts | 11 ++-- .../FSAPIStorageEventManagerAdapter.ts | 5 +- src/apps/webapp/test-entry.ts | 7 +-- src/apps/webapp/tsconfig.json | 2 +- src/apps/webapp/vaultSelector.ts | 4 +- src/apps/webpeer/src/P2PReplicatorShim.ts | 11 ++-- src/apps/webpeer/src/main.ts | 3 +- src/apps/webpeer/src/uitest.ts | 3 +- src/apps/webpeer/tsconfig.app.json | 2 +- src/features/ConfigSync/PluginDialogModal.ts | 2 +- src/lib | 2 +- src/modules/coreObsidian/UILib/dialogs.ts | 6 +-- utilsdeno/refactor-globals.ts | 53 +++++++++++-------- utilsdeno/refactor-styles.ts | 35 ++++++------ 24 files changed, 123 insertions(+), 85 deletions(-) diff --git a/src/apps/cli/commands/p2p.ts b/src/apps/cli/commands/p2p.ts index f7c78e2..e6542ad 100644 --- a/src/apps/cli/commands/p2p.ts +++ b/src/apps/cli/commands/p2p.ts @@ -2,14 +2,15 @@ import type { LiveSyncBaseCore } from "@/LiveSyncBaseCore"; import { P2P_DEFAULT_SETTINGS } from "@lib/common/types"; import type { ServiceContext } from "@lib/services/base/ServiceBase"; import { LiveSyncTrysteroReplicator } from "@lib/replication/trystero/LiveSyncTrysteroReplicator"; -import { addP2PEventHandlers } from "@lib/replication/trystero/addP2PEventHandlers"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; + type CLIP2PPeer = { peerId: string; name: string; }; function delay(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); } export function parseTimeoutSeconds(value: string, commandName: string): number { diff --git a/src/apps/cli/commands/runCommand.ts b/src/apps/cli/commands/runCommand.ts index 74ee8ab..9ce1a2f 100644 --- a/src/apps/cli/commands/runCommand.ts +++ b/src/apps/cli/commands/runCommand.ts @@ -18,6 +18,7 @@ import { promptForPassphrase, readStdinAsUtf8, toArrayBuffer, toDatabaseRelative import { collectPeers, openP2PHost, parseTimeoutSeconds, syncWithPeer } from "./p2p"; import { performFullScan } from "@lib/serviceFeatures/offlineScanner"; import { UnresolvedErrorManager } from "@lib/services/base/UnresolvedErrorManager"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; function redactConnectionString(uri: string): string { return uri.replace(/\/\/([^@/]+)@/u, "//***@"); @@ -150,11 +151,11 @@ export async function runCommand(options: CLIOptions, context: CLICommandContext ); } } - pollTimer = setTimeout(poll, currentIntervalMs); + pollTimer = compatGlobal.setTimeout(poll, currentIntervalMs); }; - let pollTimer: ReturnType = setTimeout(poll, currentIntervalMs); + let pollTimer = compatGlobal.setTimeout(poll, currentIntervalMs); core.services.appLifecycle.onUnload.addHandler(async () => { - clearTimeout(pollTimer); + compatGlobal.clearTimeout(pollTimer); return true; }); } else { diff --git a/src/apps/cli/testdeno/bench-couchdb.ts b/src/apps/cli/testdeno/bench-couchdb.ts index 6ed6df7..f419697 100644 --- a/src/apps/cli/testdeno/bench-couchdb.ts +++ b/src/apps/cli/testdeno/bench-couchdb.ts @@ -3,6 +3,7 @@ import { applyRemoteSyncSettings, initSettingsFile } from "./helpers/settings.ts import { assertFilesEqual, runCliOrFail } from "./helpers/cli.ts"; import { startCouchdb, stopCouchdb } from "./helpers/docker.ts"; import { createDeterministicDataset, type DatasetEntry } from "./helpers/dataset.ts"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; type BenchmarkConfig = { couchdbBackendUri: string; @@ -137,7 +138,7 @@ function startCouchdbProxy(options: { backendUri: string; proxyUri: string; requ }, }, async (request) => { - await new Promise((resolve) => setTimeout(resolve, halfDelayMs)); + await new Promise((resolve) => compatGlobal.setTimeout(resolve, halfDelayMs)); const targetUrl = new URL(request.url); targetUrl.protocol = backend.protocol; diff --git a/src/apps/cli/testdeno/helpers/backgroundCli.ts b/src/apps/cli/testdeno/helpers/backgroundCli.ts index ef81fea..52ac46b 100644 --- a/src/apps/cli/testdeno/helpers/backgroundCli.ts +++ b/src/apps/cli/testdeno/helpers/backgroundCli.ts @@ -1,5 +1,6 @@ import { CLI_DIR, TEE_ENABLED, formatTeeCommand, createLineTeeWriter } from "./cli.ts"; import { join } from "@std/path"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; const CLI_DIST = join(CLI_DIR, "dist", "index.cjs"); const VERBOSE_ENABLED = Deno.env.get("LIVESYNC_CLI_VERBOSE") === "1"; @@ -77,7 +78,9 @@ export class BackgroundCliProcess { if (this.combined.includes(needle)) return; const status = await Promise.race([ this.child.status.then((s) => ({ type: "status" as const, status: s })), - new Promise<{ type: "tick" }>((resolve) => setTimeout(() => resolve({ type: "tick" }), 100)), + new Promise<{ type: "tick" }>((resolve) => + compatGlobal.setTimeout(() => resolve({ type: "tick" }), 100) + ), ]); if (status.type === "status") { throw new Error( diff --git a/src/apps/cli/testdeno/helpers/cli.ts b/src/apps/cli/testdeno/helpers/cli.ts index c393c26..aae6b67 100644 --- a/src/apps/cli/testdeno/helpers/cli.ts +++ b/src/apps/cli/testdeno/helpers/cli.ts @@ -1,4 +1,5 @@ import { join } from "@std/path"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; // --------------------------------------------------------------------------- // Path resolution @@ -25,7 +26,7 @@ const VERBOSE_ENABLED = Deno.env.get("LIVESYNC_CLI_VERBOSE") === "1"; const DEBUG_ENABLED = Deno.env.get("LIVESYNC_CLI_DEBUG") === "1"; function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); } function concatChunks(chunks: Uint8Array[]): Uint8Array { diff --git a/src/apps/cli/testdeno/helpers/docker.ts b/src/apps/cli/testdeno/helpers/docker.ts index 3c0e6ce..9c5d6bd 100644 --- a/src/apps/cli/testdeno/helpers/docker.ts +++ b/src/apps/cli/testdeno/helpers/docker.ts @@ -1,3 +1,5 @@ +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; + /** * Docker service management for tests. * @@ -256,7 +258,7 @@ function untrackContainer(container: string): void { } function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); } async function waitForCouchdbStable(hostname: string, user: string, password: string): Promise { diff --git a/src/apps/cli/testdeno/helpers/net.ts b/src/apps/cli/testdeno/helpers/net.ts index fa5debd..dd8b076 100644 --- a/src/apps/cli/testdeno/helpers/net.ts +++ b/src/apps/cli/testdeno/helpers/net.ts @@ -1,3 +1,5 @@ +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; + type WaitForPortOptions = { timeoutMs?: number; intervalMs?: number; @@ -5,7 +7,7 @@ type WaitForPortOptions = { }; function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); } async function connectWithTimeout(hostname: string, port: number, timeoutMs: number): Promise { @@ -13,13 +15,13 @@ async function connectWithTimeout(hostname: string, port: number, timeoutMs: num try { const connPromise = Deno.connect({ hostname, port }); const timeoutPromise = new Promise((_, reject) => { - timer = setTimeout(() => reject(new Error(`connect timeout after ${timeoutMs}ms`)), timeoutMs); + timer = compatGlobal.setTimeout(() => reject(new Error(`connect timeout after ${timeoutMs}ms`)), timeoutMs); }); const conn = await Promise.race([connPromise, timeoutPromise]); conn.close(); } finally { if (timer !== undefined) { - clearTimeout(timer); + compatGlobal.clearTimeout(timer); } } } diff --git a/src/apps/cli/testdeno/helpers/p2p.ts b/src/apps/cli/testdeno/helpers/p2p.ts index a04b080..98d8603 100644 --- a/src/apps/cli/testdeno/helpers/p2p.ts +++ b/src/apps/cli/testdeno/helpers/p2p.ts @@ -1,6 +1,7 @@ import { runCli } from "./cli.ts"; import { isLocalP2pRelay, startP2pRelay, stopP2pRelay, startCoturn, stopCoturn } from "./docker.ts"; import { waitForPort } from "./net.ts"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; export type PeerEntry = { id: string; @@ -8,7 +9,7 @@ export type PeerEntry = { }; function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); } function parseRelayEndpoint(relay: string): { hostname: string; port: number } { diff --git a/src/apps/cli/testdeno/test-sync-two-local-databases.ts b/src/apps/cli/testdeno/test-sync-two-local-databases.ts index 5717d40..422d5d0 100644 --- a/src/apps/cli/testdeno/test-sync-two-local-databases.ts +++ b/src/apps/cli/testdeno/test-sync-two-local-databases.ts @@ -28,6 +28,7 @@ import { TempDir } from "./helpers/temp.ts"; import { runCliOrFail, jsonFieldIsNa } from "./helpers/cli.ts"; import { applyCouchdbSettings, initSettingsFile } from "./helpers/settings.ts"; import { startCouchdb, stopCouchdb } from "./helpers/docker.ts"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; // --------------------------------------------------------------------------- // Load configuration @@ -109,7 +110,7 @@ async function runSuite( config: { uri: string; user: string; password: string }, dbname: string ): Promise { - const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + const sleep = (ms: number) => new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); const runWithRetry = async (label: string, fn: () => Promise, retries = SYNC_RETRY): Promise => { let lastErr: unknown; for (let i = 0; i <= retries; i++) { diff --git a/src/apps/webapp/bootstrap.ts b/src/apps/webapp/bootstrap.ts index b3fa072..a6d9800 100644 --- a/src/apps/webapp/bootstrap.ts +++ b/src/apps/webapp/bootstrap.ts @@ -1,11 +1,12 @@ import { LiveSyncWebApp } from "./main"; import { VaultHistoryStore, type VaultHistoryItem } from "./vaultSelector"; +import { compatGlobal, _activeDocument } from "@lib/common/coreEnvFunctions.ts"; const historyStore = new VaultHistoryStore(); let app: LiveSyncWebApp | null = null; function getRequiredElement(id: string): T { - const element = document.getElementById(id); + const element = _activeDocument.getElementById(id); if (!element) { throw new Error(`Missing element: #${id}`); } @@ -22,7 +23,7 @@ function setBusyState(isBusy: boolean): void { const pickNewBtn = getRequiredElement("pick-new-vault"); pickNewBtn.disabled = isBusy; - const historyButtons = document.querySelectorAll(".vault-item button"); + const historyButtons = _activeDocument.querySelectorAll(".vault-item button"); historyButtons.forEach((button) => { button.disabled = isBusy; }); @@ -45,24 +46,24 @@ async function renderHistoryList(): Promise { emptyEl.classList.toggle("is-hidden", items.length > 0); for (const item of items) { - const row = document.createElement("div"); + const row = _activeDocument.createElement("div"); row.className = "vault-item"; - const info = document.createElement("div"); + const info = _activeDocument.createElement("div"); info.className = "vault-item-info"; - const name = document.createElement("div"); + const name = _activeDocument.createElement("div"); name.className = "vault-item-name"; name.textContent = item.name; - const meta = document.createElement("div"); + const meta = _activeDocument.createElement("div"); meta.className = "vault-item-meta"; const label = item.id === lastUsedId ? "Last used" : "Used"; meta.textContent = `${label}: ${formatLastUsed(item.lastUsedAt)}`; info.append(name, meta); - const useButton = document.createElement("button"); + const useButton = _activeDocument.createElement("button"); useButton.type = "button"; useButton.textContent = "Use this vault"; useButton.addEventListener("click", () => { @@ -120,7 +121,7 @@ async function initializeVaultSelector(): Promise { await renderHistoryList(); } -window.addEventListener("load", async () => { +compatGlobal.addEventListener("load", async () => { try { await initializeVaultSelector(); } catch (error) { @@ -129,11 +130,11 @@ window.addEventListener("load", async () => { } }); -window.addEventListener("beforeunload", () => { +compatGlobal.addEventListener("beforeunload", () => { void app?.shutdown(); }); -(window as any).livesyncApp = { +(compatGlobal as any).livesyncApp = { getApp: () => app, historyStore, }; diff --git a/src/apps/webapp/main.ts b/src/apps/webapp/main.ts index ea32268..8b3dd4b 100644 --- a/src/apps/webapp/main.ts +++ b/src/apps/webapp/main.ts @@ -19,6 +19,7 @@ import { SetupManager } from "@/modules/features/SetupManager"; import { useSetupManagerHandlersFeature } from "@/serviceFeatures/setupObsidian/setupManagerHandlers"; import { useP2PReplicatorCommands } from "@lib/replication/trystero/useP2PReplicatorCommands"; import { useP2PReplicatorFeature } from "@lib/replication/trystero/useP2PReplicatorFeature"; +import { compatGlobal, _activeDocument } from "@lib/common/coreEnvFunctions.ts"; const SETTINGS_DIR = ".livesync"; const SETTINGS_FILE = "settings.json"; @@ -102,8 +103,8 @@ class LiveSyncWebApp { console.log("[AppLifecycle] Restart requested"); await this.shutdown(); await this.initialize(); - setTimeout(() => { - window.location.reload(); + compatGlobal.setTimeout(() => { + compatGlobal.location.reload(); }, 1000); }); @@ -235,7 +236,7 @@ class LiveSyncWebApp { } private showError(message: string) { - const statusEl = document.getElementById("status"); + const statusEl = _activeDocument.getElementById("status"); if (statusEl) { statusEl.className = "error"; statusEl.textContent = `Error: ${message}`; @@ -243,7 +244,7 @@ class LiveSyncWebApp { } private showWarning(message: string) { - const statusEl = document.getElementById("status"); + const statusEl = _activeDocument.getElementById("status"); if (statusEl) { statusEl.className = "warning"; statusEl.textContent = `Warning: ${message}`; @@ -251,7 +252,7 @@ class LiveSyncWebApp { } private showSuccess(message: string) { - const statusEl = document.getElementById("status"); + const statusEl = _activeDocument.getElementById("status"); if (statusEl) { statusEl.className = "success"; statusEl.textContent = message; diff --git a/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts b/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts index b17d69e..7c7285d 100644 --- a/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts +++ b/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts @@ -11,6 +11,7 @@ import type { } from "@lib/managers/adapters"; import type { FileEventItemSentinel } from "@lib/managers/StorageEventManager"; import type { FSAPIFile, FSAPIFolder } from "@/apps/webapp/adapters/FSAPITypes"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; /** * FileSystem API-specific type guard adapter @@ -149,14 +150,14 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter { async beginWatch(handlers: IStorageEventWatchHandlers): Promise { // Use FileSystemObserver if available (Chrome 124+) - if (typeof (window as any).FileSystemObserver === "undefined") { + if (typeof (compatGlobal as any).FileSystemObserver === "undefined") { console.log("[FSAPIWatchAdapter] FileSystemObserver not available, file watching disabled"); console.log("[FSAPIWatchAdapter] Consider using Chrome 124+ for real-time file watching"); return Promise.resolve(); } try { - const FileSystemObserver = (window as any).FileSystemObserver; + const FileSystemObserver = (compatGlobal as any).FileSystemObserver; this.observer = new FileSystemObserver(async (records: any[]) => { for (const record of records) { diff --git a/src/apps/webapp/test-entry.ts b/src/apps/webapp/test-entry.ts index 3dcb8fe..ab70ee2 100644 --- a/src/apps/webapp/test-entry.ts +++ b/src/apps/webapp/test-entry.ts @@ -12,6 +12,7 @@ import { LiveSyncWebApp } from "./main"; import type { ObsidianLiveSyncSettings } from "@lib/common/types"; import type { FilePathWithPrefix } from "@lib/common/types"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; // -------------------------------------------------------------------------- // Internal state – one app instance per page / browser context @@ -41,7 +42,7 @@ async function waitForIdle(core: any, timeoutMs = 60_000): Promise { (core.services?.fileProcessing?.processing?.value ?? 0) + (core.services?.replication?.storageApplyingCount?.value ?? 0); if (q === 0) return; - await new Promise((r) => setTimeout(r, 300)); + await new Promise((r) => compatGlobal.setTimeout(r, 300)); } throw new Error(`waitForIdle timed out after ${timeoutMs} ms`); } @@ -116,7 +117,7 @@ export interface LiveSyncTestAPI { const livesyncTest: LiveSyncTestAPI = { async init(vaultName: string, settings: Partial): Promise { // Clean up any stale OPFS data from previous runs. - const opfsRoot = await navigator.storage.getDirectory(); + const opfsRoot = await compatGlobal.navigator.storage.getDirectory(); try { await opfsRoot.removeEntry(vaultName, { recursive: true }); } catch { @@ -200,4 +201,4 @@ const livesyncTest: LiveSyncTestAPI = { }; // Expose on window for Playwright page.evaluate() calls. -(window as any).livesyncTest = livesyncTest; +(compatGlobal as any).livesyncTest = livesyncTest; diff --git a/src/apps/webapp/tsconfig.json b/src/apps/webapp/tsconfig.json index f79193a..c838f6e 100644 --- a/src/apps/webapp/tsconfig.json +++ b/src/apps/webapp/tsconfig.json @@ -21,7 +21,7 @@ "noFallthroughCasesInSwitch": true, /* Path mapping */ - "baseUrl": ".", + // "baseUrl": ".", "paths": { "@/*": ["../../*"], "@lib/*": ["../../lib/src/*"] diff --git a/src/apps/webapp/vaultSelector.ts b/src/apps/webapp/vaultSelector.ts index 79764a9..fac24ca 100644 --- a/src/apps/webapp/vaultSelector.ts +++ b/src/apps/webapp/vaultSelector.ts @@ -1,3 +1,5 @@ +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; + const HANDLE_DB_NAME = "livesync-webapp-handles"; const HANDLE_STORE_NAME = "handles"; const LAST_USED_KEY = "meta:lastUsedVaultId"; @@ -170,7 +172,7 @@ export class VaultHistoryStore { } async pickNewVault(): Promise { - const picker = (window as any).showDirectoryPicker; + const picker = (compatGlobal as any).showDirectoryPicker; if (typeof picker !== "function") { throw new Error("FileSystem API showDirectoryPicker is not supported in this browser"); } diff --git a/src/apps/webpeer/src/P2PReplicatorShim.ts b/src/apps/webpeer/src/P2PReplicatorShim.ts index 11c9a9c..8048804 100644 --- a/src/apps/webpeer/src/P2PReplicatorShim.ts +++ b/src/apps/webpeer/src/P2PReplicatorShim.ts @@ -17,7 +17,9 @@ import { type PeerStatus, type PluginShim, } from "@lib/replication/trystero/P2PReplicatorPaneCommon"; -import { P2PLogCollector, type P2PReplicatorBase, useP2PReplicator } from "@lib/replication/trystero/P2PReplicatorCore"; +import { useP2PReplicator } from "@lib/replication/trystero/P2PReplicatorCore"; +import { P2PLogCollector } from "@lib/replication/trystero/P2PLogCollector"; +import type { P2PReplicatorBase } from "@lib/replication/trystero/P2PReplicatorBase.ts"; import type { SimpleStore } from "octagonal-wheels/databases/SimpleStoreBase"; import { reactiveSource } from "octagonal-wheels/dataobject/reactive_v2"; import { EVENT_SETTING_SAVED } from "@lib/events/coreEvents"; @@ -31,6 +33,7 @@ import { SimpleStoreIDBv2 } from "octagonal-wheels/databases/SimpleStoreIDBv2"; import type { BrowserAPIService } from "@lib/services/implements/browser/BrowserAPIService"; import type { InjectableSettingService } from "@lib/services/implements/injectable/InjectableSettingService"; import { LiveSyncTrysteroReplicator } from "@lib/replication/trystero/LiveSyncTrysteroReplicator"; +import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; function addToList(item: string, list: string) { return unique( @@ -137,7 +140,7 @@ export class P2PReplicatorShim implements P2PReplicatorBase { this._initP2PReplicator(); - setTimeout(() => { + compatGlobal.setTimeout(() => { if (this.settings.P2P_AutoStart && this.settings.P2P_Enabled) { void this.open(); } @@ -164,12 +167,12 @@ export class P2PReplicatorShim implements P2PReplicatorBase { getConfig(key: string) { const vaultName = this.services.vault.getVaultName(); const dbKey = `${vaultName}-${key}`; - return localStorage.getItem(dbKey); + return compatGlobal.localStorage.getItem(dbKey); } setConfig(key: string, value: string) { const vaultName = this.services.vault.getVaultName(); const dbKey = `${vaultName}-${key}`; - localStorage.setItem(dbKey, value); + compatGlobal.localStorage.setItem(dbKey, value); } getDeviceName(): string { diff --git a/src/apps/webpeer/src/main.ts b/src/apps/webpeer/src/main.ts index befae65..045a1ff 100644 --- a/src/apps/webpeer/src/main.ts +++ b/src/apps/webpeer/src/main.ts @@ -1,9 +1,10 @@ import { mount } from "svelte"; import "./app.css"; import App from "./App.svelte"; +import { _activeDocument } from "@lib/common/coreEnvFunctions.ts"; const app = mount(App, { - target: document.getElementById("app")!, + target: _activeDocument.getElementById("app")!, }); export default app; diff --git a/src/apps/webpeer/src/uitest.ts b/src/apps/webpeer/src/uitest.ts index 04132b0..e13b4dd 100644 --- a/src/apps/webpeer/src/uitest.ts +++ b/src/apps/webpeer/src/uitest.ts @@ -1,9 +1,10 @@ import { mount } from "svelte"; import "./app.css"; import App from "./UITest.svelte"; +import { _activeDocument } from "@lib/common/coreEnvFunctions.ts"; const app = mount(App, { - target: document.getElementById("app")!, + target: _activeDocument.getElementById("app")!, }); export default app; diff --git a/src/apps/webpeer/tsconfig.app.json b/src/apps/webpeer/tsconfig.app.json index c070f33..ebea849 100644 --- a/src/apps/webpeer/tsconfig.app.json +++ b/src/apps/webpeer/tsconfig.app.json @@ -1,7 +1,7 @@ { "extends": "../../../tsconfig.json", "compilerOptions": { - "sourceRoot": "../", + // "sourceRoot": "../", "target": "ESNext", "useDefineForClassFields": true, "module": "ESNext", diff --git a/src/features/ConfigSync/PluginDialogModal.ts b/src/features/ConfigSync/PluginDialogModal.ts index 34cb27c..f5dc12e 100644 --- a/src/features/ConfigSync/PluginDialogModal.ts +++ b/src/features/ConfigSync/PluginDialogModal.ts @@ -19,7 +19,7 @@ export class PluginDialogModal extends Modal { this.contentEl.setCssStyles({ overflow: "auto", display: "flex", - flexDirection: "column" + flexDirection: "column", }); this.titleEl.setText("Customization Sync (Beta3)"); if (!this.component) { diff --git a/src/lib b/src/lib index 3dad956..7157dbc 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 3dad9565aa2b58dc3190dcb88182d0f2acd8fb87 +Subproject commit 7157dbc62cbdd551e6a5f9ff417bf05a833e9099 diff --git a/src/modules/coreObsidian/UILib/dialogs.ts b/src/modules/coreObsidian/UILib/dialogs.ts index ef94340..93ac895 100644 --- a/src/modules/coreObsidian/UILib/dialogs.ts +++ b/src/modules/coreObsidian/UILib/dialogs.ts @@ -194,7 +194,7 @@ export class MessageBox extends AutoClosableModal { const div = contentEl.createDiv(); div.setCssStyles({ userSelect: "text", - "webkitUserSelect": "text" + webkitUserSelect: "text", }); void MarkdownRenderer.render(this.plugin.app, this.contentMd, div, "/", this.plugin); const buttonSetting = new Setting(contentEl); @@ -214,7 +214,7 @@ export class MessageBox extends AutoClosableModal { flexDirection: "column", alignItems: "center", justifyContent: "center", - flexGrow: "1" + flexGrow: "1", }); } contentEl.addEventListener("click", () => { @@ -244,7 +244,7 @@ export class MessageBox extends AutoClosableModal { if (this.wideButton) { btn.buttonEl.setCssStyles({ flexGrow: "1", - width: "100%" + width: "100%", }); } return btn; diff --git a/utilsdeno/refactor-globals.ts b/utilsdeno/refactor-globals.ts index 86f35c6..36b75f3 100644 --- a/utilsdeno/refactor-globals.ts +++ b/utilsdeno/refactor-globals.ts @@ -45,7 +45,7 @@ const TARGET_GLOBALS = new Set([ "navigator", "location", "document", - "window" + "window", ]); let modifiedFilesCount = 0; @@ -59,22 +59,13 @@ for (const sourceFile of project.getSourceFiles()) { continue; } - // Exclude submodule files under src/lib/ - if (posixFilePath.startsWith(posixLibSrc)) { - continue; - } - - // Exclude independent application modules under src/apps/ - if (posixFilePath.startsWith(`${posixSrc}/apps/`)) { + // Exclude coreEnvFunctions.ts to avoid self-referential definitions + if (posixFilePath.endsWith("/coreEnvFunctions.ts") || posixFilePath.endsWith("/coreEnvFunctions")) { continue; } // Exclude unit and integration test files - if ( - posixFilePath.endsWith(".spec.ts") || - posixFilePath.endsWith(".test.ts") || - posixFilePath.includes("/_test/") - ) { + if (posixFilePath.endsWith(".spec.ts") || posixFilePath.endsWith(".test.ts") || posixFilePath.includes("/_test/")) { continue; } @@ -101,6 +92,14 @@ for (const sourceFile of project.getSourceFiles()) { } } + // 1.5. Skip if it is the right-hand side of a QualifiedName (e.g. the "requestAnimationFrame" in "typeof compatGlobal.requestAnimationFrame") + if (parent.getKind() === SyntaxKind.QualifiedName) { + const qualified = parent.asKindOrThrow(SyntaxKind.QualifiedName); + if (qualified.getRight() === idNode) { + continue; + } + } + // 2. Skip if it is the operand of a typeof expression (e.g. "typeof window") if (parent.getKind() === SyntaxKind.TypeOfExpression) { continue; @@ -153,6 +152,8 @@ for (const sourceFile of project.getSourceFiles()) { let replacement = ""; if (name === "window" || name === "globalThis") { replacement = "compatGlobal"; + } else if (name === "document") { + replacement = "_activeDocument"; } else { replacement = `compatGlobal.${name}`; } @@ -174,23 +175,33 @@ for (const sourceFile of project.getSourceFiles()) { node.replaceWithText(replacement); } - // Ensure compatGlobal is imported - const hasCompatGlobalImport = sourceFile.getImportDeclarations().some((imp) => { - return imp.getNamedImports().some((ni) => ni.getName() === "compatGlobal"); - }); + // Determine what needs to be imported based on replacements + const needsCompatGlobal = nodesToReplace.some((r) => r.replacement.includes("compatGlobal")); + const needsActiveDocument = nodesToReplace.some((r) => r.replacement.includes("_activeDocument")); - if (!hasCompatGlobalImport) { + const requiredImports: string[] = []; + if (needsCompatGlobal) requiredImports.push("compatGlobal"); + if (needsActiveDocument) requiredImports.push("_activeDocument"); + + if (requiredImports.length > 0) { const existingImport = sourceFile.getImportDeclarations().find((imp) => { const spec = imp.getModuleSpecifierValue(); return spec === "@lib/common/coreEnvFunctions" || spec === "@lib/common/coreEnvFunctions.ts"; }); if (existingImport) { - existingImport.addNamedImport("compatGlobal"); + for (const nameToImport of requiredImports) { + const alreadyImported = existingImport + .getNamedImports() + .some((ni) => ni.getName() === nameToImport); + if (!alreadyImported) { + existingImport.addNamedImport(nameToImport); + } + } } else { sourceFile.addImportDeclaration({ - namedImports: ["compatGlobal"], - moduleSpecifier: "@lib/common/coreEnvFunctions.ts" + namedImports: requiredImports, + moduleSpecifier: "@lib/common/coreEnvFunctions.ts", }); } } diff --git a/utilsdeno/refactor-styles.ts b/utilsdeno/refactor-styles.ts index 4851d4c..4bdb4c6 100644 --- a/utilsdeno/refactor-styles.ts +++ b/utilsdeno/refactor-styles.ts @@ -41,7 +41,7 @@ function matchStyleAccess(node: Node): { element: Node; propertyName: string; is return { element: expr.getExpression(), propertyName: node.getName(), - isComputed: false + isComputed: false, }; } } else if (Node.isElementAccessExpression(node)) { @@ -52,7 +52,7 @@ function matchStyleAccess(node: Node): { element: Node; propertyName: string; is return { element: expr.getExpression(), propertyName: arg.getText(), - isComputed: true + isComputed: true, }; } } @@ -74,7 +74,7 @@ function getStyleAssignment(statement: Node) { property: styleAccess.propertyName, valueText: expr.getRight().getText(), isComputed: styleAccess.isComputed, - statementNode: statement + statementNode: statement, }; } @@ -100,11 +100,7 @@ for (const sourceFile of project.getSourceFiles()) { } // Exclude unit and integration test files - if ( - posixFilePath.endsWith(".spec.ts") || - posixFilePath.endsWith(".test.ts") || - posixFilePath.includes("/_test/") - ) { + if (posixFilePath.endsWith(".spec.ts") || posixFilePath.endsWith(".test.ts") || posixFilePath.includes("/_test/")) { continue; } @@ -126,12 +122,14 @@ for (const sourceFile of project.getSourceFiles()) { if (assignment) { const currentGroup: StyleGroup = { elementText: assignment.elementText, - assignments: [{ - property: assignment.property, - valueText: assignment.valueText, - isComputed: assignment.isComputed, - statementNode: assignment.statementNode - }] + assignments: [ + { + property: assignment.property, + valueText: assignment.valueText, + isComputed: assignment.isComputed, + statementNode: assignment.statementNode, + }, + ], }; // Look ahead to collect consecutive assignments to the same element @@ -143,7 +141,7 @@ for (const sourceFile of project.getSourceFiles()) { property: nextAssignment.property, valueText: nextAssignment.valueText, isComputed: nextAssignment.isComputed, - statementNode: nextAssignment.statementNode + statementNode: nextAssignment.statementNode, }); j++; } else { @@ -190,7 +188,12 @@ for (const sourceFile of project.getSourceFiles()) { const { line } = sourceFile.getLineAndColumnAtPos(firstNode.getStart()); console.log(` Line ${line}: Replacing consecutive style assignments on "${group.elementText}" with:`); - console.log(newText.split("\n").map((l) => ` ${l}`).join("\n")); + console.log( + newText + .split("\n") + .map((l) => ` ${l}`) + .join("\n") + ); if (!isDryRun) { firstNode.replaceWithText(newText); From 7895336189de57919616b9a7b82fd63f05c0b4ed Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 06:08:40 +0100 Subject: [PATCH 3/8] revert deno test --- src/apps/cli/adapters/NodeVaultAdapter.ts | 2 +- src/apps/cli/testdeno/bench-couchdb.ts | 3 +-- src/apps/cli/testdeno/helpers/backgroundCli.ts | 3 +-- src/apps/cli/testdeno/helpers/cli.ts | 3 +-- src/apps/cli/testdeno/helpers/docker.ts | 4 +--- src/apps/cli/testdeno/helpers/net.ts | 8 +++----- src/apps/cli/testdeno/helpers/p2p.ts | 3 +-- src/apps/cli/testdeno/test-setup-put-cat.ts | 2 +- src/apps/cli/testdeno/test-sync-two-local-databases.ts | 3 +-- 9 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/apps/cli/adapters/NodeVaultAdapter.ts b/src/apps/cli/adapters/NodeVaultAdapter.ts index e313f39..99e8d93 100644 --- a/src/apps/cli/adapters/NodeVaultAdapter.ts +++ b/src/apps/cli/adapters/NodeVaultAdapter.ts @@ -2,7 +2,7 @@ import * as fs from "fs/promises"; import * as path from "path"; import type { UXDataWriteOptions } from "@lib/common/types"; import type { IVaultAdapter } from "@lib/serviceModules/adapters"; -import type { NodeFile, NodeFolder, NodeStat } from "./NodeTypes"; +import type { NodeFile, NodeFolder } from "./NodeTypes"; /** * Vault adapter implementation for Node.js diff --git a/src/apps/cli/testdeno/bench-couchdb.ts b/src/apps/cli/testdeno/bench-couchdb.ts index f419697..6ed6df7 100644 --- a/src/apps/cli/testdeno/bench-couchdb.ts +++ b/src/apps/cli/testdeno/bench-couchdb.ts @@ -3,7 +3,6 @@ import { applyRemoteSyncSettings, initSettingsFile } from "./helpers/settings.ts import { assertFilesEqual, runCliOrFail } from "./helpers/cli.ts"; import { startCouchdb, stopCouchdb } from "./helpers/docker.ts"; import { createDeterministicDataset, type DatasetEntry } from "./helpers/dataset.ts"; -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; type BenchmarkConfig = { couchdbBackendUri: string; @@ -138,7 +137,7 @@ function startCouchdbProxy(options: { backendUri: string; proxyUri: string; requ }, }, async (request) => { - await new Promise((resolve) => compatGlobal.setTimeout(resolve, halfDelayMs)); + await new Promise((resolve) => setTimeout(resolve, halfDelayMs)); const targetUrl = new URL(request.url); targetUrl.protocol = backend.protocol; diff --git a/src/apps/cli/testdeno/helpers/backgroundCli.ts b/src/apps/cli/testdeno/helpers/backgroundCli.ts index 52ac46b..f2cbbb4 100644 --- a/src/apps/cli/testdeno/helpers/backgroundCli.ts +++ b/src/apps/cli/testdeno/helpers/backgroundCli.ts @@ -1,6 +1,5 @@ import { CLI_DIR, TEE_ENABLED, formatTeeCommand, createLineTeeWriter } from "./cli.ts"; import { join } from "@std/path"; -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; const CLI_DIST = join(CLI_DIR, "dist", "index.cjs"); const VERBOSE_ENABLED = Deno.env.get("LIVESYNC_CLI_VERBOSE") === "1"; @@ -79,7 +78,7 @@ export class BackgroundCliProcess { const status = await Promise.race([ this.child.status.then((s) => ({ type: "status" as const, status: s })), new Promise<{ type: "tick" }>((resolve) => - compatGlobal.setTimeout(() => resolve({ type: "tick" }), 100) + setTimeout(() => resolve({ type: "tick" }), 100) ), ]); if (status.type === "status") { diff --git a/src/apps/cli/testdeno/helpers/cli.ts b/src/apps/cli/testdeno/helpers/cli.ts index aae6b67..c393c26 100644 --- a/src/apps/cli/testdeno/helpers/cli.ts +++ b/src/apps/cli/testdeno/helpers/cli.ts @@ -1,5 +1,4 @@ import { join } from "@std/path"; -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; // --------------------------------------------------------------------------- // Path resolution @@ -26,7 +25,7 @@ const VERBOSE_ENABLED = Deno.env.get("LIVESYNC_CLI_VERBOSE") === "1"; const DEBUG_ENABLED = Deno.env.get("LIVESYNC_CLI_DEBUG") === "1"; function sleep(ms: number): Promise { - return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } function concatChunks(chunks: Uint8Array[]): Uint8Array { diff --git a/src/apps/cli/testdeno/helpers/docker.ts b/src/apps/cli/testdeno/helpers/docker.ts index 9c5d6bd..3c0e6ce 100644 --- a/src/apps/cli/testdeno/helpers/docker.ts +++ b/src/apps/cli/testdeno/helpers/docker.ts @@ -1,5 +1,3 @@ -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; - /** * Docker service management for tests. * @@ -258,7 +256,7 @@ function untrackContainer(container: string): void { } function sleep(ms: number): Promise { - return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } async function waitForCouchdbStable(hostname: string, user: string, password: string): Promise { diff --git a/src/apps/cli/testdeno/helpers/net.ts b/src/apps/cli/testdeno/helpers/net.ts index dd8b076..fa5debd 100644 --- a/src/apps/cli/testdeno/helpers/net.ts +++ b/src/apps/cli/testdeno/helpers/net.ts @@ -1,5 +1,3 @@ -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; - type WaitForPortOptions = { timeoutMs?: number; intervalMs?: number; @@ -7,7 +5,7 @@ type WaitForPortOptions = { }; function sleep(ms: number): Promise { - return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } async function connectWithTimeout(hostname: string, port: number, timeoutMs: number): Promise { @@ -15,13 +13,13 @@ async function connectWithTimeout(hostname: string, port: number, timeoutMs: num try { const connPromise = Deno.connect({ hostname, port }); const timeoutPromise = new Promise((_, reject) => { - timer = compatGlobal.setTimeout(() => reject(new Error(`connect timeout after ${timeoutMs}ms`)), timeoutMs); + timer = setTimeout(() => reject(new Error(`connect timeout after ${timeoutMs}ms`)), timeoutMs); }); const conn = await Promise.race([connPromise, timeoutPromise]); conn.close(); } finally { if (timer !== undefined) { - compatGlobal.clearTimeout(timer); + clearTimeout(timer); } } } diff --git a/src/apps/cli/testdeno/helpers/p2p.ts b/src/apps/cli/testdeno/helpers/p2p.ts index 98d8603..a04b080 100644 --- a/src/apps/cli/testdeno/helpers/p2p.ts +++ b/src/apps/cli/testdeno/helpers/p2p.ts @@ -1,7 +1,6 @@ import { runCli } from "./cli.ts"; import { isLocalP2pRelay, startP2pRelay, stopP2pRelay, startCoturn, stopCoturn } from "./docker.ts"; import { waitForPort } from "./net.ts"; -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; export type PeerEntry = { id: string; @@ -9,7 +8,7 @@ export type PeerEntry = { }; function sleep(ms: number): Promise { - return new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } function parseRelayEndpoint(relay: string): { hostname: string; port: number } { diff --git a/src/apps/cli/testdeno/test-setup-put-cat.ts b/src/apps/cli/testdeno/test-setup-put-cat.ts index f2a7696..e1d99c9 100644 --- a/src/apps/cli/testdeno/test-setup-put-cat.ts +++ b/src/apps/cli/testdeno/test-setup-put-cat.ts @@ -132,7 +132,7 @@ Deno.test("CLI file operations: push / cat / ls / info / rm / resolve / cat-rev assertEquals(data.path, REMOTE_PATH, "info .path mismatch"); assertEquals(data.filename, REMOTE_PATH.split("/").at(-1), "info .filename mismatch"); assert(typeof data.size === "number" && data.size >= 0, `info .size invalid: ${data.size}`); - assert(typeof data.chunks === "number" && (data.chunks as number) >= 1, `info .chunks invalid: ${data.chunks}`); + assert(typeof data.chunks === "number" && (data.chunks) >= 1, `info .chunks invalid: ${data.chunks}`); assertEquals(data.conflicts, "N/A", "info .conflicts should be N/A"); console.log("[PASS] info output format matched"); }); diff --git a/src/apps/cli/testdeno/test-sync-two-local-databases.ts b/src/apps/cli/testdeno/test-sync-two-local-databases.ts index 422d5d0..5717d40 100644 --- a/src/apps/cli/testdeno/test-sync-two-local-databases.ts +++ b/src/apps/cli/testdeno/test-sync-two-local-databases.ts @@ -28,7 +28,6 @@ import { TempDir } from "./helpers/temp.ts"; import { runCliOrFail, jsonFieldIsNa } from "./helpers/cli.ts"; import { applyCouchdbSettings, initSettingsFile } from "./helpers/settings.ts"; import { startCouchdb, stopCouchdb } from "./helpers/docker.ts"; -import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; // --------------------------------------------------------------------------- // Load configuration @@ -110,7 +109,7 @@ async function runSuite( config: { uri: string; user: string; password: string }, dbname: string ): Promise { - const sleep = (ms: number) => new Promise((resolve) => compatGlobal.setTimeout(resolve, ms)); + const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); const runWithRetry = async (label: string, fn: () => Promise, retries = SYNC_RETRY): Promise => { let lastErr: unknown; for (let i = 0; i <= retries; i++) { From 4a5283543d4001c2f192a1f4daf48ca1f9e2c276 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 06:10:30 +0100 Subject: [PATCH 4/8] for automatic review --- src/apps/webapp/main.ts | 4 +- .../FSAPIStorageEventManagerAdapter.ts | 6 +- src/apps/webapp/vaultSelector.ts | 2 +- src/lib | 2 +- .../coreFeatures/ModuleConflictResolver.ts | 4 +- utilsdeno/README.md | 102 +++++++++++++ utilsdeno/detect-any.ts | 49 +++++++ utilsdeno/refactor-assertions.ts | 96 ++++++++++++ utilsdeno/refactor-globals.ts | 7 +- utilsdeno/refactor-styles.ts | 7 +- utilsdeno/refactor-unused.ts | 138 ++++++++++++++++++ 11 files changed, 406 insertions(+), 11 deletions(-) create mode 100644 utilsdeno/README.md create mode 100644 utilsdeno/detect-any.ts create mode 100644 utilsdeno/refactor-assertions.ts create mode 100644 utilsdeno/refactor-unused.ts diff --git a/src/apps/webapp/main.ts b/src/apps/webapp/main.ts index 8b3dd4b..eb67e04 100644 --- a/src/apps/webapp/main.ts +++ b/src/apps/webapp/main.ts @@ -92,7 +92,7 @@ class LiveSyncWebApp { console.log("[Settings] Loaded from .livesync/settings.json"); return { ...DEFAULT_SETTINGS, ...data } as ObsidianLiveSyncSettings; } - } catch (error) { + } catch { console.log("[Settings] Failed to load, using defaults"); } return DEFAULT_SETTINGS as ObsidianLiveSyncSettings; @@ -170,7 +170,7 @@ class LiveSyncWebApp { const file = await fileHandle.getFile(); const text = await file.text(); return JSON.parse(text); - } catch (error) { + } catch { // File doesn't exist yet return null; } diff --git a/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts b/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts index 7c7285d..762903f 100644 --- a/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts +++ b/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts @@ -182,7 +182,7 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter { if (changedHandle && changedHandle.kind === "file") { const file = await changedHandle.getFile(); const fileInfo = { - path: relativePath as any, + path: relativePath, stat: { size: file.size, mtime: file.lastModified, @@ -200,7 +200,7 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter { } } else if (type === "disappeared") { const fileInfo = { - path: relativePath as any, + path: relativePath, stat: { size: 0, mtime: Date.now(), @@ -217,7 +217,7 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter { if (changedHandle && changedHandle.kind === "file") { const file = await changedHandle.getFile(); const fileInfo = { - path: relativePath as any, + path: relativePath, stat: { size: file.size, mtime: file.lastModified, diff --git a/src/apps/webapp/vaultSelector.ts b/src/apps/webapp/vaultSelector.ts index fac24ca..37b7573 100644 --- a/src/apps/webapp/vaultSelector.ts +++ b/src/apps/webapp/vaultSelector.ts @@ -91,7 +91,7 @@ export class VaultHistoryStore { async getVaultHistory(): Promise { return this.withStore("readonly", async (store) => { - const keys = (await this.requestAsPromise(store.getAllKeys())) as IDBValidKey[]; + const keys = (await this.requestAsPromise(store.getAllKeys())); const values = (await this.requestAsPromise(store.getAll())) as unknown[]; const items: VaultHistoryItem[] = []; for (let i = 0; i < keys.length; i++) { diff --git a/src/lib b/src/lib index 7157dbc..c926417 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 7157dbc62cbdd551e6a5f9ff417bf05a833e9099 +Subproject commit c926417f82a4bf90e2e6fbc1ad3071a49077c52e diff --git a/src/modules/coreFeatures/ModuleConflictResolver.ts b/src/modules/coreFeatures/ModuleConflictResolver.ts index 80362a9..28544ad 100644 --- a/src/modules/coreFeatures/ModuleConflictResolver.ts +++ b/src/modules/coreFeatures/ModuleConflictResolver.ts @@ -182,9 +182,9 @@ export class ModuleConflictResolver extends AbstractModule { revs.map(async (rev) => { const leaf = await this.core.databaseFileAccess.fetchEntryMeta(filename, rev); if (leaf == false) { - return [0, rev] as [number, string]; + return [0, rev]; } - return [leaf.mtime, rev] as [number, string]; + return [leaf.mtime, rev]; }) )), ] as [number, string][] diff --git a/utilsdeno/README.md b/utilsdeno/README.md new file mode 100644 index 0000000..70d3a83 --- /dev/null +++ b/utilsdeno/README.md @@ -0,0 +1,102 @@ +# Refactoring and Code Quality Utilities + +This directory contains Deno-based scripts that utilise `ts-morph` to perform codebase-wide refactoring, code quality clean-up, and static analysis. + +These utilities are designed to help maintain code quality, resolve compiler warnings, and ensure popout window compatibility in the Obsidian plug-in environment. + +--- + +## Prerequisites + +To execute these scripts, you must have Deno installed on your system. + +--- + +## General Usage + +By default, all refactoring scripts run in **dry-run mode**. They will output the proposed changes to the console without modifying any files. + +To apply the changes to the files, append the `'--run'` flag: + +```bash +deno run --allow-read --allow-write --allow-env .ts --run +``` + +--- + +## Utilities Reference + +### 1. Global Wrapper Refactoring (`refactor-globals.ts`) +Converts standard global variable usages to compatibility wrappers to ensure safe operation when running in Obsidian popout windows (which run in separate window contexts). + +* **Targets**: `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval`, `requestAnimationFrame`, `cancelAnimationFrame`, `localStorage`, `navigator`, `location`, `window`, `globalThis`, and `document`. +* **Actions**: + * Replaces global namespace references (like `window` and `globalThis`) with `compatGlobal`. + * Replaces `document` with `_activeDocument` (from `@lib/common/coreEnvFunctions.ts`). + * Injects or updates the necessary imports in modified files. +* **Command**: + ```bash + deno run --allow-read --allow-write --allow-env refactor-globals.ts + ``` + +### 2. Element Style Normalisation (`refactor-styles.ts`) +Converts direct style assignments on HTML/SVG elements to use the plug-in's `setCssStyles` helper. + +* **Actions**: + * Replaces statements like `element.style.color = 'red';` with `element.setCssStyles({ color: 'red' });`. + * Groups multiple consecutive style assignments on the same element into a single call. + * Supports both static keys and computed bracket properties. +* **Command**: + ```bash + deno run --allow-read --allow-write --allow-env refactor-styles.ts + ``` + +### 3. Redundant Assertions Cleanup (`refactor-assertions.ts`) +Finds and removes type assertions that are redundant because the expression already evaluates to the asserted type. + +* **Actions**: + * Removes redundant `as Type` or `` assertions. + * Preserves critical literal assertions such as `as const` and ``. +* **Command**: + ```bash + deno run --allow-read --allow-write --allow-env refactor-assertions.ts + ``` + +### 4. Unused Code Refactoring (`refactor-unused.ts`) +Cleans up unused imports and catch variables to reduce bundle size and warnings. + +* **Actions**: + * Converts unused catch variables to simple catch statements (e.g. `catch (error)` -> `catch`). + * Removes unused items in named imports, handling alias bindings (e.g. `import { A as B }`) correctly. + * Deletes empty import declarations resulting from the named import clean-up. +* **Command**: + ```bash + deno run --allow-read --allow-write --allow-env refactor-unused.ts + ``` + +### 5. Explicit Any Detection (`detect-any.ts`) +Scans the codebase and logs all occurrences of explicit `any` types. + +* **Actions**: + * Identifies uses of the `any` keyword in TypeScript and Svelte files. + * Logs the filename, line number, and matching code line for audit purposes. +* **Command**: + ```bash + deno run --allow-read --allow-env detect-any.ts + ``` + +### 6. Import Normalisation (`normalise-imports.ts`) +Ensures that all import statements are standardised across the codebase, resolving paths to aliases such as `@lib/` and `@/` where applicable. + +* **Command**: + ```bash + deno run --allow-read --allow-write --allow-env normalise-imports.ts + ``` + +--- + +## Safety and Exclusions + +* **Tests Excluded**: All scripts automatically skip files located in `_test/` or `testdeno/` folders, as well as files ending with `.spec.ts` or `.test.ts`. +* **Submodule Caution**: Some tools will run against the `src/lib/` submodule. Ensure you verify changes inside the submodule prior to committing. +* **Verification**: Always run `npm run check` and `npm run test:unit` after performing refactoring tasks to verify that type safety and tests remain intact. diff --git a/utilsdeno/detect-any.ts b/utilsdeno/detect-any.ts new file mode 100644 index 0000000..f56e11a --- /dev/null +++ b/utilsdeno/detect-any.ts @@ -0,0 +1,49 @@ +// Detect explicit usage of 'any' type in the codebase. +// Use this script by running `deno run --allow-read --allow-env detect-any.ts` from the utilsdeno directory. +import { Project, SyntaxKind } from "npm:ts-morph"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); +project.addSourceFilesAtPaths("../src/**/*.ts"); +project.addSourceFilesAtPaths("../src/**/*.svelte"); + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, ".."); + +function toPosixPath(filePath: string): string { + return filePath.replace(/\\/g, "/"); +} + +const posixProjectRoot = toPosixPath(projectRoot); +const posixSrc = `${posixProjectRoot}/src`; + +let anyCount = 0; + +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const posixFilePath = toPosixPath(filePath); + + if (!posixFilePath.startsWith(posixSrc)) continue; + if ( + posixFilePath.includes("/_test/") || + posixFilePath.endsWith(".spec.ts") || + posixFilePath.endsWith(".test.ts") + ) { + continue; + } + + const anyNodes = sourceFile.getDescendantsOfKind(SyntaxKind.AnyKeyword); + if (anyNodes.length > 0) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + for (const anyNode of anyNodes) { + const { line } = sourceFile.getLineAndColumnAtPos(anyNode.getStart()); + const lineText = sourceFile.getFullText().split(/\r?\n/)[line - 1]; + console.log(` Line ${line}: ${lineText.trim()}`); + anyCount++; + } + } +} + +console.log(`\nTotal explicit 'any' usages found: ${anyCount}`); diff --git a/utilsdeno/refactor-assertions.ts b/utilsdeno/refactor-assertions.ts new file mode 100644 index 0000000..24d8dc4 --- /dev/null +++ b/utilsdeno/refactor-assertions.ts @@ -0,0 +1,96 @@ +// Refactor unnecessary type assertions (e.g. `expr as Type` where type of `expr` is already `Type`). +// Use this script by running `deno run --allow-read --allow-write --allow-env refactor-assertions.ts` from the utilsdeno directory. +// Run with --run flag to apply changes. +import { Project, SyntaxKind, Node } from "npm:ts-morph"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const isDryRun = !Deno.args.includes("--run"); + +if (isDryRun) { + console.log("=== DRY RUN MODE ==="); + console.log( + "To apply changes, run with: deno run --allow-read --allow-write --allow-env refactor-assertions.ts --run\n" + ); +} else { + console.log("=== RUN MODE: WILL MODIFY FILES ==="); +} + +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); +project.addSourceFilesAtPaths("../src/**/*.ts"); + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, ".."); + +function toPosixPath(filePath: string): string { + return filePath.replace(/\\/g, "/"); +} + +const posixProjectRoot = toPosixPath(projectRoot); +const posixSrc = `${posixProjectRoot}/src`; + +let modifiedFilesCount = 0; + +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const posixFilePath = toPosixPath(filePath); + + if (!posixFilePath.startsWith(posixSrc)) continue; + if (posixFilePath.includes("/_test/") || posixFilePath.endsWith(".spec.ts") || posixFilePath.endsWith(".test.ts")) continue; + + // Find AsExpression (expr as Type) and TypeAssertion (expr) + const asExpressions = sourceFile.getDescendantsOfKind(SyntaxKind.AsExpression); + const typeAssertions = sourceFile.getDescendantsOfKind(SyntaxKind.TypeAssertion); + const allAssertions = [...asExpressions, ...typeAssertions]; + + const nodesToRemove: Node[] = []; + + for (const node of allAssertions) { + const expr = node.getExpression(); + const exprType = expr.getType(); + const assertType = node.getType(); + + // Skip `as const` or `` assertions + const typeNode = (node as any).getTypeNode?.(); + if (typeNode && typeNode.getText() === "const") { + continue; + } + + // Compare type texts to find redundant assertions + const exprTypeText = exprType.getText(); + const assertTypeText = assertType.getText(); + + if (exprTypeText === assertTypeText) { + nodesToRemove.push(node); + } + } + + if (nodesToRemove.length > 0) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + + // Reverse nodes order to keep indices/references valid when modifying + const sortedNodes = [...nodesToRemove].sort((a, b) => b.getStart() - a.getStart()); + + for (const node of sortedNodes) { + const { line } = sourceFile.getLineAndColumnAtPos(node.getStart()); + const exprText = node.getExpression().getText(); + console.log(` Line ${line}: "${node.getText()}" -> "${exprText}"`); + + if (!isDryRun) { + node.replaceWithText(exprText); + } + } + + modifiedFilesCount++; + } +} + +console.log(`\nTotal files to modify: ${modifiedFilesCount}`); + +if (!isDryRun) { + project.saveSync(); + console.log("All changes successfully saved."); +} else { + console.log("Dry run complete. No changes were written to files."); +} diff --git a/utilsdeno/refactor-globals.ts b/utilsdeno/refactor-globals.ts index 36b75f3..bd368df 100644 --- a/utilsdeno/refactor-globals.ts +++ b/utilsdeno/refactor-globals.ts @@ -65,7 +65,12 @@ for (const sourceFile of project.getSourceFiles()) { } // Exclude unit and integration test files - if (posixFilePath.endsWith(".spec.ts") || posixFilePath.endsWith(".test.ts") || posixFilePath.includes("/_test/")) { + if ( + posixFilePath.endsWith(".spec.ts") || + posixFilePath.endsWith(".test.ts") || + posixFilePath.includes("/_test/") || + posixFilePath.includes("/testdeno/") + ) { continue; } diff --git a/utilsdeno/refactor-styles.ts b/utilsdeno/refactor-styles.ts index 4bdb4c6..c9546d7 100644 --- a/utilsdeno/refactor-styles.ts +++ b/utilsdeno/refactor-styles.ts @@ -100,7 +100,12 @@ for (const sourceFile of project.getSourceFiles()) { } // Exclude unit and integration test files - if (posixFilePath.endsWith(".spec.ts") || posixFilePath.endsWith(".test.ts") || posixFilePath.includes("/_test/")) { + if ( + posixFilePath.endsWith(".spec.ts") || + posixFilePath.endsWith(".test.ts") || + posixFilePath.includes("/_test/") || + posixFilePath.includes("/testdeno/") + ) { continue; } diff --git a/utilsdeno/refactor-unused.ts b/utilsdeno/refactor-unused.ts new file mode 100644 index 0000000..d805c32 --- /dev/null +++ b/utilsdeno/refactor-unused.ts @@ -0,0 +1,138 @@ +// Refactor unused catch variables and unused imports in the codebase. +// Use this script by running `deno run --allow-read --allow-write --allow-env refactor-unused.ts` from the utilsdeno directory. +// Run with --run flag to apply changes. +import { Project, SyntaxKind, Node } from "npm:ts-morph"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const isDryRun = !Deno.args.includes("--run"); + +if (isDryRun) { + console.log("=== DRY RUN MODE ==="); + console.log( + "To apply changes, run with: deno run --allow-read --allow-write --allow-env refactor-unused.ts --run\n" + ); +} else { + console.log("=== RUN MODE: WILL MODIFY FILES ==="); +} + +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); +// Only add .ts files to avoid Svelte-markup-blindness references +project.addSourceFilesAtPaths("../src/**/*.ts"); + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, ".."); + +function toPosixPath(filePath: string): string { + return filePath.replace(/\\/g, "/"); +} + +const posixProjectRoot = toPosixPath(projectRoot); +const posixSrc = `${posixProjectRoot}/src`; + +let modifiedFilesCount = 0; + +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const posixFilePath = toPosixPath(filePath); + + if (!posixFilePath.startsWith(posixSrc)) continue; + if (posixFilePath.includes("/_test/") || posixFilePath.endsWith(".spec.ts") || posixFilePath.endsWith(".test.ts")) continue; + + let fileModified = false; + + // 1. Find unused catch variables: catch (error) -> catch + const catchClauses = sourceFile.getDescendantsOfKind(SyntaxKind.CatchClause); + const catchVarsToRemove: Node[] = []; + + for (const catchClause of catchClauses) { + const varDec = catchClause.getVariableDeclaration(); + if (varDec) { + const varName = varDec.getName(); + // Count references within the catch clause itself + const count = catchClause.getDescendantsOfKind(SyntaxKind.Identifier) + .filter((id) => id.getText() === varName) + .length; + if (count === 1) { // Only the declaration itself + catchVarsToRemove.push(varDec); + } + } + } + + if (catchVarsToRemove.length > 0) { + if (!fileModified) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + fileModified = true; + } + for (const varDec of catchVarsToRemove) { + const { line } = sourceFile.getLineAndColumnAtPos(varDec.getStart()); + console.log(` Line ${line}: Unused catch variable "${varDec.getText()}" -> Remove it`); + if (!isDryRun) { + varDec.remove(); + } + } + } + + // 2. Find unused named imports + const importDeclarations = sourceFile.getImportDeclarations(); + const importsToRemove: { namedImport: any; impDecl: any }[] = []; + const modifiedDecls = new Set(); + + for (const impDecl of importDeclarations) { + const namedImports = impDecl.getNamedImports(); + if (namedImports.length === 0) continue; + + for (const namedImport of namedImports) { + const importName = namedImport.getAliasNode()?.getText() ?? namedImport.getName(); + // Count references in the entire file + const count = sourceFile.getDescendantsOfKind(SyntaxKind.Identifier) + .filter((id) => id.getText() === importName) + .length; + if (count === 1) { // Only the import specifier itself + importsToRemove.push({ namedImport, impDecl }); + } + } + } + + if (importsToRemove.length > 0) { + if (!fileModified) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + fileModified = true; + } + for (const { namedImport, impDecl } of importsToRemove) { + const { line } = sourceFile.getLineAndColumnAtPos(namedImport.getStart()); + console.log(` Line ${line}: Unused named import "${namedImport.getText()}" -> Remove it`); + if (!isDryRun) { + namedImport.remove(); + modifiedDecls.add(impDecl); + } + } + } + + // 3. Clean up empty import declarations (only those we actually modified) + if (!isDryRun && fileModified && modifiedDecls.size > 0) { + for (const impDecl of modifiedDecls) { + if ( + impDecl.getNamedImports().length === 0 && + !impDecl.getDefaultImport() && + !impDecl.getNamespaceImport() + ) { + impDecl.remove(); + } + } + } + + if (fileModified) { + modifiedFilesCount++; + } +} + +console.log(`\nTotal files to modify: ${modifiedFilesCount}`); + +if (!isDryRun) { + project.saveSync(); + console.log("All changes successfully saved."); +} else { + console.log("Dry run complete. No changes were written to files."); +} From 88a8bcbd5ad798097067d57412737d6aa122e199 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 06:15:25 +0100 Subject: [PATCH 5/8] barrel node specific modules to summarise the warnings --- .../cli/adapters/NodeConversionAdapter.ts | 2 +- .../cli/adapters/NodeFileSystemAdapter.ts | 3 +- src/apps/cli/adapters/NodePathAdapter.ts | 2 +- src/apps/cli/adapters/NodeStorageAdapter.ts | 3 +- src/apps/cli/adapters/NodeVaultAdapter.ts | 3 +- src/apps/cli/commands/runCommand.ts | 3 +- src/apps/cli/commands/utils.ts | 3 +- src/apps/cli/main.ts | 8 +- .../managers/CLIStorageEventManagerAdapter.ts | 3 +- src/apps/cli/node-compat.ts | 12 ++ src/apps/cli/serviceModules/IgnoreRules.ts | 4 +- .../cli/services/NodeKeyValueDBService.ts | 3 +- src/apps/cli/services/NodeLocalStorage.ts | 3 +- src/apps/cli/services/NodeServiceHub.ts | 2 +- utilsdeno/README.md | 12 ++ utilsdeno/refactor-cli-node-imports.ts | 132 ++++++++++++++++++ 16 files changed, 169 insertions(+), 29 deletions(-) create mode 100644 src/apps/cli/node-compat.ts create mode 100644 utilsdeno/refactor-cli-node-imports.ts diff --git a/src/apps/cli/adapters/NodeConversionAdapter.ts b/src/apps/cli/adapters/NodeConversionAdapter.ts index 044abe2..be410e8 100644 --- a/src/apps/cli/adapters/NodeConversionAdapter.ts +++ b/src/apps/cli/adapters/NodeConversionAdapter.ts @@ -1,7 +1,7 @@ -import * as path from "path"; import type { UXFileInfoStub, UXFolderInfo } from "@lib/common/types"; import type { IConversionAdapter } from "@lib/serviceModules/adapters"; import type { NodeFile, NodeFolder } from "./NodeTypes"; +import { path } from "../node-compat"; /** * Conversion adapter implementation for Node.js diff --git a/src/apps/cli/adapters/NodeFileSystemAdapter.ts b/src/apps/cli/adapters/NodeFileSystemAdapter.ts index 34d434e..94662e8 100644 --- a/src/apps/cli/adapters/NodeFileSystemAdapter.ts +++ b/src/apps/cli/adapters/NodeFileSystemAdapter.ts @@ -1,5 +1,3 @@ -import * as fs from "fs/promises"; -import * as path from "path"; import type { FilePath, UXStat } from "@lib/common/types"; import type { IFileSystemAdapter } from "@lib/serviceModules/adapters"; import { NodePathAdapter } from "./NodePathAdapter"; @@ -8,6 +6,7 @@ import { NodeConversionAdapter } from "./NodeConversionAdapter"; import { NodeStorageAdapter } from "./NodeStorageAdapter"; import { NodeVaultAdapter } from "./NodeVaultAdapter"; import type { NodeFile, NodeFolder, NodeStat } from "./NodeTypes"; +import { fsPromises as fs, path } from "../node-compat"; /** * Complete file system adapter implementation for Node.js diff --git a/src/apps/cli/adapters/NodePathAdapter.ts b/src/apps/cli/adapters/NodePathAdapter.ts index fdad06a..1a30fbc 100644 --- a/src/apps/cli/adapters/NodePathAdapter.ts +++ b/src/apps/cli/adapters/NodePathAdapter.ts @@ -1,7 +1,7 @@ -import * as path from "path"; import type { FilePath } from "@lib/common/types"; import type { IPathAdapter } from "@lib/serviceModules/adapters"; import type { NodeFile } from "./NodeTypes"; +import { path } from "../node-compat"; /** * Path adapter implementation for Node.js diff --git a/src/apps/cli/adapters/NodeStorageAdapter.ts b/src/apps/cli/adapters/NodeStorageAdapter.ts index 1ed5685..c6f4992 100644 --- a/src/apps/cli/adapters/NodeStorageAdapter.ts +++ b/src/apps/cli/adapters/NodeStorageAdapter.ts @@ -1,8 +1,7 @@ -import * as fs from "fs/promises"; -import * as path from "path"; import type { UXDataWriteOptions } from "@lib/common/types"; import type { IStorageAdapter } from "@lib/serviceModules/adapters"; import type { NodeStat } from "./NodeTypes"; +import { fsPromises as fs, path } from "../node-compat"; /** * Storage adapter implementation for Node.js diff --git a/src/apps/cli/adapters/NodeVaultAdapter.ts b/src/apps/cli/adapters/NodeVaultAdapter.ts index 99e8d93..deb44e5 100644 --- a/src/apps/cli/adapters/NodeVaultAdapter.ts +++ b/src/apps/cli/adapters/NodeVaultAdapter.ts @@ -1,8 +1,7 @@ -import * as fs from "fs/promises"; -import * as path from "path"; import type { UXDataWriteOptions } from "@lib/common/types"; import type { IVaultAdapter } from "@lib/serviceModules/adapters"; import type { NodeFile, NodeFolder } from "./NodeTypes"; +import { fsPromises as fs, path } from "../node-compat"; /** * Vault adapter implementation for Node.js diff --git a/src/apps/cli/commands/runCommand.ts b/src/apps/cli/commands/runCommand.ts index 9ce1a2f..9f09bcc 100644 --- a/src/apps/cli/commands/runCommand.ts +++ b/src/apps/cli/commands/runCommand.ts @@ -1,5 +1,3 @@ -import * as fs from "fs/promises"; -import * as path from "path"; import { decodeSettingsFromSetupURI } from "@lib/API/processSetting"; import { configURIBase } from "@lib/common/models/shared.const"; import { @@ -19,6 +17,7 @@ import { collectPeers, openP2PHost, parseTimeoutSeconds, syncWithPeer } from "./ import { performFullScan } from "@lib/serviceFeatures/offlineScanner"; import { UnresolvedErrorManager } from "@lib/services/base/UnresolvedErrorManager"; import { compatGlobal } from "@lib/common/coreEnvFunctions.ts"; +import { fsPromises as fs, path } from "../node-compat"; function redactConnectionString(uri: string): string { return uri.replace(/\/\/([^@/]+)@/u, "//***@"); diff --git a/src/apps/cli/commands/utils.ts b/src/apps/cli/commands/utils.ts index b596a71..abf6b19 100644 --- a/src/apps/cli/commands/utils.ts +++ b/src/apps/cli/commands/utils.ts @@ -1,5 +1,4 @@ -import * as path from "path"; -import * as readline from "node:readline/promises"; +import { path, readline } from "../node-compat"; export function toArrayBuffer(data: Buffer): ArrayBuffer { return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength) as ArrayBuffer; diff --git a/src/apps/cli/main.ts b/src/apps/cli/main.ts index e6d878f..cc63a6b 100644 --- a/src/apps/cli/main.ts +++ b/src/apps/cli/main.ts @@ -1,10 +1,3 @@ -/** - * Self-hosted LiveSync CLI - * Command-line version of Self-hosted LiveSync plugin for syncing vaults without Obsidian - */ - -import * as fs from "fs/promises"; -import * as path from "path"; import { NodeServiceContext, NodeServiceHub } from "./services/NodeServiceHub"; import { configureNodeLocalStorage, ensureGlobalNodeLocalStorage } from "./services/NodeLocalStorage"; import { LiveSyncBaseCore } from "@/LiveSyncBaseCore"; @@ -27,6 +20,7 @@ import { getPathFromUXFileInfo } from "@lib/common/typeUtils"; import { stripAllPrefixes } from "@lib/string_and_binary/path"; import { IgnoreRules } from "./serviceModules/IgnoreRules"; import { useP2PReplicatorFeature } from "@lib/replication/trystero/useP2PReplicatorFeature"; +import { fsPromises as fs, path } from "./node-compat"; const SETTINGS_FILE = ".livesync/settings.json"; ensureGlobalNodeLocalStorage(); diff --git a/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts b/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts index 64452a5..69bbc7e 100644 --- a/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts +++ b/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts @@ -12,10 +12,9 @@ import type { import type { FileEventItemSentinel } from "@lib/managers/StorageEventManager"; import type { NodeFile, NodeFolder } from "@/apps/cli/adapters/NodeTypes"; import type { Stats } from "fs"; -import * as fs from "fs/promises"; -import * as path from "path"; import { watch as chokidarWatch, type FSWatcher } from "chokidar"; import type { IgnoreRules } from "@/apps/cli/serviceModules/IgnoreRules"; +import { fsPromises as fs, path } from "../node-compat"; /** * CLI-specific type guard adapter diff --git a/src/apps/cli/node-compat.ts b/src/apps/cli/node-compat.ts new file mode 100644 index 0000000..cf8338a --- /dev/null +++ b/src/apps/cli/node-compat.ts @@ -0,0 +1,12 @@ +/* eslint-disable obsidianmd/no-nodejs-builtins */ +import * as nodeFs from "node:fs"; +import * as nodeFsPromises from "node:fs/promises"; +import * as nodePath from "node:path"; +import * as nodeReadlinePromises from "node:readline/promises"; + +export { + nodeFs as fs, + nodeFsPromises as fsPromises, + nodePath as path, + nodeReadlinePromises as readline, +}; diff --git a/src/apps/cli/serviceModules/IgnoreRules.ts b/src/apps/cli/serviceModules/IgnoreRules.ts index 0b7fc41..62e0b79 100644 --- a/src/apps/cli/serviceModules/IgnoreRules.ts +++ b/src/apps/cli/serviceModules/IgnoreRules.ts @@ -1,7 +1,5 @@ -import * as fs from "fs/promises"; -import * as path from "path"; - import { minimatch } from "minimatch"; +import { fsPromises as fs, path } from "../node-compat"; /** * Loads and evaluates ignore rules from `.livesync/ignore` inside the vault. diff --git a/src/apps/cli/services/NodeKeyValueDBService.ts b/src/apps/cli/services/NodeKeyValueDBService.ts index 10b1626..87f54c5 100644 --- a/src/apps/cli/services/NodeKeyValueDBService.ts +++ b/src/apps/cli/services/NodeKeyValueDBService.ts @@ -7,8 +7,7 @@ import type { InjectableDatabaseEventService } from "@lib/services/implements/in import type { IVaultService } from "@lib/services/base/IService"; import type { SimpleStore } from "octagonal-wheels/databases/SimpleStoreBase"; import { createInstanceLogFunction } from "@lib/services/lib/logUtils"; -import * as nodeFs from "node:fs"; -import * as nodePath from "node:path"; +import { fs as nodeFs, path as nodePath } from "../node-compat"; const NODE_KV_TYPED_KEY = "__nodeKvType"; const NODE_KV_VALUES_KEY = "values"; diff --git a/src/apps/cli/services/NodeLocalStorage.ts b/src/apps/cli/services/NodeLocalStorage.ts index 3e96822..a4ba07d 100644 --- a/src/apps/cli/services/NodeLocalStorage.ts +++ b/src/apps/cli/services/NodeLocalStorage.ts @@ -1,5 +1,4 @@ -import * as nodeFs from "node:fs"; -import * as nodePath from "node:path"; +import { fs as nodeFs, path as nodePath } from "../node-compat"; type LocalStorageShape = { getItem(key: string): string | null; diff --git a/src/apps/cli/services/NodeServiceHub.ts b/src/apps/cli/services/NodeServiceHub.ts index 2aaa093..770d3bb 100644 --- a/src/apps/cli/services/NodeServiceHub.ts +++ b/src/apps/cli/services/NodeServiceHub.ts @@ -1,6 +1,5 @@ import type { AppLifecycleService, AppLifecycleServiceDependencies } from "@lib/services/base/AppLifecycleService"; import { ServiceContext } from "@lib/services/base/ServiceBase"; -import * as nodePath from "node:path"; import { ConfigServiceBrowserCompat } from "@lib/services/implements/browser/ConfigServiceBrowserCompat"; import { SvelteDialogManagerBase, type ComponentHasResult } from "@lib/services/implements/base/SvelteDialog"; import { UIService } from "@lib/services/implements/base/UIService"; @@ -25,6 +24,7 @@ import { NodeKeyValueDBService } from "./NodeKeyValueDBService"; import { NodeSettingService } from "./NodeSettingService"; import { DatabaseService } from "@lib/services/base/DatabaseService"; import type { ObsidianLiveSyncSettings } from "@lib/common/types"; +import { path as nodePath } from "../node-compat"; export class NodeServiceContext extends ServiceContext { databasePath: string; diff --git a/utilsdeno/README.md b/utilsdeno/README.md index 70d3a83..dc46fc4 100644 --- a/utilsdeno/README.md +++ b/utilsdeno/README.md @@ -93,6 +93,18 @@ Ensures that all import statements are standardised across the codebase, resolvi deno run --allow-read --allow-write --allow-env normalise-imports.ts ``` +### 7. CLI Node.js Import Redirection (`refactor-cli-node-imports.ts`) +Redirects direct Node.js built-in module imports (like `fs` and `path`) within the CLI codebase to use a single barrel file (`src/apps/cli/node-compat.ts`). + +* **Actions**: + * Finds imports of Node.js built-in APIs (`fs`, `fs/promises`, `path`, and `readline/promises`) in CLI source files. + * Replaces them with imports from the local `node-compat.ts` barrel file. + * This eliminates duplicate browser-targeted linter warnings on Node.js built-ins in the CLI workspace, keeping linter ignores consolidated. +* **Command**: + ```bash + deno run --allow-read --allow-write --allow-env refactor-cli-node-imports.ts + ``` + --- ## Safety and Exclusions diff --git a/utilsdeno/refactor-cli-node-imports.ts b/utilsdeno/refactor-cli-node-imports.ts new file mode 100644 index 0000000..1a828ce --- /dev/null +++ b/utilsdeno/refactor-cli-node-imports.ts @@ -0,0 +1,132 @@ +// Refactor Node.js imports in the CLI application to use the barrel compatibility file. +// Use this script by running `deno run --allow-read --allow-write --allow-env refactor-cli-node-imports.ts` from the utilsdeno directory. +// Run with --run flag to apply changes. +import { Project, SyntaxKind, Node } from "npm:ts-morph"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const isDryRun = !Deno.args.includes("--run"); + +if (isDryRun) { + console.log("=== DRY RUN MODE ==="); + console.log( + "To apply changes, run with: deno run --allow-read --allow-write --allow-env refactor-cli-node-imports.ts --run\n" + ); +} else { + console.log("=== RUN MODE: WILL MODIFY FILES ==="); +} + +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); +project.addSourceFilesAtPaths("../src/apps/cli/**/*.ts"); + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, ".."); +const nodeCompatPath = path.resolve(projectRoot, "src", "apps", "cli", "node-compat.ts"); + +function toPosixPath(filePath: string): string { + return filePath.replace(/\\/g, "/"); +} + +const posixProjectRoot = toPosixPath(projectRoot); +const posixSrc = `${posixProjectRoot}/src`; + +function getRelativeImportPath(fromFile: string, toFile: string): string { + let rel = path.relative(path.dirname(fromFile), toFile); + rel = rel.replace(/\\/g, "/"); + if (!rel.startsWith(".") && !rel.startsWith("/")) { + rel = "./" + rel; + } + if (rel.endsWith(".ts")) { + rel = rel.slice(0, -3); + } + return rel; +} + +let modifiedFilesCount = 0; + +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const posixFilePath = toPosixPath(filePath); + + // Only process CLI source files under src/apps/cli/ + if (!posixFilePath.includes("/src/apps/cli/")) continue; + if ( + posixFilePath.endsWith("node-compat.ts") || + posixFilePath.endsWith("vite.config.ts") || + posixFilePath.endsWith(".spec.ts") || + posixFilePath.endsWith(".test.ts") || + posixFilePath.includes("/_test/") || + posixFilePath.includes("/testdeno/") || + posixFilePath.includes("/test/") + ) { + continue; + } + + const importDeclarations = sourceFile.getImportDeclarations(); + const targetImports: any[] = []; + const namedImportsToAdd: string[] = []; + + for (const impDecl of importDeclarations) { + const specifier = impDecl.getModuleSpecifierValue(); + + // Check if it's a Node.js built-in module we want to redirect + let exportedName = ""; + if (specifier === "fs/promises" || specifier === "node:fs/promises") { + exportedName = "fsPromises"; + } else if (specifier === "fs" || specifier === "node:fs") { + exportedName = "fs"; + } else if (specifier === "path" || specifier === "node:path") { + exportedName = "path"; + } else if (specifier === "node:readline/promises") { + exportedName = "readline"; + } + + if (exportedName) { + const localName = impDecl.getNamespaceImport()?.getText() || impDecl.getDefaultImport()?.getText(); + if (localName) { + targetImports.push({ impDecl, exportedName, localName }); + } + } + } + + if (targetImports.length > 0) { + console.log(`File: ${posixFilePath.slice(posixProjectRoot.length + 1)}`); + + for (const { impDecl, exportedName, localName } of targetImports) { + const { line } = sourceFile.getLineAndColumnAtPos(impDecl.getStart()); + console.log(` Line ${line}: Redirecting "${impDecl.getText()}"`); + + if (exportedName === localName) { + namedImportsToAdd.push(exportedName); + } else { + namedImportsToAdd.push(`${exportedName} as ${localName}`); + } + + if (!isDryRun) { + impDecl.remove(); + } + } + + const relImportPath = getRelativeImportPath(filePath, nodeCompatPath); + console.log(` Adding: import { ${namedImportsToAdd.join(", ")} } from "${relImportPath}"`); + + if (!isDryRun) { + sourceFile.addImportDeclaration({ + namedImports: namedImportsToAdd, + moduleSpecifier: relImportPath, + }); + } + + modifiedFilesCount++; + } +} + +console.log(`\nTotal files to modify: ${modifiedFilesCount}`); + +if (!isDryRun) { + project.saveSync(); + console.log("All changes successfully saved."); +} else { + console.log("Dry run complete. No changes were written to files."); +} From dae8443fe8adfae72b44c8531c8e8c9993338486 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 06:35:14 +0100 Subject: [PATCH 6/8] update more deps --- package-lock.json | 249 +++++++++++++++++++++++-------------------- package.json | 2 +- src/apps/cli/main.ts | 20 ++-- 3 files changed, 147 insertions(+), 124 deletions(-) diff --git a/package-lock.json b/package-lock.json index ca96fa3..4cedf2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "diff-match-patch": "^1.0.5", "fflate": "^0.8.2", "idb": "^8.0.3", - "markdown-it": "^14.1.1", + "markdown-it": "^14.2.0", "minimatch": "^10.2.2", "obsidian": "^1.12.3", "octagonal-wheels": "^0.1.46", @@ -949,13 +949,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", - "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", + "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -971,9 +971,9 @@ "license": "MIT" }, "node_modules/@babel/compat-data": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", - "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", "dev": true, "license": "MIT", "engines": { @@ -981,22 +981,22 @@ } }, "node_modules/@babel/core": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", - "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-module-transforms": "^7.28.6", - "@babel/helpers": "^7.28.6", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/traverse": "^7.29.0", - "@babel/types": "^7.29.0", + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -1036,14 +1036,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.29.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", - "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.0", - "@babel/types": "^7.29.0", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -1053,14 +1053,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", - "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.28.6", - "@babel/helper-validator-option": "^7.27.1", + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -1090,9 +1090,9 @@ } }, "node_modules/@babel/helper-globals": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", "dev": true, "license": "MIT", "engines": { @@ -1100,29 +1100,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", - "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.28.6", - "@babel/types": "^7.28.6" + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", - "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.28.6", - "@babel/helper-validator-identifier": "^7.28.5", - "@babel/traverse": "^7.28.6" + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -1132,9 +1132,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", "dev": true, "license": "MIT", "engines": { @@ -1142,9 +1142,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", "dev": true, "license": "MIT", "engines": { @@ -1152,9 +1152,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", "dev": true, "license": "MIT", "engines": { @@ -1162,27 +1162,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", - "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0" + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", - "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.0" + "@babel/types": "^7.29.7" }, "bin": { "parser": "bin/babel-parser.js" @@ -1201,33 +1201,33 @@ } }, "node_modules/@babel/template": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", - "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/parser": "^7.28.6", - "@babel/types": "^7.28.6" + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", - "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0", + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", "debug": "^4.3.1" }, "engines": { @@ -1235,14 +1235,14 @@ } }, "node_modules/@babel/types": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", - "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -6122,9 +6122,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.10", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.10.tgz", - "integrity": "sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==", + "version": "2.10.37", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.37.tgz", + "integrity": "sha512-girxaJ7WZssDOFhzCGZTDKoTa1gk6A1TbflaYTpykLJ4UU9Fz9kx1aREM8JCuoVHbL8X8T/mJg7w2oYSq72Oig==", "dev": true, "license": "Apache-2.0", "bin": { @@ -6183,9 +6183,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", - "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "dev": true, "funding": [ { @@ -6204,11 +6204,11 @@ "license": "MIT", "peer": true, "dependencies": { - "baseline-browser-mapping": "^2.9.0", - "caniuse-lite": "^1.0.30001759", - "electron-to-chromium": "^1.5.263", - "node-releases": "^2.0.27", - "update-browserslist-db": "^1.2.0" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -6328,9 +6328,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001781", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001781.tgz", - "integrity": "sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw==", + "version": "1.0.30001799", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz", + "integrity": "sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==", "dev": true, "funding": [ { @@ -7209,9 +7209,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.325", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.325.tgz", - "integrity": "sha512-PwfIw7WQSt3xX7yOf5OE/unLzsK9CaN2f/FvV3WjPR1Knoc1T9vePRVV4W1EM301JzzysK51K7FNKcusCr0zYA==", + "version": "1.5.375", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.375.tgz", + "integrity": "sha512-ZWP5eB4BVPW/ZYo9252hQZHZ5XavtsTgpbhcmMmRwymavC5AsLWQWBPaKMeNd2LW0KGby5HPXvj7+sr4ta5j/Q==", "dev": true, "license": "ISC" }, @@ -10777,9 +10777,19 @@ "license": "MIT" }, "node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.1.tgz", + "integrity": "sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" @@ -10974,14 +10984,24 @@ } }, "node_modules/markdown-it": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", - "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.2.0.tgz", + "integrity": "sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", - "linkify-it": "^5.0.0", + "linkify-it": "^5.0.1", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" @@ -11273,11 +11293,14 @@ } }, "node_modules/node-releases": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", - "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "version": "2.0.47", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz", + "integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/normalize-path": { "version": "3.0.0", @@ -16268,9 +16291,9 @@ "license": "BSD" }, "node_modules/ws": { - "version": "8.20.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.1.tgz", - "integrity": "sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 98bc88b..fb613b1 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "diff-match-patch": "^1.0.5", "fflate": "^0.8.2", "idb": "^8.0.3", - "markdown-it": "^14.1.1", + "markdown-it": "^14.2.0", "minimatch": "^10.2.2", "obsidian": "^1.12.3", "octagonal-wheels": "^0.1.46", diff --git a/src/apps/cli/main.ts b/src/apps/cli/main.ts index cc63a6b..3fc94e9 100644 --- a/src/apps/cli/main.ts +++ b/src/apps/cli/main.ts @@ -20,7 +20,7 @@ import { getPathFromUXFileInfo } from "@lib/common/typeUtils"; import { stripAllPrefixes } from "@lib/string_and_binary/path"; import { IgnoreRules } from "./serviceModules/IgnoreRules"; import { useP2PReplicatorFeature } from "@lib/replication/trystero/useP2PReplicatorFeature"; -import { fsPromises as fs, path } from "./node-compat"; +import { fsPromises as fs, path, fs as fsSync } from "./node-compat"; const SETTINGS_FILE = ".livesync/settings.json"; ensureGlobalNodeLocalStorage(); @@ -232,8 +232,8 @@ async function createDefaultSettingsFile(options: CLIOptions) { const targetPath = options.settingsPath ? path.resolve(options.settingsPath) : options.commandArgs[0] - ? path.resolve(options.commandArgs[0]) - : path.resolve(process.cwd(), "data.json"); + ? path.resolve(options.commandArgs[0]) + : path.resolve(process.cwd(), "data.json"); if (!options.force) { try { @@ -323,8 +323,8 @@ export async function main() { options.command === "mirror" && options.commandArgs[0] ? path.resolve(options.commandArgs[0]) : options.vaultPath - ? path.resolve(options.vaultPath) - : databasePath!; + ? path.resolve(options.vaultPath) + : databasePath!; // Check if vault directory exists try { @@ -479,8 +479,8 @@ export async function main() { } }; - process.on("SIGINT", () => shutdown("SIGINT")); - process.on("SIGTERM", () => shutdown("SIGTERM")); + process.on("SIGINT", () => void shutdown("SIGINT")); + process.on("SIGTERM", () => void shutdown("SIGTERM")); // Save the settings file before any lifecycle events can mutate and persist them. // suspendAllSync and other lifecycle hooks clobber sync settings in memory, and @@ -493,8 +493,8 @@ export async function main() { if (settingsBackup) { const tmpPath = settingsPath + ".tmp"; try { - require("fs").writeFileSync(tmpPath, settingsBackup, "utf-8"); - require("fs").renameSync(tmpPath, settingsPath); + fsSync.writeFileSync(tmpPath, settingsBackup, "utf-8"); + fsSync.renameSync(tmpPath, settingsPath); } catch (err) { console.error("[Settings] Failed to restore settings on exit:", err); } @@ -557,7 +557,7 @@ export async function main() { if (options.command === "daemon" && result) { // Keep the process running - await new Promise(() => {}); + await new Promise(() => { }); } else { await core.services.control.onUnload(); } From 93dc03e86f4a197a8a32285e330830afdcb9c0ca Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 10:05:45 +0100 Subject: [PATCH 7/8] remove unused dependencies, update some dependencies --- package-lock.json | 1922 +++++++---------- package.json | 15 +- src/apps/cli/entrypoint.ts | 1 + .../managers/CLIStorageEventManagerAdapter.ts | 5 +- src/apps/cli/node-compat.ts | 3 +- src/apps/cli/package.json | 6 +- src/apps/webapp/package.json | 8 +- src/apps/webpeer/package.json | 8 +- 8 files changed, 816 insertions(+), 1152 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4cedf2b..bf4ece1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,8 +27,8 @@ "fflate": "^0.8.2", "idb": "^8.0.3", "markdown-it": "^14.2.0", - "minimatch": "^10.2.2", - "obsidian": "^1.12.3", + "minimatch": "^10.2.5", + "obsidian": "^1.13.1", "octagonal-wheels": "^0.1.46", "qrcode-generator": "^1.4.4", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" @@ -37,7 +37,7 @@ "@dword-design/eslint-plugin-import-alias": "^8.1.8", "@eslint/js": "^9.39.3", "@playwright/test": "^1.58.2", - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "@tsconfig/svelte": "^5.0.8", "@types/deno": "^2.5.0", "@types/diff-match-patch": "^1.0.36", @@ -52,7 +52,6 @@ "@types/pouchdb-mapreduce": "^6.1.10", "@types/pouchdb-replication": "^6.4.7", "@types/transform-pouch": "^1.0.6", - "@typescript-eslint/eslint-plugin": "8.56.1", "@typescript-eslint/parser": "8.56.1", "@vitest/browser": "^4.1.8", "@vitest/browser-playwright": "^4.1.8", @@ -63,7 +62,7 @@ "esbuild-svelte": "^0.9.4", "eslint": "^9.39.3", "eslint-plugin-obsidianmd": "^0.3.0", - "eslint-plugin-svelte": "^3.15.0", + "eslint-plugin-svelte": "^3.19.0", "events": "^3.3.0", "globals": "^14.0.0", "playwright": "^1.58.2", @@ -81,7 +80,7 @@ "pouchdb-utils": "^9.0.0", "prettier": "3.8.1", "rollup-plugin-copy": "^3.5.0", - "svelte": "5.41.1", + "svelte": "5.56.3", "svelte-check": "^4.6.0", "svelte-eslint-parser": "^1.8.0", "svelte-preprocess": "^6.0.3", @@ -91,7 +90,7 @@ "tsx": "^4.21.0", "typescript": "5.9.3", "typescript-eslint": "^8.61.0", - "vite": "^7.3.1", + "vite": "^8.0.16", "vitest": "^4.1.8", "webdriverio": "^9.27.0", "yaml": "^2.8.2" @@ -1352,158 +1351,15 @@ } } }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/project-service": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.1.tgz", - "integrity": "sha512-PrC4JYGmR241lYnfhmKGTXkFqv8+ymbTFgSAY0fVXpY82/QkMw5TZPl+vGzuDDU2QYJk9fIDOBTntF+yDv9LEA==", + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.61.1", - "@typescript-eslint/types": "^8.61.1", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/scope-manager": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.1.tgz", - "integrity": "sha512-L2bdIeoQS8FlKAvONAr20w6OcLXeB+qiDKbAooS9A0Ben+iSIkBef0FxqwKWYqt5sa0i4KJtxVyVmhMylKzF5w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/visitor-keys": "8.61.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.1.tgz", - "integrity": "sha512-UN/H4di+OO7EWx2ovME+8t31YO+KVnK0RRKEHR3kOt21/Ay8BOq3M1OMvWs5vNiqcFCYGYoxK3MXPZzmMUE+yg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/types": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.1.tgz", - "integrity": "sha512-G+CRlPqLv7Bz1IZVs03x5K59F1veqL0EJUROAdGhKsEq8qOiRiZbI+HUojPq5l0fEGOKModD9br6lObhB8zkoA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.1.tgz", - "integrity": "sha512-u+oQD3BqYWPc8YV9Zab4vaJElJuwOLPRc10Jm1o/qS+6Qwen14HCWwx0Seo4LnSn2wxea2Ik8DxPt2/FHmuhrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.61.1", - "@typescript-eslint/tsconfig-utils": "8.61.1", - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/visitor-keys": "8.61.1", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/utils": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.1.tgz", - "integrity": "sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.61.1", - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/typescript-estree": "8.61.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.1.tgz", - "integrity": "sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.61.1", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@dword-design/eslint-plugin-import-alias/node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "tslib": "^2.4.0" } }, "node_modules/@esbuild/aix-ppc64": { @@ -1863,23 +1719,6 @@ "node": ">=18" } }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", - "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@esbuild/sunos-x64": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", @@ -2559,6 +2398,25 @@ "integrity": "sha512-eFrYUPDVHeuwWHluTG1kwNQUEUcFjVKYwPkU8z9DR1JH3AW7JtJsG9cRVGmwz809kKtGfwGJj58juCZxEvnI/g==", "license": "MIT" }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", + "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, "node_modules/@noble/curves": { "version": "1.9.7", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", @@ -2645,6 +2503,16 @@ "node": ">= 8" } }, + "node_modules/@oxc-project/types": { + "version": "0.133.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", + "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, "node_modules/@peculiar/asn1-cms": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.1.tgz", @@ -2897,24 +2765,10 @@ "bare-path": "^3.0.0" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz", - "integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz", - "integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz", + "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==", "cpu": [ "arm64" ], @@ -2923,12 +2777,15 @@ "optional": true, "os": [ "android" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz", - "integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz", + "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==", "cpu": [ "arm64" ], @@ -2937,12 +2794,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz", - "integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz", + "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==", "cpu": [ "x64" ], @@ -2951,26 +2811,15 @@ "optional": true, "os": [ "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz", - "integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==", - "cpu": [ - "arm64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz", - "integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz", + "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==", "cpu": [ "x64" ], @@ -2979,12 +2828,15 @@ "optional": true, "os": [ "freebsd" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz", - "integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz", + "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==", "cpu": [ "arm" ], @@ -2993,26 +2845,15 @@ "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz", - "integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==", - "cpu": [ - "arm" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz", - "integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz", + "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==", "cpu": [ "arm64" ], @@ -3021,12 +2862,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz", - "integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz", + "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==", "cpu": [ "arm64" ], @@ -3035,40 +2879,15 @@ "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz", - "integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==", - "cpu": [ - "loong64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz", - "integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz", - "integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz", + "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==", "cpu": [ "ppc64" ], @@ -3077,54 +2896,15 @@ "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz", - "integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==", - "cpu": [ - "ppc64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz", - "integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz", - "integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz", - "integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz", + "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==", "cpu": [ "s390x" ], @@ -3133,12 +2913,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz", - "integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz", + "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==", "cpu": [ "x64" ], @@ -3147,12 +2930,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz", - "integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==", + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz", + "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==", "cpu": [ "x64" ], @@ -3161,26 +2947,15 @@ "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz", - "integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==", - "cpu": [ - "x64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz", - "integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==", + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz", + "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==", "cpu": [ "arm64" ], @@ -3189,12 +2964,68 @@ "optional": true, "os": [ "openharmony" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz", - "integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==", + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz", + "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz", + "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==", "cpu": [ "arm64" ], @@ -3203,26 +3034,15 @@ "optional": true, "os": [ "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz", - "integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==", - "cpu": [ - "ia32" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz", - "integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==", + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz", + "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==", "cpu": [ "x64" ], @@ -3231,21 +3051,17 @@ "optional": true, "os": [ "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz", - "integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==", - "cpu": [ - "x64" ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] + "license": "MIT" }, "node_modules/@rtsao/scc": { "version": "1.1.0", @@ -3340,13 +3156,13 @@ } }, "node_modules/@smithy/core": { - "version": "3.24.7", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.7.tgz", - "integrity": "sha512-KoUi4M1f3BG6kzN1FnCwL7oyFptTbyBJKjR6yhSib+JHRdUmM1o+VwsFtJ66NZCkCzVfJMWRHJNo0R0jznp0Pg==", + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.25.0.tgz", + "integrity": "sha512-TTD6el7tvKyafkXBf7XO3jLOE+qVxOTrLjp/fEGiV3BMfUHK/LfdYlQO9YgZvzxC7kqA3H/IhJXNqQgnbgjb7A==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "5.2.0", - "@smithy/types": "^4.14.4", + "@smithy/types": "^4.15.0", "tslib": "^2.6.2" }, "engines": { @@ -3513,12 +3329,12 @@ } }, "node_modules/@smithy/is-array-buffer": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.3.7.tgz", - "integrity": "sha512-AusFkhQbCFK8ucF0RH9ojrWTvE26FgBzJvobi3dY7D/cIw6Mzdz8NwNg/gtQSzSo6JQ5tCaRJyWxM8AL0zm6fQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.4.0.tgz", + "integrity": "sha512-EZ6yOBlyezpi9BaP1rBFL3+2R4oDq0aUlgmrlFRuckVH7UdP4/fnFma1ozc8Td33y7eVY/yHpQVh7phvddZ6Lw==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.7", + "@smithy/core": "^3.25.0", "tslib": "^2.6.2" }, "engines": { @@ -3782,9 +3598,9 @@ } }, "node_modules/@smithy/types": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.4.tgz", - "integrity": "sha512-B2S9+UGm1+/pHkcx3ZoLVX1a+pmSk8rqxRR+ZsNqZaJ5q9FWX9AFGQVM4qG5+OBeQUZVy99HY8HqW8gK/wgXzQ==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.15.0.tgz", + "integrity": "sha512-Z5TAOxygoFvybJV3igo5SloFflSokHx2hu1eFA+DxDTcn+FtKxUSui+rbTRG1pAafMA888Z3MVvCWUuvCrTXjg==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -3846,12 +3662,12 @@ } }, "node_modules/@smithy/util-buffer-from": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.3.7.tgz", - "integrity": "sha512-Ur4edaceoTQZSCi7cLcJfRpw1Kh28pcSVFuOLSrrjppbO3xIMo9Zi0Q0ZfQ0qflMZzB0f5NIBHswBLiFSwzVVg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.4.0.tgz", + "integrity": "sha512-C8u31V1di8HIs8azooCJ4XfG/RwmMZ5rJRfwYd0z/B3Yu1985KWouo9m2WuHNXXXh+5fLi+15Ut8jYlgBWETbA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.7", + "@smithy/core": "^3.25.0", "tslib": "^2.6.2" }, "engines": { @@ -3987,12 +3803,12 @@ } }, "node_modules/@smithy/util-utf8": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.3.7.tgz", - "integrity": "sha512-U2XPgO73I8ef8FP3jRQO4Iiol7chWuv4TD6LxNLvRo/pYwBvbelxLcODkpAA9ek+k23NMgc9NoiVzp8INwogMA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.4.0.tgz", + "integrity": "sha512-dMvQY14daYwEfKR+/ACROrUwJ5onUue7d9o4KJo4gaecn5eVzxlCbSeU9GSh0ojFpIiI1bpnJJxO1wY2VXDEtQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.7", + "@smithy/core": "^3.25.0", "tslib": "^2.6.2" }, "engines": { @@ -4033,9 +3849,9 @@ "license": "MIT" }, "node_modules/@sveltejs/acorn-typescript": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.9.tgz", - "integrity": "sha512-lVJX6qEgs/4DOcRTpo56tmKzVPtoWAaVbL4hfO7t7NVwl9AAXzQR6cihesW1BmNMPl+bK6dreu2sOKBP2Q9CIA==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.10.tgz", + "integrity": "sha512-4WfKk68eTih+MiJD4fSbxN7E8kVBmTMPWHUPYjvl2N0rMs53YLTT8/YjKU5Dtnz5LqDjl7LEw4U7lXR2W3J5WA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4053,43 +3869,23 @@ } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.4.tgz", - "integrity": "sha512-ou/d51QSdTyN26D7h6dSpusAKaZkAiGM55/AKYi+9AGZw7q85hElbjK3kEyzXHhLSnRISHOYzVge6x0jRZ7DXA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-7.1.2.tgz", + "integrity": "sha512-DrUBA2UXRfDmUX/ZTiEopd3X40yavsJF1FX2RygcuIScHL7o5YX1fMvoYnDhjeJQC4weCOklirpNWlcb2NiSeA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^5.0.0", "deepmerge": "^4.3.1", "magic-string": "^0.30.21", "obug": "^2.1.0", - "vitefu": "^1.1.1" + "vitefu": "^1.1.2" }, "engines": { "node": "^20.19 || ^22.12 || >=24" }, "peerDependencies": { - "svelte": "^5.0.0", - "vite": "^6.3.0 || ^7.0.0" - } - }, - "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-5.0.2.tgz", - "integrity": "sha512-TZzRTcEtZffICSAoZGkPSl6Etsj2torOVrx6Uw0KpXxrec9Gg6jFWQ60Q3+LmNGfZSxHRCZL7vXVZIWmuV50Ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "obug": "^2.1.0" - }, - "engines": { - "node": "^20.19 || ^22.12 || >=24" - }, - "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^6.0.0-next.0", - "svelte": "^5.0.0", - "vite": "^6.3.0 || ^7.0.0" + "svelte": "^5.46.4", + "vite": "^8.0.0-beta.7 || ^8.0.0" } }, "node_modules/@tootallnate/quickjs-emscripten": { @@ -4122,6 +3918,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", + "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -4237,9 +4044,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "license": "MIT" }, "node_modules/@types/fs-extra": { @@ -4576,6 +4383,13 @@ "@types/pouchdb-core": "*" } }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/which/-/which-2.0.2.tgz", @@ -4604,52 +4418,12 @@ "@types/node": "*" } }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.56.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz", - "integrity": "sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.56.1", - "@typescript-eslint/type-utils": "8.56.1", - "@typescript-eslint/utils": "8.56.1", - "@typescript-eslint/visitor-keys": "8.56.1", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.56.1", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/@typescript-eslint/parser": { "version": "8.56.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz", "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.56.1", "@typescript-eslint/types": "8.56.1", @@ -4726,31 +4500,6 @@ "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.56.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz", - "integrity": "sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.56.1", - "@typescript-eslint/typescript-estree": "8.56.1", - "@typescript-eslint/utils": "8.56.1", - "debug": "^4.4.3", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, "node_modules/@typescript-eslint/types": { "version": "8.56.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", @@ -4794,16 +4543,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.56.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz", - "integrity": "sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==", + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.1.tgz", + "integrity": "sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.56.1", - "@typescript-eslint/types": "8.56.1", - "@typescript-eslint/typescript-estree": "8.56.1" + "@typescript-eslint/scope-manager": "8.61.1", + "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/typescript-estree": "8.61.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4814,7 +4563,137 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/project-service": { + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.1.tgz", + "integrity": "sha512-PrC4JYGmR241lYnfhmKGTXkFqv8+ymbTFgSAY0fVXpY82/QkMw5TZPl+vGzuDDU2QYJk9fIDOBTntF+yDv9LEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.61.1", + "@typescript-eslint/types": "^8.61.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.1.tgz", + "integrity": "sha512-L2bdIeoQS8FlKAvONAr20w6OcLXeB+qiDKbAooS9A0Ben+iSIkBef0FxqwKWYqt5sa0i4KJtxVyVmhMylKzF5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/visitor-keys": "8.61.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.1.tgz", + "integrity": "sha512-UN/H4di+OO7EWx2ovME+8t31YO+KVnK0RRKEHR3kOt21/Ay8BOq3M1OMvWs5vNiqcFCYGYoxK3MXPZzmMUE+yg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.1.tgz", + "integrity": "sha512-G+CRlPqLv7Bz1IZVs03x5K59F1veqL0EJUROAdGhKsEq8qOiRiZbI+HUojPq5l0fEGOKModD9br6lObhB8zkoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.1.tgz", + "integrity": "sha512-u+oQD3BqYWPc8YV9Zab4vaJElJuwOLPRc10Jm1o/qS+6Qwen14HCWwx0Seo4LnSn2wxea2Ik8DxPt2/FHmuhrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.61.1", + "@typescript-eslint/tsconfig-utils": "8.61.1", + "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/visitor-keys": "8.61.1", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.1.tgz", + "integrity": "sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.61.1", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@typescript-eslint/visitor-keys": { @@ -5598,9 +5477,9 @@ "license": "Python-2.0" }, "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.1.tgz", + "integrity": "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==", "dev": true, "license": "Apache-2.0", "engines": { @@ -6518,6 +6397,13 @@ "dev": true, "license": "MIT" }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -6952,6 +6838,23 @@ "node": ">= 14" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devalue": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.8.1.tgz", + "integrity": "sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==", + "dev": true, + "license": "MIT" + }, "node_modules/diff-match-patch": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", @@ -8093,6 +7996,21 @@ "undici-types": "~5.26.4" } }, + "node_modules/eslint-plugin-obsidianmd/node_modules/obsidian": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.12.3.tgz", + "integrity": "sha512-HxWqe763dOqzXjnNiHmAJTRERN8KILBSqxDSEqbeSr7W8R8Jxezzbca+nz1LiiqXnMpM8lV2jzAezw3CZ4xNUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/codemirror": "5.60.8", + "moment": "2.29.4" + }, + "peerDependencies": { + "@codemirror/state": "6.5.0", + "@codemirror/view": "6.38.6" + } + }, "node_modules/eslint-plugin-obsidianmd/node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", @@ -8223,9 +8141,9 @@ } }, "node_modules/eslint-plugin-svelte": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.16.0.tgz", - "integrity": "sha512-DJXxqpYZUxcE0SfYo8EJzV2ZC+zAD7fJp1n1HwcEMRR1cOEUYvjT9GuzJeNghMjgb7uxuK3IJAzI+x6zzUxO5A==", + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.19.0.tgz", + "integrity": "sha512-t3rNaZeXz4d2gG4uJyMEYfJCFKf22+SWbSizIIXIWKu4wM+XPLiMWuSSr/C5821JmFeN9ogK+eExbG+z+twyxw==", "dev": true, "license": "MIT", "dependencies": { @@ -8238,7 +8156,7 @@ "postcss-load-config": "^3.1.4", "postcss-safe-parser": "^7.0.0", "semver": "^7.6.3", - "svelte-eslint-parser": "^1.4.0" + "svelte-eslint-parser": "^1.7.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -8459,14 +8377,21 @@ } }, "node_modules/esrap": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.4.tgz", - "integrity": "sha512-suICpxAmZ9A8bzJjEl/+rLJiDKC0X4gYWUxT6URAWBLvlXmtbZd5ySMu/N2ZGEtMCAmflUDPSehrP9BQcsGcSg==", + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.11.tgz", + "integrity": "sha512-gPdx+I+BjYEinNMQaBXFjbaJVyoPMU4ZODg5mE+M4DqVG9VusAVHHjcBX+zqyITlI0DIARwDMMzZwAWj36dRoQ==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "peerDependencies": { "@typescript-eslint/types": "^8.2.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/types": { + "optional": true + } } }, "node_modules/esrecurse": { @@ -10776,6 +10701,267 @@ "dev": true, "license": "MIT" }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/linkify-it": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.1.tgz", @@ -11191,9 +11377,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", "dev": true, "funding": [ { @@ -11449,9 +11635,9 @@ } }, "node_modules/obsidian": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.12.3.tgz", - "integrity": "sha512-HxWqe763dOqzXjnNiHmAJTRERN8KILBSqxDSEqbeSr7W8R8Jxezzbca+nz1LiiqXnMpM8lV2jzAezw3CZ4xNUw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.13.1.tgz", + "integrity": "sha512-qtTEA2pmhJzhuhJqzbBFRYhpIOqvW+krDYjtFynv66KbxBbumHBlsJfWw3I4jtnK/6fZwbQhCrmmDdRwXmX56w==", "license": "MIT", "dependencies": { "@types/codemirror": "5.60.8", @@ -12008,9 +12194,9 @@ } }, "node_modules/postcss": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz", - "integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==", + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", "dev": true, "funding": [ { @@ -12029,7 +12215,7 @@ "license": "MIT", "peer": true, "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -12855,49 +13041,38 @@ "dev": true, "license": "MIT" }, - "node_modules/rollup": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz", - "integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==", + "node_modules/rolldown": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", + "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.8" + "@oxc-project/types": "=0.133.0", + "@rolldown/pluginutils": "^1.0.0" }, "bin": { - "rollup": "dist/bin/rollup" + "rolldown": "bin/cli.mjs" }, "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" + "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.60.0", - "@rollup/rollup-android-arm64": "4.60.0", - "@rollup/rollup-darwin-arm64": "4.60.0", - "@rollup/rollup-darwin-x64": "4.60.0", - "@rollup/rollup-freebsd-arm64": "4.60.0", - "@rollup/rollup-freebsd-x64": "4.60.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.60.0", - "@rollup/rollup-linux-arm-musleabihf": "4.60.0", - "@rollup/rollup-linux-arm64-gnu": "4.60.0", - "@rollup/rollup-linux-arm64-musl": "4.60.0", - "@rollup/rollup-linux-loong64-gnu": "4.60.0", - "@rollup/rollup-linux-loong64-musl": "4.60.0", - "@rollup/rollup-linux-ppc64-gnu": "4.60.0", - "@rollup/rollup-linux-ppc64-musl": "4.60.0", - "@rollup/rollup-linux-riscv64-gnu": "4.60.0", - "@rollup/rollup-linux-riscv64-musl": "4.60.0", - "@rollup/rollup-linux-s390x-gnu": "4.60.0", - "@rollup/rollup-linux-x64-gnu": "4.60.0", - "@rollup/rollup-linux-x64-musl": "4.60.0", - "@rollup/rollup-openbsd-x64": "4.60.0", - "@rollup/rollup-openharmony-arm64": "4.60.0", - "@rollup/rollup-win32-arm64-msvc": "4.60.0", - "@rollup/rollup-win32-ia32-msvc": "4.60.0", - "@rollup/rollup-win32-x64-gnu": "4.60.0", - "@rollup/rollup-win32-x64-msvc": "4.60.0", - "fsevents": "~2.3.2" + "@rolldown/binding-android-arm64": "1.0.3", + "@rolldown/binding-darwin-arm64": "1.0.3", + "@rolldown/binding-darwin-x64": "1.0.3", + "@rolldown/binding-freebsd-x64": "1.0.3", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", + "@rolldown/binding-linux-arm64-gnu": "1.0.3", + "@rolldown/binding-linux-arm64-musl": "1.0.3", + "@rolldown/binding-linux-ppc64-gnu": "1.0.3", + "@rolldown/binding-linux-s390x-gnu": "1.0.3", + "@rolldown/binding-linux-x64-gnu": "1.0.3", + "@rolldown/binding-linux-x64-musl": "1.0.3", + "@rolldown/binding-openharmony-arm64": "1.0.3", + "@rolldown/binding-wasm32-wasi": "1.0.3", + "@rolldown/binding-win32-arm64-msvc": "1.0.3", + "@rolldown/binding-win32-x64-msvc": "1.0.3" } }, "node_modules/rollup-plugin-copy": { @@ -13822,23 +13997,25 @@ } }, "node_modules/svelte": { - "version": "5.41.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.41.1.tgz", - "integrity": "sha512-0a/huwc8e2es+7KFi70esqsReRfRbrT8h1cJSY/+z1lF0yKM6TT+//HYu28Yxstr50H7ifaqZRDGd0KuKDxP7w==", + "version": "5.56.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.56.3.tgz", + "integrity": "sha512-w7JvrM5IFl5cmfbY0TLik9o7mjRUJmRMhOR51tBPu708Gr/MjbGs7VnJnr/B0CaXeI4vtnOh7RKxDr0cwhMdDA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@jridgewell/remapping": "^2.3.4", "@jridgewell/sourcemap-codec": "^1.5.0", - "@sveltejs/acorn-typescript": "^1.0.5", + "@sveltejs/acorn-typescript": "^1.0.10", "@types/estree": "^1.0.5", + "@types/trusted-types": "^2.0.7", "acorn": "^8.12.1", - "aria-query": "^5.3.1", + "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", + "devalue": "^5.8.1", "esm-env": "^1.2.1", - "esrap": "^2.1.0", + "esrap": "^2.2.11", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", @@ -14064,6 +14241,7 @@ "integrity": "sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", @@ -14077,13 +14255,6 @@ "node": ">=10" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, "node_modules/test-exclude": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-8.0.0.tgz", @@ -14143,14 +14314,14 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -14704,30 +14875,6 @@ "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.1.tgz", - "integrity": "sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.61.1", - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/typescript-estree": "8.61.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { "version": "8.61.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.1.tgz", @@ -14795,9 +14942,9 @@ } }, "node_modules/undici": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.27.2.tgz", - "integrity": "sha512-uZsKNuzQxDMUY6M3pIMvy5tvlGmtq8XJ2oLAkfRKGNu+1VQAIvLy2xIVG5ATZl5wDXl/tddByAWCizRbOme+TA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz", + "integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==", "dev": true, "license": "MIT", "engines": { @@ -14905,19 +15052,18 @@ } }, "node_modules/vite": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.5.tgz", - "integrity": "sha512-KuOaNhcnGFN2zIPGA7wRmzF+lJA1sea7rHq17aiJ++9lzY1WWG6Jpwqwe1KNbRVPIqHmr8GLYx7jbrQcN/7/ww==", + "version": "8.0.16", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", + "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "esbuild": "^0.27.0", - "fdir": "^6.5.0", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.43.0", - "tinyglobby": "^0.2.15" + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.15", + "rolldown": "1.0.3", + "tinyglobby": "^0.2.17" }, "bin": { "vite": "bin/vite.js" @@ -14933,9 +15079,10 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.1.18", + "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", - "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", @@ -14948,15 +15095,18 @@ "@types/node": { "optional": true }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, "jiti": { "optional": true }, "less": { "optional": true }, - "lightningcss": { - "optional": true - }, "sass": { "optional": true }, @@ -14981,13 +15131,13 @@ } }, "node_modules/vite-plugin-istanbul": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/vite-plugin-istanbul/-/vite-plugin-istanbul-8.0.0.tgz", - "integrity": "sha512-r6L7cg2iwPqNnY/rWFyemWeDTIKRZjekEWS90e2FsTjDYH4UdTS6hvW1nEX1B++PKPCnqCaj5BJTDn5Cy5jYoQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vite-plugin-istanbul/-/vite-plugin-istanbul-9.0.1.tgz", + "integrity": "sha512-zgcdcqa4r3urX+xqhMQG2uLR2s6IdklQW+acBEtLw6fvUWhuvXswYqxjHAZZ5HCfHEgRs7RH7qIZCklTLRsKLg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/generator": "^7.29.1", + "@babel/generator": "^7.29.7", "@istanbuljs/load-nyc-config": "^1.1.0", "@types/babel__generator": "7.27.0", "espree": "^11.2.0", @@ -14997,7 +15147,7 @@ "test-exclude": "^8.0.0" }, "peerDependencies": { - "vite": ">=4" + "vite": ">=7" } }, "node_modules/vite-plugin-istanbul/node_modules/eslint-visitor-keys": { @@ -15041,491 +15191,6 @@ "node": ">= 12" } }, - "node_modules/vite/node_modules/@esbuild/aix-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", - "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/android-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", - "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/android-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", - "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/android-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", - "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/darwin-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", - "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/darwin-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", - "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", - "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/freebsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", - "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", - "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", - "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", - "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-loong64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", - "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-mips64el": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", - "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", - "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-riscv64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", - "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-s390x": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", - "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", - "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", - "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/netbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", - "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", - "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/openbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", - "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/sunos-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", - "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", - "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", - "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", - "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/esbuild": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", - "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.7", - "@esbuild/android-arm": "0.27.7", - "@esbuild/android-arm64": "0.27.7", - "@esbuild/android-x64": "0.27.7", - "@esbuild/darwin-arm64": "0.27.7", - "@esbuild/darwin-x64": "0.27.7", - "@esbuild/freebsd-arm64": "0.27.7", - "@esbuild/freebsd-x64": "0.27.7", - "@esbuild/linux-arm": "0.27.7", - "@esbuild/linux-arm64": "0.27.7", - "@esbuild/linux-ia32": "0.27.7", - "@esbuild/linux-loong64": "0.27.7", - "@esbuild/linux-mips64el": "0.27.7", - "@esbuild/linux-ppc64": "0.27.7", - "@esbuild/linux-riscv64": "0.27.7", - "@esbuild/linux-s390x": "0.27.7", - "@esbuild/linux-x64": "0.27.7", - "@esbuild/netbsd-arm64": "0.27.7", - "@esbuild/netbsd-x64": "0.27.7", - "@esbuild/openbsd-arm64": "0.27.7", - "@esbuild/openbsd-x64": "0.27.7", - "@esbuild/openharmony-arm64": "0.27.7", - "@esbuild/sunos-x64": "0.27.7", - "@esbuild/win32-arm64": "0.27.7", - "@esbuild/win32-ia32": "0.27.7", - "@esbuild/win32-x64": "0.27.7" - } - }, - "node_modules/vite/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, "node_modules/vite/node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -15547,7 +15212,6 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -15759,9 +15423,9 @@ } }, "node_modules/webdriver/node_modules/undici": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz", - "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==", + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz", + "integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==", "dev": true, "license": "MIT", "engines": { @@ -16525,7 +16189,7 @@ "version": "0.25.76-cli", "dependencies": { "chokidar": "^4.0.0", - "minimatch": "^10.2.2", + "minimatch": "^10.2.5", "octagonal-wheels": "^0.1.46", "pouchdb-adapter-http": "^9.0.0", "pouchdb-adapter-leveldb": "^9.0.0", @@ -16540,9 +16204,9 @@ "werift": "^0.23.0" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "typescript": "5.9.3", - "vite": "^7.3.1", + "vite": "^8.0.16", "vitest": "^4.1.8" } }, @@ -16554,12 +16218,12 @@ }, "devDependencies": { "@playwright/test": "^1.58.2", - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "playwright": "^1.58.2", - "svelte": "5.41.1", + "svelte": "5.56.3", "typescript": "5.9.3", - "vite": "^7.3.1", - "vite-plugin-istanbul": "^8.0.0" + "vite": "^8.0.16", + "vite-plugin-istanbul": "^9.0.1" } }, "src/apps/webpeer": { @@ -16568,13 +16232,13 @@ "octagonal-wheels": "^0.1.46" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "@tsconfig/svelte": "^5.0.8", - "eslint-plugin-svelte": "^3.15.0", - "svelte": "5.41.1", + "eslint-plugin-svelte": "^3.19.0", + "svelte": "5.56.3", "svelte-check": "^4.6.0", "typescript": "5.9.3", - "vite": "^7.3.1" + "vite": "^8.0.16" } } } diff --git a/package.json b/package.json index fb613b1..067944a 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,8 @@ "devDependencies": { "@dword-design/eslint-plugin-import-alias": "^8.1.8", "@eslint/js": "^9.39.3", - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@playwright/test": "^1.58.2", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "@tsconfig/svelte": "^5.0.8", "@types/deno": "^2.5.0", "@types/diff-match-patch": "^1.0.36", @@ -81,7 +82,6 @@ "@types/pouchdb-mapreduce": "^6.1.10", "@types/pouchdb-replication": "^6.4.7", "@types/transform-pouch": "^1.0.6", - "@typescript-eslint/eslint-plugin": "8.56.1", "@typescript-eslint/parser": "8.56.1", "@vitest/browser": "^4.1.8", "@vitest/browser-playwright": "^4.1.8", @@ -92,10 +92,9 @@ "esbuild-svelte": "^0.9.4", "eslint": "^9.39.3", "eslint-plugin-obsidianmd": "^0.3.0", - "eslint-plugin-svelte": "^3.15.0", + "eslint-plugin-svelte": "^3.19.0", "events": "^3.3.0", "globals": "^14.0.0", - "@playwright/test": "^1.58.2", "playwright": "^1.58.2", "postcss": "^8.5.6", "pouchdb-adapter-http": "^9.0.0", @@ -111,7 +110,7 @@ "pouchdb-utils": "^9.0.0", "prettier": "3.8.1", "rollup-plugin-copy": "^3.5.0", - "svelte": "5.41.1", + "svelte": "5.56.3", "svelte-check": "^4.6.0", "svelte-eslint-parser": "^1.8.0", "svelte-preprocess": "^6.0.3", @@ -121,7 +120,7 @@ "tsx": "^4.21.0", "typescript": "5.9.3", "typescript-eslint": "^8.61.0", - "vite": "^7.3.1", + "vite": "^8.0.16", "vitest": "^4.1.8", "webdriverio": "^9.27.0", "yaml": "^2.8.2" @@ -140,8 +139,8 @@ "fflate": "^0.8.2", "idb": "^8.0.3", "markdown-it": "^14.2.0", - "minimatch": "^10.2.2", - "obsidian": "^1.12.3", + "minimatch": "^10.2.5", + "obsidian": "^1.13.1", "octagonal-wheels": "^0.1.46", "qrcode-generator": "^1.4.4", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" diff --git a/src/apps/cli/entrypoint.ts b/src/apps/cli/entrypoint.ts index 9cfc06e..9627000 100644 --- a/src/apps/cli/entrypoint.ts +++ b/src/apps/cli/entrypoint.ts @@ -1,4 +1,5 @@ #!/usr/bin/env node +// eslint-disable -- This is the entry point for the CLI application. import * as polyfill from "werift"; import { main } from "./main"; diff --git a/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts b/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts index 69bbc7e..0e82065 100644 --- a/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts +++ b/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts @@ -11,10 +11,9 @@ import type { } from "@lib/managers/adapters"; import type { FileEventItemSentinel } from "@lib/managers/StorageEventManager"; import type { NodeFile, NodeFolder } from "@/apps/cli/adapters/NodeTypes"; -import type { Stats } from "fs"; import { watch as chokidarWatch, type FSWatcher } from "chokidar"; import type { IgnoreRules } from "@/apps/cli/serviceModules/IgnoreRules"; -import { fsPromises as fs, path } from "../node-compat"; +import { fsPromises as fs, path, type Stats } from "../node-compat"; /** * CLI-specific type guard adapter @@ -100,7 +99,7 @@ class CLIWatchAdapter implements IStorageEventWatchAdapter { private basePath: string, private ignoreRules?: IgnoreRules, private watchEnabled: boolean = false - ) {} + ) { } private _toNodeFile(filePath: string, stats: Stats | undefined): NodeFile { return { diff --git a/src/apps/cli/node-compat.ts b/src/apps/cli/node-compat.ts index cf8338a..10e2c9e 100644 --- a/src/apps/cli/node-compat.ts +++ b/src/apps/cli/node-compat.ts @@ -3,10 +3,11 @@ import * as nodeFs from "node:fs"; import * as nodeFsPromises from "node:fs/promises"; import * as nodePath from "node:path"; import * as nodeReadlinePromises from "node:readline/promises"; - +import type { Stats } from "node:fs"; export { nodeFs as fs, nodeFsPromises as fsPromises, nodePath as path, nodeReadlinePromises as readline, + type Stats, }; diff --git a/src/apps/cli/package.json b/src/apps/cli/package.json index 3603bc0..308f49d 100644 --- a/src/apps/cli/package.json +++ b/src/apps/cli/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "chokidar": "^4.0.0", - "minimatch": "^10.2.2", + "minimatch": "^10.2.5", "octagonal-wheels": "^0.1.46", "pouchdb-adapter-http": "^9.0.0", "pouchdb-adapter-leveldb": "^9.0.0", @@ -55,9 +55,9 @@ "werift": "^0.23.0" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "typescript": "5.9.3", - "vite": "^7.3.1", + "vite": "^8.0.16", "vitest": "^4.1.8" } } diff --git a/src/apps/webapp/package.json b/src/apps/webapp/package.json index 7923b70..d5ea571 100644 --- a/src/apps/webapp/package.json +++ b/src/apps/webapp/package.json @@ -16,11 +16,11 @@ }, "devDependencies": { "@playwright/test": "^1.58.2", - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "playwright": "^1.58.2", - "svelte": "5.41.1", + "svelte": "5.56.3", "typescript": "5.9.3", - "vite": "^7.3.1", - "vite-plugin-istanbul": "^8.0.0" + "vite": "^8.0.16", + "vite-plugin-istanbul": "^9.0.1" } } diff --git a/src/apps/webpeer/package.json b/src/apps/webpeer/package.json index 3458641..27bc9c9 100644 --- a/src/apps/webpeer/package.json +++ b/src/apps/webpeer/package.json @@ -15,13 +15,13 @@ "octagonal-wheels": "^0.1.46" }, "devDependencies": { - "eslint-plugin-svelte": "^3.15.0", - "@sveltejs/vite-plugin-svelte": "^6.2.4", + "eslint-plugin-svelte": "^3.19.0", + "@sveltejs/vite-plugin-svelte": "^7.1.2", "@tsconfig/svelte": "^5.0.8", - "svelte": "5.41.1", + "svelte": "5.56.3", "svelte-check": "^4.6.0", "typescript": "5.9.3", - "vite": "^7.3.1" + "vite": "^8.0.16" }, "imports": { "../../src/worker/bgWorker.ts": "../../src/worker/bgWorker.mock.ts", From 72033472f3f729dd5f4c7c370d598b9dbe65b321 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 10:36:38 +0100 Subject: [PATCH 8/8] add dependency explicitly --- package-lock.json | 26 +++++++++++++++++++++++++- package.json | 4 +++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf4ece1..c7d32e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,8 @@ }, "devDependencies": { "@dword-design/eslint-plugin-import-alias": "^8.1.8", + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", "@eslint/js": "^9.39.3", "@playwright/test": "^1.58.2", "@sveltejs/vite-plugin-svelte": "^7.1.2", @@ -1351,13 +1353,35 @@ } } }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "tslib": "^2.4.0" } diff --git a/package.json b/package.json index 067944a..3e3b0ec 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,9 @@ "vite": "^8.0.16", "vitest": "^4.1.8", "webdriverio": "^9.27.0", - "yaml": "^2.8.2" + "yaml": "^2.8.2", + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1" }, "dependencies": { "@aws-sdk/client-s3": "^3.808.0",