diff --git a/server/endpoints/admin.js b/server/endpoints/admin.js index 351d65f7c..7922b29ef 100644 --- a/server/endpoints/admin.js +++ b/server/endpoints/admin.js @@ -3,7 +3,6 @@ const { Document } = require("../models/documents"); const { EventLogs } = require("../models/eventLogs"); const { Invite } = require("../models/invite"); const { SystemSettings } = require("../models/systemSettings"); -const { Telemetry } = require("../models/telemetry"); const { User } = require("../models/user"); const { DocumentVectors } = require("../models/vectors"); const { Workspace } = require("../models/workspace"); diff --git a/server/endpoints/api/openai/helpers.js b/server/endpoints/api/openai/helpers.js index 6d54f7704..64467302e 100644 --- a/server/endpoints/api/openai/helpers.js +++ b/server/endpoints/api/openai/helpers.js @@ -21,7 +21,7 @@ function getMimeTypeFromDataUrl(dataUrl) { try { const matches = dataUrl.match(/^data:([^;]+);base64,/); return matches ? matches[1].toLowerCase() : "image/png"; - } catch (e) { + } catch { return "image/png"; } } diff --git a/server/endpoints/system.js b/server/endpoints/system.js index ccd6a989c..7115960c2 100644 --- a/server/endpoints/system.js +++ b/server/endpoints/system.js @@ -1506,8 +1506,8 @@ function systemEndpoints(app) { "/system/validate-sql-connection", [validatedRequest, flexUserRoleValid([ROLES.admin])], async (request, response) => { + const { engine, connectionString } = reqBody(request); try { - const { engine, connectionString } = reqBody(request); if (!engine || !connectionString) { return response.status(400).json({ success: false, diff --git a/server/endpoints/workspaces.js b/server/endpoints/workspaces.js index 394dfe43f..ba319343f 100644 --- a/server/endpoints/workspaces.js +++ b/server/endpoints/workspaces.js @@ -49,7 +49,7 @@ function workspaceEndpoints(app) { async (request, response) => { try { const user = await userFromSession(request, response); - const { name = null, onboardingComplete = false } = reqBody(request); + const { name = null } = reqBody(request); const { workspace, message } = await Workspace.new(name, user?.id); await Telemetry.sendTelemetry( "workspace_created", diff --git a/server/endpoints/workspacesParsedFiles.js b/server/endpoints/workspacesParsedFiles.js index fde289a72..1bf0b97a1 100644 --- a/server/endpoints/workspacesParsedFiles.js +++ b/server/endpoints/workspacesParsedFiles.js @@ -105,6 +105,7 @@ function workspaceParsedFilesEndpoints(app) { console.error(e.message, e); return response.sendStatus(500).end(); } finally { + // eslint-disable-next-line if (!fileId) return; await WorkspaceParsedFiles.delete({ id: parseInt(fileId) }); } diff --git a/server/eslint.config.mjs b/server/eslint.config.mjs new file mode 100644 index 000000000..876f5c14d --- /dev/null +++ b/server/eslint.config.mjs @@ -0,0 +1,38 @@ +import js from "@eslint/js"; +import globals from "globals"; +import { defineConfig } from "eslint/config"; +import pluginPrettier from "eslint-plugin-prettier"; +import configPrettier from "eslint-config-prettier"; +import unusedImports from "eslint-plugin-unused-imports"; + +export default defineConfig([ + { ignores: ["__tests__/**", "**/syncStaticLists.mjs"] }, + { + files: ["**/*.{js,mjs,cjs}"], + plugins: { js, prettier: pluginPrettier, "unused-imports": unusedImports }, + extends: ["js/recommended"], + languageOptions: { globals: { ...globals.node, ...globals.browser } }, + rules: { + ...configPrettier.rules, + "prettier/prettier": "error", + "no-case-declarations": "off", + "no-prototype-builtins": "off", + "no-async-promise-executor": "off", + "no-extra-boolean-cast": "off", + "no-empty": "off", + "no-unused-private-class-members": "warn", + "no-unused-vars": "off", + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": [ + "error", + { + vars: "all", + varsIgnorePattern: "^_", + args: "after-used", + argsIgnorePattern: "^_", + }, + ], + }, + }, + { files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } }, +]); diff --git a/server/jobs/cleanup-orphan-documents.js b/server/jobs/cleanup-orphan-documents.js index bd532fa6d..b5b3e2aaa 100644 --- a/server/jobs/cleanup-orphan-documents.js +++ b/server/jobs/cleanup-orphan-documents.js @@ -26,7 +26,7 @@ async function batchDeleteFiles(filesToDelete, batchSize = 500) { log( `Deleted batch ${Math.floor(i / batchSize) + 1}: ${batch.length} files` ); - } catch (err) { + } catch { // If batch fails, try individual files sync for (const filePath of batch) { try { diff --git a/server/jobs/helpers/index.js b/server/jobs/helpers/index.js index e8d83f822..e4449d06d 100644 --- a/server/jobs/helpers/index.js +++ b/server/jobs/helpers/index.js @@ -1,18 +1,22 @@ -const path = require('node:path'); -const fs = require('node:fs'); -const { parentPort } = require('node:worker_threads'); +const path = require("node:path"); +const fs = require("node:fs"); +const { parentPort } = require("node:worker_threads"); const documentsPath = process.env.NODE_ENV === "development" ? path.resolve(__dirname, `../../storage/documents`) : path.resolve(process.env.STORAGE_DIR, `documents`); -function log(stringContent = '') { - if (parentPort) parentPort.postMessage(`\x1b[33m[${process.pid}]\x1b[0m: ${stringContent}`); // running as worker - else process.send(`\x1b[33m[${process.ppid}:${process.pid}]\x1b[0m: ${stringContent}`); // running as child_process +function log(stringContent = "") { + if (parentPort) + parentPort.postMessage(`\x1b[33m[${process.pid}]\x1b[0m: ${stringContent}`); // running as worker + else + process.send( + `\x1b[33m[${process.ppid}:${process.pid}]\x1b[0m: ${stringContent}` + ); // running as child_process } function conclude() { - if (parentPort) parentPort.postMessage('done'); + if (parentPort) parentPort.postMessage("done"); else process.exit(0); } @@ -27,4 +31,4 @@ module.exports = { log, conclude, updateSourceDocument, -} \ No newline at end of file +}; diff --git a/server/jobs/sync-watched-documents.js b/server/jobs/sync-watched-documents.js index 0b3a72d1d..f4464ebe0 100644 --- a/server/jobs/sync-watched-documents.js +++ b/server/jobs/sync-watched-documents.js @@ -1,152 +1,208 @@ -const { Document } = require('../models/documents.js'); -const { DocumentSyncQueue } = require('../models/documentSyncQueue.js'); -const { CollectorApi } = require('../utils/collectorApi'); +const { Document } = require("../models/documents.js"); +const { DocumentSyncQueue } = require("../models/documentSyncQueue.js"); +const { CollectorApi } = require("../utils/collectorApi"); const { fileData } = require("../utils/files"); -const { log, conclude, updateSourceDocument } = require('./helpers/index.js'); -const { getVectorDbClass } = require('../utils/helpers/index.js'); -const { DocumentSyncRun } = require('../models/documentSyncRun.js'); +const { log, conclude, updateSourceDocument } = require("./helpers/index.js"); +const { getVectorDbClass } = require("../utils/helpers/index.js"); +const { DocumentSyncRun } = require("../models/documentSyncRun.js"); (async () => { try { const queuesToProcess = await DocumentSyncQueue.staleDocumentQueues(); if (queuesToProcess.length === 0) { - log('No outstanding documents to sync. Exiting.'); + log("No outstanding documents to sync. Exiting."); return; } const collector = new CollectorApi(); if (!(await collector.online())) { - log('Could not reach collector API. Exiting.'); + log("Could not reach collector API. Exiting."); return; } - log(`${queuesToProcess.length} watched documents have been found to be stale and will be updated now.`) + log( + `${queuesToProcess.length} watched documents have been found to be stale and will be updated now.` + ); for (const queue of queuesToProcess) { let newContent = null; const document = queue.workspaceDoc; const workspace = document.workspace; - const { metadata, type, source } = Document.parseDocumentTypeAndSource(document); + const { metadata, type, source } = + Document.parseDocumentTypeAndSource(document); if (!metadata || !DocumentSyncQueue.validFileTypes.includes(type)) { // Document is either broken, invalid, or not supported so drop it from future queues. - log(`Document ${document.filename} has no metadata, is broken, or invalid and has been removed from all future runs.`) + log( + `Document ${document.filename} has no metadata, is broken, or invalid and has been removed from all future runs.` + ); await DocumentSyncQueue.unwatch(document); continue; } - if (['link', 'youtube'].includes(type)) { + if (["link", "youtube"].includes(type)) { const response = await collector.forwardExtensionRequest({ endpoint: "/ext/resync-source-document", method: "POST", body: JSON.stringify({ type, - options: { link: source } - }) + options: { link: source }, + }), }); newContent = response?.content; } - if (['confluence', 'github', 'gitlab', 'drupalwiki'].includes(type)) { + if (["confluence", "github", "gitlab", "drupalwiki"].includes(type)) { const response = await collector.forwardExtensionRequest({ endpoint: "/ext/resync-source-document", method: "POST", body: JSON.stringify({ type, - options: { chunkSource: metadata.chunkSource } - }) + options: { chunkSource: metadata.chunkSource }, + }), }); newContent = response?.content; } if (!newContent) { // Check if the last "x" runs were all failures (not exits!). If so - remove the job entirely since it is broken. - const failedRunCount = (await DocumentSyncRun.where({ queueId: queue.id }, DocumentSyncQueue.maxRepeatFailures, { createdAt: 'desc' })).filter((run) => run.status === DocumentSyncRun.statuses.failed).length; + const failedRunCount = ( + await DocumentSyncRun.where( + { queueId: queue.id }, + DocumentSyncQueue.maxRepeatFailures, + { createdAt: "desc" } + ) + ).filter( + (run) => run.status === DocumentSyncRun.statuses.failed + ).length; if (failedRunCount >= DocumentSyncQueue.maxRepeatFailures) { - log(`Document ${document.filename} has failed to refresh ${failedRunCount} times continuously and will now be removed from the watched document set.`) + log( + `Document ${document.filename} has failed to refresh ${failedRunCount} times continuously and will now be removed from the watched document set.` + ); await DocumentSyncQueue.unwatch(document); continue; } - log(`Failed to get a new content response from collector for source ${source}. Skipping, but will retry next worker interval. Attempt ${failedRunCount === 0 ? 1 : failedRunCount}/${DocumentSyncQueue.maxRepeatFailures}`); - await DocumentSyncQueue.saveRun(queue.id, DocumentSyncRun.statuses.failed, { filename: document.filename, workspacesModified: [], reason: 'No content found.' }) + log( + `Failed to get a new content response from collector for source ${source}. Skipping, but will retry next worker interval. Attempt ${failedRunCount === 0 ? 1 : failedRunCount}/${DocumentSyncQueue.maxRepeatFailures}` + ); + await DocumentSyncQueue.saveRun( + queue.id, + DocumentSyncRun.statuses.failed, + { + filename: document.filename, + workspacesModified: [], + reason: "No content found.", + } + ); continue; } - const currentDocumentData = await fileData(document.docpath) + const currentDocumentData = await fileData(document.docpath); if (currentDocumentData.pageContent === newContent) { - const nextSync = DocumentSyncQueue.calcNextSync(queue) - log(`Source ${source} is unchanged and will be skipped. Next sync will be ${nextSync.toLocaleString()}.`); - await DocumentSyncQueue._update( + const nextSync = DocumentSyncQueue.calcNextSync(queue); + log( + `Source ${source} is unchanged and will be skipped. Next sync will be ${nextSync.toLocaleString()}.` + ); + await DocumentSyncQueue._update(queue.id, { + lastSyncedAt: new Date().toISOString(), + nextSyncAt: nextSync.toISOString(), + }); + await DocumentSyncQueue.saveRun( queue.id, + DocumentSyncRun.statuses.exited, { - lastSyncedAt: new Date().toISOString(), - nextSyncAt: nextSync.toISOString(), + filename: document.filename, + workspacesModified: [], + reason: "Content unchanged.", } ); - await DocumentSyncQueue.saveRun(queue.id, DocumentSyncRun.statuses.exited, { filename: document.filename, workspacesModified: [], reason: 'Content unchanged.' }) continue; } // update the defined document and workspace vectorDB with the latest information // it will skip cache and create a new vectorCache file. const vectorDatabase = getVectorDbClass(); - await vectorDatabase.deleteDocumentFromNamespace(workspace.slug, document.docId); + await vectorDatabase.deleteDocumentFromNamespace( + workspace.slug, + document.docId + ); await vectorDatabase.addDocumentToNamespace( workspace.slug, - { ...currentDocumentData, pageContent: newContent, docId: document.docId }, - document.docpath, - true - ); - updateSourceDocument( - document.docpath, { ...currentDocumentData, pageContent: newContent, docId: document.docId, - published: (new Date).toLocaleString(), - // Todo: Update word count and token_estimate? - } - ) - log(`Workspace "${workspace.name}" vectors of ${source} updated. Document and vector cache updated.`) - + }, + document.docpath, + true + ); + updateSourceDocument(document.docpath, { + ...currentDocumentData, + pageContent: newContent, + docId: document.docId, + published: new Date().toLocaleString(), + // Todo: Update word count and token_estimate? + }); + log( + `Workspace "${workspace.name}" vectors of ${source} updated. Document and vector cache updated.` + ); // Now we can bloom the results to all matching documents in all other workspaces const workspacesModified = [workspace.slug]; - const moreReferences = await Document.where({ - id: { not: document.id }, - filename: document.filename - }, null, null, { workspace: true }); + const moreReferences = await Document.where( + { + id: { not: document.id }, + filename: document.filename, + }, + null, + null, + { workspace: true } + ); if (moreReferences.length !== 0) { - log(`${source} is referenced in ${moreReferences.length} other workspaces. Updating those workspaces as well...`) + log( + `${source} is referenced in ${moreReferences.length} other workspaces. Updating those workspaces as well...` + ); for (const additionalDocumentRef of moreReferences) { const additionalWorkspace = additionalDocumentRef.workspace; workspacesModified.push(additionalWorkspace.slug); - await vectorDatabase.deleteDocumentFromNamespace(additionalWorkspace.slug, additionalDocumentRef.docId); + await vectorDatabase.deleteDocumentFromNamespace( + additionalWorkspace.slug, + additionalDocumentRef.docId + ); await vectorDatabase.addDocumentToNamespace( additionalWorkspace.slug, - { ...currentDocumentData, pageContent: newContent, docId: additionalDocumentRef.docId }, - additionalDocumentRef.docpath, + { + ...currentDocumentData, + pageContent: newContent, + docId: additionalDocumentRef.docId, + }, + additionalDocumentRef.docpath + ); + log( + `Workspace "${additionalWorkspace.name}" vectors for ${source} was also updated with the new content from cache.` ); - log(`Workspace "${additionalWorkspace.name}" vectors for ${source} was also updated with the new content from cache.`) } } const nextRefresh = DocumentSyncQueue.calcNextSync(queue); - log(`${source} has been refreshed in all workspaces it is currently referenced in. Next refresh will be ${nextRefresh.toLocaleString()}.`) - await DocumentSyncQueue._update( - queue.id, - { - lastSyncedAt: new Date().toISOString(), - nextSyncAt: nextRefresh.toISOString(), - } + log( + `${source} has been refreshed in all workspaces it is currently referenced in. Next refresh will be ${nextRefresh.toLocaleString()}.` + ); + await DocumentSyncQueue._update(queue.id, { + lastSyncedAt: new Date().toISOString(), + nextSyncAt: nextRefresh.toISOString(), + }); + await DocumentSyncQueue.saveRun( + queue.id, + DocumentSyncRun.statuses.success, + { filename: document.filename, workspacesModified } ); - await DocumentSyncQueue.saveRun(queue.id, DocumentSyncRun.statuses.success, { filename: document.filename, workspacesModified }) } } catch (e) { - console.error(e) - log(`errored with ${e.message}`) + console.error(e); + log(`errored with ${e.message}`); } finally { conclude(); } diff --git a/server/models/documents.js b/server/models/documents.js index a28331153..a13c3a6a2 100644 --- a/server/models/documents.js +++ b/server/models/documents.js @@ -93,7 +93,7 @@ const Document = { if (!data) continue; const docId = uuidv4(); - const { pageContent, ...metadata } = data; + const { pageContent: _pageContent, ...metadata } = data; const newDoc = { docId, filename: path.split("/")[1], diff --git a/server/models/embedChats.js b/server/models/embedChats.js index 9f11b1c6e..0d456600c 100644 --- a/server/models/embedChats.js +++ b/server/models/embedChats.js @@ -47,7 +47,7 @@ const EmbedChats = { filterSources: function (chats) { return chats.map((chat) => { const { response, ...rest } = chat; - const { sources, ...responseRest } = safeJsonParse(response); + const { sources: _sources, ...responseRest } = safeJsonParse(response); return { ...rest, response: JSON.stringify(responseRest) }; }); }, diff --git a/server/models/embedConfig.js b/server/models/embedConfig.js index 202c5a68f..91f043258 100644 --- a/server/models/embedConfig.js +++ b/server/models/embedConfig.js @@ -52,7 +52,7 @@ const EmbedConfig = { data?.message_limit, "message_limit" ), - createdBy: Number(creatorId) ?? null, + createdBy: creatorId != null ? Number(creatorId) : null, workspace: { connect: { id: Number(data.workspace_id) }, }, @@ -71,7 +71,7 @@ const EmbedConfig = { this.writable.includes(key) ); if (validKeys.length === 0) - return { embed: { id }, message: "No valid fields to update!" }; + return { embed: { id: embedId }, message: "No valid fields to update!" }; const updates = {}; validKeys.map((key) => { diff --git a/server/models/mobileDevice.js b/server/models/mobileDevice.js index 434f4c3a8..3b63db766 100644 --- a/server/models/mobileDevice.js +++ b/server/models/mobileDevice.js @@ -42,7 +42,7 @@ const MobileDevice = { const tokenData = TemporaryMobileDeviceRequests.get(token); if (tokenData.expiresAt < Date.now()) return null; return tokenData; - } catch (error) { + } catch { return null; } finally { TemporaryMobileDeviceRequests.delete(token); diff --git a/server/models/systemSettings.js b/server/models/systemSettings.js index 00fd67c8e..2f5514ab3 100644 --- a/server/models/systemSettings.js +++ b/server/models/systemSettings.js @@ -5,7 +5,6 @@ process.env.NODE_ENV === "development" const { default: slugify } = require("slugify"); const { isValidUrl, safeJsonParse } = require("../utils/http"); const prisma = require("../utils/prisma"); -const { v4 } = require("uuid"); const { MetaGenerator } = require("../utils/boot/MetaGenerator"); const { PGVector } = require("../utils/vectorDbProviders/pgvector"); const { NativeEmbedder } = require("../utils/EmbeddingEngines/native"); @@ -72,7 +71,7 @@ const SystemSettings = { .filter((setting) => isValidUrl(setting.url)) .slice(0, 3); // max of 3 items in footer. return JSON.stringify(array); - } catch (e) { + } catch { console.error(`Failed to run validation function on footer_data`); return JSON.stringify([]); } @@ -138,7 +137,7 @@ const SystemSettings = { try { const skills = updates.split(",").filter((skill) => !!skill); return JSON.stringify(skills); - } catch (e) { + } catch { console.error(`Could not validate agent skills.`); return JSON.stringify([]); } @@ -147,7 +146,7 @@ const SystemSettings = { try { const skills = updates.split(",").filter((skill) => !!skill); return JSON.stringify(skills); - } catch (e) { + } catch { console.error(`Could not validate disabled agent skills.`); return JSON.stringify([]); } @@ -163,7 +162,7 @@ const SystemSettings = { safeJsonParse(updates, []) ); return JSON.stringify(updatedConnections); - } catch (e) { + } catch { console.error(`Failed to merge connections`); return JSON.stringify(existingConnections ?? []); } diff --git a/server/models/user.js b/server/models/user.js index 67e1bf1c5..a1eb7bc3c 100644 --- a/server/models/user.js +++ b/server/models/user.js @@ -87,7 +87,11 @@ const User = { }, filterFields: function (user = {}) { - const { password, web_push_subscription_config, ...rest } = user; + const { + password: _password, + web_push_subscription_config: _web_push_subscription_config, + ...rest + } = user; return { ...rest }; }, _identifyErrorAndFormatMessage: function (error) { diff --git a/server/package.json b/server/package.json index cea2933ad..53235acf0 100644 --- a/server/package.json +++ b/server/package.json @@ -12,7 +12,7 @@ "scripts": { "dev": "cross-env NODE_ENV=development nodemon --ignore documents --ignore vector-cache --ignore storage --ignore swagger --trace-warnings index.js", "start": "cross-env NODE_ENV=production node index.js", - "lint": "yarn prettier --ignore-path ../.prettierignore --write ./endpoints ./models ./utils index.js", + "lint": "eslint --fix .", "swagger": "node ./swagger/init.js" }, "prisma": { @@ -92,18 +92,20 @@ "form-data": "4.0.4" }, "devDependencies": { + "@eslint/js": "9", "@inquirer/prompts": "^4.3.1", "cross-env": "^7.0.3", - "eslint": "^8.50.0", + "eslint": "9", "eslint-config-prettier": "^9.0.0", "eslint-plugin-ft-flow": "^3.0.0", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "eslint-plugin-unused-imports": "^4.4.1", "flow-bin": "^0.217.0", "flow-remove-types": "^2.217.1", - "globals": "^13.21.0", + "globals": "^17.4.0", "hermes-eslint": "^0.15.0", "node-html-markdown": "^1.3.0", "nodemon": "^2.0.22", diff --git a/server/swagger/index.js b/server/swagger/index.js index 12c54cfa5..3c6bd3809 100644 --- a/server/swagger/index.js +++ b/server/swagger/index.js @@ -1,10 +1,10 @@ function waitForElm(selector) { - return new Promise(resolve => { + return new Promise((resolve) => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } - const observer = new MutationObserver(mutations => { + const observer = new MutationObserver((_mutations) => { if (document.querySelector(selector)) { resolve(document.querySelector(selector)); observer.disconnect(); @@ -13,16 +13,16 @@ function waitForElm(selector) { observer.observe(document.body, { childList: true, - subtree: true + subtree: true, }); }); } // Force change the Swagger logo in the header -waitForElm('.topbar-wrapper').then((elm) => { - if (window.SWAGGER_DOCS_ENV === 'development') { - elm.innerHTML = `` +waitForElm(".topbar-wrapper").then((elm) => { + if (window.SWAGGER_DOCS_ENV === "development") { + elm.innerHTML = ``; } else { - elm.innerHTML = `` + elm.innerHTML = ``; } -}); \ No newline at end of file +}); diff --git a/server/swagger/utils.js b/server/swagger/utils.js index c4ad2705d..fc1ac7823 100644 --- a/server/swagger/utils.js +++ b/server/swagger/utils.js @@ -1,11 +1,11 @@ -const fs = require('fs'); -const path = require('path'); -const swaggerUi = require('swagger-ui-express'); +const fs = require("fs"); +const path = require("path"); +const swaggerUi = require("swagger-ui-express"); function faviconUrl() { - return process.env.NODE_ENV === "production" ? - '/public/favicon.png' : - 'http://localhost:3000/public/favicon.png' + return process.env.NODE_ENV === "production" + ? "/public/favicon.png" + : "http://localhost:3000/public/favicon.png"; } function useSwagger(app) { @@ -15,44 +15,42 @@ function useSwagger(app) { ); return; } - app.use('/api/docs', swaggerUi.serve); + app.use("/api/docs", swaggerUi.serve); const options = { customCss: [ - fs.readFileSync(path.resolve(__dirname, 'index.css')), - fs.readFileSync(path.resolve(__dirname, 'dark-swagger.css')) - ].join('\n\n\n'), - customSiteTitle: 'AnythingLLM Developer API Documentation', + fs.readFileSync(path.resolve(__dirname, "index.css")), + fs.readFileSync(path.resolve(__dirname, "dark-swagger.css")), + ].join("\n\n\n"), + customSiteTitle: "AnythingLLM Developer API Documentation", customfavIcon: faviconUrl(), - } + }; if (process.env.NODE_ENV === "production") { - const swaggerDocument = require('./openapi.json'); - app.get('/api/docs', swaggerUi.setup( - swaggerDocument, - { - ...options, - customJsStr: 'window.SWAGGER_DOCS_ENV = "production";\n\n' + fs.readFileSync(path.resolve(__dirname, 'index.js'), 'utf8'), - }, - )); - } else { - // we regenerate the html page only in development mode to ensure it is up-to-date when the code is hot-reloaded. + const swaggerDocument = require("./openapi.json"); app.get( "/api/docs", - async (_, response) => { - // #swagger.ignore = true - const swaggerDocument = require('./openapi.json'); - return response.send( - swaggerUi.generateHTML( - swaggerDocument, - { - ...options, - customJsStr: 'window.SWAGGER_DOCS_ENV = "development";\n\n' + fs.readFileSync(path.resolve(__dirname, 'index.js'), 'utf8'), - } - ) - ); - } + swaggerUi.setup(swaggerDocument, { + ...options, + customJsStr: + 'window.SWAGGER_DOCS_ENV = "production";\n\n' + + fs.readFileSync(path.resolve(__dirname, "index.js"), "utf8"), + }) ); + } else { + // we regenerate the html page only in development mode to ensure it is up-to-date when the code is hot-reloaded. + app.get("/api/docs", async (_, response) => { + // #swagger.ignore = true + const swaggerDocument = require("./openapi.json"); + return response.send( + swaggerUi.generateHTML(swaggerDocument, { + ...options, + customJsStr: + 'window.SWAGGER_DOCS_ENV = "development";\n\n' + + fs.readFileSync(path.resolve(__dirname, "index.js"), "utf8"), + }) + ); + }); } } -module.exports = { faviconUrl, useSwagger } \ No newline at end of file +module.exports = { faviconUrl, useSwagger }; diff --git a/server/utils/AiProviders/azureOpenAi/index.js b/server/utils/AiProviders/azureOpenAi/index.js index a73e3a804..735e7c8a4 100644 --- a/server/utils/AiProviders/azureOpenAi/index.js +++ b/server/utils/AiProviders/azureOpenAi/index.js @@ -55,7 +55,7 @@ class AzureOpenAiLLM { url.search = ""; url.hash = ""; return url.href; - } catch (error) { + } catch { throw new Error( `"${azureOpenAiEndpoint}" is not a valid URL. Check your settings for the Azure OpenAI provider and set a valid endpoint URL.` ); diff --git a/server/utils/AiProviders/bedrock/index.js b/server/utils/AiProviders/bedrock/index.js index 6dc7de6e2..2ac112bf7 100644 --- a/server/utils/AiProviders/bedrock/index.js +++ b/server/utils/AiProviders/bedrock/index.js @@ -170,7 +170,7 @@ class AWSBedrockLLM { const numericLimit = Number(limit); if (isNaN(numericLimit) || numericLimit <= 0) { this.#slog( - `[AWSBedrock ERROR] Invalid AWS_BEDROCK_LLM_MODEL_TOKEN_LIMIT found: "${limitSourceValue}". Must be a positive number - returning default ${DEFAULT_CONTEXT_WINDOW_TOKENS}.` + `[AWSBedrock ERROR] Invalid AWS_BEDROCK_LLM_MODEL_TOKEN_LIMIT found: "${limit}". Must be a positive number - returning default ${DEFAULT_CONTEXT_WINDOW_TOKENS}.` ); return DEFAULT_CONTEXT_WINDOW_TOKENS; } diff --git a/server/utils/AiProviders/dellProAiStudio/index.js b/server/utils/AiProviders/dellProAiStudio/index.js index 1c887d5b5..0b5751742 100644 --- a/server/utils/AiProviders/dellProAiStudio/index.js +++ b/server/utils/AiProviders/dellProAiStudio/index.js @@ -45,7 +45,7 @@ class DellProAiStudioLLM { const baseURL = new URL(providedBasePath); const basePath = `${baseURL.origin}/v1/openai`; return basePath; - } catch (e) { + } catch { return null; } } diff --git a/server/utils/AiProviders/dockerModelRunner/index.js b/server/utils/AiProviders/dockerModelRunner/index.js index 44f713f70..094fbf656 100644 --- a/server/utils/AiProviders/dockerModelRunner/index.js +++ b/server/utils/AiProviders/dockerModelRunner/index.js @@ -276,7 +276,7 @@ function parseDockerModelRunnerEndpoint(basePath = null, to = "openai") { else if (to === "ollama") url.pathname = "api"; else if (to === "dmr") url.pathname = ""; return url.toString(); - } catch (e) { + } catch { return basePath; } } @@ -508,6 +508,7 @@ async function getDockerModels(basePath = null, task = "chat") { } catch (e) { DockerModelRunnerLLM.slog(`Error getting Docker models`, e); } finally { + // eslint-disable-next-line return Object.values(availableModels).flatMap((m) => m.tags); } } diff --git a/server/utils/AiProviders/foundry/index.js b/server/utils/AiProviders/foundry/index.js index 76145bf04..98eb02e05 100644 --- a/server/utils/AiProviders/foundry/index.js +++ b/server/utils/AiProviders/foundry/index.js @@ -464,7 +464,7 @@ function parseFoundryBasePath(providedBasePath = "") { const baseURL = new URL(providedBasePath); const basePath = `${baseURL.origin}/v1`; return basePath; - } catch (e) { + } catch { return providedBasePath; } } diff --git a/server/utils/AiProviders/genericOpenAi/index.js b/server/utils/AiProviders/genericOpenAi/index.js index d4a60974d..4e6de97e9 100644 --- a/server/utils/AiProviders/genericOpenAi/index.js +++ b/server/utils/AiProviders/genericOpenAi/index.js @@ -7,6 +7,7 @@ const { writeResponseChunk, clientAbortedHandler, } = require("../../helpers/chat/responses"); +const { v4: uuidv4 } = require("uuid"); const { toValidNumber } = require("../../http"); const { getAnythingLLMUserAgent } = require("../../../endpoints/utils"); diff --git a/server/utils/AiProviders/giteeai/index.js b/server/utils/AiProviders/giteeai/index.js index 8be36e293..95f24ef7b 100644 --- a/server/utils/AiProviders/giteeai/index.js +++ b/server/utils/AiProviders/giteeai/index.js @@ -89,7 +89,7 @@ class GiteeAILLM { ); } - async isValidChatCompletionModel(modelName = "") { + async isValidChatCompletionModel(_modelName = "") { return true; } diff --git a/server/utils/AiProviders/lemonade/index.js b/server/utils/AiProviders/lemonade/index.js index bc8c5f55a..9fd372a26 100644 --- a/server/utils/AiProviders/lemonade/index.js +++ b/server/utils/AiProviders/lemonade/index.js @@ -309,7 +309,7 @@ function parseLemonadeServerEndpoint(basePath = null, to = "openai") { else if (to === "ollama") url.pathname = "api"; else if (to === "base") url.pathname = ""; // only used for /live return url.toString(); - } catch (e) { + } catch { return basePath; } } @@ -369,6 +369,7 @@ async function getAllLemonadeModels(basePath = null, task = "chat") { } catch (e) { LemonadeLLM.slog(`Error getting Lemonade models`, e); } finally { + // eslint-disable-next-line return Object.values(availableModels).flatMap((m) => m.tags); } } diff --git a/server/utils/AiProviders/lmStudio/index.js b/server/utils/AiProviders/lmStudio/index.js index 4ef1c7b6a..56c8f4a5e 100644 --- a/server/utils/AiProviders/lmStudio/index.js +++ b/server/utils/AiProviders/lmStudio/index.js @@ -356,7 +356,7 @@ function parseLMStudioBasePath(providedBasePath = "", apiVersion = "legacy") { if (apiVersion === "legacy") basePath += `/v1`; if (apiVersion === "v1") basePath += `/api/v1`; return basePath; - } catch (e) { + } catch { return providedBasePath; } } diff --git a/server/utils/AiProviders/mistral/index.js b/server/utils/AiProviders/mistral/index.js index 07298ef95..d14c5ce71 100644 --- a/server/utils/AiProviders/mistral/index.js +++ b/server/utils/AiProviders/mistral/index.js @@ -59,7 +59,7 @@ class MistralLLM { return 32000; } - async isValidChatCompletionModel(modelName = "") { + async isValidChatCompletionModel(_modelName = "") { return true; } diff --git a/server/utils/AiProviders/nvidiaNim/index.js b/server/utils/AiProviders/nvidiaNim/index.js index 63e309a4b..46b113d8a 100644 --- a/server/utils/AiProviders/nvidiaNim/index.js +++ b/server/utils/AiProviders/nvidiaNim/index.js @@ -242,7 +242,7 @@ function parseNvidiaNimBasePath(providedBasePath = "") { const baseURL = new URL(providedBasePath); const basePath = `${baseURL.origin}/v1`; return basePath; - } catch (e) { + } catch { return providedBasePath; } } diff --git a/server/utils/AiProviders/ppio/index.js b/server/utils/AiProviders/ppio/index.js index f10ede2e9..f60052576 100644 --- a/server/utils/AiProviders/ppio/index.js +++ b/server/utils/AiProviders/ppio/index.js @@ -112,6 +112,7 @@ class PPIOLLM { * @param {{userPrompt:string, attachments: import("../../helpers").Attachment[]}} * @returns {string|object[]} */ + //eslint-disable-next-line #generateContent({ userPrompt, attachments = [] }) { if (!attachments.length) { return userPrompt; diff --git a/server/utils/AiProviders/privatemode/index.js b/server/utils/AiProviders/privatemode/index.js index 7f71ec2b9..ebbdfe6f1 100644 --- a/server/utils/AiProviders/privatemode/index.js +++ b/server/utils/AiProviders/privatemode/index.js @@ -54,7 +54,7 @@ class PrivatemodeLLM { const baseURL = new URL(providedBasePath); const basePath = `${baseURL.origin}/v1`; return basePath; - } catch (e) { + } catch { return null; } } diff --git a/server/utils/AiProviders/sambanova/index.js b/server/utils/AiProviders/sambanova/index.js index 4cec536df..a3b9bf848 100644 --- a/server/utils/AiProviders/sambanova/index.js +++ b/server/utils/AiProviders/sambanova/index.js @@ -3,7 +3,10 @@ const { LLMPerformanceMonitor, } = require("../../helpers/chat/LLMPerformanceMonitor"); const { v4: uuidv4 } = require("uuid"); -const { writeResponseChunk } = require("../../helpers/chat/responses"); +const { + writeResponseChunk, + clientAbortedHandler, +} = require("../../helpers/chat/responses"); const { MODEL_MAP } = require("../modelMap"); class SambaNovaLLM { diff --git a/server/utils/EmbeddingEngines/lemonade/index.js b/server/utils/EmbeddingEngines/lemonade/index.js index 4d24a1fd1..537438647 100644 --- a/server/utils/EmbeddingEngines/lemonade/index.js +++ b/server/utils/EmbeddingEngines/lemonade/index.js @@ -1,4 +1,3 @@ -const { toChunks } = require("../../helpers"); const { parseLemonadeServerEndpoint } = require("../../AiProviders/lemonade"); class LemonadeEmbedder { diff --git a/server/utils/EmbeddingRerankers/native/index.js b/server/utils/EmbeddingRerankers/native/index.js index fdade3402..599338224 100644 --- a/server/utils/EmbeddingRerankers/native/index.js +++ b/server/utils/EmbeddingRerankers/native/index.js @@ -44,7 +44,7 @@ class NativeEmbeddingReranker { if (!NativeEmbeddingReranker.#transformers) return "https://huggingface.co"; try { return new URL(NativeEmbeddingReranker.#transformers.env.remoteHost).host; - } catch (e) { + } catch { return this.#fallbackHost; } } diff --git a/server/utils/MCP/hypervisor/index.js b/server/utils/MCP/hypervisor/index.js index 07b0b8cdf..875070446 100644 --- a/server/utils/MCP/hypervisor/index.js +++ b/server/utils/MCP/hypervisor/index.js @@ -315,7 +315,7 @@ class MCPHypervisor { try { new URL(server.url); - } catch (error) { + } catch { throw new Error(`MCP server "${name}": invalid URL "${server.url}"`); } return; diff --git a/server/utils/TextToSpeech/elevenLabs/index.js b/server/utils/TextToSpeech/elevenLabs/index.js index e3d25f3ae..1fbbe071f 100644 --- a/server/utils/TextToSpeech/elevenLabs/index.js +++ b/server/utils/TextToSpeech/elevenLabs/index.js @@ -1,4 +1,4 @@ -const { ElevenLabsClient, stream } = require("elevenlabs"); +const { ElevenLabsClient } = require("elevenlabs"); class ElevenLabsTTS { constructor() { diff --git a/server/utils/agents/aibitat/example/websocket/websock-branding-collab.js b/server/utils/agents/aibitat/example/websocket/websock-branding-collab.js index 809aafd3c..fcda2b9eb 100644 --- a/server/utils/agents/aibitat/example/websocket/websock-branding-collab.js +++ b/server/utils/agents/aibitat/example/websocket/websock-branding-collab.js @@ -45,7 +45,7 @@ app.ws("/ws", function (ws, _response) { }) ); }); - } catch (error) {} + } catch {} }); app.all("*", function (_, response) { diff --git a/server/utils/agents/aibitat/example/websocket/websock-multi-turn-chat.js b/server/utils/agents/aibitat/example/websocket/websock-multi-turn-chat.js index 6c58709bb..92279c691 100644 --- a/server/utils/agents/aibitat/example/websocket/websock-multi-turn-chat.js +++ b/server/utils/agents/aibitat/example/websocket/websock-multi-turn-chat.js @@ -45,7 +45,7 @@ app.ws("/ws", function (ws, _response) { }) ); }); - } catch (error) {} + } catch {} }); app.all("*", function (_, response) { diff --git a/server/utils/agents/aibitat/index.js b/server/utils/agents/aibitat/index.js index 56a4d8900..d84e0cd65 100644 --- a/server/utils/agents/aibitat/index.js +++ b/server/utils/agents/aibitat/index.js @@ -1,3 +1,4 @@ +/* eslint-disable unused-imports/no-unused-vars */ const { EventEmitter } = require("events"); const { APIError } = require("./error.js"); const Providers = require("./providers/index.js"); @@ -275,6 +276,7 @@ class AIbitat { /** * The message when the error occurred. */ + // eslint-disable-next-line {} ) => null ) { @@ -913,6 +915,7 @@ ${this.getHistory({ to: route.to }) } // remove the last chat's that threw an error + // eslint-disable-next-line const { from, to } = this?._chats?.pop(); await this.chat({ from, to }); diff --git a/server/utils/agents/aibitat/plugins/cli.js b/server/utils/agents/aibitat/plugins/cli.js index fab80c0d4..f2aea0e66 100644 --- a/server/utils/agents/aibitat/plugins/cli.js +++ b/server/utils/agents/aibitat/plugins/cli.js @@ -1,7 +1,6 @@ // Plugin CAN ONLY BE USE IN DEVELOPMENT. const { input } = require("@inquirer/prompts"); const chalk = require("chalk"); -const { RetryError } = require("../error"); /** * Command-line Interface plugin. It prints the messages on the console and asks for feedback diff --git a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js index 82353683e..252ce5416 100644 --- a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js +++ b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js @@ -64,7 +64,7 @@ async function validateConnection(identifier = "", connectionConfig = {}) { try { const client = getDBClient(identifier, connectionConfig); return await client.validateConnection(); - } catch (error) { + } catch { console.log(`Failed to connect to ${identifier} database.`); return { success: false, diff --git a/server/utils/agents/aibitat/plugins/sql-agent/list-database.js b/server/utils/agents/aibitat/plugins/sql-agent/list-database.js index 20e67c281..794041a1d 100644 --- a/server/utils/agents/aibitat/plugins/sql-agent/list-database.js +++ b/server/utils/agents/aibitat/plugins/sql-agent/list-database.js @@ -37,7 +37,7 @@ module.exports.SqlAgentListDatabase = { ); const connections = (await listSQLConnections()).map((conn) => { - const { connectionString, ...rest } = conn; + const { connectionString: _connectionString, ...rest } = conn; return rest; }); return JSON.stringify(connections); diff --git a/server/utils/agents/aibitat/plugins/web-browsing.js b/server/utils/agents/aibitat/plugins/web-browsing.js index 316bdd99a..ed568e9d0 100644 --- a/server/utils/agents/aibitat/plugins/web-browsing.js +++ b/server/utils/agents/aibitat/plugins/web-browsing.js @@ -196,6 +196,7 @@ const webBrowsing = { extensions, }); }); + break; case "google_maps": response.local_results?.slice(0, 10).forEach((searchResult) => { const { @@ -217,6 +218,7 @@ const webBrowsing = { extensions, }); }); + break; case "google_images_light": response.images_results ?.slice(0, 10) @@ -229,6 +231,7 @@ const webBrowsing = { thumbnail, }); }); + break; case "google_shopping_light": response.shopping_results ?.slice(0, 10) @@ -254,6 +257,7 @@ const webBrowsing = { product_link, }); }); + break; case "google_news_light": response.news_results?.slice(0, 10).forEach((searchResult) => { const { title, link, source, thumbnail, snippet, date } = @@ -267,6 +271,7 @@ const webBrowsing = { date, }); }); + break; case "google_jobs": response.jobs_results?.forEach((searchResult) => { const { @@ -286,6 +291,7 @@ const webBrowsing = { extensions, }); }); + break; case "google_patents": response.organic_results?.forEach((searchResult) => { const { @@ -305,6 +311,7 @@ const webBrowsing = { publication_number, }); }); + break; case "google_scholar": response.organic_results?.forEach((searchResult) => { const { title, link, snippet, publication_info } = @@ -316,6 +323,7 @@ const webBrowsing = { publication_info, }); }); + break; case "baidu": if (response.hasOwnProperty("answer_box")) data.push(response.answer_box); @@ -327,6 +335,7 @@ const webBrowsing = { snippet, }); }); + break; case "amazon": response.organic_results ?.slice(0, 10) @@ -560,6 +569,7 @@ const webBrowsing = { query, language = "en", hl = "us", + //eslint-disable-next-line limit = 100, device_type = "desktop", proxy_location = "US" diff --git a/server/utils/agents/aibitat/providers/cohere.js b/server/utils/agents/aibitat/providers/cohere.js index 21d715469..f7707b830 100644 --- a/server/utils/agents/aibitat/providers/cohere.js +++ b/server/utils/agents/aibitat/providers/cohere.js @@ -153,6 +153,7 @@ class CohereProvider extends InheritMultiple([Provider, UnTooled]) { this.providerLog( "CohereProvider.stream - will process this chat completion." ); + // eslint-disable-next-line try { let completion = { content: "" }; if (functions.length > 0) { diff --git a/server/utils/agents/aibitat/providers/helpers/untooled.js b/server/utils/agents/aibitat/providers/helpers/untooled.js index ee4dfd888..171341118 100644 --- a/server/utils/agents/aibitat/providers/helpers/untooled.js +++ b/server/utils/agents/aibitat/providers/helpers/untooled.js @@ -263,6 +263,7 @@ ${JSON.stringify(def.parameters.properties, null, 4)}\n`; eventHandler = null ) { this.providerLog("Untooled.stream - will process this chat completion."); + // eslint-disable-next-line try { let completion = { content: "" }; if (functions.length > 0) { @@ -368,6 +369,7 @@ ${JSON.stringify(def.parameters.properties, null, 4)}\n`; */ async complete(messages, functions = [], chatCallback = null) { this.providerLog("Untooled.complete - will process this chat completion."); + // eslint-disable-next-line try { let completion = { content: "" }; if (functions.length > 0) { diff --git a/server/utils/agents/aibitat/providers/ollama.js b/server/utils/agents/aibitat/providers/ollama.js index d72d9ab77..af7da8aa7 100644 --- a/server/utils/agents/aibitat/providers/ollama.js +++ b/server/utils/agents/aibitat/providers/ollama.js @@ -307,6 +307,7 @@ class OllamaProvider extends InheritMultiple([Provider, UnTooled]) { this.providerLog( "OllamaProvider.stream - will process this chat completion." ); + // eslint-disable-next-line try { let completion = { content: "" }; if (functions.length > 0) { @@ -469,6 +470,7 @@ class OllamaProvider extends InheritMultiple([Provider, UnTooled]) { this.providerLog( "OllamaProvider.complete - will process this chat completion." ); + // eslint-disable-next-line try { let completion = { content: "" }; if (functions.length > 0) { diff --git a/server/utils/agents/defaults.js b/server/utils/agents/defaults.js index f55589639..7a725a49e 100644 --- a/server/utils/agents/defaults.js +++ b/server/utils/agents/defaults.js @@ -5,7 +5,6 @@ const Provider = require("./aibitat/providers/ai-provider"); const ImportedPlugin = require("./imported"); const { AgentFlows } = require("../agentFlows"); const MCPCompatibilityLayer = require("../MCP"); -const { SystemPromptVariables } = require("../../models/systemPromptVariables"); // This is a list of skills that are built-in and default enabled. const DEFAULT_SKILLS = [ diff --git a/server/utils/agents/ephemeral.js b/server/utils/agents/ephemeral.js index e7944bb1f..d0c794bc2 100644 --- a/server/utils/agents/ephemeral.js +++ b/server/utils/agents/ephemeral.js @@ -355,7 +355,7 @@ class EphemeralAgentHandler extends AgentHandler { async createAIbitat( args = { - handler, + handler: null, } ) { this.aibitat = new AIbitat({ diff --git a/server/utils/agents/index.js b/server/utils/agents/index.js index 0cc3f08ab..321867e6f 100644 --- a/server/utils/agents/index.js +++ b/server/utils/agents/index.js @@ -593,7 +593,7 @@ class AgentHandler { async createAIbitat( args = { - socket, + socket: null, } ) { this.aibitat = new AIbitat({ diff --git a/server/utils/files/index.js b/server/utils/files/index.js index ff7f5239e..37fcd4620 100644 --- a/server/utils/files/index.js +++ b/server/utils/files/index.js @@ -136,7 +136,7 @@ async function getDocumentsByFolder(folderName = "") { const filePath = path.join(folderPath, file); const rawData = fs.readFileSync(filePath, "utf8"); const cachefilename = `${folderName}/${file}`; - const { pageContent, ...metadata } = JSON.parse(rawData); + const { pageContent: _pageContent, ...metadata } = JSON.parse(rawData); documents.push({ name: file, type: "file", @@ -251,7 +251,7 @@ async function findDocumentInDocuments(documentName = null) { const fileData = fs.readFileSync(targetFileLocation, "utf8"); const cachefilename = `${folder}/${targetFilename}`; - const { pageContent, ...metadata } = JSON.parse(fileData); + const { pageContent: _pageContent, ...metadata } = JSON.parse(fileData); return { name: targetFilename, type: "file", diff --git a/server/utils/files/logo.js b/server/utils/files/logo.js index 19ac506c1..fa67fbfca 100644 --- a/server/utils/files/logo.js +++ b/server/utils/files/logo.js @@ -38,7 +38,10 @@ async function determineLogoFilepath(defaultFilename = LOGO_FILENAME) { const defaultFilepath = path.join(basePath, defaultFilename); if (currentLogoFilename && validFilename(currentLogoFilename)) { - customLogoPath = path.join(basePath, normalizePath(currentLogoFilename)); + const customLogoPath = path.join( + basePath, + normalizePath(currentLogoFilename) + ); if (!isWithin(path.resolve(basePath), path.resolve(customLogoPath))) return defaultFilepath; return fs.existsSync(customLogoPath) ? customLogoPath : defaultFilepath; diff --git a/server/utils/helpers/chat/LLMPerformanceMonitor.js b/server/utils/helpers/chat/LLMPerformanceMonitor.js index e30d300a6..e2e71e51f 100644 --- a/server/utils/helpers/chat/LLMPerformanceMonitor.js +++ b/server/utils/helpers/chat/LLMPerformanceMonitor.js @@ -33,7 +33,7 @@ class LLMPerformanceMonitor { static countTokens(messages = []) { try { return this.tokenManager.statsFrom(messages); - } catch (e) { + } catch { return 0; } } diff --git a/server/utils/helpers/chat/index.js b/server/utils/helpers/chat/index.js index 1ca0c65c2..8239c3cc9 100644 --- a/server/utils/helpers/chat/index.js +++ b/server/utils/helpers/chat/index.js @@ -384,7 +384,7 @@ function fillSourceWindow({ searchResults = [], // Sources from similarity search history = [], // Raw history filterIdentifiers = [], // pinned document sources -} = config) { +} = {}) { const sources = [...searchResults]; if (sources.length >= nDocs || history.length === 0) { diff --git a/server/utils/helpers/updateENV.js b/server/utils/helpers/updateENV.js index fb87736d3..7bfdc6704 100644 --- a/server/utils/helpers/updateENV.js +++ b/server/utils/helpers/updateENV.js @@ -853,7 +853,7 @@ function isValidURL(input = "") { try { new URL(input); return null; - } catch (e) { + } catch { return "URL is not a valid URL."; } } diff --git a/server/utils/http/index.js b/server/utils/http/index.js index 201f01470..3ed161d56 100644 --- a/server/utils/http/index.js +++ b/server/utils/http/index.js @@ -95,7 +95,7 @@ function isValidUrl(urlString = "") { const url = new URL(urlString); if (!["http:", "https:"].includes(url.protocol)) return false; return true; - } catch (e) {} + } catch {} return false; } diff --git a/server/utils/middleware/embedMiddleware.js b/server/utils/middleware/embedMiddleware.js index b8f299929..33b7b4712 100644 --- a/server/utils/middleware/embedMiddleware.js +++ b/server/utils/middleware/embedMiddleware.js @@ -157,7 +157,7 @@ async function canRespond(request, response, next) { } next(); - } catch (e) { + } catch { response.status(500).json({ id: uuidv4(), type: "abort", diff --git a/server/utils/vectorDbProviders/base.js b/server/utils/vectorDbProviders/base.js index a57247555..c785d3020 100644 --- a/server/utils/vectorDbProviders/base.js +++ b/server/utils/vectorDbProviders/base.js @@ -1,5 +1,6 @@ -/** - * Base class for all Vector Database providers. +/* eslint-disable unused-imports/no-unused-vars */ + +/* Base class for all Vector Database providers. * All vector database providers should extend this class and implement/override the necessary methods. */ class VectorDatabase { diff --git a/server/utils/vectorDbProviders/chromacloud/index.js b/server/utils/vectorDbProviders/chromacloud/index.js index 490bcc0ca..f6fcd726a 100644 --- a/server/utils/vectorDbProviders/chromacloud/index.js +++ b/server/utils/vectorDbProviders/chromacloud/index.js @@ -119,6 +119,7 @@ class ChromaCloud extends Chroma { let counter = 1; for (const chunk of chunks) { await collection.add(chunk); + //eslint-disable-next-line counter++; } return true; diff --git a/server/utils/vectorDbProviders/pgvector/index.js b/server/utils/vectorDbProviders/pgvector/index.js index 28970f741..20f67f7f9 100644 --- a/server/utils/vectorDbProviders/pgvector/index.js +++ b/server/utils/vectorDbProviders/pgvector/index.js @@ -313,7 +313,7 @@ class PGVector extends VectorDatabase { (row) => row.tablename === PGVector.tableName() ); return !!tableExists; - } catch (err) { + } catch { return false; } finally { if (connection) await connection.end(); @@ -329,7 +329,7 @@ class PGVector extends VectorDatabase { `SELECT COUNT(id) FROM "${PGVector.tableName()}"` ); return result.rows[0].count; - } catch (err) { + } catch { return 0; } finally { if (connection) await connection.end(); @@ -354,7 +354,7 @@ class PGVector extends VectorDatabase { [namespace] ); return result.rows[0].count; - } catch (err) { + } catch { return 0; } finally { if (connection) await connection.end(); @@ -500,7 +500,7 @@ class PGVector extends VectorDatabase { try { connection = await this.connect(); return await this.namespaceExists(connection, namespace); - } catch (err) { + } catch { return false; } finally { if (connection) await connection.end(); @@ -823,7 +823,7 @@ class PGVector extends VectorDatabase { connection = await this.connect(); await connection.query(`DROP TABLE IF EXISTS "${PGVector.tableName()}"`); return { reset: true }; - } catch (err) { + } catch { return { reset: false }; } finally { if (connection) await connection.end(); diff --git a/server/utils/vectorDbProviders/weaviate/index.js b/server/utils/vectorDbProviders/weaviate/index.js index 5877259b4..3aa14ba78 100644 --- a/server/utils/vectorDbProviders/weaviate/index.js +++ b/server/utils/vectorDbProviders/weaviate/index.js @@ -492,7 +492,6 @@ class Weaviate extends VectorDatabase { if ( value.length > 0 && typeof value[0] !== "object" && - // eslint-disable-next-line @typescript-eslint/no-explicit-any value.every((el) => typeof el === typeof value[0]) ) { // Weaviate only supports arrays of primitive types, diff --git a/server/yarn.lock b/server/yarn.lock index 6fbb0a24e..22d15cd95 100644 --- a/server/yarn.lock +++ b/server/yarn.lock @@ -1612,37 +1612,73 @@ bson "^6.2.0" winston "^3.7.2" -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== +"@eslint-community/eslint-utils@^4.8.0": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595" + integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ== dependencies: - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== +"@eslint-community/regexpp@^4.12.1": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/config-array@^0.21.1": + version "0.21.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713" + integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA== dependencies: - ajv "^6.12.4" + "@eslint/object-schema" "^2.1.7" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/config-helpers@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" + integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== + dependencies: + "@eslint/core" "^0.17.0" + +"@eslint/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" + integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.3.1": + version "3.3.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.4.tgz#e402b1920f7c1f5a15342caa432b1348cacbb641" + integrity sha512-4h4MVF8pmBsncB60r0wSJiIeUKTSD4m7FmTFThG8RHlsg9ajqckLm9OraguFGZE4vVdpiI1Q4+hFnisopmG6gQ== + dependencies: + ajv "^6.14.0" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" + js-yaml "^4.1.1" + minimatch "^3.1.3" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@9", "@eslint/js@9.39.3": + version "9.39.3" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.3.tgz#c6168736c7e0c43ead49654ed06a4bcb3833363d" + integrity sha512-1B1VkCq6FuUNlQvlBYb+1jDu/gV297TIs/OeiaSR9l1H27SVW55ONE1e1Vp16NqP683+xEGzxYtv4XCiDPaQiw== + +"@eslint/object-schema@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" + integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== + +"@eslint/plugin-kit@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" + integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== + dependencies: + "@eslint/core" "^0.17.0" + levn "^0.4.1" "@fastify/busboy@^2.0.0": version "2.1.1" @@ -1699,24 +1735,28 @@ resolved "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.2.2.tgz" integrity sha512-/KPde26khDUIPkTGU82jdtTW9UAuvUTumCAbFs/7giR0SxsvZC4hru51PBvpijH6BVkHcROcvZM/lpy5h1jRRA== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.7" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.7.tgz#822cb7b3a12c5a240a24f621b5a2413e27a45f26" + integrity sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.4.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.4.0", "@humanwhocodes/retry@^0.4.2": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" + integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== "@inquirer/checkbox@^2.2.3": version "2.3.2" @@ -2089,27 +2129,6 @@ zod "^3.25 || ^4.0" zod-to-json-schema "^3.25.0" -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - "@petamoriken/float16@^3.8.6": version "3.8.6" resolved "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.6.tgz" @@ -3502,6 +3521,16 @@ resolved "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.4.tgz" integrity sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg== +"@types/estree@^1.0.6": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== + +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/lodash@^4.14.165": version "4.17.6" resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.6.tgz" @@ -3581,11 +3610,6 @@ resolved "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz" integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g== -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - "@xenova/transformers@^2.14.0", "@xenova/transformers@^2.17.2": version "2.17.2" resolved "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.17.2.tgz" @@ -3649,10 +3673,10 @@ acorn@^7.4.1: resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.15.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== adm-zip@^0.5.16: version "0.5.16" @@ -3680,10 +3704,10 @@ ajv-formats@^3.0.1: dependencies: ajv "^8.0.0" -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== +ajv@^6.12.4, ajv@^6.14.0: + version "6.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a" + integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -4152,7 +4176,7 @@ call-bound@^1.0.2: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@6: @@ -4555,7 +4579,7 @@ cross-fetch@^3.1.5: dependencies: node-fetch "^2.6.12" -cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5: +cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5, cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -4564,15 +4588,6 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - crypt@0.0.2: version "0.0.2" resolved "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz" @@ -4754,13 +4769,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dom-serializer@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz" @@ -5098,76 +5106,82 @@ eslint-plugin-react@^7.33.2: semver "^6.3.1" string.prototype.matchall "^4.0.10" -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== +eslint-plugin-unused-imports@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.4.1.tgz#a831f0a2937d7631eba30cb87091ab7d3a5da0e1" + integrity sha512-oZGYUz1X3sRMGUB+0cZyK2VcvRX5lm/vB56PgNNcU+7ficUCKm66oZWKUubXWnOuPjQ8PvmXtCViXBMONPe7tQ== + +eslint-scope@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82" + integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.50.0: - version "8.57.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== +eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== + +eslint@9: + version "9.39.3" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.3.tgz#08d63df1533d7743c0907b32a79a7e134e63ee2f" + integrity sha512-VmQ+sifHUbI/IcSopBCF/HO3YiHQx/AVd3UVyYL6weuwW+HvON9VYn5l6Zl1WZzPWXPNZrSQpxwkkZ/VuvJZzg== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint-community/eslint-utils" "^4.8.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.21.1" + "@eslint/config-helpers" "^0.4.2" + "@eslint/core" "^0.17.0" + "@eslint/eslintrc" "^3.3.1" + "@eslint/js" "9.39.3" + "@eslint/plugin-kit" "^0.4.1" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" + "@humanwhocodes/retry" "^0.4.2" + "@types/estree" "^1.0.6" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.6" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" + eslint-scope "^8.4.0" + eslint-visitor-keys "^4.2.1" + espree "^10.4.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== +espree@^10.0.1, espree@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" + integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== dependencies: - acorn "^8.9.0" + acorn "^8.15.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^4.2.1" -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== +esquery@^1.5.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.7.0.tgz#08d048f261f0ddedb5bae95f46809463d9c9496d" + integrity sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g== dependencies: estraverse "^5.1.0" @@ -5410,24 +5424,17 @@ fastest-levenshtein@^1.0.7: resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - fecha@^4.2.0: version "4.2.3" resolved "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz" integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" fill-range@^7.0.1: version "7.0.1" @@ -5488,14 +5495,13 @@ fix-path@^4.0.0: dependencies: shell-path "^3.0.0" -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flat@^5.0.2: version "5.0.2" @@ -5728,7 +5734,7 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.1.3, glob@^7.1.7: +glob@^7.1.7: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -5740,12 +5746,15 @@ glob@^7.1.3, glob@^7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^13.19.0, globals@^13.21.0: - version "13.24.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globals@^17.4.0: + version "17.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-17.4.0.tgz#33d7d297ed1536b388a0e2f4bcd0ff19c8ff91b5" + integrity sha512-hjrNztw/VajQwOLsMNT1cbJiH2muO3OROCHnbehc8eY5JyD2gqz4AcMHPqgaOR59DjgUjYAYLeH699g/eWi2jw== globalthis@^1.0.3: version "1.0.4" @@ -5760,11 +5769,6 @@ gopd@^1.0.1, gopd@^1.2.0: resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - graphql-request@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/graphql-request/-/graphql-request-5.2.0.tgz" @@ -5990,9 +5994,9 @@ ignore@^5.2.0: integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + version "3.3.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -6194,11 +6198,6 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - is-promise@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" @@ -6397,6 +6396,13 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +js-yaml@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + jsbi@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/jsbi/-/jsbi-4.3.0.tgz" @@ -6502,9 +6508,9 @@ jws@^4.0.0: jwa "^2.0.0" safe-buffer "^5.0.1" -keyv@^4.5.3: +keyv@^4.5.4: version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" @@ -6686,7 +6692,7 @@ lodash.isstring@^4.0.1: lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.once@^4.0.0: @@ -6851,13 +6857,20 @@ minimalistic-assert@^1.0.0: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.3: + version "3.1.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" @@ -7382,7 +7395,7 @@ p-wait-for@3: parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" @@ -7717,11 +7730,6 @@ qs@^6.13.1, qs@^6.14.0, qs@~6.14.0: dependencies: side-channel "^1.1.0" -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - queue-tick@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz" @@ -7863,7 +7871,7 @@ require-from-string@^2.0.2: resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve@^2.0.0-next.5: @@ -7880,23 +7888,11 @@ retry@^0.13.1: resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - rfdc@^1.3.0: version "1.3.1" resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz" integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - router@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/router/-/router-2.2.0.tgz#019be620b711c87641167cc79b99090f00b146ef" @@ -7908,13 +7904,6 @@ router@^2.2.0: parseurl "^1.3.3" path-to-regexp "^8.0.0" -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - rusha@^0.8.14: version "0.8.14" resolved "https://registry.npmjs.org/rusha/-/rusha-0.8.14.tgz" @@ -8383,7 +8372,7 @@ strip-final-newline@^2.0.0: strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: @@ -8539,11 +8528,6 @@ text-hex@1.0.x: resolved "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" @@ -8614,11 +8598,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz"