From d39cafbb669bc3fd6ac5bd9bbbc5429fcd99eb44 Mon Sep 17 00:00:00 2001 From: joshmlxn Date: Tue, 4 Jun 2024 12:26:14 +0100 Subject: [PATCH] update dependencies, linting .etc --- electron/.eslintrc.json => .eslintrc.json | 8 +- electron/constants/publishOptions.js | 1 - electron/main.js | 228 +++++++++++----------- electron/update.js | 36 +--- package.json | 2 +- yarn.lock | 123 ++++++------ 6 files changed, 189 insertions(+), 209 deletions(-) rename electron/.eslintrc.json => .eslintrc.json (73%) diff --git a/electron/.eslintrc.json b/.eslintrc.json similarity index 73% rename from electron/.eslintrc.json rename to .eslintrc.json index 7b4801c60..2b5541904 100644 --- a/electron/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,6 @@ { "extends": ["eslint:recommended", "plugin:prettier/recommended"], - "plugins": ["prettier", "no-unused-imports"], - "ignorePatterns": [".next/"], + "plugins": ["prettier", "unused-imports"], "rules": { "prettier/prettier": [ "error", @@ -12,7 +11,7 @@ } ], "no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], - "no-unused-imports/no-unused-imports": "error" + "unused-imports/no-unused-imports": "error" }, "parserOptions": { "ecmaVersion": "latest", @@ -21,5 +20,6 @@ "env": { "node": true, "es6": true - } + }, + "ignorePatterns": ["**/*.js", "!electron/**/*.js"] } diff --git a/electron/constants/publishOptions.js b/electron/constants/publishOptions.js index c35e64645..c827e0413 100644 --- a/electron/constants/publishOptions.js +++ b/electron/constants/publishOptions.js @@ -6,7 +6,6 @@ const publishOptions = { token: process.env.GH_TOKEN, private: false, publishAutoUpdate: true, - }; module.exports = { publishOptions }; diff --git a/electron/main.js b/electron/main.js index 0dc81a8cf..79c7ead6a 100644 --- a/electron/main.js +++ b/electron/main.js @@ -1,4 +1,4 @@ -const dotenv = require("dotenv"); +const dotenv = require('dotenv'); const { app, @@ -9,15 +9,15 @@ const { ipcMain, dialog, shell, -} = require("electron"); -const { spawn } = require("child_process"); -const path = require("path"); -const fs = require("fs"); -const os = require("os"); -const next = require("next"); -const http = require("http"); -const AdmZip = require("adm-zip"); -const { TRAY_ICONS, TRAY_ICONS_PATHS } = require("./icons"); +} = require('electron'); +const { spawn } = require('child_process'); +const path = require('path'); +const fs = require('fs'); +const os = require('os'); +const next = require('next'); +const http = require('http'); +const AdmZip = require('adm-zip'); +const { TRAY_ICONS, TRAY_ICONS_PATHS } = require('./icons'); const { setupDarwin, @@ -26,12 +26,12 @@ const { OperateDirectory, Env, dirs, -} = require("./install"); -const { killProcesses } = require("./processes"); -const { isPortAvailable, findAvailablePort } = require("./ports"); -const { PORT_RANGE, isWindows, isMac } = require("./constants"); -const { macUpdater } = require("./update"); -const { setupStoreIpc } = require("./store"); +} = require('./install'); +const { killProcesses } = require('./processes'); +const { isPortAvailable, findAvailablePort } = require('./ports'); +const { PORT_RANGE, isWindows, isMac } = require('./constants'); +const { setupMacUpdater } = require('./update'); +const { setupStoreIpc } = require('./store'); // Configure environment variables dotenv.config(); @@ -44,7 +44,7 @@ if (!singleInstanceLock) app.quit(); const macUpdater = setupMacUpdater(app); const platform = os.platform(); -const isDev = process.env.NODE_ENV === "development"; +const isDev = process.env.NODE_ENV === 'development'; let appConfig = { ports: { @@ -107,54 +107,54 @@ const getUpdatedTrayIcon = (iconPath) => { */ const createTray = () => { const trayPath = getUpdatedTrayIcon( - isWindows || isMac ? TRAY_ICONS.LOGGED_OUT : TRAY_ICONS_PATHS.LOGGED_OUT + isWindows || isMac ? TRAY_ICONS.LOGGED_OUT : TRAY_ICONS_PATHS.LOGGED_OUT, ); const tray = new Tray(trayPath); const contextMenu = Menu.buildFromTemplate([ { - label: "Show app", + label: 'Show app', click: function () { mainWindow.show(); }, }, { - label: "Hide app", + label: 'Hide app', click: function () { mainWindow.hide(); }, }, { - label: "Quit", + label: 'Quit', click: async function () { await beforeQuit(); app.quit(); }, }, ]); - tray.setToolTip("Pearl"); + tray.setToolTip('Pearl'); tray.setContextMenu(contextMenu); - ipcMain.on("tray", (_event, status) => { + ipcMain.on('tray', (_event, status) => { switch (status) { - case "low-gas": { + case 'low-gas': { const icon = getUpdatedTrayIcon( - isWindows || isMac ? TRAY_ICONS.LOW_GAS : TRAY_ICONS_PATHS.LOW_GAS + isWindows || isMac ? TRAY_ICONS.LOW_GAS : TRAY_ICONS_PATHS.LOW_GAS, ); tray.setImage(icon); break; } - case "running": { + case 'running': { const icon = getUpdatedTrayIcon( - isWindows || isMac ? TRAY_ICONS.RUNNING : TRAY_ICONS_PATHS.RUNNING + isWindows || isMac ? TRAY_ICONS.RUNNING : TRAY_ICONS_PATHS.RUNNING, ); tray.setImage(icon); break; } - case "paused": { + case 'paused': { const icon = getUpdatedTrayIcon( - isWindows || isMac ? TRAY_ICONS.PAUSED : TRAY_ICONS_PATHS.PAUSED + isWindows || isMac ? TRAY_ICONS.PAUSED : TRAY_ICONS_PATHS.PAUSED, ); tray.setImage(icon); break; @@ -174,14 +174,14 @@ const createSplashWindow = () => { height: APP_WIDTH, resizable: false, show: true, - title: "Pearl", + title: 'Pearl', frame: false, webPreferences: { nodeIntegration: true, contextIsolation: false, }, }); - splashWindow.loadURL("file://" + __dirname + "/loading/index.html"); + splashWindow.loadURL('file://' + __dirname + '/loading/index.html'); if (isDev) { splashWindow.webContents.openDevTools(); @@ -195,7 +195,7 @@ const HEIGHT = 700; const createMainWindow = () => { const width = isDev ? 840 : APP_WIDTH; mainWindow = new BrowserWindow({ - title: "Pearl", + title: 'Pearl', resizable: false, draggable: true, frame: false, @@ -207,7 +207,7 @@ const createMainWindow = () => { webPreferences: { nodeIntegration: false, contextIsolation: true, - preload: path.join(__dirname, "preload.js"), + preload: path.join(__dirname, 'preload.js'), }, }); @@ -219,15 +219,15 @@ const createMainWindow = () => { mainWindow.loadURL(`http://localhost:${appConfig.ports.prod.next}`); } - ipcMain.on("close-app", () => { + ipcMain.on('close-app', () => { mainWindow.close(); }); - ipcMain.on("minimize-app", () => { + ipcMain.on('minimize-app', () => { mainWindow.minimize(); }); - app.on("activate", () => { + app.on('activate', () => { if (mainWindow.isMinimized()) { mainWindow.restore(); } else { @@ -235,29 +235,29 @@ const createMainWindow = () => { } }); - ipcMain.on("set-height", (_event, height) => { + ipcMain.on('set-height', (_event, height) => { mainWindow.setSize(width, height); }); - ipcMain.on("show-notification", (_event, title, description) => { + ipcMain.on('show-notification', (_event, title, description) => { showNotification(title, description || undefined); }); - mainWindow.webContents.on("did-fail-load", () => { + mainWindow.webContents.on('did-fail-load', () => { mainWindow.webContents.reloadIgnoringCache(); }); - mainWindow.webContents.on("ready-to-show", () => { + mainWindow.webContents.on('ready-to-show', () => { mainWindow.show(); }); mainWindow.webContents.setWindowOpenHandler(({ url }) => { // open url in a browser and prevent default - require("electron").shell.openExternal(url); - return { action: "deny" }; + require('electron').shell.openExternal(url); + return { action: 'deny' }; }); - mainWindow.on("close", function (event) { + mainWindow.on('close', function (event) { event.preventDefault(); mainWindow.hide(); }); @@ -271,8 +271,8 @@ const createMainWindow = () => { async function launchDaemon() { function appendLog(data) { - fs.appendFileSync(`${OperateDirectory}/logs.txt`, data.trim() + "\n", { - encoding: "utf-8", + fs.appendFileSync(`${OperateDirectory}/logs.txt`, data.trim() + '\n', { + encoding: 'utf-8', }); return data; } @@ -280,7 +280,7 @@ async function launchDaemon() { // Free up backend port if already occupied try { await fetch(`http://localhost:${appConfig.ports.prod.operate}/api`); - console.log("Killing backend server!"); + console.log('Killing backend server!'); let endpoint = fs .readFileSync(`${OperateDirectory}/operate.kill`) .toString() @@ -288,40 +288,40 @@ async function launchDaemon() { .trimRight(); await fetch(`http://localhost:${appConfig.ports.prod.operate}/${endpoint}`); } catch (err) { - console.log("Backend not running!"); + console.log('Backend not running!'); } const check = new Promise(function (resolve, _reject) { operateDaemon = spawn( OperateCmd, [ - "daemon", + 'daemon', `--port=${appConfig.ports.prod.operate}`, `--home=${OperateDirectory}`, ], - { env: Env } + { env: Env }, ); operateDaemonPid = operateDaemon.pid; fs.appendFileSync( `${OperateDirectory}/operate.pip`, `${operateDaemon.pid}`, { - encoding: "utf-8", - } + encoding: 'utf-8', + }, ); - operateDaemon.stderr.on("data", (data) => { - if (data.toString().includes("Uvicorn running on")) { + operateDaemon.stderr.on('data', (data) => { + if (data.toString().includes('Uvicorn running on')) { resolve({ running: true, error: null }); } if ( - data.toString().includes("error while attempting to bind on address") + data.toString().includes('error while attempting to bind on address') ) { - resolve({ running: false, error: "Port already in use" }); + resolve({ running: false, error: 'Port already in use' }); } console.log(appendLog(data.toString().trim())); }); - operateDaemon.stdout.on("data", (data) => { + operateDaemon.stdout.on('data', (data) => { console.log(appendLog(data.toString().trim())); }); }); @@ -330,26 +330,26 @@ async function launchDaemon() { async function launchDaemonDev() { const check = new Promise(function (resolve, _reject) { - operateDaemon = spawn("poetry", [ - "run", - "operate", - "daemon", + operateDaemon = spawn('poetry', [ + 'run', + 'operate', + 'daemon', `--port=${appConfig.ports.dev.operate}`, - "--home=.operate", + '--home=.operate', ]); operateDaemonPid = operateDaemon.pid; - operateDaemon.stderr.on("data", (data) => { - if (data.toString().includes("Uvicorn running on")) { + operateDaemon.stderr.on('data', (data) => { + if (data.toString().includes('Uvicorn running on')) { resolve({ running: true, error: null }); } if ( - data.toString().includes("error while attempting to bind on address") + data.toString().includes('error while attempting to bind on address') ) { - resolve({ running: false, error: "Port already in use" }); + resolve({ running: false, error: 'Port already in use' }); } console.log(data.toString().trim()); }); - operateDaemon.stdout.on("data", (data) => { + operateDaemon.stdout.on('data', (data) => { console.log(data.toString().trim()); }); }); @@ -363,11 +363,11 @@ async function launchNextApp() { port: appConfig.ports.prod.next, env: { GNOSIS_RPC: - process.env.NODE_ENV === "production" + process.env.NODE_ENV === 'production' ? process.env.FORK_URL : process.env.DEV_RPC, NEXT_PUBLIC_BACKEND_PORT: - process.env.NODE_ENV === "production" + process.env.NODE_ENV === 'production' ? appConfig.ports.prod.operate : appConfig.ports.dev.operate, }, @@ -381,7 +381,7 @@ async function launchNextApp() { server.listen(appConfig.ports.prod.next, (err) => { if (err) throw err; console.log( - `> Next server running on http://localhost:${appConfig.ports.prod.next}` + `> Next server running on http://localhost:${appConfig.ports.prod.next}`, ); }); } @@ -390,24 +390,24 @@ async function launchNextAppDev() { await new Promise(function (resolve, _reject) { process.env.NEXT_PUBLIC_BACKEND_PORT = appConfig.ports.dev.operate; // must set next env var to connect to backend nextAppProcess = spawn( - "yarn", - ["dev:frontend", "--port", appConfig.ports.dev.next], + 'yarn', + ['dev:frontend', '--port', appConfig.ports.dev.next], { env: { ...process.env, NEXT_PUBLIC_BACKEND_PORT: appConfig.ports.dev.operate, }, - } + }, ); nextAppProcessPid = nextAppProcess.pid; - nextAppProcess.stdout.on("data", (data) => { + nextAppProcess.stdout.on('data', (data) => { console.log(data.toString().trim()); resolve(); }); }); } -ipcMain.on("check", async function (event, _argument) { +ipcMain.on('check', async function (event, _argument) { // Update try { macUpdater.checkForUpdates().then((res) => { @@ -415,14 +415,14 @@ ipcMain.on("check", async function (event, _argument) { if (!res.downloadPromise) return; new Notification({ - title: "Update Available", - body: "Downloading update...", + title: 'Update Available', + body: 'Downloading update...', }).show(); res.downloadPromise.then(() => { new Notification({ - title: "Update Downloaded", - body: "Restarting application...", + title: 'Update Downloaded', + body: 'Restarting application...', }).show(); macUpdater.quitAndInstall(); }); @@ -433,11 +433,11 @@ ipcMain.on("check", async function (event, _argument) { // Setup try { - event.sender.send("response", "Checking installation"); + event.sender.send('response', 'Checking installation'); if (!isDev) { - if (platform === "darwin") { + if (platform === 'darwin') { await setupDarwin(event.sender); - } else if (platform === "win32") { + } else if (platform === 'win32') { // TODO } else { await setupUbuntu(event.sender); @@ -446,12 +446,12 @@ ipcMain.on("check", async function (event, _argument) { if (isDev) { event.sender.send( - "response", - "Starting Pearl Daemon In Development Mode" + 'response', + 'Starting Pearl Daemon In Development Mode', ); const daemonDevPortAvailable = await isPortAvailable( - appConfig.ports.dev.operate + appConfig.ports.dev.operate, ); if (!daemonDevPortAvailable) { @@ -461,12 +461,12 @@ ipcMain.on("check", async function (event, _argument) { } await launchDaemonDev(); event.sender.send( - "response", - "Starting Frontend Server In Development Mode" + 'response', + 'Starting Frontend Server In Development Mode', ); const frontendDevPortAvailable = await isPortAvailable( - appConfig.ports.dev.next + appConfig.ports.dev.next, ); if (!frontendDevPortAvailable) { @@ -477,12 +477,12 @@ ipcMain.on("check", async function (event, _argument) { } await launchNextAppDev(); } else { - event.sender.send("response", "Starting Pearl Daemon"); + event.sender.send('response', 'Starting Pearl Daemon'); await launchDaemon(); - event.sender.send("response", "Starting Frontend Server"); + event.sender.send('response', 'Starting Frontend Server'); const frontendPortAvailable = await isPortAvailable( - appConfig.ports.prod.next + appConfig.ports.prod.next, ); if (!frontendPortAvailable) { appConfig.ports.prod.next = await findAvailablePort({ @@ -493,54 +493,54 @@ ipcMain.on("check", async function (event, _argument) { await launchNextApp(); } - event.sender.send("response", "Launching App"); + event.sender.send('response', 'Launching App'); createMainWindow(); createTray(); splashWindow.destroy(); } catch (e) { console.log(e); new Notification({ - title: "Error", + title: 'Error', body: e, }).show(); - event.sender.send("response", e); + event.sender.send('response', e); // app.quit(); } }); // APP-SPECIFIC EVENTS -app.on("ready", async () => { - if (platform === "darwin") { +app.on('ready', async () => { + if (platform === 'darwin') { app.dock?.setIcon( - path.join(__dirname, "assets/icons/splash-robot-head-dock.png") + path.join(__dirname, 'assets/icons/splash-robot-head-dock.png'), ); } createSplashWindow(); }); -app.on("window-all-closed", () => { +app.on('window-all-closed', () => { app.quit(); }); -app.on("before-quit", async () => { +app.on('before-quit', async () => { await beforeQuit(); }); // UPDATER EVENTS -macUpdater.on("update-downloaded", () => { +macUpdater.on('update-downloaded', () => { macUpdater.quitAndInstall(); }); // PROCESS SPECIFIC EVENTS (HANDLES NON-GRACEFUL TERMINATION) -process.on("uncaughtException", (error) => { - console.error("Uncaught Exception:", error); +process.on('uncaughtException', (error) => { + console.error('Uncaught Exception:', error); // Clean up your child processes here beforeQuit().then(() => { process.exit(1); // Exit with a failure code }); }); -["SIGINT", "SIGTERM"].forEach((signal) => { +['SIGINT', 'SIGTERM'].forEach((signal) => { process.on(signal, () => { console.log(`Received ${signal}. Cleaning up...`); beforeQuit().then(() => { @@ -550,16 +550,16 @@ process.on("uncaughtException", (error) => { }); // OPEN PATH -ipcMain.on("open-path", (_, filePath) => { +ipcMain.on('open-path', (_, filePath) => { shell.openPath(filePath); }); function getSanitizedLogs({ name, filePath, data }) { - const logs = filePath ? fs.readFileSync(filePath, "utf-8") : data; + const logs = filePath ? fs.readFileSync(filePath, 'utf-8') : data; const tempDir = os.tmpdir(); const usernameRegex = /\/Users\/([^/]+)/g; - const sanitizedData = logs.replace(usernameRegex, "/Users/*****"); + const sanitizedData = logs.replace(usernameRegex, '/Users/*****'); const sanitizedLogsFilePath = path.join(tempDir, name); fs.writeFileSync(sanitizedLogsFilePath, sanitizedData); @@ -568,14 +568,14 @@ function getSanitizedLogs({ name, filePath, data }) { } // EXPORT LOGS -ipcMain.handle("save-logs", async (_, data) => { +ipcMain.handle('save-logs', async (_, data) => { // version.txt const versionFile = dirs.VersionFile; // logs.txt - const logFile = getSanitizedLogs({ name: "log.txt", filePath: dirs.LogFile }); + const logFile = getSanitizedLogs({ name: 'log.txt', filePath: dirs.LogFile }); // operate.log const installationLog = getSanitizedLogs({ - name: "installation_log.txt", + name: 'installation_log.txt', filePath: dirs.OperateInstallationLog, }); @@ -590,13 +590,13 @@ ipcMain.handle("save-logs", async (_, data) => { Total Memory: ${os.totalmem()} Free Memory: ${os.freemem()} `; - const osInfoFilePath = path.join(tempDir, "os_info.txt"); + const osInfoFilePath = path.join(tempDir, 'os_info.txt'); fs.writeFileSync(osInfoFilePath, osInfo); // Persistent store let storeFilePath; if (data.store) { - storeFilePath = path.join(tempDir, "store.txt"); + storeFilePath = path.join(tempDir, 'store.txt'); fs.writeFileSync(storeFilePath, JSON.stringify(data.store, null, 2)); } @@ -604,7 +604,7 @@ ipcMain.handle("save-logs", async (_, data) => { let debugDataFilePath; if (data.debugData) { debugDataFilePath = getSanitizedLogs({ - name: "debug_data.txt", + name: 'debug_data.txt', data: JSON.stringify(data.debugData, null, 2), }); } @@ -620,9 +620,9 @@ ipcMain.handle("save-logs", async (_, data) => { // Show save dialog const { filePath } = await dialog.showSaveDialog({ - title: "Save Logs", - defaultPath: path.join(os.homedir(), "pearl_logs.zip"), - filters: [{ name: "Zip Files", extensions: ["zip"] }], + title: 'Save Logs', + defaultPath: path.join(os.homedir(), 'pearl_logs.zip'), + filters: [{ name: 'Zip Files', extensions: ['zip'] }], }); let result; diff --git a/electron/update.js b/electron/update.js index cc72aee04..9fb4023bd 100644 --- a/electron/update.js +++ b/electron/update.js @@ -1,35 +1,11 @@ -// const { publishOptions } = require('./constants/publishOptions'); -// const electronUpdater = require('electron-updater'); -// const electronLogger = require('electron-log'); +const electronUpdater = require('electron-updater'); +const electronLogger = require('electron-log'); -// const macUpdater = new electronUpdater.MacUpdater({ -// ...publishOptions, -// }); +const { publishOptions } = require('./constants/publishOptions'); -// macUpdater.logger = electronLogger; - -// macUpdater.setFeedURL({ -// ...publishOptions, -// }); - -// macUpdater.autoDownload = true; -// macUpdater.autoInstallOnAppQuit = true; -// macUpdater.logger = electronLogger; - -const { publishOptions } = require("../constants/publishOptions"); -const electronUpdater = require("electron-updater"); -const electronLogger = require("electron-log"); - -macUpdater.logger = electronLogger; - -export const setupMacUpdater = (app) => { +const setupMacUpdater = (app) => { /** @type import type { MacUpdater } from "electron-updater" */ - const macUpdater = new electronUpdater.MacUpdater( - { - ...publishOptions, - }, - app - ); + const macUpdater = new electronUpdater.MacUpdater(publishOptions, app); macUpdater.logger = electronLogger; @@ -38,4 +14,4 @@ export const setupMacUpdater = (app) => { }; }; -module.exports = { macUpdater }; +module.exports = { setupMacUpdater }; diff --git a/package.json b/package.json index 3cd9e83a8..c65b12bb3 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "cross-env": "^7.0.3", "dockerode": "^4.0.2", "dotenv": "^16.4.5", - "electron-log": "^5.1.4", + "electron-log": "^5.1.5", "electron-store": "^9.0.0", "electron-updater": "^6.3.0-alpha.4", "ethers": "5.7.2", diff --git a/yarn.lock b/yarn.lock index 9dc0da627..61633b9c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -217,9 +217,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + version "4.10.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" + integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -1004,7 +1004,7 @@ classnames "^2.3.2" rc-util "^5.24.4" -"@rc-component/trigger@^2.0.0", "@rc-component/trigger@^2.1.1": +"@rc-component/trigger@^2.0.0", "@rc-component/trigger@^2.1.1", "@rc-component/trigger@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@rc-component/trigger/-/trigger-2.2.0.tgz#503a48b0895a2cfddee0a5b7b11492c3df2a493d" integrity sha512-QarBCji02YE9aRFhZgRZmOpXBj0IZutRippsVBv85sxvG4FGk/vRxwAlkn3MS9zK5mwbETd86mAVg2tKqTkdJA== @@ -1197,9 +1197,9 @@ integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== "@types/node@*", "@types/node@^20.9.0": - version "20.13.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.13.0.tgz#011a76bc1e71ae9a026dddcfd7039084f752c4b6" - integrity sha512-FM6AOb3khNkNIXPnHFDYaHerSv8uN22C91z098AnGccVu+Pcdhi+pNUFDi0iLmPIsVE0JBD0KVS7mzUYt4nRzQ== + version "20.14.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.1.tgz#2434dbcb1f039e31f2c0e9969da93f52cf6348f3" + integrity sha512-T2MzSGEu+ysB/FkWfqmhV3PLyQlowdptmmgD20C6QxsS8Fmv5SjpZ1ayXaEC0S21/h5UJ9iA6W/5vSNU5l00OA== dependencies: undici-types "~5.26.4" @@ -1296,9 +1296,9 @@ adm-zip@^0.4.16: integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== adm-zip@^0.5.12: - version "0.5.12" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.12.tgz#87786328e91d54b37358d8a50f954c4cd73ba60b" - integrity sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ== + version "0.5.13" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.13.tgz#e2fbd87d0bb75603ccfdcb03a57a57c4831d9758" + integrity sha512-4U51tTl9J8UVEcuKGr6zRzY95tWoAa9l+ureGBNmsfleszjZblm5NyEEL/ZQxkhi86co5mZhSvL2T7gkZ6feYQ== aes-js@3.0.0: version "3.0.0" @@ -1343,14 +1343,14 @@ ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.4: uri-js "^4.2.2" ajv@^8.0.0, ajv@^8.12.0: - version "8.14.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.14.0.tgz#f514ddfd4756abb200e1704414963620a625ebbb" - integrity sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA== + version "8.15.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.15.0.tgz#d918c661e3e820bbbc65a320e182ee56a1aa978a" + integrity sha512-15BTtQUOsSrmHCy+B4VnAiJAJxJ8IFgu6fcjFQF3jQYZ78nLSQthlFg4ehp+NLIyfvFgOlxNsjKIEhydtFPVHQ== dependencies: fast-deep-equal "^3.1.3" + fast-uri "^2.3.0" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.4.1" ansi-colors@4.1.1: version "4.1.1" @@ -1399,9 +1399,9 @@ ansi-styles@^6.1.0: integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== antd@^5.14.0: - version "5.17.4" - resolved "https://registry.yarnpkg.com/antd/-/antd-5.17.4.tgz#a73bdf4ef35f909ecbf299f91af973d3fcb51d93" - integrity sha512-oDWrcibe1s72223vpvA3/dNBEotGkggyWQVX1+GVrhuVXt/QYE3oU3Tsg3PeMurohvO8kjxambqG/zbmsMG34g== + version "5.18.0" + resolved "https://registry.yarnpkg.com/antd/-/antd-5.18.0.tgz#78e3a7b3024e2db642a1046eb8f6c5eee0ae4bb3" + integrity sha512-xAvqvioW34npeZb8/JLZmCh5mcHU5MLiA0IYWAlpLAVmSgjs3p0tNzbU6a7Yx+y7o7E8PHtlchWfO3yBLQ15FQ== dependencies: "@ant-design/colors" "^7.0.2" "@ant-design/cssinjs" "^1.19.1" @@ -1412,7 +1412,7 @@ antd@^5.14.0: "@rc-component/color-picker" "~1.5.3" "@rc-component/mutate-observer" "^1.1.0" "@rc-component/tour" "~1.15.0" - "@rc-component/trigger" "^2.1.1" + "@rc-component/trigger" "^2.2.0" classnames "^2.5.1" copy-to-clipboard "^3.3.3" dayjs "^1.11.10" @@ -1421,27 +1421,27 @@ antd@^5.14.0: rc-checkbox "~3.3.0" rc-collapse "~3.7.3" rc-dialog "~9.4.0" - rc-drawer "~7.1.0" + rc-drawer "~7.2.0" rc-dropdown "~4.2.0" - rc-field-form "~2.0.1" - rc-image "~7.6.0" + rc-field-form "~2.2.0" + rc-image "~7.8.0" rc-input "~1.5.1" rc-input-number "~9.1.0" rc-mentions "~2.13.1" rc-menu "~9.14.0" rc-motion "^2.9.1" - rc-notification "~5.4.0" + rc-notification "~5.6.0" rc-pagination "~4.0.4" rc-picker "~4.5.0" rc-progress "~4.0.0" - rc-rate "~2.12.0" + rc-rate "~2.13.0" rc-resize-observer "^1.4.0" rc-segmented "~2.3.0" rc-select "~14.14.0" rc-slider "~10.6.2" rc-steps "~6.0.1" rc-switch "~4.1.0" - rc-table "~7.45.6" + rc-table "~7.45.7" rc-tabs "~15.1.0" rc-textarea "~1.7.0" rc-tooltip "~6.2.0" @@ -1837,9 +1837,9 @@ camelize@^1.0.0: integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== caniuse-lite@^1.0.30001579: - version "1.0.30001625" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001625.tgz#ead1b155ea691d6a87938754d3cb119c24465b03" - integrity sha512-4KE9N2gcRH+HQhpeiRZXd+1niLB/XNLAhSy4z7fI8EzcbcPoAqjNInxVHTiTwWfTIV4w096XG8OtCOCQQKPv3w== + version "1.0.30001627" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz#8071c42d468e06ed2fb2c545efe79a663fd326ab" + integrity sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw== case@^1.6.3: version "1.6.3" @@ -2400,7 +2400,7 @@ electron-builder@^24.12.0: simple-update-notifier "2.0.0" yargs "^17.6.2" -electron-log@^5.1.4: +electron-log@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-5.1.5.tgz#70d5051fc5ab7669b2592f53f72034867269c96e" integrity sha512-vuq10faUAxRbILgQx7yHoMObKZDEfj7hMSZrJPsVrDNeCpV/HN11dU7QuY4UDUe055pzBxhSCB3m0+6D3Aktjw== @@ -2822,6 +2822,11 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-uri@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.3.0.tgz#bdae493942483d299e7285dcb4627767d42e2793" + integrity sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -3471,9 +3476,9 @@ isexe@^2.0.0: integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== jackspeak@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.1.2.tgz#eada67ea949c6b71de50f1b09c92a961897b90ab" - integrity sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ== + version "3.2.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.2.3.tgz#33e8c44f7858d199fc5684f4ab62d1fd873eb10d" + integrity sha512-htOzIMPbpLid/Gq9/zaz9SfExABxqRe1sSCdxntlO/aMD6u0issZQiY25n2GKQUtJ02j7z5sfptlAOMpWWOmvw== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -4186,9 +4191,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== + version "3.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.0.tgz#d173ea0524a691d4c0b1181752f2b46724328cdf" + integrity sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g== progress@^2.0.3: version "2.0.3" @@ -4302,10 +4307,10 @@ rc-dialog@~9.4.0: rc-motion "^2.3.0" rc-util "^5.21.0" -rc-drawer@~7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/rc-drawer/-/rc-drawer-7.1.0.tgz#2beabb8bab1784aea255d0d850bc206c3dc715da" - integrity sha512-nBE1rF5iZvpavoyqhSSz2mk/yANltA7g3aF0U45xkx381n3we/RKs9cJfNKp9mSWCedOKWt9FLEwZDaAaOGn2w== +rc-drawer@~7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/rc-drawer/-/rc-drawer-7.2.0.tgz#8d7de2f1fd52f3ac5a25f54afbb8ac14c62e5663" + integrity sha512-9lOQ7kBekEJRdEpScHvtmEtXnAsy+NGDXiRWc2ZVC7QXAazNVbeT4EraQKYwCME8BJLa8Bxqxvs5swwyOepRwg== dependencies: "@babel/runtime" "^7.23.9" "@rc-component/portal" "^1.1.1" @@ -4323,19 +4328,19 @@ rc-dropdown@~4.2.0: classnames "^2.2.6" rc-util "^5.17.0" -rc-field-form@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/rc-field-form/-/rc-field-form-2.0.1.tgz#97dc352f3899e9617f2abfd0c09bf0fcd17409e2" - integrity sha512-3WK/POHBcfMFKrzScrkmgMIXqoVQ0KgVwcVnej/ukwuQG4ZHCJaTi2KhM+tWTK4WODBXbmjKg5pKHj2IVmSg4A== +rc-field-form@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/rc-field-form/-/rc-field-form-2.2.0.tgz#1e8d1f1d6514ec2ab7cd7e8e0aa49854416bc009" + integrity sha512-Kl7wBXCmFbRi9aPw0yiRTSPH3WQGRnOVGX/UxlEjAz2pGwsaw2MisCJ7GTXukdiybYsw8K7agDD7ZsPGUNcDKg== dependencies: "@babel/runtime" "^7.18.0" "@rc-component/async-validator" "^5.0.3" rc-util "^5.32.2" -rc-image@~7.6.0: - version "7.6.0" - resolved "https://registry.yarnpkg.com/rc-image/-/rc-image-7.6.0.tgz#2867087b77c8595ea9eb37d18ca863e47904b191" - integrity sha512-tL3Rvd1sS+frZQ01i+tkeUPaOeFz2iG9/scAt/Cfs0hyCRVA/w0Pu1J/JxIX8blalvmHE0bZQRYdOmRAzWu4Hg== +rc-image@~7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/rc-image/-/rc-image-7.8.0.tgz#d14c0e2410649fbacf71f459cc9006bdcbbaa9ac" + integrity sha512-f5lgtAvRaL+HW9to4Lt06419GJtMLCGbp9RA++nJaDEwZvsMNkKa4QtG5+kDYTVKQf6pjaakJOIPB98W/khQFw== dependencies: "@babel/runtime" "^7.11.2" "@rc-component/portal" "^1.0.2" @@ -4398,10 +4403,10 @@ rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motio classnames "^2.2.1" rc-util "^5.39.3" -rc-notification@~5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/rc-notification/-/rc-notification-5.4.0.tgz#c5ea20bfe4ed2dbacc7ef945777626c050945db8" - integrity sha512-li19y9RoYJciF3WRFvD+DvWS70jdL8Fr+Gfb/OshK+iY6iTkwzoigmSIp76/kWh5tF5i/i9im12X3nsF85GYdA== +rc-notification@~5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/rc-notification/-/rc-notification-5.6.0.tgz#1639aa30686d79ee4bb8ace05a698a5a104aaa74" + integrity sha512-TGQW5T7waOxLwgJG7fXcw8l7AQiFOjaZ7ISF5PrU526nunHRNcTMuzKihQHaF4E/h/KfOCDk3Mv8eqzbu2e28w== dependencies: "@babel/runtime" "^7.10.1" classnames "2.x" @@ -4448,10 +4453,10 @@ rc-progress@~4.0.0: classnames "^2.2.6" rc-util "^5.16.1" -rc-rate@~2.12.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/rc-rate/-/rc-rate-2.12.0.tgz#0182deffed3b009cdcc61660da8746c39ed91ed5" - integrity sha512-g092v5iZCdVzbjdn28FzvWebK2IutoVoiTeqoLTj9WM7SjA/gOJIw5/JFZMRyJYYVe1jLAU2UhAfstIpCNRozg== +rc-rate@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/rc-rate/-/rc-rate-2.13.0.tgz#642f591ccf55c3a5d84d8d212caf1f7951d203a8" + integrity sha512-oxvx1Q5k5wD30sjN5tqAyWTvJfLNNJn7Oq3IeS4HxWfAiC4BOXMITNAsw7u/fzdtO4MS8Ki8uRLOzcnEuoQiAw== dependencies: "@babel/runtime" "^7.10.1" classnames "^2.2.5" @@ -4517,7 +4522,7 @@ rc-switch@~4.1.0: classnames "^2.2.1" rc-util "^5.30.0" -rc-table@~7.45.6: +rc-table@~7.45.7: version "7.45.7" resolved "https://registry.yarnpkg.com/rc-table/-/rc-table-7.45.7.tgz#f7c509e05c677a30ad5b212750122da6f5318004" integrity sha512-wi9LetBL1t1csxyGkMB2p3mCiMt+NDexMlPbXHvQFmBBAsMxrgNSAPwUci2zDLUq9m8QdWc1Nh8suvrpy9mXrg== @@ -5356,9 +5361,9 @@ type-fest@^3.8.0: integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== type-fest@^4.18.1: - version "4.18.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.18.3.tgz#5249f96e7c2c3f0f1561625f54050e343f1c8f68" - integrity sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ== + version "4.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.19.0.tgz#f7d3d5f55a7a118b5fe3d2eef53059cf8e516dcd" + integrity sha512-CN2l+hWACRiejlnr68vY0/7734Kzu+9+TOslUXbSCQ1ruY9XIHDBSceVXCcHm/oXrdzhtLMMdJEKfemf1yXiZQ== typescript@^5.3.3: version "5.4.5" @@ -5397,7 +5402,7 @@ unpipe@1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -uri-js@^4.2.2, uri-js@^4.4.1: +uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==