From 5a35b71339b0fa406f7e34e264ab1302fde5df9f Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 04:01:45 +0100 Subject: [PATCH 1/3] define workspace --- esbuild.config.mjs | 37 +- eslint.config.common.mjs | 143 ++++ eslint.config.mjs | 66 +- package-lock.json | 1282 ++++++++++++++-------------- package.json | 21 +- src/apps/cli/package.json | 2 +- src/apps/cli/tsconfig.json | 8 +- src/apps/webapp/package.json | 2 +- src/apps/webpeer/package.json | 4 +- src/apps/webpeer/tsconfig.app.json | 6 +- tsconfig.json | 4 +- update-workspaces.mjs | 111 +++ utilsdeno/deno.json | 8 + utilsdeno/deno.lock | 69 ++ utilsdeno/refactor-import-utils.ts | 187 ++++ utilsdeno/refactor-imports.ts | 155 ++++ utilsdeno/types-add-ignore.ts | 58 ++ 17 files changed, 1453 insertions(+), 710 deletions(-) create mode 100644 eslint.config.common.mjs create mode 100644 update-workspaces.mjs create mode 100644 utilsdeno/deno.json create mode 100644 utilsdeno/deno.lock create mode 100644 utilsdeno/refactor-import-utils.ts create mode 100644 utilsdeno/refactor-imports.ts create mode 100644 utilsdeno/types-add-ignore.ts diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 4350fab..23b8fe9 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -19,11 +19,15 @@ const packageJson = JSON.parse(fs.readFileSync("./package.json") + ""); const updateInfo = JSON.stringify(fs.readFileSync("./updates.md") + ""); const PATHS_TEST_INSTALL = process.env?.PATHS_TEST_INSTALL || ""; -const PATH_TEST_INSTALL = PATHS_TEST_INSTALL.split(path.delimiter).map(p => p.trim()).filter(p => p.length); +const PATH_TEST_INSTALL = PATHS_TEST_INSTALL.split(path.delimiter) + .map((p) => p.trim()) + .filter((p) => p.length); if (PATH_TEST_INSTALL) { console.log(`Built files will be copied to ${PATH_TEST_INSTALL}`); } else { - console.log("Development build: You can install the plug-in to Obsidian for testing by exporting the PATHS_TEST_INSTALL environment variable with the paths to your vault plugins directories separated by your system path delimiter (':' on Unix, ';' on Windows)."); + console.log( + "Development build: You can install the plug-in to Obsidian for testing by exporting the PATHS_TEST_INSTALL environment variable with the paths to your vault plugins directories separated by your system path delimiter (':' on Unix, ';' on Windows)." + ); } const moduleAliasPlugin = { @@ -66,6 +70,34 @@ const moduleAliasPlugin = { }, }; +const removePragmaCommentsPlugin = { + name: "remove-pragma-comments", + setup(build) { + // Filter target extensions (e.g., JavaScript and TypeScript) + build.onLoad({ filter: /\.[jt]s?$/ }, async (args) => { + const source = await fs.promises.readFile(args.path, "utf8"); + + // Regex targeting both single-line and multi-line comments + // This regex looks for: + // - /* eslint ... */ (multi-line) + // const esLintPragmaRegexBlock = /\/\*[\s\S]*?eslint[\s\S]*?\*\/|([^\\:]|^)\/\/.*eslint.*$/gm; + // - // eslint-disable-next-line + let cleanedSource = source; + const tsIgnoreRegex = /\/\*\s*@ts-ignore\s*\*\/|([^\\:]|^)\/\/.*?@ts-ignore.*$/gm; + const esLintPragmaRegexLine = /([^\\:]|^)\/\/.*?eslint-.*$/gm; + const exps = [tsIgnoreRegex, esLintPragmaRegexLine]; + for (const exp of exps) { + cleanedSource = cleanedSource.replace(exp, "$1"); + } + + return { + contents: cleanedSource, + loader: args.path.endsWith("ts") ? "ts" : "js", + }; + }); + }, +}; + /** @type esbuild.Plugin[] */ const plugins = [ { @@ -177,6 +209,7 @@ const context = await esbuild.context({ preprocess: sveltePreprocess(), compilerOptions: { css: "injected", preserveComments: false }, }), + removePragmaCommentsPlugin, ...plugins, ], }); diff --git a/eslint.config.common.mjs b/eslint.config.common.mjs new file mode 100644 index 0000000..d8c6044 --- /dev/null +++ b/eslint.config.common.mjs @@ -0,0 +1,143 @@ +const restrictedGlobalsOptions = [ + { + name: "app", + message: "Avoid using the global app object. Instead use the reference provided by your plugin instance.", + }, + "warn", + { + name: "fetch", + message: "Use the built-in `requestUrl` function instead of `fetch` for network requests in Obsidian.", + }, + { + name: "localStorage", + message: + "Prefer `App#saveLocalStorage` / `App#loadLocalStorage` functions to write / read localStorage data that's unique to a vault.", + }, +]; +const restrictedImportsOptions = [ + { + name: "axios", + message: "Use the built-in `requestUrl` function instead of `axios`.", + }, + { + name: "superagent", + message: "Use the built-in `requestUrl` function instead of `superagent`.", + }, + { + name: "got", + message: "Use the built-in `requestUrl` function instead of `got`.", + }, + { + name: "ofetch", + message: "Use the built-in `requestUrl` function instead of `ofetch`.", + }, + { + name: "ky", + message: "Use the built-in `requestUrl` function instead of `ky`.", + }, + { + name: "node-fetch", + message: "Use the built-in `requestUrl` function instead of `node-fetch`.", + }, + { + name: "moment", + message: "The 'moment' package is bundled with Obsidian. Please import it from 'obsidian' instead.", + }, +]; + +const warnWhileDev = "off"; + +/** + * @type {import("eslint").Linter.RulesRecord} + */ +export const baseRules = { + // -- Base rules (turned off in favour of TS specific versions or explicitly disabled). + "no-unused-vars": "off", + "no-unused-labels": "off", + "no-prototype-builtins": "off", + "require-await": "off", + // -- TypeScript specific rules (Gradual adoption of stricter rules, currently set to 'warn' for a while). + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/no-redundant-type-constituents": "warn", + // -- TypeScript specific rules + // @typescript-eslint/no-unsafe-* rules and @typescript-eslint/no-explicit-any: + // This project contains a lot of library-sh code where the use of `any` is often necessary and justified. + // Rules is now set to 'off' for a while. + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + // -- Reasonable rules. + "@typescript-eslint/no-deprecated": warnWhileDev, + "@typescript-eslint/no-unused-vars": ["error", { args: "none" }], + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/require-await": "error", + "@typescript-eslint/no-misused-promises": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + + // -- General rules + "no-async-promise-executor": warnWhileDev, + "no-constant-condition": ["error", { checkLoops: false }], + // -- Disabled rules + // no-undef: This option breaks the global declarations for the library files and is not worth the effort to fix at this time. + "no-undef": "off", +}; + +/** + * @type {import("eslint").Linter.RulesRecord} + */ +export const obsidianRules = { + // -- Obsidian rules + // obsidianmd/no-unsupported-api: usually this project checks for API support at runtime, so this rule is not critical but can be helpful to catch potential issues. + "obsidianmd/no-unsupported-api": warnWhileDev, + + // -- Plugin specific overrides + "obsidianmd/rule-custom-message": "off", + "obsidianmd/ui/sentence-case": "off", + "obsidianmd/no-plugin-as-component": "off", + + // -- Temporary overrides for migration + "obsidianmd/no-static-styles-assignment": "off", +}; +/** + * @type {(base:string) => import("eslint").Linter.RulesRecord} + */ +export const ImportAliasRules = (base) => ({ + "@dword-design/import-alias/prefer-alias": [ + "error", + { + aliasForSubpaths: true, + alias: { + "@": `${base}/src`, + "@lib": `${base}/src/lib/src`, + }, + }, + ], +}); +/** + * @type {import("eslint").Linter.RulesRecord} + */ +export const CommunityReviewRecommendedRules = { + "no-unused-vars": "off", + "no-prototype-bultins": "off", + "no-self-compare": "warn", + "no-eval": "error", + "no-implied-eval": "error", + "prefer-const": "off", + "no-implicit-globals": "error", + "no-console": "off", // overridden by obsidianmd/rule-custom-message + "no-restricted-globals": ["error", ...restrictedGlobalsOptions], + "no-restricted-imports": ["error", ...restrictedImportsOptions], + "no-alert": "error", + "no-undef": "error", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-deprecated": "error", + "@typescript-eslint/no-unused-vars": ["warn", { args: "none" }], + "@typescript-eslint/require-await": "off", + "@typescript-eslint/no-explicit-any": ["error", { fixToUnknown: true }], + // "import/no-nodejs-modules": "off", + // "import/no-extraneous-dependencies": "error", +}; diff --git a/eslint.config.mjs b/eslint.config.mjs index 65f81a3..624bd2a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,6 +4,8 @@ import globals from "globals"; import { defineConfig, globalIgnores } from "eslint/config"; import * as sveltePlugin from "eslint-plugin-svelte"; import svelteParser from "svelte-eslint-parser"; +import importAlias from "@dword-design/eslint-plugin-import-alias"; +import { baseRules, ImportAliasRules, obsidianRules } from "./eslint.config.common.mjs"; const warnWhileDev = "off"; // Change to "warn" to enable warnings for rules that are currently disabled. export default defineConfig([ globalIgnores([ @@ -18,11 +20,11 @@ export default defineConfig([ "**/*.json", "**/.eslintrc.js.bak", // Files from linked dependencies (those files should not exist for most people). - "modules/octagonal-wheels/dist/**/*", + "modules/octagonal-wheels/dist", // Sub-projects (Exclude from root linting as they have different environments) - "src/apps/**/*", - "utils/**/*", + "src/apps", + "utils", // Specific exclusions from common library (src/lib) "src/lib/coverage", @@ -54,6 +56,7 @@ export default defineConfig([ ]), ...sveltePlugin.configs["flat/base"], ...obsidianmd.configs.recommended, + importAlias.configs.recommended, { files: ["**/*.ts"], // ignores:["src/lib/**/*.ts"], // Exclude library files from root linting (they have different environments and rules). @@ -62,64 +65,29 @@ export default defineConfig([ parser: tsParser, parserOptions: { project: "./tsconfig.json", + rootDir: "./", }, }, - linterOptions:{ + linterOptions: { reportUnusedDisableDirectives: false, }, rules: { - // -- Base rules (turned off in favour of TS specific versions or explicitly disabled). - "no-unused-vars": "off", - "no-unused-labels": "off", - "no-prototype-builtins": "off", - "require-await": "off", - // -- TypeScript specific rules - // @typescript-eslint/no-unsafe-* rules and @typescript-eslint/no-explicit-any: - // This project contains a lot of library-sh code where the use of `any` is often necessary and justified. - // Rules is now set to 'off' for a while. - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - // -- Reasonable rules. - "@typescript-eslint/no-deprecated": warnWhileDev, - "@typescript-eslint/no-unused-vars": ["error", { args: "none" }], - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - - // -- Obsidian rules - // obsidianmd/no-unsupported-api: usually this project checks for API support at runtime, so this rule is not critical but can be helpful to catch potential issues. - "obsidianmd/no-unsupported-api": warnWhileDev, - - // -- General rules - "no-async-promise-executor": warnWhileDev, - "no-constant-condition": ["error", { checkLoops: false }], - // -- Disabled rules - // no-undef: This option breaks the global declarations for the library files and is not worth the effort to fix at this time. - "no-undef": "off", - - // -- Plugin specific overrides - "obsidianmd/rule-custom-message": "off", - "obsidianmd/ui/sentence-case": "off", - "obsidianmd/no-plugin-as-component": "off", - - // -- Temporary overrides for migration - "obsidianmd/no-static-styles-assignment": "off", + ...baseRules, + ...obsidianRules, + // -- Project specific rules + ...ImportAliasRules("."), }, }, { files: ["**/*.svelte"], languageOptions: { + globals: { ...globals.browser, PouchDB: "readonly" }, parser: svelteParser, parserOptions: { parser: tsParser, extraFileExtensions: [".svelte"], + project: "./tsconfig.json", + rootDir: "./", }, }, rules: { @@ -127,8 +95,8 @@ export default defineConfig([ // Svelte template's declarations have a lot of false positives and the rule is not worth the effort to fix at this time. // it may improve in the future with some options as like ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],] "no-unused-vars": "off", - "obsidianmd/no-plugin-as-component": "off", - "obsidianmd/ui/sentence-case": "off", + ...obsidianRules, + ...ImportAliasRules("."), }, }, ]); diff --git a/package-lock.json b/package-lock.json index cf7c501..46cb9a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,11 @@ "name": "obsidian-livesync", "version": "0.25.76", "license": "MIT", + "workspaces": [ + "src/apps/cli", + "src/apps/webpeer", + "src/apps/webapp" + ], "dependencies": { "@aws-sdk/client-s3": "^3.808.0", "@smithy/fetch-http-handler": "^5.3.10", @@ -15,15 +20,14 @@ "@smithy/middleware-apply-body-checksum": "^4.3.9", "@smithy/protocol-http": "^5.3.9", "@smithy/querystring-builder": "^4.2.9", + "@smithy/types": "^4.14.3", "@smithy/util-retry": "^4.4.5", "@trystero-p2p/nostr": "^0.24.0", "chokidar": "^4.0.0", - "commander": "^14.0.3", "diff-match-patch": "^1.0.5", "fflate": "^0.8.2", "idb": "^8.0.3", "markdown-it": "^14.1.1", - "micromatch": "^4.0.0", "minimatch": "^10.2.2", "obsidian": "^1.12.3", "octagonal-wheels": "^0.1.46", @@ -33,7 +37,7 @@ "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" }, "devDependencies": { - "@chialab/esbuild-plugin-worker": "^0.19.0", + "@dword-design/eslint-plugin-import-alias": "^8.1.8", "@eslint/js": "^9.39.3", "@sveltejs/vite-plugin-svelte": "^6.2.4", "@tsconfig/svelte": "^5.0.8", @@ -66,7 +70,6 @@ "globals": "^14.0.0", "playwright": "^1.58.2", "postcss": "^8.5.6", - "postcss-load-config": "^6.0.1", "pouchdb-adapter-http": "^9.0.0", "pouchdb-adapter-idb": "^9.0.0", "pouchdb-adapter-indexeddb": "^9.0.0", @@ -81,14 +84,15 @@ "prettier": "3.8.1", "rollup-plugin-copy": "^3.5.0", "svelte": "5.41.1", - "svelte-check": "^4.4.3", + "svelte-check": "^4.6.0", + "svelte-eslint-parser": "^1.8.0", "svelte-preprocess": "^6.0.3", "terser": "^5.39.0", "tinyglobby": "^0.2.15", "transform-pouch": "^2.0.0", - "tslib": "^2.8.1", "tsx": "^4.21.0", "typescript": "5.9.3", + "typescript-eslint": "^8.61.0", "vite": "^7.3.1", "vite-plugin-istanbul": "^8.0.0", "vitest": "^4.1.8", @@ -1264,77 +1268,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@chialab/esbuild-plugin-meta-url": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@chialab/esbuild-plugin-meta-url/-/esbuild-plugin-meta-url-0.19.1.tgz", - "integrity": "sha512-psYdhXG5CTA16PkOc4RhWj7XJQWONXJIrRTp3xkxKW0A7d0n/B0W+TABMR3zohboyoC6Uqv1zO8jf62zx2Xh6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@chialab/esbuild-rna": "^0.19.1", - "@chialab/estransform": "^0.19.1", - "mime-types": "^2.1.35" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@chialab/esbuild-plugin-worker": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@chialab/esbuild-plugin-worker/-/esbuild-plugin-worker-0.19.1.tgz", - "integrity": "sha512-eZeOMzPmT3LyEryS8GlUJ69NDcWEYT4JDHEYMAiAtNsN+ftFTSUkEeVFgP1zyebgmZApPc4Gdpo162nPBG2rSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@chialab/esbuild-plugin-meta-url": "^0.19.1", - "@chialab/esbuild-rna": "^0.19.1", - "@chialab/estransform": "^0.19.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@chialab/esbuild-rna": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@chialab/esbuild-rna/-/esbuild-rna-0.19.1.tgz", - "integrity": "sha512-v8dpllvqWmYsAvDkfVRRqz1jwxUZyfLYAR0MgsiifnI+C95OPdV3qhubvwebav8s8YUVz2Jr6J8bWpU+GW7TfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@chialab/estransform": "^0.19.1", - "@chialab/node-resolve": "^0.19.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@chialab/estransform": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@chialab/estransform/-/estransform-0.19.1.tgz", - "integrity": "sha512-Op0TvQxnzdcnBriFUIjgg3V3MpOB9Cfs4S7TvIuypPegFOSvuFAOcPl5V02NJ9dyGoOc8W6ORbSldc5PYKhOCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@napi-rs/magic-string": "^0.3.4", - "@parcel/source-map": "^2.0.0", - "cjs-module-lexer": "^1.2.2", - "es-module-lexer": "^1.0.0", - "oxc-parser": "^0.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@chialab/node-resolve": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@chialab/node-resolve/-/node-resolve-0.19.1.tgz", - "integrity": "sha512-J4i4YJNaFuYG6UWpum9y8XfICWsWxoCawy6HQtU2lDqp915oboxXvpZ3lBdA5Llb8VexCKQZYufY8QXPyzU62Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/@codemirror/state": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.0.tgz", @@ -1358,6 +1291,224 @@ "w3c-keyname": "^2.2.4" } }, + "node_modules/@dword-design/defaults": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@dword-design/defaults/-/defaults-1.1.8.tgz", + "integrity": "sha512-66Ubh9RjKyb/0/myYNFqzXzkowM0zWy5ImTp/wR3u4KZf8ymI5BBOO/9+QyDz1uBLV1dZGskUVMxSDYgQRmAkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-obj": "^4.1.0", + "lodash-es": "^4.17.21", + "type-fest": "^5.6.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/dword-design" + } + }, + "node_modules/@dword-design/defaults/node_modules/type-fest": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.7.0.tgz", + "integrity": "sha512-1URUxUqfHFM1c+zfSPsa3gnkO7Aq21qyH75SIduNYz4SzY964rn1X2vCMQaHSHhktiw+0kPa2iyb6PUpXqB6Vg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@dword-design/eslint-plugin-import-alias": { + "version": "8.1.8", + "resolved": "https://registry.npmjs.org/@dword-design/eslint-plugin-import-alias/-/eslint-plugin-import-alias-8.1.8.tgz", + "integrity": "sha512-hqAg9ys+YD2+rIheqeu6DACbuqsUpEbrNur05m/n2AsWL37s5l8qzjdnoYFCr47nsDMP7dIQJiP0YBqToAc/Ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.29.0", + "@dword-design/defaults": "^1.1.2", + "@types/babel__core": "^7.20.5", + "@types/lodash-es": "^4.17.12", + "@typescript-eslint/utils": "^8.57.0", + "babel-plugin-module-resolver": "^5.0.2", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/dword-design" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "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==", + "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/@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" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", @@ -2411,252 +2562,6 @@ "integrity": "sha512-eFrYUPDVHeuwWHluTG1kwNQUEUcFjVKYwPkU8z9DR1JH3AW7JtJsG9cRVGmwz809kKtGfwGJj58juCZxEvnI/g==", "license": "MIT" }, - "node_modules/@napi-rs/magic-string": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string/-/magic-string-0.3.4.tgz", - "integrity": "sha512-DEWl/B99RQsyMT3F9bvrXuhL01/eIQp/dtNSE3G1jQ4mTGRcP4iHWxoPZ577WrbjUinrNgvRA5+08g8fkPgimQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@napi-rs/magic-string-android-arm-eabi": "0.3.4", - "@napi-rs/magic-string-android-arm64": "0.3.4", - "@napi-rs/magic-string-darwin-arm64": "0.3.4", - "@napi-rs/magic-string-darwin-x64": "0.3.4", - "@napi-rs/magic-string-freebsd-x64": "0.3.4", - "@napi-rs/magic-string-linux-arm-gnueabihf": "0.3.4", - "@napi-rs/magic-string-linux-arm64-gnu": "0.3.4", - "@napi-rs/magic-string-linux-arm64-musl": "0.3.4", - "@napi-rs/magic-string-linux-x64-gnu": "0.3.4", - "@napi-rs/magic-string-linux-x64-musl": "0.3.4", - "@napi-rs/magic-string-win32-arm64-msvc": "0.3.4", - "@napi-rs/magic-string-win32-ia32-msvc": "0.3.4", - "@napi-rs/magic-string-win32-x64-msvc": "0.3.4" - } - }, - "node_modules/@napi-rs/magic-string-android-arm-eabi": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-android-arm-eabi/-/magic-string-android-arm-eabi-0.3.4.tgz", - "integrity": "sha512-sszAYxqtzzJ4FDerDNHcqL9NhqPhj8W4DNiOanXYy50mA5oojlRtaAFPiB5ZMrWDBM32v5Q30LrmxQ4eTtu2Dg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-android-arm64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-android-arm64/-/magic-string-android-arm64-0.3.4.tgz", - "integrity": "sha512-jdQ6HuO0X5rkX4MauTcWR4HWdgjakTOmmzqXg8L26+jOHVVG1LZE+Su5qvV4bP8vMb2h+vPE+JsnwqSmWymu3Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-darwin-arm64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-darwin-arm64/-/magic-string-darwin-arm64-0.3.4.tgz", - "integrity": "sha512-6NmMtvURce9/oq09XBZmuIeI6lPLGtEJ2ZPO/QzL3nLZa6wygiCnO/sFACKYNg5/73ET5HMMTeuogE1JI+r2Lw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-darwin-x64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-darwin-x64/-/magic-string-darwin-x64-0.3.4.tgz", - "integrity": "sha512-f9LmfMiUAKDOtl0meOuLYeVb6OERrgGzrTg1Tn3R3fTAShM2kxRbfAuPE9ljuXxIFzOv/uqRNLSl/LqCJwpREA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-freebsd-x64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-freebsd-x64/-/magic-string-freebsd-x64-0.3.4.tgz", - "integrity": "sha512-rqduQ4odiDK4QdM45xHWRTU4wtFIfpp8g8QGpz+3qqg7ivldDqbbNOrBaf6Oeu77uuEvWggnkyuChotfKgJdJQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-linux-arm-gnueabihf": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-linux-arm-gnueabihf/-/magic-string-linux-arm-gnueabihf-0.3.4.tgz", - "integrity": "sha512-pVaJEdEpiPqIfq3M4+yMAATS7Z9muDcWYn8H7GFH1ygh8GwgLgKfy/n/lG2M6zp18Mwd0x7E2E/qg9GgCyUzoQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-linux-arm64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-linux-arm64-gnu/-/magic-string-linux-arm64-gnu-0.3.4.tgz", - "integrity": "sha512-9FwoAih/0tzEZx0BjYYIxWkSRMjonIn91RFM3q3MBs/evmThXUYXUqLNa1PPIkK1JoksswtDi48qWWLt8nGflQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-linux-arm64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-linux-arm64-musl/-/magic-string-linux-arm64-musl-0.3.4.tgz", - "integrity": "sha512-wCR7R+WPOcAKmVQc1s6h6HwfwW1vL9pM8BjUY9Ljkdb8wt1LmZEmV2Sgfc1SfbRQzbyl+pKeufP6adRRQVzYDA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-linux-x64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-linux-x64-gnu/-/magic-string-linux-x64-gnu-0.3.4.tgz", - "integrity": "sha512-sbxFDpYnt5WFbxQ1xozwOvh5A7IftqSI0WnE9O7KsQIOi0ej2dvFbfOW4tmFkvH/YP8KJELo5AhP2+kEq1DpYA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-linux-x64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-linux-x64-musl/-/magic-string-linux-x64-musl-0.3.4.tgz", - "integrity": "sha512-jN4h/7e2Ul8v3UK5IZu38NXLMdzVWhY4uEDlnwuUAhwRh26wBQ1/pLD97Uy/Z3dFNBQPcsv60XS9fOM1YDNT6w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-win32-arm64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-win32-arm64-msvc/-/magic-string-win32-arm64-msvc-0.3.4.tgz", - "integrity": "sha512-gMUyTRHLWpzX2ntJFCbW2Gnla9Y/WUmbkZuW5SBAo/Jo8QojHn76Y4PNgnoXdzcsV9b/45RBxurYKAfFg9WTyg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-win32-ia32-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-win32-ia32-msvc/-/magic-string-win32-ia32-msvc-0.3.4.tgz", - "integrity": "sha512-QIMauMOvEHgL00K9np/c9CT/CRtLOz3mRTQqcZ9XGzSoAMrpxH71KSpDJrKl7h7Ro6TZ+hJ0C3T+JVuTCZNv4A==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/magic-string-win32-x64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@napi-rs/magic-string-win32-x64-msvc/-/magic-string-win32-x64-msvc-0.3.4.tgz", - "integrity": "sha512-V8FMSf828MzOI3P6/765MR7zHU6CUZqiyPhmAnwYoKFNxfv7oCviN/G6NcENeCdcYOvNgh5fYzaNLB96ndId5A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@noble/curves": { "version": "1.9.7", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", @@ -2743,131 +2648,6 @@ "node": ">= 8" } }, - "node_modules/@oxc-parser/binding-darwin-arm64": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.8.0.tgz", - "integrity": "sha512-3Dws5Wzj9efojjqvhS4ZF+Abh0EoiI5ciOE2kdLifMzSg4fnmYAIOktoUnPEo87TNIb4SiFJ5JgPBgEyq42Eow==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@oxc-parser/binding-darwin-x64": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.8.0.tgz", - "integrity": "sha512-DAUJ/mfq0Jn2VDYn69bhHTsIWj+aZ/viamexFwaLL7ntkIFmGpzAJZUlWofpY1IRJynKWW+P5AOLYXMllw4qUw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@oxc-parser/binding-linux-arm64-gnu": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.8.0.tgz", - "integrity": "sha512-ZHQVey/O4K3zTIKtpfsbtJIE8MPTRHRxgY3dejaoeFQGf9C3HasgF132Yp4zN/jOUx+x8czKPVa/Af40ViyhGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-parser/binding-linux-arm64-musl": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.8.0.tgz", - "integrity": "sha512-Diw+Tnf5v+zAYXzDoSKCZsMaroU6GoqZMS7smfDtFnZYTHWZrsTmPBLUQe7AFiG7O7tkhsCdcWjOYgbVkrSVOA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-parser/binding-linux-x64-gnu": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.8.0.tgz", - "integrity": "sha512-WloqcRrtQUVEP/Sy8ZeEgF0HgBKQjOv3zLFZqbC5ipkerKriGcVbsq3fOIMOi/55AM6/UhIAjeZGnoeco72JjQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-parser/binding-linux-x64-musl": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.8.0.tgz", - "integrity": "sha512-2j7BD9szwSXTvSj0Q8VE98UHGYvrgZzdLy4EyB0FilhQnopEfz+YV674rWGY2Il1VYxHJwGctrTJHvARolu37g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-parser/binding-win32-arm64-msvc": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.8.0.tgz", - "integrity": "sha512-mcomr1og17yCmnwn8Q7CRzrH9Va0HccWe4Ld3/u/elBsw0SEzYGVvECRzCyRglYAbKTtusz7as9Jee0RiMOMmg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@oxc-parser/binding-win32-x64-msvc": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.8.0.tgz", - "integrity": "sha512-nIBkc1KZOVYUaHT3+U+gM354P3byMAIXMvlmLMbs0kWVRcI4vrzL8qwWpC6QdBQxWKZGqPEqGolv8H4dDYA9nQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@parcel/source-map": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.1.1.tgz", - "integrity": "sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3" - }, - "engines": { - "node": "^12.18.3 || >=14" - } - }, "node_modules/@peculiar/asn1-cms": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.1.tgz", @@ -4249,6 +4029,16 @@ "acorn": "^8.9.0" } }, + "node_modules/@sveltejs/load-config": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@sveltejs/load-config/-/load-config-0.1.1.tgz", + "integrity": "sha512-BXXm+VOH/9X4N7Dd1iZ2MqA1h7M+9i2noI8QYuLDY8QcN2WHYn7D/VK/+IJNfcAmRw7ACNJ538UT9GXIhnBTiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + } + }, "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", @@ -4319,6 +4109,20 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, "node_modules/@types/babel__generator": { "version": "7.27.0", "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", @@ -4329,6 +4133,27 @@ "@babel/types": "^7.0.0" } }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, "node_modules/@types/braces": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/braces/-/braces-3.0.5.tgz", @@ -4446,6 +4271,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/lodash": { + "version": "4.17.24", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz", + "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/lodash-es": { + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz", + "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/markdown-it": { "version": "14.1.2", "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", @@ -6029,6 +5871,117 @@ } } }, + "node_modules/babel-plugin-module-resolver": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.3.tgz", + "integrity": "sha512-h8h6H71ZvdLJZxZrYkaeR30BojTaV7O9GfqacY14SNj5CNB8ocL9tydNzTC0JrnNN7vY3eJhwCmkDj7tuEUaqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-babel-config": "^2.1.1", + "glob": "^9.3.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.8" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", + "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.7.tgz", + "integrity": "sha512-V+1uQNdzybxa14e/p00HZnQNNcTjnRJjDxg2V8wtkjFctq4M7hXFws4oekyTP0Jebeq7QYtpFyOeBAjc88zvYg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", @@ -6207,6 +6160,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -6476,13 +6430,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", - "dev": true, - "license": "MIT" - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -6558,15 +6505,6 @@ "dev": true, "license": "MIT" }, - "node_modules/commander": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", - "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", - "license": "MIT", - "engines": { - "node": ">=20" - } - }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -7001,19 +6939,6 @@ "node": ">= 14" } }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/diff-match-patch": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", @@ -7497,13 +7422,6 @@ "node": ">= 0.4" } }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -8806,6 +8724,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -8814,6 +8733,29 @@ "node": ">=8" } }, + "node_modules/find-babel-config": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.2.tgz", + "integrity": "sha512-ZfZp1rQyp4gyuxqt1ZqjFGVeVBvmpURMqdIWXbPRfB97Bf6BzdK/xSIbylEINzQ0kB5tlDQfn9HkNXXWsqTqLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.3" + } + }, + "node_modules/find-babel-config/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -9908,6 +9850,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -10826,6 +10769,7 @@ "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "dev": true, "license": "MIT", + "optional": true, "engines": { "node": ">=14" }, @@ -10842,6 +10786,10 @@ "uc.micro": "^2.0.0" } }, + "node_modules/livesync-webapp": { + "resolved": "src/apps/webapp", + "link": true + }, "node_modules/locate-app": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.5.0.tgz", @@ -10893,6 +10841,13 @@ "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, + "node_modules/lodash-es": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -11093,6 +11048,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -11102,29 +11058,6 @@ "node": ">=8.6" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/minimatch": { "version": "10.2.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", @@ -11573,26 +11506,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/oxc-parser": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.8.0.tgz", - "integrity": "sha512-ObPeMkbDX7igb7NyyAC8CbVC3fY+YmlMsxsRQ2oyFBkpQtI5tjoyqSDKbS9A9EcJvt2q89C4UoC+HjVBdLYYJg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "optionalDependencies": { - "@oxc-parser/binding-darwin-arm64": "0.8.0", - "@oxc-parser/binding-darwin-x64": "0.8.0", - "@oxc-parser/binding-linux-arm64-gnu": "0.8.0", - "@oxc-parser/binding-linux-arm64-musl": "0.8.0", - "@oxc-parser/binding-linux-x64-gnu": "0.8.0", - "@oxc-parser/binding-linux-x64-musl": "0.8.0", - "@oxc-parser/binding-win32-arm64-msvc": "0.8.0", - "@oxc-parser/binding-win32-x64-msvc": "0.8.0" - } - }, "node_modules/p-cancelable": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", @@ -11862,6 +11775,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -11939,6 +11853,85 @@ "node": ">=8" } }, + "node_modules/pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-up/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-up/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/playwright": { "version": "1.58.2", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", @@ -12022,50 +12015,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-load-config": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", - "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "lilconfig": "^3.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, "node_modules/postcss-safe-parser": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", @@ -12799,6 +12748,13 @@ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", "license": "MIT" }, + "node_modules/reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "dev": true, + "license": "MIT" + }, "node_modules/resolve": { "version": "1.22.12", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", @@ -13102,6 +13058,10 @@ "dev": true, "license": "MIT" }, + "node_modules/self-hosted-livesync-cli": { + "resolved": "src/apps/cli", + "link": true + }, "node_modules/semver": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", @@ -13876,13 +13836,14 @@ } }, "node_modules/svelte-check": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.4.5.tgz", - "integrity": "sha512-1bSwIRCvvmSHrlK52fOlZmVtUZgil43jNL/2H18pRpa+eQjzGt6e3zayxhp1S7GajPFKNM/2PMCG+DZFHlG9fw==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.6.0.tgz", + "integrity": "sha512-KhVnDFDSid57mmZtHz8gfW8AAGylOZ0vPnOIzVmAL+urzwK8sBYXRss953gD8T0OdgAQ11mdWhE6uadmtOz8TQ==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", + "@sveltejs/load-config": "0.1.1", "chokidar": "^4.0.1", "fdir": "^6.2.0", "picocolors": "^1.0.0", @@ -13918,9 +13879,9 @@ } }, "node_modules/svelte-eslint-parser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.6.0.tgz", - "integrity": "sha512-qoB1ehychT6OxEtQAqc/guSqLS20SlA53Uijl7x375s8nlUT0lb9ol/gzraEEatQwsyPTJo87s2CmKL9Xab+Uw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.8.0.tgz", + "integrity": "sha512-mikR1qwIVy3t5WthUoAXkMwxkXvabZP9FJgdx35Ei7EbGWmctva1Pih16Koeor/bdNNq8NXHlwKGS6NkYTawLg==", "dev": true, "license": "MIT", "dependencies": { @@ -13934,7 +13895,7 @@ }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0", - "pnpm": "10.30.3" + "pnpm": "10.34.1" }, "funding": { "url": "https://github.com/sponsors/ota-meshi" @@ -14034,6 +13995,19 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tapable": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", @@ -14218,6 +14192,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -14516,16 +14491,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.3.tgz", - "integrity": "sha512-KgusgyDgG4LI8Ih/sWaCtZ06tckLAS5CvT5A4D1Q7bYVoAAyzwiZvE4BmwDHkhRVkvhRBepKeASoFzQetha7Fg==", + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.61.1.tgz", + "integrity": "sha512-V7PayAfJokV3pEHgN7/v03D1SpujhRfQtYLbLIiBfDDncdg4PAiRBfoS4cnCANK4jmAPncczi59QO3afiXUlNw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.59.3", - "@typescript-eslint/parser": "8.59.3", - "@typescript-eslint/typescript-estree": "8.59.3", - "@typescript-eslint/utils": "8.59.3" + "@typescript-eslint/eslint-plugin": "8.61.1", + "@typescript-eslint/parser": "8.61.1", + "@typescript-eslint/typescript-estree": "8.61.1", + "@typescript-eslint/utils": "8.61.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -14540,17 +14515,17 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.3.tgz", - "integrity": "sha512-PwFvSKsXGShKGW6n5bZOhGHEcCZXM8HofLK9fNsEwZXzFRjoY+XT1Vsf1zgyXdwTr0ZYz1/2tkZ0DBTT9jZjhw==", + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.61.1.tgz", + "integrity": "sha512-ZPlVl3PB3et/59Ne0fv/sci6ZXz4T4Hp4nTJ56i/Y0gR89ARb+KphojTq6j+56E5PIezmOIOOWyY+aWQFd+IkQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.59.3", - "@typescript-eslint/type-utils": "8.59.3", - "@typescript-eslint/utils": "8.59.3", - "@typescript-eslint/visitor-keys": "8.59.3", + "@typescript-eslint/scope-manager": "8.61.1", + "@typescript-eslint/type-utils": "8.61.1", + "@typescript-eslint/utils": "8.61.1", + "@typescript-eslint/visitor-keys": "8.61.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -14563,23 +14538,23 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.59.3", + "@typescript-eslint/parser": "^8.61.1", "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/parser": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.3.tgz", - "integrity": "sha512-HPwA+hVkfcriajbNvTmZv4VRauibay+cWArYUYq7u7W7PmGShMxbPxLvrwDme55a6d5alG3nrYfhyJ/G28XlLg==", + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.61.1.tgz", + "integrity": "sha512-PJ5vePq5/ognBbrIcoC5+SHO5dfpeLPzP9FpLkzWrguoYQEeeSjlJpVwOpo1JRSTEi7dRcwNy4h4dzV70PqHcg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.59.3", - "@typescript-eslint/types": "8.59.3", - "@typescript-eslint/typescript-estree": "8.59.3", - "@typescript-eslint/visitor-keys": "8.59.3", + "@typescript-eslint/scope-manager": "8.61.1", + "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/typescript-estree": "8.61.1", + "@typescript-eslint/visitor-keys": "8.61.1", "debug": "^4.4.3" }, "engines": { @@ -14595,14 +14570,14 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/project-service": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.3.tgz", - "integrity": "sha512-ECiUWa/KYRGDFUqTNehaRgzDshnJfkTABJxVemHk4ko22gcr0ukloKjWvyQ64g8YCV/UI47kN1dbmjf/GaQYng==", + "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.59.3", - "@typescript-eslint/types": "^8.59.3", + "@typescript-eslint/tsconfig-utils": "^8.61.1", + "@typescript-eslint/types": "^8.61.1", "debug": "^4.4.3" }, "engines": { @@ -14617,14 +14592,14 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.3.tgz", - "integrity": "sha512-t2LvZnoEfzKtnPjgeEu41xw5gxq9mQVfYy4OoZ4Vlt0sk3JwxmhCca/AR7DwOiHrjWgjAj6as4AhRLKSDfvZIA==", + "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.59.3", - "@typescript-eslint/visitor-keys": "8.59.3" + "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/visitor-keys": "8.61.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -14635,9 +14610,9 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.3.tgz", - "integrity": "sha512-PcIJHjmaREXLgIAIzLnSY9VucEzz8FKXsRgFa1DmdGCK/5tJpW03TKJF01Q6VZd1lLdz2sIKPWaDUZN9dp//dw==", + "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": { @@ -14652,15 +14627,15 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/type-utils": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.3.tgz", - "integrity": "sha512-g71d8QD8UaiHGvrJwyIS1hCX5r63w6Jll+4VEYhEAHXTDIqX1JgxhTAbEHtKntL9kuc4jRo7/GWw5xfCepSccQ==", + "version": "8.61.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.61.1.tgz", + "integrity": "sha512-GYRicKmVK0C4fsKgaACaknOUAq9Oa2kwsjnpFhFcS/5p4Ht5IP9OVLbgIgcK4SRk92nVHFluurg1lumD9dBcLw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.59.3", - "@typescript-eslint/typescript-estree": "8.59.3", - "@typescript-eslint/utils": "8.59.3", + "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/typescript-estree": "8.61.1", + "@typescript-eslint/utils": "8.61.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -14677,9 +14652,9 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.3.tgz", - "integrity": "sha512-ePFoH0g4ludssdRFqqDxQePCxU4WQyRa9+XVwjm7yLn0FKhMeoetC+qBEEI1Eyb1pGSDveTIT09Bvw2WhlGayg==", + "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": { @@ -14691,16 +14666,16 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.3.tgz", - "integrity": "sha512-CbRjVRAf7Lr9Kr8RopKcbY45p2VfmmHrm0ygOCYFi7oU8q19m0Fs/6iHS7kNOmwpp+ob07ZVcAqlxUod9lYdmg==", + "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.59.3", - "@typescript-eslint/tsconfig-utils": "8.59.3", - "@typescript-eslint/types": "8.59.3", - "@typescript-eslint/visitor-keys": "8.59.3", + "@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", @@ -14719,16 +14694,16 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.3.tgz", - "integrity": "sha512-JAvT14goBzRzzzZyqq3P9BLArIxTtQURUtFgQ/V7FO+eU+Gg6ES+5ymOPP1wRxXcxAYeivCk4uS3jCKWI1K8Zg==", + "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.59.3", - "@typescript-eslint/types": "8.59.3", - "@typescript-eslint/typescript-estree": "8.59.3" + "@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" @@ -14743,13 +14718,13 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.59.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.3.tgz", - "integrity": "sha512-f1UQF7ggd42YiwI5wGrRaPsa+P0CINBlrkLPmGfpq/u/I/oVtecoEIfFR9ag/oa1sLOsRNZ6xehf6qMZhQGBDg==", + "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.59.3", + "@typescript-eslint/types": "8.61.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -15857,6 +15832,10 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "license": "BSD-2-Clause" }, + "node_modules/webpeer": { + "resolved": "src/apps/webpeer", + "link": true + }, "node_modules/werift": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/werift/-/werift-0.23.0.tgz", @@ -16529,6 +16508,31 @@ "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } + }, + "src/apps/cli": { + "name": "self-hosted-livesync-cli", + "version": "0.0.0", + "devDependencies": {} + }, + "src/apps/webapp": { + "name": "livesync-webapp", + "version": "0.0.1", + "devDependencies": { + "typescript": "5.9.3", + "vite": "^7.3.1" + } + }, + "src/apps/webpeer": { + "version": "0.0.0", + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.2.4", + "@tsconfig/svelte": "^5.0.8", + "eslint-plugin-svelte": "^3.15.0", + "svelte": "5.41.1", + "svelte-check": "^4.6.0", + "typescript": "5.9.3", + "vite": "^7.3.1" + } } } } diff --git a/package.json b/package.json index d089abe..9392cbe 100644 --- a/package.json +++ b/package.json @@ -57,13 +57,14 @@ "test:docker-all:stop": "npm run test:docker-all:down", "test:full": "npm run test:docker-all:start && vitest run --coverage && npm run test:docker-all:stop", "test:p2p": "bash test/suitep2p/run-p2p-tests.sh", - "version": "node version-bump.mjs && git add manifest.json versions.json" + "update-workspaces": "node update-workspaces.mjs", + "version": "node version-bump.mjs && node update-workspaces.mjs && git add manifest.json versions.json src/apps/cli/package.json src/apps/webpeer/package.json src/apps/webapp/package.json" }, "keywords": [], "author": "vorotamoroz", "license": "MIT", "devDependencies": { - "@chialab/esbuild-plugin-worker": "^0.19.0", + "@dword-design/eslint-plugin-import-alias": "^8.1.8", "@eslint/js": "^9.39.3", "@sveltejs/vite-plugin-svelte": "^6.2.4", "@tsconfig/svelte": "^5.0.8", @@ -96,7 +97,6 @@ "globals": "^14.0.0", "playwright": "^1.58.2", "postcss": "^8.5.6", - "postcss-load-config": "^6.0.1", "pouchdb-adapter-http": "^9.0.0", "pouchdb-adapter-idb": "^9.0.0", "pouchdb-adapter-indexeddb": "^9.0.0", @@ -111,14 +111,15 @@ "prettier": "3.8.1", "rollup-plugin-copy": "^3.5.0", "svelte": "5.41.1", - "svelte-check": "^4.4.3", + "svelte-check": "^4.6.0", + "svelte-eslint-parser": "^1.8.0", "svelte-preprocess": "^6.0.3", "terser": "^5.39.0", "tinyglobby": "^0.2.15", "transform-pouch": "^2.0.0", - "tslib": "^2.8.1", "tsx": "^4.21.0", "typescript": "5.9.3", + "typescript-eslint": "^8.61.0", "vite": "^7.3.1", "vite-plugin-istanbul": "^8.0.0", "vitest": "^4.1.8", @@ -132,15 +133,14 @@ "@smithy/middleware-apply-body-checksum": "^4.3.9", "@smithy/protocol-http": "^5.3.9", "@smithy/querystring-builder": "^4.2.9", + "@smithy/types": "^4.14.3", "@smithy/util-retry": "^4.4.5", "@trystero-p2p/nostr": "^0.24.0", "chokidar": "^4.0.0", - "commander": "^14.0.3", "diff-match-patch": "^1.0.5", "fflate": "^0.8.2", "idb": "^8.0.3", "markdown-it": "^14.1.1", - "micromatch": "^4.0.0", "minimatch": "^10.2.2", "obsidian": "^1.12.3", "octagonal-wheels": "^0.1.46", @@ -148,5 +148,10 @@ "qrcode-generator": "^1.4.4", "werift": "^0.23.0", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" - } + }, + "workspaces": [ + "src/apps/cli", + "src/apps/webpeer", + "src/apps/webapp" + ] } diff --git a/src/apps/cli/package.json b/src/apps/cli/package.json index 07337bc..c95b3a6 100644 --- a/src/apps/cli/package.json +++ b/src/apps/cli/package.json @@ -1,7 +1,7 @@ { "name": "self-hosted-livesync-cli", "private": true, - "version": "0.0.0", + "version": "0.25.76-cli", "main": "dist/index.cjs", "type": "module", "scripts": { diff --git a/src/apps/cli/tsconfig.json b/src/apps/cli/tsconfig.json index f79193a..6edb103 100644 --- a/src/apps/cli/tsconfig.json +++ b/src/apps/cli/tsconfig.json @@ -15,18 +15,18 @@ "noEmit": true, /* Linting */ - "strict": false, + "strict": true, + // "noImplicitAny": false, "noUnusedLocals": false, "noUnusedParameters": false, "noFallthroughCasesInSwitch": true, - + // "rootDir": "../../../", /* Path mapping */ - "baseUrl": ".", "paths": { "@/*": ["../../*"], "@lib/*": ["../../lib/src/*"] } }, "include": ["*.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist", "test", "testdeno"] } diff --git a/src/apps/webapp/package.json b/src/apps/webapp/package.json index 07e8f94..bc6eaf1 100644 --- a/src/apps/webapp/package.json +++ b/src/apps/webapp/package.json @@ -1,7 +1,7 @@ { "name": "livesync-webapp", "private": true, - "version": "0.0.1", + "version": "0.25.76-webapp", "type": "module", "description": "Browser-based Self-hosted LiveSync using FileSystem API", "scripts": { diff --git a/src/apps/webpeer/package.json b/src/apps/webpeer/package.json index b2201f6..8a1f9d0 100644 --- a/src/apps/webpeer/package.json +++ b/src/apps/webpeer/package.json @@ -1,7 +1,7 @@ { "name": "webpeer", "private": true, - "version": "0.0.0", + "version": "0.25.76-webpeer", "type": "module", "scripts": { "dev": "vite", @@ -17,7 +17,7 @@ "@sveltejs/vite-plugin-svelte": "^6.2.4", "@tsconfig/svelte": "^5.0.8", "svelte": "5.41.1", - "svelte-check": "^443.3", + "svelte-check": "^4.6.0", "typescript": "5.9.3", "vite": "^7.3.1" }, diff --git a/src/apps/webpeer/tsconfig.app.json b/src/apps/webpeer/tsconfig.app.json index 5bd9975..c070f33 100644 --- a/src/apps/webpeer/tsconfig.app.json +++ b/src/apps/webpeer/tsconfig.app.json @@ -1,5 +1,5 @@ { - "extends": "@tsconfig/svelte/tsconfig.json", + "extends": "../../../tsconfig.json", "compilerOptions": { "sourceRoot": "../", "target": "ESNext", @@ -15,11 +15,13 @@ "allowJs": true, "checkJs": true, "isolatedModules": true, + "allowImportingTsExtensions": true, "moduleDetection": "force", "paths": { "@/*": ["../../*"], "@lib/*": ["../../lib/src/*"] } }, - "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] + "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.svelte"], + "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.json b/tsconfig.json index 4ec4071..099e5f9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,6 @@ "@lib/*": ["./src/lib/src/*"] } }, - "include": ["**/*.ts", "test/**/*.test.ts", "**/*.unit.spec.ts"], - "exclude": ["pouchdb-browser-webpack", "utils", "src/apps", "src/**/*.test.ts", "**/_test/**"] + "include": ["**/*.ts", "test/**/*.test.ts", "**/*.unit.spec.ts", "**/*.svelte"], + "exclude": ["pouchdb-browser-webpack", "utils", "src/apps", "src/**/*.test.ts", "**/_test/**", "utilsdeno"] } diff --git a/update-workspaces.mjs b/update-workspaces.mjs new file mode 100644 index 0000000..3664612 --- /dev/null +++ b/update-workspaces.mjs @@ -0,0 +1,111 @@ +import { readFileSync, writeFileSync, statSync, readdirSync } from 'fs'; +import { join, basename, resolve } from 'path'; + +// Read the root package.json file. +const rootPackagePath = resolve('package.json'); +let rootPackage; +try { + rootPackage = JSON.parse(readFileSync(rootPackagePath, 'utf8')); +} catch (error) { + console.error('Failed to read the root package.json:', error); + process.exit(1); +} + +const mainVersion = rootPackage.version; +if (!mainVersion) { + console.error('No version found in the root package.json.'); + process.exit(1); +} + +const workspaces = rootPackage.workspaces; +if (!workspaces || !Array.isArray(workspaces)) { + console.error('No workspaces array defined in the root package.json.'); + process.exit(1); +} + +// Collect all root dependencies for version matching. +const rootDeps = { + ...(rootPackage.dependencies || {}), + ...(rootPackage.devDependencies || {}), + ...(rootPackage.peerDependencies || {}) +}; + +// Helper function to resolve glob patterns (for example, src/apps/*) +function resolveWorkspaceDirs(patterns) { + const dirs = []; + for (const pattern of patterns) { + if (pattern.endsWith('/*')) { + const baseDir = pattern.slice(0, -2); + try { + const subDirs = readdirSync(baseDir); + for (const subDir of subDirs) { + const fullPath = join(baseDir, subDir); + if (statSync(fullPath).isDirectory()) { + dirs.push(fullPath); + } + } + } catch (error) { + console.warn(`Could not read the directory for pattern '${pattern}':`, error.message); + } + } else { + dirs.push(pattern); + } + } + return dirs; +} + +const workspaceDirs = resolveWorkspaceDirs(workspaces); + +for (const dir of workspaceDirs) { + const pkgJsonPath = join(dir, 'package.json'); + let pkg; + try { + pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf8')); + } catch (error) { + // Skip the directory if package.json does not exist. + continue; + } + + const workspaceName = basename(dir); + const targetVersion = `${mainVersion}-${workspaceName}`; + + console.log(`Updating ${pkg.name || dir}:`); + console.log(` Version: ${pkg.version} -> ${targetVersion}`); + pkg.version = targetVersion; + + // Synchronise dependencies. + if (pkg.dependencies) { + for (const dep of Object.keys(pkg.dependencies)) { + if (dep in rootDeps) { + const oldVer = pkg.dependencies[dep]; + const newVer = rootDeps[dep]; + if (oldVer !== newVer) { + console.log(` Dependency '${dep}': ${oldVer} -> ${newVer}`); + pkg.dependencies[dep] = newVer; + } + } + } + } + + // Synchronise devDependencies. + if (pkg.devDependencies) { + for (const dep of Object.keys(pkg.devDependencies)) { + if (dep in rootDeps) { + const oldVer = pkg.devDependencies[dep]; + const newVer = rootDeps[dep]; + if (oldVer !== newVer) { + console.log(` DevDependency '${dep}': ${oldVer} -> ${newVer}`); + pkg.devDependencies[dep] = newVer; + } + } + } + } + + // Write back the modified package.json file. + try { + writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 4) + '\n', 'utf8'); + console.log(` Successfully updated ${pkgJsonPath}`); + } catch (error) { + console.error(` Failed to write ${pkgJsonPath}:`, error); + } +} diff --git a/utilsdeno/deno.json b/utilsdeno/deno.json new file mode 100644 index 0000000..4fa74eb --- /dev/null +++ b/utilsdeno/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "dev": "deno run --watch --allow-net main.ts" + }, + "imports": { + "@std/assert": "jsr:@std/assert@1" + } +} diff --git a/utilsdeno/deno.lock b/utilsdeno/deno.lock new file mode 100644 index 0000000..5496e77 --- /dev/null +++ b/utilsdeno/deno.lock @@ -0,0 +1,69 @@ +{ + "version": "5", + "specifiers": { + "npm:ts-morph@*": "28.0.0", + "npm:ts-morph@latest": "28.0.0" + }, + "npm": { + "@ts-morph/common@0.29.0": { + "integrity": "sha512-35oUmphHbJvQ/+UTwFNme/t2p3FoKiGJ5auTjjpNTop2dyREspirjMy82PLSC1pnDJ8ah1GU98hwpVt64YXQsg==", + "dependencies": [ + "minimatch", + "path-browserify", + "tinyglobby" + ] + }, + "balanced-match@4.0.4": { + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==" + }, + "brace-expansion@5.0.6": { + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "dependencies": [ + "balanced-match" + ] + }, + "code-block-writer@13.0.3": { + "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==" + }, + "fdir@6.5.0_picomatch@4.0.4": { + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dependencies": [ + "picomatch" + ], + "optionalPeers": [ + "picomatch" + ] + }, + "minimatch@10.2.5": { + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dependencies": [ + "brace-expansion" + ] + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, + "picomatch@4.0.4": { + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==" + }, + "tinyglobby@0.2.16": { + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dependencies": [ + "fdir", + "picomatch" + ] + }, + "ts-morph@28.0.0": { + "integrity": "sha512-Wp3tnZ2bzwxyTZMtgWVzXDfm7lB1Drz+y9DmmYH/L702PQhPyVrp3pkou3yIz4qjS14GY9kcpmLiOOMvl8oG1g==", + "dependencies": [ + "@ts-morph/common", + "code-block-writer" + ] + } + }, + "workspace": { + "dependencies": [ + "jsr:@std/assert@1" + ] + } +} diff --git a/utilsdeno/refactor-import-utils.ts b/utilsdeno/refactor-import-utils.ts new file mode 100644 index 0000000..96e45df --- /dev/null +++ b/utilsdeno/refactor-import-utils.ts @@ -0,0 +1,187 @@ +// Delete references to utils.ts and replace them with new imports based on the importMap. +// Use this script by running `deno run --allow-read --allow-write --allow-run refactor-import-utils.ts` from the utilsdeno directory. +import { Project } from "npm:ts-morph"; + +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-import-utils.ts --run\n" + ); +} + +// const project = new Project({ tsConfigFilePath: "../src/apps/cli/tsconfig.json" }); +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); + +const importMap = new Map(); + +const targetFiles = [ + "utils.concurrency.ts", + "utils.timer.ts", + "utils.notations.ts", + "utils.database.ts", + "utils.regexp.ts", + "utils.settings.ts", + "utils.patch.ts", + "utils.misc.ts", +]; + +// 1. Map exports from our newly created subfiles +for (const sourceFile of project.getSourceFiles()) { + const filePath = sourceFile.getFilePath(); + const fileName = sourceFile.getBaseName(); + if (filePath.includes("src/lib/src/common/") && targetFiles.includes(fileName)) { + const exports = sourceFile.getExportedDeclarations(); + for (const [name] of exports) { + const relativePath = filePath.split("src/lib/src/")[1].replace(/\.ts$/, ""); + importMap.set(name, `@lib/${relativePath}`); + } + } +} + +// 2. Map exports/imports of octagonal-wheels in utils.ts +const utilsFile = project.getSourceFile("src/lib/src/common/utils.ts"); +if (utilsFile) { + // Parse imports from octagonal-wheels + for (const imp of utilsFile.getImportDeclarations()) { + const moduleSpec = imp.getModuleSpecifierValue(); + if (moduleSpec.startsWith("octagonal-wheels")) { + for (const namedImport of imp.getNamedImports()) { + importMap.set(namedImport.getName(), moduleSpec); + } + } + } + // Parse export declarations from octagonal-wheels + for (const exp of utilsFile.getExportDeclarations()) { + const moduleSpec = exp.getModuleSpecifierValue(); + if (moduleSpec && moduleSpec.startsWith("octagonal-wheels")) { + for (const namedExport of exp.getNamedExports()) { + importMap.set(namedExport.getName(), moduleSpec); + } + } + } +} + +console.log(`Built importMap with ${importMap.size} mappings.\n`); + +let modifiedFilesCount = 0; + +// 3. Loop through all source files and replace imports +for (const sourceFile of project.getSourceFiles()) { + let fileModified = false; + const imports = sourceFile.getImportDeclarations(); + + for (const imp of imports) { + const moduleSpec = imp.getModuleSpecifierValue(); + const isUtilsImport = + moduleSpec === "@lib/common/utils" || + moduleSpec === "@lib/common/utils.ts" || + moduleSpec.endsWith("/common/utils") || + moduleSpec.endsWith("/common/utils.ts"); + + if (isUtilsImport) { + const namedImports = imp.getNamedImports(); + const defaultImport = imp.getDefaultImport(); + + const importsToReplace: Record = {}; + for (const namedImport of namedImports) { + const name = namedImport.getName(); + let newPath = importMap.get(name); + if (newPath) { + // If original ended with .ts and the new path starts with @lib, keep .ts + if (moduleSpec.endsWith(".ts") && newPath.startsWith("@lib/")) { + newPath = newPath + ".ts"; + } + if (!importsToReplace[newPath]) { + importsToReplace[newPath] = []; + } + importsToReplace[newPath].push({ + name, + newPath, + isTypeOnly: namedImport.isTypeOnly() || imp.isTypeOnly(), + }); + } + } + + if (Object.keys(importsToReplace).length > 0 || (defaultImport && importMap.has(defaultImport.getText()))) { + fileModified = true; + + console.log(`File: ${sourceFile.getFilePath().split("obsidian-livesync/")[1]}`); + console.log(` Old: ${imp.getText()}`); + } + + if (!isDryRun) { + // Apply replacements + for (const newPath in importsToReplace) { + const isTypeOnly = importsToReplace[newPath].filter((i) => i.isTypeOnly); + if (isTypeOnly.length > 0) { + sourceFile.insertImportDeclaration(imp.getChildIndex(), { + namedImports: isTypeOnly.map((i) => i.name), + moduleSpecifier: newPath, + isTypeOnly: true, + }); + } + const isValueImport = importsToReplace[newPath].filter((i) => !i.isTypeOnly); + if (isValueImport.length > 0) { + sourceFile.insertImportDeclaration(imp.getChildIndex(), { + namedImports: isValueImport.map((i) => i.name), + moduleSpecifier: newPath, + isTypeOnly: false, + }); + } + for (const { name } of importsToReplace[newPath]) { + const namedImport = imp.getNamedImports().find((ni) => ni.getName() === name); + if (namedImport) { + namedImport.remove(); + } + } + } + } else { + // In dry run, just print what it would do + for (const newPath in importsToReplace) { + const names = importsToReplace[newPath].map((i) => i.name).join(", "); + console.log(` -> Would import { ${names} } from "${newPath}"`); + } + } + + if (defaultImport) { + const name = defaultImport.getText(); + let newPath = importMap.get(name); + if (newPath) { + if (moduleSpec.endsWith(".ts") && newPath.startsWith("@lib/")) { + newPath = newPath + ".ts"; + } + if (!isDryRun) { + sourceFile.insertImportDeclaration(imp.getChildIndex(), { + defaultImport: name, + moduleSpecifier: newPath, + isTypeOnly: imp.isTypeOnly(), + }); + imp.removeDefaultImport(); + } else { + console.log(` -> Would import default ${name} from "${newPath}"`); + } + } + } + + if (!isDryRun) { + if (imp.getNamedImports().length === 0 && !imp.getDefaultImport()) { + imp.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."); +} diff --git a/utilsdeno/refactor-imports.ts b/utilsdeno/refactor-imports.ts new file mode 100644 index 0000000..b7d7a6a --- /dev/null +++ b/utilsdeno/refactor-imports.ts @@ -0,0 +1,155 @@ +// Delete references to types.ts and replace them with new imports based on the importMap. It will also split imports if some are type-only and some are value imports. +// Use this script by running `deno run --allow-read --allow-write --allow-run refactor-imports.ts` from the utilsdeno directory. It will read all source files, find imports from types.ts, and replace them with the new paths based on the importMap. Make sure to review the changes before saving, as it will modify your source files. +import { Project } from "npm:ts-morph"; + +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-import-utils.ts --run\n" + ); +} + +// const project = new Project({ tsConfigFilePath: "../src/apps/cli/tsconfig.json" }); +const project = new Project({ tsConfigFilePath: "../tsconfig.json" }); + +const importMap = new Map(); +// Build a map of types moved out of Models. +// Under src/lib/src/common/models. +for (const sourceFile of project.getSourceFiles()) { + if (sourceFile.getFilePath().includes("src/lib/src/common/models")) { + const exports = sourceFile.getExportedDeclarations(); + for (const [name, declarations] of exports) { + for (const declaration of declarations) { + if ( + // declaration.getKindName() === "TypeAliasDeclaration" || + // declaration.getKindName() === "InterfaceDeclaration" || + // declaration.getKindName() === "EnumDeclaration" || + true + ) { + // console.log(`Found type export in ${sourceFile.getFilePath()}:`, name); + const relativePath = sourceFile.getFilePath().split("src/lib/src/")[1].replace(/\.ts$/, ""); + importMap.set(name, `@lib/${relativePath}`); + } + } + } + } +} +// Extras + +importMap.set("LOG_LEVEL_NOTICE", "@lib/common/logger"); +importMap.set("LOG_LEVEL_VERBOSE", "@lib/common/logger"); +importMap.set("LOG_LEVEL_INFO", "@lib/common/logger"); +importMap.set("LOG_LEVEL_DEBUG", "@lib/common/logger"); +importMap.set("LOG_LEVEL_URGENT", "@lib/common/logger"); +importMap.set("LOG_LEVEL", "@lib/common/logger"); +importMap.set("Logger", "@lib/common/logger"); + +// console.log("Import map:", importMap); + +// Loop through all files that import from types.ts. +for (const sourceFile of project.getSourceFiles()) { + const imports = sourceFile.getImportDeclarations(); + // if import from types.ts and the file is pointing `/lib/src/common/types.ts` (resolved), then we will check if the imported names exist in the importMap, if yes, we will replace the import path with the new path from importMap. + + for (const imp of imports) { + const moduleSpecifier = imp.getModuleSpecifierValue(); + if (moduleSpecifier.endsWith("types") || moduleSpecifier.endsWith("types.ts")) { + const filePath = sourceFile.getFilePath(); + const lineNumber = imp.getStartLineNumber(); + const resolvedModule = imp.getModuleSpecifierSourceFile(); + if (!resolvedModule || !resolvedModule.getFilePath().includes("/lib/src/common/types.ts")) { + continue; + } + + // Collect imports from types.ts. + const namedImports = imp.getNamedImports(); + const defaultImport = imp.getDefaultImport(); + console.log(`Found import in ${filePath} at line ${lineNumber}:`, { + namedImports: namedImports.map((ni) => ni.getText()), + defaultImport: defaultImport ? defaultImport.getText() : null, + }); + // Group imports by their names and generate new import paths based on the importMap + const importsToReplace: Record = {}; + for (const namedImport of namedImports) { + const name = namedImport.getName(); + const newPath = importMap.get(name); + if (newPath) { + console.log( + `Will replace import of ${name} in ${filePath} at line ${lineNumber} with new path:`, + newPath + ); + if (!importsToReplace[newPath]) { + importsToReplace[newPath] = []; + } + importsToReplace[newPath].push({ + name, + newPath, + isTypeOnly: namedImport.isTypeOnly() || imp.isTypeOnly(), + }); + } + } + + // For each import, generate a new path from importMap and replace it. + // Split the import when it needs to become multiple imports. + + for (const newPath in importsToReplace) { + // First, handle type-only imports. + const isTypeOnly = importsToReplace[newPath].filter((i) => i.isTypeOnly); + if (isTypeOnly.length > 0) { + sourceFile.insertImportDeclaration(imp.getChildIndex(), { + namedImports: isTypeOnly.map((i) => i.name), + moduleSpecifier: newPath, + isTypeOnly: true, + }); + } + // Then, handle non-type-only imports. + const isValueImport = importsToReplace[newPath].filter((i) => !i.isTypeOnly); + if (isValueImport.length > 0) { + sourceFile.insertImportDeclaration(imp.getChildIndex(), { + namedImports: isValueImport.map((i) => i.name), + moduleSpecifier: newPath, + isTypeOnly: false, + }); + } + // Remove the replaced named imports from the old import. + for (const { name } of importsToReplace[newPath]) { + const namedImport = imp.getNamedImports().find((ni) => ni.getName() === name); + if (namedImport) { + namedImport.remove(); + } + } + } + // If there is also a default import and it exists in importMap, replace it too. + if (defaultImport) { + const name = defaultImport.getText(); + const newPath = importMap.get(name); + + if (newPath) { + console.log( + `Replacing default import of ${name} in ${filePath} at line ${lineNumber} with new path:`, + newPath + ); + // Add the new import statement. + sourceFile.insertImportDeclaration(imp.getChildIndex(), { + defaultImport: name, + moduleSpecifier: newPath, + isTypeOnly: imp.isTypeOnly(), + }); + // Remove the default import from the old import. + imp.removeDefaultImport(); + } + } + if (imp.getNamedImports().length === 0 && !imp.getDefaultImport()) { + // Delete the entire import statement if nothing remains. + imp.remove(); + } + } + } +} + +// Save everything at the end. +if (!isDryRun) { + project.saveSync(); +} diff --git a/utilsdeno/types-add-ignore.ts b/utilsdeno/types-add-ignore.ts new file mode 100644 index 0000000..0e6109c --- /dev/null +++ b/utilsdeno/types-add-ignore.ts @@ -0,0 +1,58 @@ +import { Project, SyntaxKind } from "npm:ts-morph"; + +function processFile(filePath: string) { + const project = new Project(); + const sourceFile = project.addSourceFileAtPath(filePath); + + // 1. Collect all 'any' type nodes in the file + const anyTypeNodes = sourceFile.getDescendantsOfKind(SyntaxKind.AnyKeyword); + const sourceText = sourceFile.getFullText(); + const lineBreak = sourceText.includes("\r\n") ? "\r\n" : "\n"; + const lines = sourceText.split(/\r?\n/); + const targetLines = new Set(); + + // 2. Collect the line numbers that contain 'any' + anyTypeNodes.forEach((anyNode: any) => { + const { line } = sourceFile.getLineAndColumnAtPos(anyNode.getStart()); + targetLines.add(line - 1); + }); + + // 3. Add an inline disable only to lines that contain 'any' + for (const lineIndex of targetLines) { + const line = lines[lineIndex]; + if (!line) { + continue; + } + if (line.includes("eslint-disable-line @typescript-eslint/no-explicit-any")) { + continue; + } + lines[lineIndex] = `${line} // eslint-disable-line @typescript-eslint/no-explicit-any`; + } + + const updatedSourceText = lines.join(lineBreak); + + // Output the result + return updatedSourceText; +} + +const targetDir = `./_types/`; + +async function processDir(dirPath: string) { + for await (const entry of Deno.readDir(dirPath)) { + if (entry.isDirectory) { + await processDir(`${dirPath}/${entry.name}`); + } + if (entry.isFile && entry.name.endsWith(".d.ts")) { + const filePath = `${dirPath}/${entry.name}`; + console.log(`Processing: ${filePath}`); + const updatedContent = processFile(filePath); + // Write the file. To revert, regenerate it with npm run lib:build:types. + await Deno.writeTextFile(filePath, updatedContent); + + // console.log(`Updated content for ${filePath}:\n${updatedContent}\n`); + console.log(`Processed: ${filePath}`); + } + } +} + +await processDir(targetDir); From dcd10cd690d93d54cd5390740c65b90a9e437f39 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 04:24:55 +0100 Subject: [PATCH 2/3] Fix dependency management --- package-lock.json | 102 ++++++++++++++++++------------ package.json | 5 +- src/apps/cli/Dockerfile | 4 +- src/apps/cli/README.md | 17 +++-- src/apps/cli/package.json | 24 ++++++- src/apps/cli/runtime-package.json | 25 -------- src/apps/webapp/README.md | 18 +++++- src/apps/webapp/package.json | 11 +++- src/apps/webpeer/README.md | 13 +++- src/apps/webpeer/package.json | 4 +- 10 files changed, 136 insertions(+), 87 deletions(-) delete mode 100644 src/apps/cli/runtime-package.json diff --git a/package-lock.json b/package-lock.json index 46cb9a1..ca96fa3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,6 @@ "@smithy/types": "^4.14.3", "@smithy/util-retry": "^4.4.5", "@trystero-p2p/nostr": "^0.24.0", - "chokidar": "^4.0.0", "diff-match-patch": "^1.0.5", "fflate": "^0.8.2", "idb": "^8.0.3", @@ -31,14 +30,13 @@ "minimatch": "^10.2.2", "obsidian": "^1.12.3", "octagonal-wheels": "^0.1.46", - "pouchdb-adapter-leveldb": "^9.0.0", "qrcode-generator": "^1.4.4", - "werift": "^0.23.0", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" }, "devDependencies": { "@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", "@tsconfig/svelte": "^5.0.8", "@types/deno": "^2.5.0", @@ -94,7 +92,6 @@ "typescript": "5.9.3", "typescript-eslint": "^8.61.0", "vite": "^7.3.1", - "vite-plugin-istanbul": "^8.0.0", "vitest": "^4.1.8", "webdriverio": "^9.27.0", "yaml": "^2.8.2" @@ -2820,6 +2817,22 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@playwright/test": { + "version": "1.61.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.61.0.tgz", + "integrity": "sha512-cKA5B6lpFEMyMGjxF54QihfYpB4FkEGH+qZhtArDEG+wezQAJY8Pq6C7T1SjWz+FFzt3TbyoXBQYk/0292TdJA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.61.0" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.29", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", @@ -10763,20 +10776,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", @@ -11933,14 +11932,14 @@ } }, "node_modules/playwright": { - "version": "1.58.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", - "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", + "version": "1.61.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.61.0.tgz", + "integrity": "sha512-Z+7BeeqQPRRzklHsVFP4KTGIyMxKUmfeRA4WisM6G3/XW6nwGeX6fX9qYaDa+CiUqpOkb2f6X3nar05R3kSuJQ==", "dev": true, "license": "Apache-2.0", "peer": true, "dependencies": { - "playwright-core": "1.58.2" + "playwright-core": "1.61.0" }, "bin": { "playwright": "cli.js" @@ -11953,9 +11952,9 @@ } }, "node_modules/playwright-core": { - "version": "1.58.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", - "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", + "version": "1.61.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.61.0.tgz", + "integrity": "sha512-caX7TrY3Ml6egyDX0WUcTHDxodl/b51y5wJOdCEA36QviK/s2g081hvmGs8eaE3DWb6NYZQ6BjO/QkNRPenoPA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -12087,7 +12086,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-9.0.0.tgz", "integrity": "sha512-SnTtqwAEiAa3uxKbc1J7LfiBViwEkKe2xkK92zxyTXPqWBvMnh4UU3GXxx7GrXTM4L9llsQ3lSjpbH4CNqG1Mw==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-binary-utils": "9.0.0", @@ -12103,7 +12101,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-adapter-http/-/pouchdb-adapter-http-9.0.0.tgz", "integrity": "sha512-2eL008XeRZkdyp3hMHHOhdIPqK9H6Mn4SLlQvit4zCbqnOFfAswzPjUmHULGMbDUCrQBTu6y82FnV6NHXv9kgw==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-binary-utils": "9.0.0", @@ -12221,7 +12218,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-checkpointer/-/pouchdb-checkpointer-9.0.0.tgz", "integrity": "sha512-yu1OlWw78oTHKOkg1GoxxF2qB7YUsjK3rUDJOChMs/sVlZwOTZ4mGdWFPBr3udxSGvR77E+g89kpdmAWhPpHvA==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-collate": "9.0.0", @@ -12268,7 +12264,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-9.0.0.tgz", "integrity": "sha512-vvVhq4eEOmSkwSRwf2NBYtdhURB7ryJ7sUI4WDN00GuLUj2g8jAXBJuZIryVgdYt/5S5cfn70iRL6Eow+LFhpA==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-abstract-mapreduce": "9.0.0", @@ -12284,7 +12279,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-generate-replication-id/-/pouchdb-generate-replication-id-9.0.0.tgz", "integrity": "sha512-wetxjU0W/qNYtfHIoKwBO73ddUr0/eqzYOkoKHSFXCgOzYmTglDeqXiVY9LPysRXTgaHUJPKC5LoknZZw7e+Dw==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-collate": "9.0.0", @@ -12304,7 +12298,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-mapreduce/-/pouchdb-mapreduce-9.0.0.tgz", "integrity": "sha512-ZD8PleQ9atzQAzT2LZWsvooUVEfsen5QGv/SDfci20IleCaFW2A2q7OERrqY0YWKDCCNRsWhPWPmsFvZC9K8DQ==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-abstract-mapreduce": "9.0.0", @@ -12316,7 +12309,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-9.0.0.tgz", "integrity": "sha512-Bjh8W6QXqp1j7MKmHhYYp5cYlcQsm5drD8Jd/F+ZlfNt18uiD2SQXWzGM5797+tiW/LszFGb8ttw0uHWjxufCQ==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-utils": "9.0.0" @@ -12345,7 +12337,6 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/pouchdb-replication/-/pouchdb-replication-9.0.0.tgz", "integrity": "sha512-EZ68KJ3ZUWuPe35NxP6WnRw8J6Zudf0j/tZ/6mOSrCcp3EbtBNt8Ke2FaAThUgiFahVnHD5Y8nd53EGs2DLygg==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-checkpointer": "9.0.0", @@ -12379,7 +12370,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/pouchdb-wrappers/-/pouchdb-wrappers-5.0.0.tgz", "integrity": "sha512-fXqsVn+rmlPtxaAIGaQP5TkiaT39OMwvMk+ScLLtHrmfXD2KBO6fe/qBl38N/rpTn0h/A058dPN4fLAHt550zA==", - "dev": true, "license": "Apache-2.0" }, "node_modules/prelude-ls": { @@ -14261,7 +14251,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/transform-pouch/-/transform-pouch-2.0.0.tgz", "integrity": "sha512-nDZovo0U5o0UdMNL93fMQgGjrwH9h4F/a7qqRTnF6cVA+FfgyXiJPTrSuD+LmWSO7r2deZt0P0oeCD8hkgxl5g==", - "dev": true, "license": "Apache-2.0", "dependencies": { "pouchdb-wrappers": "^5.0.0" @@ -14305,7 +14294,6 @@ "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "~0.28.0" }, @@ -16511,19 +16499,51 @@ }, "src/apps/cli": { "name": "self-hosted-livesync-cli", - "version": "0.0.0", - "devDependencies": {} + "version": "0.25.76-cli", + "dependencies": { + "chokidar": "^4.0.0", + "minimatch": "^10.2.2", + "octagonal-wheels": "^0.1.46", + "pouchdb-adapter-http": "^9.0.0", + "pouchdb-adapter-leveldb": "^9.0.0", + "pouchdb-core": "^9.0.0", + "pouchdb-errors": "^9.0.0", + "pouchdb-find": "^9.0.0", + "pouchdb-mapreduce": "^9.0.0", + "pouchdb-merge": "^9.0.0", + "pouchdb-replication": "^9.0.0", + "pouchdb-utils": "^9.0.0", + "transform-pouch": "^2.0.0", + "werift": "^0.23.0" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.2.4", + "typescript": "5.9.3", + "vite": "^7.3.1", + "vitest": "^4.1.8" + } }, "src/apps/webapp": { "name": "livesync-webapp", - "version": "0.0.1", + "version": "0.25.76-webapp", + "dependencies": { + "octagonal-wheels": "^0.1.46" + }, "devDependencies": { + "@playwright/test": "^1.58.2", + "@sveltejs/vite-plugin-svelte": "^6.2.4", + "playwright": "^1.58.2", + "svelte": "5.41.1", "typescript": "5.9.3", - "vite": "^7.3.1" + "vite": "^7.3.1", + "vite-plugin-istanbul": "^8.0.0" } }, "src/apps/webpeer": { - "version": "0.0.0", + "version": "0.25.76-webpeer", + "dependencies": { + "octagonal-wheels": "^0.1.46" + }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^6.2.4", "@tsconfig/svelte": "^5.0.8", diff --git a/package.json b/package.json index 9392cbe..98bc88b 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "eslint-plugin-svelte": "^3.15.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", @@ -121,7 +122,6 @@ "typescript": "5.9.3", "typescript-eslint": "^8.61.0", "vite": "^7.3.1", - "vite-plugin-istanbul": "^8.0.0", "vitest": "^4.1.8", "webdriverio": "^9.27.0", "yaml": "^2.8.2" @@ -136,7 +136,6 @@ "@smithy/types": "^4.14.3", "@smithy/util-retry": "^4.4.5", "@trystero-p2p/nostr": "^0.24.0", - "chokidar": "^4.0.0", "diff-match-patch": "^1.0.5", "fflate": "^0.8.2", "idb": "^8.0.3", @@ -144,9 +143,7 @@ "minimatch": "^10.2.2", "obsidian": "^1.12.3", "octagonal-wheels": "^0.1.46", - "pouchdb-adapter-leveldb": "^9.0.0", "qrcode-generator": "^1.4.4", - "werift": "^0.23.0", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" }, "workspaces": [ diff --git a/src/apps/cli/Dockerfile b/src/apps/cli/Dockerfile index beed3b5..bf6b9bf 100644 --- a/src/apps/cli/Dockerfile +++ b/src/apps/cli/Dockerfile @@ -82,8 +82,8 @@ RUN apt-get update \ WORKDIR /deps -# runtime-package.json lists only the packages that Vite leaves external -COPY src/apps/cli/runtime-package.json ./package.json +# package.json lists only the packages that the CLI requires +COPY src/apps/cli/package.json ./package.json RUN npm install --omit=dev # ───────────────────────────────────────────────────────────────────────────── diff --git a/src/apps/cli/README.md b/src/apps/cli/README.md index 001e19c..edb1043 100644 --- a/src/apps/cli/README.md +++ b/src/apps/cli/README.md @@ -118,19 +118,26 @@ git submodule update --init --recursive # Install dependencies from the repository root npm install -# Build the CLI from its package directory +# Build the CLI from the repository root +npm run build -w self-hosted-livesync-cli + +# Or from the package directory cd src/apps/cli npm run build ``` -If `src/lib` is missing, `npm run build` now stops early with a targeted message -instead of a low-level Vite `ENOENT` error. +If `src/lib` is missing, the build process stops early with a targeted message instead of a low-level Vite `ENOENT` error. Run the CLI: ```bash -# Run with npm script (from repository root) -npm run --silent cli -- [database-path] [command] [args...] +# Run with npm workspace script (from repository root) +npm run cli -w self-hosted-livesync-cli -- [database-path] [command] [args...] + +# Or from the package directory +cd src/apps/cli +npm run cli -- [database-path] [command] [args...] + # Run the built executable directly node src/apps/cli/dist/index.cjs [database-path] [command] [args...] ``` diff --git a/src/apps/cli/package.json b/src/apps/cli/package.json index c95b3a6..3603bc0 100644 --- a/src/apps/cli/package.json +++ b/src/apps/cli/package.json @@ -38,6 +38,26 @@ "test:e2e:docker:p2p-sync": "RUN_BUILD=0 LIVESYNC_TEST_DOCKER=1 bash test/test-p2p-sync-linux.sh", "test:e2e:docker:all": "export RUN_BUILD=0 && npm run test:e2e:docker:setup-put-cat && npm run test:e2e:docker:push-pull && npm run test:e2e:docker:sync-two-local && npm run test:e2e:docker:mirror && npm run test:e2e:docker:remote-commands" }, - "dependencies": {}, - "devDependencies": {} + "dependencies": { + "chokidar": "^4.0.0", + "minimatch": "^10.2.2", + "octagonal-wheels": "^0.1.46", + "pouchdb-adapter-http": "^9.0.0", + "pouchdb-adapter-leveldb": "^9.0.0", + "pouchdb-core": "^9.0.0", + "pouchdb-errors": "^9.0.0", + "pouchdb-find": "^9.0.0", + "pouchdb-mapreduce": "^9.0.0", + "pouchdb-merge": "^9.0.0", + "pouchdb-replication": "^9.0.0", + "pouchdb-utils": "^9.0.0", + "transform-pouch": "^2.0.0", + "werift": "^0.23.0" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.2.4", + "typescript": "5.9.3", + "vite": "^7.3.1", + "vitest": "^4.1.8" + } } diff --git a/src/apps/cli/runtime-package.json b/src/apps/cli/runtime-package.json deleted file mode 100644 index 305d966..0000000 --- a/src/apps/cli/runtime-package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "livesync-cli-runtime", - "private": true, - "version": "0.0.0", - "description": "Runtime dependencies for Self-hosted LiveSync CLI Docker image", - "dependencies": { - "chokidar": "^4.0.0", - "commander": "^14.0.3", - "werift": "^0.22.9", - "pouchdb-adapter-http": "^9.0.0", - "pouchdb-adapter-idb": "^9.0.0", - "pouchdb-adapter-indexeddb": "^9.0.0", - "pouchdb-adapter-leveldb": "^9.0.0", - "pouchdb-adapter-memory": "^9.0.0", - "pouchdb-core": "^9.0.0", - "pouchdb-errors": "^9.0.0", - "pouchdb-find": "^9.0.0", - "pouchdb-mapreduce": "^9.0.0", - "pouchdb-merge": "^9.0.0", - "pouchdb-replication": "^9.0.0", - "pouchdb-utils": "^9.0.0", - "pouchdb-wrappers": "*", - "transform-pouch": "^2.0.0" - } -} diff --git a/src/apps/webapp/README.md b/src/apps/webapp/README.md index e65a4e0..ce1a6cb 100644 --- a/src/apps/webapp/README.md +++ b/src/apps/webapp/README.md @@ -35,8 +35,15 @@ npm install ### Development +From the repository root: + +```bash +npm run dev -w livesync-webapp +``` + +Or from the package directory: + ```bash -# Build the project (ensure you are in `src/apps/webapp` directory) cd src/apps/webapp npm run dev ``` @@ -45,8 +52,15 @@ This will start a development server at `http://localhost:3000`. ### Build +From the repository root: + +```bash +npm run build -w livesync-webapp +``` + +Or from the package directory: + ```bash -# Build the project (ensure you are in `src/apps/webapp` directory) cd src/apps/webapp npm run build ``` diff --git a/src/apps/webapp/package.json b/src/apps/webapp/package.json index bc6eaf1..7923b70 100644 --- a/src/apps/webapp/package.json +++ b/src/apps/webapp/package.json @@ -11,9 +11,16 @@ "run:docker": "docker run -p 8002:80 livesync-webapp", "preview": "vite preview" }, - "dependencies": {}, + "dependencies": { + "octagonal-wheels": "^0.1.46" + }, "devDependencies": { + "@playwright/test": "^1.58.2", + "@sveltejs/vite-plugin-svelte": "^6.2.4", + "playwright": "^1.58.2", + "svelte": "5.41.1", "typescript": "5.9.3", - "vite": "^7.3.1" + "vite": "^7.3.1", + "vite-plugin-istanbul": "^8.0.0" } } diff --git a/src/apps/webpeer/README.md b/src/apps/webpeer/README.md index 81a2af5..5494bd2 100644 --- a/src/apps/webpeer/README.md +++ b/src/apps/webpeer/README.md @@ -13,13 +13,20 @@ This pseudo client actually receives the data from other devices, and sends if s ## How to use it? -We can build the application by running the following command: +We can build the application from the repository root by running the following command: ```bash -$ deno task build +npm run build -w webpeer ``` -Then, open the `dist/index.html` in the browser. It can be configured as the same as the Self-hosted LiveSync (Same components are used[^1]). +Or from the package directory: + +```bash +cd src/apps/webpeer +npm run build +``` + +Then, open `dist/index.html` in the browser. It can be configured in the same way as Self-hosted LiveSync (the same components are used[^1]). ## Some notes diff --git a/src/apps/webpeer/package.json b/src/apps/webpeer/package.json index 8a1f9d0..3458641 100644 --- a/src/apps/webpeer/package.json +++ b/src/apps/webpeer/package.json @@ -11,7 +11,9 @@ "preview": "vite preview", "check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json" }, - "dependencies": {}, + "dependencies": { + "octagonal-wheels": "^0.1.46" + }, "devDependencies": { "eslint-plugin-svelte": "^3.15.0", "@sveltejs/vite-plugin-svelte": "^6.2.4", From ae9c46f8f051f6a02707a1384eb960a1fb3a2c19 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 17 Jun 2026 04:39:39 +0100 Subject: [PATCH 3/3] Fix import paths --- src/apps/cli/commands/p2p.ts | 2 +- src/apps/cli/commands/types.ts | 2 +- src/apps/cli/main.ts | 6 +- .../managers/CLIStorageEventManagerAdapter.ts | 4 +- ...CLIStorageEventManagerAdapter.unit.spec.ts | 2 +- .../cli/managers/StorageEventManagerCLI.ts | 4 +- .../cli/serviceModules/CLIServiceModules.ts | 6 +- src/apps/cli/serviceModules/FileAccessCLI.ts | 2 +- .../serviceModules/ServiceFileAccessImpl.ts | 2 +- src/apps/cli/services/NodeServiceHub.ts | 2 +- src/apps/webapp/main.ts | 4 +- .../FSAPIStorageEventManagerAdapter.ts | 2 +- .../serviceModules/FSAPIServiceModules.ts | 2 +- .../webapp/serviceModules/FileAccessFSAPI.ts | 2 +- .../serviceModules/ServiceFileAccessImpl.ts | 2 +- src/apps/webapp/test/e2e.spec.ts | 2 +- src/apps/webpeer/src/P2PReplicatorShim.ts | 4 +- src/apps/webpeer/src/UITest.svelte | 2 +- src/common/KeyValueDB.ts | 2 +- src/common/KeyValueDBv2.ts | 4 +- src/common/events.ts | 4 +- src/common/obsidianEvents.ts | 4 +- src/common/types.ts | 10 +- src/common/utils.ts | 16 +- src/features/ConfigSync/CmdConfigSync.ts | 36 ++-- src/features/ConfigSync/PluginCombo.svelte | 8 +- src/features/ConfigSync/PluginDialogModal.ts | 4 +- src/features/ConfigSync/PluginPane.svelte | 10 +- .../HiddenFileCommon/JsonResolveModal.ts | 6 +- .../HiddenFileCommon/JsonResolvePane.svelte | 8 +- .../HiddenFileSync/CmdHiddenFileSync.ts | 22 +-- src/features/LiveSyncCommands.ts | 12 +- .../CmdLocalDatabaseMainte.ts | 10 +- .../P2PReplicator/P2POpenReplicationModal.ts | 2 +- .../P2POpenReplicationPane.svelte | 2 +- .../P2PReplicator/P2PReplicatorPane.svelte | 4 +- .../P2PReplicator/P2PReplicatorPaneView.ts | 2 +- .../P2PReplicator/P2PServerStatusCard.svelte | 6 +- .../P2PReplicator/P2PServerStatusPaneView.ts | 2 +- .../P2PReplicator/PeerStatusRow.svelte | 8 +- src/lib | 2 +- src/modules/AbstractModule.ts | 2 +- src/modules/AbstractObsidianModule.ts | 6 +- src/modules/ModuleTypes.ts | 4 +- src/modules/core/ModulePeriodicProcess.ts | 4 +- src/modules/core/ModuleReplicator.ts | 12 +- src/modules/core/ModuleReplicatorCouchDB.ts | 10 +- src/modules/core/ModuleReplicatorMinIO.ts | 10 +- src/modules/core/ReplicateResultProcessor.ts | 2 +- .../coreFeatures/ModuleConflictChecker.ts | 8 +- .../coreFeatures/ModuleConflictResolver.ts | 12 +- .../ModuleResolveMismatchedTweaks.ts | 12 +- src/modules/coreObsidian/UILib/dialogs.ts | 4 +- .../coreObsidian/storageLib/utilObsidian.ts | 12 +- src/modules/essential/ModuleBasicMenu.ts | 2 +- src/modules/essential/ModuleMigration.ts | 20 +- .../APILib/ObsHttpHandler.ts | 2 +- .../essentialObsidian/ModuleObsidianEvents.ts | 12 +- .../essentialObsidian/ModuleObsidianMenu.ts | 2 +- src/modules/extras/ModuleDev.ts | 10 +- src/modules/extras/devUtil/TestPane.svelte | 8 +- src/modules/extras/devUtil/TestPaneView.ts | 4 +- src/modules/extras/devUtil/testUtils.ts | 4 +- src/modules/extras/devUtil/tests.ts | 2 +- .../DocumentHistory/DocumentHistoryModal.ts | 18 +- .../GlobalHistory/GlobalHistory.svelte | 12 +- .../GlobalHistory/GlobalHistoryView.ts | 6 +- .../ConflictResolveModal.ts | 10 +- src/modules/features/Log/LogPane.svelte | 6 +- src/modules/features/Log/LogPaneView.ts | 4 +- src/modules/features/ModuleGlobalHistory.ts | 2 +- .../ModuleInteractiveConflictResolver.ts | 8 +- src/modules/features/ModuleLog.ts | 18 +- .../features/ModuleObsidianDocumentHistory.ts | 8 +- .../ModuleObsidianSettingAsMarkdown.ts | 8 +- .../features/ModuleObsidianSettingTab.ts | 4 +- .../MultipleRegExpControl.svelte | 4 +- .../ObsidianLiveSyncSettingTab.ts | 24 +-- .../features/SettingDialogue/PaneAdvanced.ts | 2 +- .../features/SettingDialogue/PaneChangeLog.ts | 6 +- .../SettingDialogue/PaneCustomisationSync.ts | 2 +- .../features/SettingDialogue/PaneGeneral.ts | 4 +- .../SettingDialogue/PaneMaintenance.ts | 8 +- .../features/SettingDialogue/PanePatches.ts | 8 +- .../SettingDialogue/PanePowerUsers.ts | 2 +- .../SettingDialogue/PaneRemoteConfig.ts | 24 +-- .../features/SettingDialogue/PaneSelector.ts | 4 +- .../features/SettingDialogue/PaneSetup.ts | 10 +- .../SettingDialogue/PaneSyncSettings.ts | 13 +- .../features/SettingDialogue/SettingPane.ts | 4 +- .../remoteConfigBuffer.unit.spec.ts | 2 +- .../features/SettingDialogue/settingUtils.ts | 9 +- .../SettingDialogue/utilFixCouchDBSetting.ts | 14 +- src/modules/features/SetupManager.ts | 2 +- .../features/SetupManager.unit.spec.ts | 8 +- .../dialogs/OutroAskUserMode.svelte | 16 +- .../SetupWizard/dialogs/OutroNewUser.svelte | 12 +- .../dialogs/RebuildEverything.svelte | 22 +-- .../SetupWizard/dialogs/ScanQRCode.svelte | 10 +- .../dialogs/SelectMethodExisting.svelte | 16 +- .../dialogs/SelectMethodNewUser.svelte | 16 +- .../SetupWizard/dialogs/SetupRemote.svelte | 14 +- .../dialogs/SetupRemoteBucket.svelte | 16 +- .../dialogs/SetupRemoteCouchDB.svelte | 16 +- .../dialogs/SetupRemoteE2EE.svelte | 16 +- .../SetupWizard/dialogs/UseSetupURI.svelte | 14 +- .../SetupWizard/dialogs/utilCheckCouchDB.ts | 14 +- src/modules/main/ModuleLiveSyncMain.ts | 12 +- src/modules/services/ObsidianAPIService.ts | 4 +- .../services/ObsidianAppLifecycleService.ts | 4 +- src/modules/services/ObsidianConfirm.ts | 8 +- .../services/ObsidianDatabaseService.ts | 2 +- src/modules/services/ObsidianPathService.ts | 4 +- .../services/ObsidianSettingService.ts | 2 +- src/modules/services/ObsidianUIService.ts | 2 +- src/modules/services/ObsidianVaultService.ts | 6 +- src/modules/services/SvelteDialogObsidian.ts | 2 +- src/serviceFeatures/redFlag.ts | 4 +- src/serviceFeatures/redFlag.unit.spec.ts | 4 +- src/serviceFeatures/useP2PReplicatorUI.ts | 4 +- .../ObsidianConversionAdapter.ts | 4 +- .../ObsidianFileSystemAdapter.ts | 4 +- .../ObsidianStorageAdapter.ts | 6 +- .../ObsidianTypeGuardAdapter.ts | 2 +- .../ObsidianVaultAdapter.ts | 6 +- src/types.ts | 8 +- utilsdeno/normalise-imports.ts | 177 ++++++++++++++++++ 127 files changed, 634 insertions(+), 467 deletions(-) create mode 100644 utilsdeno/normalise-imports.ts diff --git a/src/apps/cli/commands/p2p.ts b/src/apps/cli/commands/p2p.ts index e3297ee..f7c78e2 100644 --- a/src/apps/cli/commands/p2p.ts +++ b/src/apps/cli/commands/p2p.ts @@ -1,4 +1,4 @@ -import type { LiveSyncBaseCore } from "../../../LiveSyncBaseCore"; +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"; diff --git a/src/apps/cli/commands/types.ts b/src/apps/cli/commands/types.ts index 88c6cde..8239646 100644 --- a/src/apps/cli/commands/types.ts +++ b/src/apps/cli/commands/types.ts @@ -1,4 +1,4 @@ -import { LiveSyncBaseCore } from "../../../LiveSyncBaseCore"; +import { LiveSyncBaseCore } from "@/LiveSyncBaseCore"; import { ServiceContext } from "@lib/services/base/ServiceBase"; import type { ObsidianLiveSyncSettings } from "@lib/common/types"; diff --git a/src/apps/cli/main.ts b/src/apps/cli/main.ts index ed4cb8b..e6d878f 100644 --- a/src/apps/cli/main.ts +++ b/src/apps/cli/main.ts @@ -7,11 +7,11 @@ 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"; +import { LiveSyncBaseCore } from "@/LiveSyncBaseCore"; import { initialiseServiceModulesCLI } from "./serviceModules/CLIServiceModules"; import { DEFAULT_SETTINGS, LOG_LEVEL_VERBOSE, type LOG_LEVEL, type ObsidianLiveSyncSettings } from "@lib/common/types"; import type { InjectableServiceHub } from "@lib/services/implements/injectable/InjectableServiceHub"; -import type { InjectableSettingService } from "@/lib/src/services/implements/injectable/InjectableSettingService"; +import type { InjectableSettingService } from "@lib/services/implements/injectable/InjectableSettingService"; import { LOG_LEVEL_DEBUG, setGlobalLogFunction, @@ -26,7 +26,7 @@ import type { CLICommand, CLIOptions } from "./commands/types"; import { getPathFromUXFileInfo } from "@lib/common/typeUtils"; import { stripAllPrefixes } from "@lib/string_and_binary/path"; import { IgnoreRules } from "./serviceModules/IgnoreRules"; -import { useP2PReplicatorFeature } from "@/lib/src/replication/trystero/useP2PReplicatorFeature"; +import { useP2PReplicatorFeature } from "@lib/replication/trystero/useP2PReplicatorFeature"; const SETTINGS_FILE = ".livesync/settings.json"; ensureGlobalNodeLocalStorage(); diff --git a/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts b/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts index f6bc9e0..64452a5 100644 --- a/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts +++ b/src/apps/cli/managers/CLIStorageEventManagerAdapter.ts @@ -10,12 +10,12 @@ import type { IStorageEventWatchHandlers, } from "@lib/managers/adapters"; import type { FileEventItemSentinel } from "@lib/managers/StorageEventManager"; -import type { NodeFile, NodeFolder } from "../adapters/NodeTypes"; +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 "../serviceModules/IgnoreRules"; +import type { IgnoreRules } from "@/apps/cli/serviceModules/IgnoreRules"; /** * CLI-specific type guard adapter diff --git a/src/apps/cli/managers/CLIStorageEventManagerAdapter.unit.spec.ts b/src/apps/cli/managers/CLIStorageEventManagerAdapter.unit.spec.ts index 5af69a9..cd3e415 100644 --- a/src/apps/cli/managers/CLIStorageEventManagerAdapter.unit.spec.ts +++ b/src/apps/cli/managers/CLIStorageEventManagerAdapter.unit.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi, beforeEach } from "vitest"; import type { IStorageEventWatchHandlers } from "@lib/managers/adapters"; -import type { NodeFile } from "../adapters/NodeTypes"; +import type { NodeFile } from "@/apps/cli/adapters/NodeTypes"; // ── chokidar mock ────────────────────────────────────────────────────────────── // Must be hoisted before imports that pull in chokidar. diff --git a/src/apps/cli/managers/StorageEventManagerCLI.ts b/src/apps/cli/managers/StorageEventManagerCLI.ts index 7838ef3..10c65ca 100644 --- a/src/apps/cli/managers/StorageEventManagerCLI.ts +++ b/src/apps/cli/managers/StorageEventManagerCLI.ts @@ -1,8 +1,8 @@ import { StorageEventManagerBase, type StorageEventManagerBaseDependencies } from "@lib/managers/StorageEventManager"; import { CLIStorageEventManagerAdapter } from "./CLIStorageEventManagerAdapter"; -import type { IMinimumLiveSyncCommands, LiveSyncBaseCore } from "../../../LiveSyncBaseCore"; +import type { IMinimumLiveSyncCommands, LiveSyncBaseCore } from "@/LiveSyncBaseCore"; import type { ServiceContext } from "@lib/services/base/ServiceBase"; -import type { IgnoreRules } from "../serviceModules/IgnoreRules"; +import type { IgnoreRules } from "@/apps/cli/serviceModules/IgnoreRules"; // import type { IMinimumLiveSyncCommands } from "@lib/services/base/IService"; export class StorageEventManagerCLI extends StorageEventManagerBase { diff --git a/src/apps/cli/serviceModules/CLIServiceModules.ts b/src/apps/cli/serviceModules/CLIServiceModules.ts index 50d185a..22e66b5 100644 --- a/src/apps/cli/serviceModules/CLIServiceModules.ts +++ b/src/apps/cli/serviceModules/CLIServiceModules.ts @@ -1,13 +1,13 @@ import type { InjectableServiceHub } from "@lib/services/implements/injectable/InjectableServiceHub"; import { ServiceRebuilder } from "@lib/serviceModules/Rebuilder"; -import { ServiceFileHandler } from "../../../serviceModules/FileHandler"; +import { ServiceFileHandler } from "@/serviceModules/FileHandler"; import { StorageAccessManager } from "@lib/managers/StorageProcessingManager"; -import type { LiveSyncBaseCore } from "../../../LiveSyncBaseCore"; +import type { LiveSyncBaseCore } from "@/LiveSyncBaseCore"; import type { ServiceContext } from "@lib/services/base/ServiceBase"; import { FileAccessCLI } from "./FileAccessCLI"; import { ServiceFileAccessCLI } from "./ServiceFileAccessImpl"; import { ServiceDatabaseFileAccessCLI } from "./DatabaseFileAccess"; -import { StorageEventManagerCLI } from "../managers/StorageEventManagerCLI"; +import { StorageEventManagerCLI } from "@/apps/cli/managers/StorageEventManagerCLI"; import type { ServiceModules } from "@lib/interfaces/ServiceModule"; import type { IgnoreRules } from "./IgnoreRules"; diff --git a/src/apps/cli/serviceModules/FileAccessCLI.ts b/src/apps/cli/serviceModules/FileAccessCLI.ts index 3aec6e0..bfdd691 100644 --- a/src/apps/cli/serviceModules/FileAccessCLI.ts +++ b/src/apps/cli/serviceModules/FileAccessCLI.ts @@ -1,5 +1,5 @@ import { FileAccessBase, type FileAccessBaseDependencies } from "@lib/serviceModules/FileAccessBase"; -import { NodeFileSystemAdapter } from "../adapters/NodeFileSystemAdapter"; +import { NodeFileSystemAdapter } from "@/apps/cli/adapters/NodeFileSystemAdapter"; /** * CLI-specific implementation of FileAccessBase diff --git a/src/apps/cli/serviceModules/ServiceFileAccessImpl.ts b/src/apps/cli/serviceModules/ServiceFileAccessImpl.ts index 718fc44..f0d307a 100644 --- a/src/apps/cli/serviceModules/ServiceFileAccessImpl.ts +++ b/src/apps/cli/serviceModules/ServiceFileAccessImpl.ts @@ -1,5 +1,5 @@ import { ServiceFileAccessBase, type StorageAccessBaseDependencies } from "@lib/serviceModules/ServiceFileAccessBase"; -import { NodeFileSystemAdapter } from "../adapters/NodeFileSystemAdapter"; +import { NodeFileSystemAdapter } from "@/apps/cli/adapters/NodeFileSystemAdapter"; /** * CLI-specific implementation of ServiceFileAccess diff --git a/src/apps/cli/services/NodeServiceHub.ts b/src/apps/cli/services/NodeServiceHub.ts index eb2ad69..2aaa093 100644 --- a/src/apps/cli/services/NodeServiceHub.ts +++ b/src/apps/cli/services/NodeServiceHub.ts @@ -24,7 +24,7 @@ import type { ServiceInstances } from "@lib/services/ServiceHub"; import { NodeKeyValueDBService } from "./NodeKeyValueDBService"; import { NodeSettingService } from "./NodeSettingService"; import { DatabaseService } from "@lib/services/base/DatabaseService"; -import type { ObsidianLiveSyncSettings } from "@/lib/src/common/types"; +import type { ObsidianLiveSyncSettings } from "@lib/common/types"; export class NodeServiceContext extends ServiceContext { databasePath: string; diff --git a/src/apps/webapp/main.ts b/src/apps/webapp/main.ts index 2d96c83..ea32268 100644 --- a/src/apps/webapp/main.ts +++ b/src/apps/webapp/main.ts @@ -17,8 +17,8 @@ import { useSetupURIFeature } from "@lib/serviceFeatures/setupObsidian/setupUri" import { useRemoteConfiguration } from "@lib/serviceFeatures/remoteConfig"; import { SetupManager } from "@/modules/features/SetupManager"; import { useSetupManagerHandlersFeature } from "@/serviceFeatures/setupObsidian/setupManagerHandlers"; -import { useP2PReplicatorCommands } from "@/lib/src/replication/trystero/useP2PReplicatorCommands"; -import { useP2PReplicatorFeature } from "@/lib/src/replication/trystero/useP2PReplicatorFeature"; +import { useP2PReplicatorCommands } from "@lib/replication/trystero/useP2PReplicatorCommands"; +import { useP2PReplicatorFeature } from "@lib/replication/trystero/useP2PReplicatorFeature"; const SETTINGS_DIR = ".livesync"; const SETTINGS_FILE = "settings.json"; diff --git a/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts b/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts index e33f5e6..b17d69e 100644 --- a/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts +++ b/src/apps/webapp/managers/FSAPIStorageEventManagerAdapter.ts @@ -10,7 +10,7 @@ import type { IStorageEventWatchHandlers, } from "@lib/managers/adapters"; import type { FileEventItemSentinel } from "@lib/managers/StorageEventManager"; -import type { FSAPIFile, FSAPIFolder } from "../adapters/FSAPITypes"; +import type { FSAPIFile, FSAPIFolder } from "@/apps/webapp/adapters/FSAPITypes"; /** * FileSystem API-specific type guard adapter diff --git a/src/apps/webapp/serviceModules/FSAPIServiceModules.ts b/src/apps/webapp/serviceModules/FSAPIServiceModules.ts index 26a0a2f..6e99bd1 100644 --- a/src/apps/webapp/serviceModules/FSAPIServiceModules.ts +++ b/src/apps/webapp/serviceModules/FSAPIServiceModules.ts @@ -7,7 +7,7 @@ import type { ServiceContext } from "@lib/services/base/ServiceBase"; import { FileAccessFSAPI } from "./FileAccessFSAPI"; import { ServiceFileAccessFSAPI } from "./ServiceFileAccessImpl"; import { ServiceDatabaseFileAccessFSAPI } from "./DatabaseFileAccess"; -import { StorageEventManagerFSAPI } from "../managers/StorageEventManagerFSAPI"; +import { StorageEventManagerFSAPI } from "@/apps/webapp/managers/StorageEventManagerFSAPI"; import type { ServiceModules } from "@lib/interfaces/ServiceModule"; import { ServiceFileHandler } from "@/serviceModules/FileHandler"; diff --git a/src/apps/webapp/serviceModules/FileAccessFSAPI.ts b/src/apps/webapp/serviceModules/FileAccessFSAPI.ts index 9d1561e..0ae67a8 100644 --- a/src/apps/webapp/serviceModules/FileAccessFSAPI.ts +++ b/src/apps/webapp/serviceModules/FileAccessFSAPI.ts @@ -1,5 +1,5 @@ import { FileAccessBase, type FileAccessBaseDependencies } from "@lib/serviceModules/FileAccessBase"; -import { FSAPIFileSystemAdapter } from "../adapters/FSAPIFileSystemAdapter"; +import { FSAPIFileSystemAdapter } from "@/apps/webapp/adapters/FSAPIFileSystemAdapter"; /** * FileSystem API-specific implementation of FileAccessBase diff --git a/src/apps/webapp/serviceModules/ServiceFileAccessImpl.ts b/src/apps/webapp/serviceModules/ServiceFileAccessImpl.ts index f5396e2..62fea06 100644 --- a/src/apps/webapp/serviceModules/ServiceFileAccessImpl.ts +++ b/src/apps/webapp/serviceModules/ServiceFileAccessImpl.ts @@ -1,5 +1,5 @@ import { ServiceFileAccessBase, type StorageAccessBaseDependencies } from "@lib/serviceModules/ServiceFileAccessBase"; -import { FSAPIFileSystemAdapter } from "../adapters/FSAPIFileSystemAdapter"; +import { FSAPIFileSystemAdapter } from "@/apps/webapp/adapters/FSAPIFileSystemAdapter"; /** * FileSystem API-specific implementation of ServiceFileAccess diff --git a/src/apps/webapp/test/e2e.spec.ts b/src/apps/webapp/test/e2e.spec.ts index ac83045..72c8343 100644 --- a/src/apps/webapp/test/e2e.spec.ts +++ b/src/apps/webapp/test/e2e.spec.ts @@ -17,7 +17,7 @@ */ import { test, expect, type BrowserContext, type Page, type TestInfo } from "@playwright/test"; -import type { LiveSyncTestAPI } from "../test-entry"; +import type { LiveSyncTestAPI } from "@/apps/webapp/test-entry"; import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; diff --git a/src/apps/webpeer/src/P2PReplicatorShim.ts b/src/apps/webpeer/src/P2PReplicatorShim.ts index 45b7631..11c9a9c 100644 --- a/src/apps/webpeer/src/P2PReplicatorShim.ts +++ b/src/apps/webpeer/src/P2PReplicatorShim.ts @@ -28,8 +28,8 @@ import { ServiceContext } from "@lib/services/base/ServiceBase"; import type { InjectableServiceHub } from "@lib/services/InjectableServices"; import { Menu } from "@lib/services/implements/browser/Menu"; import { SimpleStoreIDBv2 } from "octagonal-wheels/databases/SimpleStoreIDBv2"; -import type { BrowserAPIService } from "@/lib/src/services/implements/browser/BrowserAPIService"; -import type { InjectableSettingService } from "@/lib/src/services/implements/injectable/InjectableSettingService"; +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"; function addToList(item: string, list: string) { diff --git a/src/apps/webpeer/src/UITest.svelte b/src/apps/webpeer/src/UITest.svelte index 8cd83fc..0e6af79 100644 --- a/src/apps/webpeer/src/UITest.svelte +++ b/src/apps/webpeer/src/UITest.svelte @@ -1,5 +1,5 @@