diff --git a/package.js b/package.js index a0286dce..6e88b231 100644 --- a/package.js +++ b/package.js @@ -15,9 +15,9 @@ * * This is also true for any additional architecture beyond whatever macos supports. */ -const { packager } = require("@electron/packager"); -const { rebuild } = require("@electron/rebuild"); -const path = require("path"); +import { packager } from "@electron/packager"; +import { rebuild } from "@electron/rebuild"; +import path from "path"; // These arguments are provided by build.sh const srcDir = process.argv[2]; diff --git a/package.json b/package.json index e30efbda..94fefddd 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "Chronicles", "version": "1.0.0", - "main": "main.bundle.js", + "main": "main.bundle.mjs", "engines": { "node": ">=22.0.0" }, + "type": "module", "scripts": { "build": "./build.sh", "lint": "yarn run lint:prettier:check && yarn run lint:types:check", @@ -16,14 +17,14 @@ "prebuild": "yarn run lint && tailwindcss -i ./src/index.css -o ./src/index-compiled.css && node ./scripts/icons.js", "start": "node ./scripts/dev.mjs", "pretest": "node ./scripts/test.mjs", - "test": "mocha 'src/**/*.test.bundle.js'" + "test": "mocha 'src/**/*.test.bundle.mjs'" }, "dependencies": { "@ariakit/react": "^0.4.8", "ajv": "^8.6.2", "ajv-formats": "^2.1.0", "better-sqlite3": "^12.1.1", - "electron-store": "^8.0.1", + "electron-store": "^10.1.0", "knex": "^2.5.0", "sharp": "^0.33.5", "uuid25": "^0.1.5", diff --git a/scripts/dev.mjs b/scripts/dev.mjs index f1d45a81..bcdf38d2 100644 --- a/scripts/dev.mjs +++ b/scripts/dev.mjs @@ -46,7 +46,7 @@ let eprocess; function startElectron() { console.log("starting electron"); checkTypes(); - eprocess = cp.spawn(`${electron}`, ["src/main.bundle.js"], { + eprocess = cp.spawn(`${electron}`, ["src/main.bundle.mjs"], { stdio: "inherit", }); @@ -68,7 +68,7 @@ const restartElectron = lodash.debounce(function startElectron() { // is incremental or something, rather than a fresh sub-process) checkTypes(); console.log("restarting electron"); - eprocess = cp.spawn(`${electron}`, ["src/main.bundle.js"], { + eprocess = cp.spawn(`${electron}`, ["src/main.bundle.mjs"], { stdio: "inherit", }); @@ -127,10 +127,11 @@ async function watchPreload() { async function watchMain() { const ctxMain = await esbuild.context({ - entryPoints: ["src/electron/index.js"], - outfile: "src/main.bundle.js", + entryPoints: ["src/electron/index.ts"], + outfile: "src/main.bundle.mjs", bundle: true, platform: "node", + format: "esm", external: ["electron", "electron-store", "better-sqlite3"], plugins: [startElectronPlugin("main")], }); diff --git a/scripts/icons.js b/scripts/icons.js index c48bd88e..d010cb05 100644 --- a/scripts/icons.js +++ b/scripts/icons.js @@ -1,8 +1,8 @@ -const sharp = require("sharp"); +import sharp from "sharp"; // https://github.com/akabekobeko/npm-icon-gen -const iconGen = require("icon-gen"); -const path = require("path"); -const fs = require("fs"); +import fs from "fs"; +import iconGen from "icon-gen"; +import path from "path"; /** * This file is used to generate icons for the app based off of an input asset. Not much diff --git a/scripts/production.js b/scripts/production.js index 4272b565..59637207 100644 --- a/scripts/production.js +++ b/scripts/production.js @@ -1,4 +1,4 @@ -const esbuild = require("esbuild"); +import esbuild from "esbuild"; // After successful build, log results function afterBuild(name) { @@ -20,8 +20,9 @@ function afterBuild(name) { // build renderer bundle esbuild.build({ entryPoints: ["src/index.tsx"], - outfile: "src/renderer.bundle.js", + outfile: "src/renderer.bundle.mjs", bundle: true, + format: "esm", platform: "browser", plugins: [afterBuild("renderer")], loader: { @@ -40,15 +41,16 @@ esbuild.build({ bundle: true, platform: "node", format: "esm", - external: ["knex", "electron", "electron-store", "better-sqlite3"], + external: ["knex", "electron", "electron-store", "better-sqlite3", "sharp"], plugins: [afterBuild("preload")], }); // build electron main bundle esbuild.build({ - entryPoints: ["src/electron/index.js"], - outfile: "src/main.bundle.js", + entryPoints: ["src/electron/index.ts"], + outfile: "src/main.bundle.mjs", bundle: true, + format: "esm", platform: "node", external: ["electron", "electron-store", "better-sqlite3"], plugins: [afterBuild("main")], diff --git a/scripts/set-packaged-version.js b/scripts/set-packaged-version.js index e434cc9f..76df79e7 100644 --- a/scripts/set-packaged-version.js +++ b/scripts/set-packaged-version.js @@ -1,6 +1,10 @@ // ./scripts/set-packaged-version.js -const fs = require("fs"); -const path = require("path"); +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); const inferVersionFromEnv = () => { const tag = process.env.GIT_TAG || "0.0.0"; diff --git a/scripts/test.mjs b/scripts/test.mjs index a099c140..85c1adef 100644 --- a/scripts/test.mjs +++ b/scripts/test.mjs @@ -21,8 +21,9 @@ testFiles.forEach(async (file) => { entryPoints: [file], // NOTE: If changing filename, also update findTestFiles glob above to avoid // bundled test files being used as source! - outfile: file.replace(".test.ts", ".test.bundle.js"), + outfile: file.replace(".test.ts", ".test.bundle.mjs"), bundle: true, + format: "esm", platform: "node", external: ["mocha"], plugins: [], diff --git a/src/electron/ensureDir.js b/src/electron/ensureDir.ts similarity index 73% rename from src/electron/ensureDir.js rename to src/electron/ensureDir.ts index 55f1b287..a6c2ff75 100644 --- a/src/electron/ensureDir.js +++ b/src/electron/ensureDir.ts @@ -1,10 +1,10 @@ -const fs = require("fs"); +import fs from "fs"; /** * Borrowed from api files, since its typescript and this is not * Reconcile that later */ -exports.ensureDir = function ensureDir(directory, create = true) { +export function ensureDir(directory: string, create = true) { if (!directory) { throw new Error("ensureDir called with no directory path"); } @@ -17,11 +17,13 @@ exports.ensureDir = function ensureDir(directory, create = true) { ); } } catch (err) { - if (err.code !== "ENOENT") throw err; + if (err instanceof Error && "code" in err && err.code !== "ENOENT") + throw err; try { fs.mkdirSync(directory, { recursive: true }); } catch (err) { - if (err.code !== "EEXIST") throw err; + if (err instanceof Error && "code" in err && err.code !== "EEXIST") + throw err; } } @@ -29,4 +31,4 @@ exports.ensureDir = function ensureDir(directory, create = true) { // when actually writing. Better to move this logic to the actual file // upload handlers. fs.accessSync(directory, fs.constants.R_OK | fs.constants.W_OK); -}; +} diff --git a/src/electron/index.js b/src/electron/index.ts similarity index 88% rename from src/electron/index.js rename to src/electron/index.ts index 781d4762..e22a43a4 100644 --- a/src/electron/index.js +++ b/src/electron/index.ts @@ -1,36 +1,37 @@ -const { - app, +import { BrowserWindow, - ipcMain, - shell, + Menu, + MenuItem, + app, dialog, + ipcMain, protocol, - Menu, - MenuItemConstructorOptions, -} = require("electron"); -const path = require("path"); -const fs = require("fs"); -const url = require("url"); -const { initUserFilesDir } = require("./userFilesInit"); -const settings = require("./settings"); -const migrate = require("./migrations"); -const { ensureDir } = require("./ensureDir"); + shell, +} from "electron"; +import fs from "fs"; +import path from "path"; +import url, { fileURLToPath } from "url"; +import { ensureDir } from "./ensureDir.js"; +import migrate from "./migrations/index.js"; +import settings from "./settings.js"; +import { initUserFilesDir } from "./userFilesInit.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); // when packaged, it should be in Library/Application Support/Chronicles/settings.json // when in dev, Library/Application Support/Chronicles/settings.json initUserFilesDir(app.getPath("userData")); console.log("application settings at startup:", settings.store); -const DATABASE_URL = "DATABASE_URL"; - // Used by createWindow, but needed in database routine because of the filepicker call -let mainWindow; +let mainWindow: BrowserWindow | null = null; function setupDefaultDatabaseUrl() { - let dbUrl = settings.get(DATABASE_URL); + let dbUrl = settings.get("databaseUrl"); if (!dbUrl) { dbUrl = path.join(app.getPath("userData"), "chronicles.db"); - settings.set(DATABASE_URL, dbUrl); + settings.set("databaseUrl", dbUrl); } return dbUrl; @@ -54,7 +55,10 @@ ipcMain.handle("setup-database", async (event, dbUrl) => { return { success: true }; } catch (err) { console.error(`Error migrating the database using url: ${dbUrl}:`, err); - return { success: false, error: err.message }; + return { + success: false, + error: err instanceof Error ? err.message : "Unknown error", + }; } }); @@ -64,7 +68,12 @@ app.whenReady().then(() => { // todo: registerFileProtocol is deprecated; using the new protocol method works, // but videos don't seek properly. protocol.registerFileProtocol("chronicles", (request, callback) => { - callback({ path: validateChroniclesUrl(request.url) }); + const path = validateChroniclesUrl(request.url); + if (path) { + callback({ path }); + } else { + callback({ path: undefined }); + } }); }); @@ -78,7 +87,7 @@ app.whenReady().then(() => { * * @param {string} chroniclesUrl The "chronicles://" URL to convert */ -function validateChroniclesUrl(chroniclesUrl) { +function validateChroniclesUrl(chroniclesUrl: string) { // NOTE: chroniclesUrl SHOULD start with chronicles://../_attachments/ // NOTE: UI should also validate this, to tell user how to fix (if it comes up) if (!chroniclesUrl?.startsWith("chronicles://../_attachments")) { @@ -126,7 +135,7 @@ function validateChroniclesUrl(chroniclesUrl) { } // Checks if the resolved path is within the specified directory -function isPathWithinDirectory(resolvedPath, directory) { +function isPathWithinDirectory(resolvedPath: string, directory: string) { const relative = path.relative(directory, resolvedPath); return !relative.startsWith("..") && !path.isAbsolute(relative); } @@ -136,7 +145,7 @@ function isPathWithinDirectory(resolvedPath, directory) { * @param {string} urlString The URL to check. * @returns {boolean} True if the URL is considered safe, false otherwise. */ -function isSafeForExternalOpen(urlString) { +function isSafeForExternalOpen(urlString: string) { try { const parsedUrl = new url.URL(urlString); @@ -156,7 +165,7 @@ function isSafeForExternalOpen(urlString) { * Handle opening web and file links in system default applications. * @param {string} url */ -function handleLinkClick(url) { +function handleLinkClick(url: string) { if (url.startsWith("chronicles://")) { const sanitized = validateChroniclesUrl(url); if (sanitized) { @@ -214,7 +223,7 @@ function createWindow() { mainWindow.loadFile("index.html"); mainWindow.once("ready-to-show", () => { if (!process.env.HEADLESS) { - mainWindow.show(); + mainWindow?.show(); } }); @@ -236,18 +245,20 @@ function createWindow() { * DevTools. * @param {Electron.Main.BrowserWindow} mainWindow */ -function setupInspectElement(mainWindow) { +function setupInspectElement(mainWindow: BrowserWindow) { // type is MenuItemConstructorOptions[] - let rightClickPosition; - const contextMenuTemplate = [ + let rightClickPosition: { x: number; y: number } | null = null; + const contextMenuTemplate: any[] = [ + // todo: MenuItemConstructorOptions[] { label: "Inspect Element", - click: (item, focusedWindow) => { - if (focusedWindow) + click: (item: MenuItem, focusedWindow?: BrowserWindow) => { + if (focusedWindow && rightClickPosition) { focusedWindow.webContents.inspectElement( rightClickPosition.x, rightClickPosition.y, ); + } }, }, ]; diff --git a/src/electron/migrations/index.js b/src/electron/migrations/index.ts similarity index 76% rename from src/electron/migrations/index.js rename to src/electron/migrations/index.ts index 14f40d48..b702872e 100644 --- a/src/electron/migrations/index.js +++ b/src/electron/migrations/index.ts @@ -1,12 +1,16 @@ -const fs = require("fs"); -const path = require("path"); -const DB = require("better-sqlite3"); +import DB from "better-sqlite3"; +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); // A hacky "migration" script after bailing on Prisma and realizing // better-sqlite3 is not compatible with knex yet :| // https://github.com/knex/knex/issues/4511 // todo: real migrations, backup database while migrating -module.exports = function (dbUrl) { +export default function (dbUrl: string) { const db = DB(dbUrl); try { @@ -23,4 +27,4 @@ module.exports = function (dbUrl) { console.error("Error running migrations!", err); throw err; } -}; +} diff --git a/src/electron/settings.js b/src/electron/settings.js deleted file mode 100644 index 39799848..00000000 --- a/src/electron/settings.js +++ /dev/null @@ -1,8 +0,0 @@ -const Store = require("electron-store"); - -// https://github.com/sindresorhus/electron-store/issues/15 -// docs are good: https://github.com/sindresorhus/electron-store -// todo: JSON Schema, etc -module.exports = new Store({ - name: "settings", -}); diff --git a/src/electron/settings.ts b/src/electron/settings.ts new file mode 100644 index 00000000..e4d733ec --- /dev/null +++ b/src/electron/settings.ts @@ -0,0 +1,27 @@ +import Store from "electron-store"; + +export interface IPreferences { + databaseUrl: string; + defaultJournal: string | null; + archivedJournals: Record; + notesDir: string; + settingsDir: string; + onboarding: "new" | "complete"; + darkMode: "light" | "dark" | "system"; + fonts: { + heading?: string; + heading2?: string; + heading3?: string; + body?: string; + mono?: string; + systemBody?: string; + systemHeading?: string; + }; +} + +// https://github.com/sindresorhus/electron-store/issues/15 +// docs are good: https://github.com/sindresorhus/electron-store +// todo: JSON Schema, etc +export default new Store({ + name: "settings", +}); diff --git a/src/electron/tsconfig.json b/src/electron/tsconfig.json new file mode 100644 index 00000000..e51c0e77 --- /dev/null +++ b/src/electron/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "nodenext", + }, +} diff --git a/src/electron/userFilesInit.js b/src/electron/userFilesInit.ts similarity index 81% rename from src/electron/userFilesInit.js rename to src/electron/userFilesInit.ts index 5f84a617..7b6a1b5f 100644 --- a/src/electron/userFilesInit.js +++ b/src/electron/userFilesInit.ts @@ -1,7 +1,6 @@ -const path = require("path"); -const fs = require("fs"); -const settings = require("./settings"); -const { ensureDir } = require("./ensureDir"); +import path from "path"; +import { ensureDir } from "./ensureDir.js"; +import settings from "./settings.js"; /** * Validate user file directories, creating them if they do not exist @@ -11,10 +10,10 @@ const { ensureDir } = require("./ensureDir"); * on MacOS: ~/Library/Application Support/Chronicles * @returns void */ -exports.initUserFilesDir = (userDataDir) => { +export function initUserFilesDir(userDataDir: string) { initDir("notesDir", path.join(userDataDir, "/notes")); initDir("settingsDir", userDataDir); -}; +} /** * Initialize files / root directories with fallbacks, and ensure they can be read from / written @@ -24,7 +23,10 @@ exports.initUserFilesDir = (userDataDir) => { * @param {string} fallbackPath - Path (relative to root) to use as default for path at settingsKey * if it does not exist; will be set in settings afterwards */ -function initDir(settingsKey, fallbackPath) { +function initDir( + settingsKey: "notesDir" | "settingsDir", + fallbackPath: string, +) { let assetsPath = settings.get(settingsKey); try { diff --git a/src/markdown/index.test.ts b/src/markdown/index.test.ts index 002553db..73c8e094 100644 --- a/src/markdown/index.test.ts +++ b/src/markdown/index.test.ts @@ -2,6 +2,7 @@ import { expect } from "chai"; import fs from "fs"; import { describe, it } from "mocha"; import path from "path"; +import { fileURLToPath } from "url"; import yaml from "yaml"; import { dedent } from "../dedent.js"; @@ -9,6 +10,9 @@ import { slateToString, stringToSlate } from "./index.js"; import { mdastToSlate } from "./remark-slate-transformer/transformers/mdast-to-slate.js"; import { dig, parseMarkdown, parseMarkdownForImport } from "./test-utils.js"; +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + // Tests can structure the data this way and use runTests to // test the various conversions. interface TestDoc { diff --git a/tsconfig.json b/tsconfig.json index 68fbc881..fda6eff2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ "target": "es2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, + "module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ @@ -42,7 +42,7 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node16", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + "moduleResolution": "bundler" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ diff --git a/yarn.lock b/yarn.lock index f9470851..bc95d409 100644 --- a/yarn.lock +++ b/yarn.lock @@ -232,9 +232,9 @@ optionalDependencies: global-agent "^3.0.0" -"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2": +"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2": version "10.2.0-electron.1" - resolved "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2" + resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2" dependencies: env-paths "^2.2.0" exponential-backoff "^3.1.1" @@ -2214,10 +2214,10 @@ ajv-formats@^2.1.0: dependencies: ajv "^8.0.0" -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== +ajv-formats@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578" + integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ== dependencies: ajv "^8.0.0" @@ -2231,15 +2231,15 @@ ajv@^8.0.0, ajv@^8.6.2: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^8.6.3: - version "8.6.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" - integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== +ajv@^8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" ansi-colors@4.1.1: version "4.1.1" @@ -2322,10 +2322,13 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -atomically@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/atomically/-/atomically-1.7.0.tgz#c07a0458432ea6dbc9a3506fffa424b48bccaafe" - integrity sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w== +atomically@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/atomically/-/atomically-2.0.3.tgz#27e47bbe39994d324918491ba7c0edb7783e56cb" + integrity sha512-kU6FmrwZ3Lx7/7y3hPS5QnbJfaohcIul5fGqf7ok+4KklIEk9tJ0C2IQPdacSbVUWv6zVHXEBWoWd6NrVMT7Cw== + dependencies: + stubborn-fs "^1.2.5" + when-exit "^2.1.1" author-regex@^1.0.0: version "1.0.0" @@ -2721,21 +2724,20 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -conf@^10.0.3: - version "10.0.3" - resolved "https://registry.yarnpkg.com/conf/-/conf-10.0.3.tgz#af266186cc754daefd2749398861ec538c50da17" - integrity sha512-4gtQ/Q36qVxBzMe6B7gWOAfni1VdhuHkIzxydHkclnwGmgN+eW4bb6jj73vigCfr7d3WlmqawvhZrpCUCTPYxQ== - dependencies: - ajv "^8.6.3" - ajv-formats "^2.1.1" - atomically "^1.7.0" - debounce-fn "^4.0.0" - dot-prop "^6.0.1" - env-paths "^2.2.1" - json-schema-typed "^7.0.3" - onetime "^5.1.2" - pkg-up "^3.1.0" - semver "^7.3.5" +conf@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/conf/-/conf-14.0.0.tgz#39b9969ebfaa31ec3e3d3f177943cbbcb9062788" + integrity sha512-L6BuueHTRuJHQvQVc6YXYZRtN5vJUtOdCTLn0tRYYV5azfbAFcPghB5zEE40mVrV6w7slMTqUfkDomutIK14fw== + dependencies: + ajv "^8.17.1" + ajv-formats "^3.0.1" + atomically "^2.0.3" + debounce-fn "^6.0.0" + dot-prop "^9.0.0" + env-paths "^3.0.0" + json-schema-typed "^8.0.1" + semver "^7.7.2" + uint8array-extras "^1.4.0" cross-spawn-windows-exe@^1.1.0, cross-spawn-windows-exe@^1.2.0: version "1.2.0" @@ -2789,12 +2791,12 @@ date-fns@^3.3.1: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.3.1.tgz#7581daca0892d139736697717a168afbb908cfed" integrity sha512-y8e109LYGgoQDveiEBD3DYXKba1jWf5BA8YU1FL5Tvm0BTdEfy54WLCwnuYWZNnzzvALy/QQ4Hov+Q9RVRv+Zw== -debounce-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/debounce-fn/-/debounce-fn-4.0.0.tgz#ed76d206d8a50e60de0dd66d494d82835ffe61c7" - integrity sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ== +debounce-fn@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/debounce-fn/-/debounce-fn-6.0.0.tgz#558169aed853eb3cf3a17c0a2438e1a91a7ba44f" + integrity sha512-rBMW+F2TXryBwB54Q0d8drNEI+TfoS9JpNTAoVpukbWEhjXQq4rySFYLaqXMFXwdv61Zb2OHtj5bviSoimqxRQ== dependencies: - mimic-fn "^3.0.0" + mimic-function "^5.0.0" debug@4, debug@^4.0.0: version "4.3.2" @@ -2944,12 +2946,12 @@ dlv@^1.1.3: resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== -dot-prop@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" - integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== +dot-prop@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-9.0.0.tgz#bae5982fe6dc6b8fddb92efef4f2ddff26779e92" + integrity sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ== dependencies: - is-obj "^2.0.0" + type-fest "^4.18.2" downshift@^6.1.12: version "6.1.12" @@ -2967,13 +2969,13 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -electron-store@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/electron-store/-/electron-store-8.0.1.tgz#9b598c1d2edeffebee9d8c1cd957ad368c528925" - integrity sha512-ZyLvNywiqSpbwC/pp89O/AycVWY/UJIkmtyzF2Bd0Nm/rLmcFc0NTGuLdg6+LE8mS8qsiK5JMoe4PnrecLHH5w== +electron-store@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/electron-store/-/electron-store-10.1.0.tgz#a46d01e4a5aadcb56829f26ca03eb0faba41fe33" + integrity sha512-oL8bRy7pVCLpwhmXy05Rh/L6O93+k9t6dqSw0+MckIc3OmCTZm6Mp04Q4f/J0rtu84Ky6ywkR8ivtGOmrq+16w== dependencies: - conf "^10.0.3" - type-fest "^1.0.2" + conf "^14.0.0" + type-fest "^4.41.0" electron@^37.1.0: version "37.1.0" @@ -3013,10 +3015,10 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== -env-paths@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +env-paths@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-3.0.0.tgz#2f1e89c2f6dbd3408e1b1711dd82d62e317f58da" + integrity sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A== err-code@^2.0.2: version "2.0.3" @@ -3115,7 +3117,7 @@ extract-zip@^2.0.0, extract-zip@^2.0.1: optionalDependencies: "@types/yauzl" "^2.9.1" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -3131,6 +3133,11 @@ fast-glob@^3.3.0: merge2 "^1.3.0" micromatch "^4.0.4" +fast-uri@^3.0.1: + version "3.0.6" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.6.tgz#88f130b77cfaea2378d56bf970dea21257a68748" + integrity sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw== + fastq@^1.6.0: version "1.16.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.16.0.tgz#83b9a9375692db77a822df081edb6a9cf6839320" @@ -3193,13 +3200,6 @@ find-up@^2.0.0: dependencies: locate-path "^2.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -3758,11 +3758,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - is-plain-obj@^2.0.0, is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" @@ -3861,10 +3856,10 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema-typed@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.3.tgz#23ff481b8b4eebcd2ca123b4fa0409e66469a2d9" - integrity sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A== +json-schema-typed@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-8.0.1.tgz#826ee39e3b6cef536f85412ff048d3ff6f19dfa0" + integrity sha512-XQmWYj2Sm4kn4WeTYvmpKEbyPsL7nBsb647c7pMe6l02/yx2+Jfc4dT6UZkEXnIUb5LhD55r2HPsJ1milQ4rDg== json-stringify-safe@^5.0.1: version "5.0.1" @@ -3952,14 +3947,6 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -4572,10 +4559,10 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-fn@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-3.1.0.tgz#65755145bbf3e36954b949c16450427451d5ca74" - integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== +mimic-function@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" + integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== mimic-response@^1.0.0: version "1.0.1" @@ -4857,7 +4844,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.0, onetime@^5.1.2: +onetime@^5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -4896,13 +4883,6 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2, "p-limit@^3.1.0 ": version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -4917,13 +4897,6 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -4943,11 +4916,6 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - papaparse@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/papaparse/-/papaparse-5.4.1.tgz#f45c0f871853578bd3a30f92d96fdcfb6ebea127" @@ -5059,13 +5027,6 @@ pirates@^4.0.1: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== -pkg-up@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== - dependencies: - find-up "^3.0.0" - plist@^3.0.0, plist@^3.0.5, plist@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/plist/-/plist-3.1.0.tgz#797a516a93e62f5bde55e0b9cc9c967f860893c9" @@ -5620,6 +5581,11 @@ semver@^7.6.3: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== +semver@^7.7.2: + version "7.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" + integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== + serialize-error@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18" @@ -5885,6 +5851,11 @@ strip-outer@^1.0.1: dependencies: escape-string-regexp "^1.0.2" +stubborn-fs@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/stubborn-fs/-/stubborn-fs-1.2.5.tgz#e5e244223166921ddf66ed5e062b6b3bf285bfd2" + integrity sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g== + styled-components@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.3.1.tgz#8a86dcd31bff7049c2ed408bae36fa23f03f071a" @@ -6115,16 +6086,21 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== -type-fest@^1.0.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" - integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== +type-fest@^4.18.2, type-fest@^4.41.0: + version "4.41.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" + integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== typescript@^5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +uint8array-extras@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/uint8array-extras/-/uint8array-extras-1.4.0.tgz#e42a678a6dd335ec2d21661333ed42f44ae7cc74" + integrity sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ== + undici-types@~6.21.0: version "6.21.0" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" @@ -6321,6 +6297,11 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +when-exit@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/when-exit/-/when-exit-2.1.4.tgz#e2a0e998f7ad67eb0d2ce37e9794386663cc96f7" + integrity sha512-4rnvd3A1t16PWzrBUcSDZqcAmsUIy4minDXT/CZ8F2mVDgd65i4Aalimgz1aQkRGU0iH5eT5+6Rx2TK8o443Pg== + which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"