From 5aec5edea28aea3a4a883f5732cb305e9e066a6c Mon Sep 17 00:00:00 2001 From: Adhityan K V Date: Fri, 1 Nov 2024 18:58:53 +0100 Subject: [PATCH] feat: refactored caches into stores --- core/embedjs-interfaces/package.json | 4 +- core/embedjs-interfaces/src/index.ts | 6 +- .../src/interfaces/base-cache.ts | 21 - .../src/interfaces/base-loader.ts | 107 +- .../src/interfaces/base-model.ts | 18 +- .../src/interfaces/base-store.ts | 23 + .../{base-db.ts => base-vector-database.ts} | 2 +- core/embedjs-interfaces/src/types.ts | 5 +- core/embedjs/package.json | 4 +- core/embedjs/src/cache/memory-cache.ts | 72 - .../src/core/rag-application-builder.ts | 37 +- core/embedjs/src/core/rag-application.ts | 71 +- core/embedjs/src/store/memory-store.ts | 93 ++ databases/embedjs-astra/src/astra-db.ts | 4 +- databases/embedjs-cosmos/src/cosmos-db.ts | 6 +- databases/embedjs-hnswlib/src/hnswlib-db.ts | 4 +- databases/embedjs-lancedb/package.json | 2 +- databases/embedjs-lancedb/src/lance-db.ts | 4 +- databases/embedjs-lmdb/package.json | 2 +- databases/embedjs-lmdb/src/index.ts | 2 +- databases/embedjs-lmdb/src/lmdb-cache.ts | 77 - databases/embedjs-lmdb/src/lmdb-store.ts | 112 ++ databases/embedjs-mongodb/src/index.ts | 2 +- databases/embedjs-mongodb/src/mongo-cache.ts | 132 -- databases/embedjs-mongodb/src/mongo-db.ts | 4 +- databases/embedjs-mongodb/src/mongo-store.ts | 161 +++ databases/embedjs-pinecone/src/pinecone-db.ts | 4 +- databases/embedjs-qdrant/package.json | 2 +- databases/embedjs-qdrant/src/qdrant-db.ts | 5 +- databases/embedjs-redis/src/index.ts | 2 +- databases/embedjs-redis/src/redis-cache.ts | 82 -- databases/embedjs-redis/src/redis-store.ts | 104 ++ databases/embedjs-weaviate/src/weaviate-db.ts | 4 +- ...ng-cache-tip.mdx => missing-store-tip.mdx} | 0 docs/api-reference/methods/delete-loader.mdx | 6 +- docs/api-reference/methods/get-loaders.mdx | 8 +- docs/api-reference/overview.mdx | 10 +- docs/components/caches/mongodb.mdx | 28 - docs/components/introduction.mdx | 2 +- docs/components/{caches => stores}/lmdb.mdx | 8 +- docs/components/stores/mongodb.mdx | 28 + .../{caches => stores}/overview.mdx | 10 +- docs/components/{caches => stores}/redis.mdx | 8 +- docs/components/vector-databases/astradb.mdx | 6 +- docs/mint.json | 6 +- examples/confluence/src/main.ts | 2 +- examples/dynamic/src/main.ts | 2 +- examples/pinecone/src/main.ts | 2 +- examples/simple/src/main.ts | 2 +- models/embedjs-anthropic/package.json | 4 +- models/embedjs-huggingface/package.json | 4 +- models/embedjs-mistral/package.json | 2 +- models/embedjs-ollama/package.json | 4 +- models/embedjs-openai/package.json | 2 +- models/embedjs-vertexai/package.json | 2 +- package-lock.json | 1288 ++++++++++++----- package.json | 18 +- 57 files changed, 1676 insertions(+), 954 deletions(-) delete mode 100644 core/embedjs-interfaces/src/interfaces/base-cache.ts create mode 100644 core/embedjs-interfaces/src/interfaces/base-store.ts rename core/embedjs-interfaces/src/interfaces/{base-db.ts => base-vector-database.ts} (89%) delete mode 100644 core/embedjs/src/cache/memory-cache.ts create mode 100644 core/embedjs/src/store/memory-store.ts delete mode 100644 databases/embedjs-lmdb/src/lmdb-cache.ts create mode 100644 databases/embedjs-lmdb/src/lmdb-store.ts delete mode 100644 databases/embedjs-mongodb/src/mongo-cache.ts create mode 100644 databases/embedjs-mongodb/src/mongo-store.ts delete mode 100644 databases/embedjs-redis/src/redis-cache.ts create mode 100644 databases/embedjs-redis/src/redis-store.ts rename docs/_snippets/{missing-cache-tip.mdx => missing-store-tip.mdx} (100%) delete mode 100644 docs/components/caches/mongodb.mdx rename docs/components/{caches => stores}/lmdb.mdx (53%) create mode 100644 docs/components/stores/mongodb.mdx rename docs/components/{caches => stores}/overview.mdx (52%) rename docs/components/{caches => stores}/redis.mdx (57%) diff --git a/core/embedjs-interfaces/package.json b/core/embedjs-interfaces/package.json index 73de9bde..4537b6a0 100644 --- a/core/embedjs-interfaces/package.json +++ b/core/embedjs-interfaces/package.json @@ -3,10 +3,10 @@ "version": "0.1.13", "description": "Interfaces for extending the embedjs ecosystem", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "debug": "^4.3.7", "md5": "^2.3.0", - "uuid": "^10.0.0" + "uuid": "^11.0.2" }, "type": "module", "main": "./src/index.js", diff --git a/core/embedjs-interfaces/src/index.ts b/core/embedjs-interfaces/src/index.ts index 2a00fca9..f6fc68f1 100644 --- a/core/embedjs-interfaces/src/index.ts +++ b/core/embedjs-interfaces/src/index.ts @@ -1,9 +1,9 @@ import { BaseLoader } from './interfaces/base-loader.js'; -import { BaseDb } from './interfaces/base-db.js'; +import { BaseVectorDatabase } from './interfaces/base-vector-database.js'; import { BaseEmbeddings } from './interfaces/base-embeddings.js'; -import { BaseCache } from './interfaces/base-cache.js'; +import { BaseStore } from './interfaces/base-store.js'; import { BaseModel } from './interfaces/base-model.js'; export * from './types.js'; export * from './constants.js'; -export { BaseDb, BaseCache, BaseLoader, BaseEmbeddings, BaseModel }; +export { BaseStore, BaseVectorDatabase, BaseLoader, BaseEmbeddings, BaseModel }; diff --git a/core/embedjs-interfaces/src/interfaces/base-cache.ts b/core/embedjs-interfaces/src/interfaces/base-cache.ts deleted file mode 100644 index 1191d938..00000000 --- a/core/embedjs-interfaces/src/interfaces/base-cache.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Conversation, Message } from '../types.js'; - -export interface BaseCache { - init(): Promise; - addLoader(loaderId: string, chunkCount: number): Promise; - getLoader(loaderId: string): Promise<{ chunkCount: number }>; - hasLoader(loaderId: string): Promise; - deleteLoader(loaderId: string): Promise; - - loaderCustomSet>(loaderCombinedId: string, value: T): Promise; - loaderCustomGet>(loaderCombinedId: string): Promise; - loaderCustomHas(loaderCombinedId: string): Promise; - loaderCustomDelete(loaderCombinedId: string): Promise; - - addConversation(conversationId: string): Promise; - getConversation(conversationId: string): Promise; - hasConversation(conversationId: string): Promise; - deleteConversation(conversationId: string): Promise; - addEntryToConversation(conversationId: string, entry: Message): Promise; - clearConversations(): Promise; -} diff --git a/core/embedjs-interfaces/src/interfaces/base-loader.ts b/core/embedjs-interfaces/src/interfaces/base-loader.ts index 9d54d5ba..3755b334 100644 --- a/core/embedjs-interfaces/src/interfaces/base-loader.ts +++ b/core/embedjs-interfaces/src/interfaces/base-loader.ts @@ -2,72 +2,24 @@ import md5 from 'md5'; import createDebugMessages from 'debug'; import { EventEmitter } from 'node:events'; -import { BaseCache } from './base-cache.js'; -import { LoaderList, LoaderChunk, UnfilteredLoaderChunk } from '../types.js'; +import { BaseStore } from './base-store.js'; +import { LoaderChunk, UnfilteredLoaderChunk } from '../types.js'; export abstract class BaseLoader< MetadataTemplate extends Record = Record, CacheTemplate extends Record = Record, > extends EventEmitter { - private static cache: Pick< - BaseCache, - 'loaderCustomDelete' | 'loaderCustomGet' | 'loaderCustomHas' | 'loaderCustomSet' - >; - private static readonly LOADERS_LIST_CACHE_KEY = 'LOADERS_LIST_CACHE_KEY'; - - public static setCache(cache: BaseCache) { - BaseLoader.cache = cache; - } - - private static async recordLoaderInCache( - loaderName: string, - uniqueId: string, - loaderMetadata: Record, - ) { - if (!BaseLoader.cache) return; - - if (await BaseLoader.cache.loaderCustomHas(BaseLoader.LOADERS_LIST_CACHE_KEY)) { - const current = await BaseLoader.cache.loaderCustomGet<{ list: LoaderList }>( - BaseLoader.LOADERS_LIST_CACHE_KEY, - ); - - current.list.push({ - type: loaderName, - uniqueId, - loaderMetadata, - }); - - current.list = [...new Map(current.list.map((item) => [item.uniqueId, item])).values()]; - BaseLoader.cache.loaderCustomSet(BaseLoader.LOADERS_LIST_CACHE_KEY, current); - } else { - BaseLoader.cache.loaderCustomSet<{ list: LoaderList }>(BaseLoader.LOADERS_LIST_CACHE_KEY, { - list: [ - { - type: loaderName, - uniqueId, - loaderMetadata, - }, - ], - }); - } - } - - public static async getLoadersList() { - if (!BaseLoader.cache) return null; + private static store: BaseStore; - if (await BaseLoader.cache.loaderCustomHas(BaseLoader.LOADERS_LIST_CACHE_KEY)) { - const current = await BaseLoader.cache.loaderCustomGet<{ list: LoaderList }>( - BaseLoader.LOADERS_LIST_CACHE_KEY, - ); - - return current.list; - } else return []; + public static setCache(store: BaseStore) { + BaseLoader.store = store; } protected readonly uniqueId: string; - private readonly _canIncrementallyLoad: boolean; - protected readonly chunkOverlap: number; protected readonly chunkSize: number; + protected readonly chunkOverlap: number; + public readonly canIncrementallyLoad: boolean; + protected readonly loaderMetadata: Record; constructor( uniqueId: string, @@ -79,47 +31,56 @@ export abstract class BaseLoader< super(); this.uniqueId = uniqueId; - this._canIncrementallyLoad = canIncrementallyLoad; - this.chunkOverlap = chunkOverlap; this.chunkSize = chunkSize; + this.chunkOverlap = chunkOverlap; + this.loaderMetadata = loaderMetadata; + this.canIncrementallyLoad = canIncrementallyLoad; - BaseLoader.recordLoaderInCache(this.constructor.name, uniqueId, loaderMetadata); createDebugMessages('embedjs:loader:BaseLoader')(`New loader class initalized with key ${uniqueId}`); } // eslint-disable-next-line @typescript-eslint/no-empty-function public async init(): Promise {} - public get canIncrementallyLoad() { - return this._canIncrementallyLoad; - } - public getUniqueId(): string { return this.uniqueId; } + private async recordLoaderInCache(chunksProcessed: number) { + if (!BaseLoader.store) return; + + const loaderData = { + uniqueId: this.uniqueId, + type: this.constructor.name, + loaderMetadata: this.loaderMetadata, + chunksProcessed, + }; + + await BaseLoader.store.addLoaderMetadata(this.uniqueId, loaderData); + } + private getCustomCacheKey(key: string) { return `LOADER_CUSTOM_${this.uniqueId}_${key}`; } protected async checkInCache(key: string) { - if (!BaseLoader.cache) return false; - return BaseLoader.cache.loaderCustomHas(this.getCustomCacheKey(key)); + if (!BaseLoader.store) return false; + return BaseLoader.store.loaderCustomHas(this.getCustomCacheKey(key)); } protected async getFromCache(key: string): Promise { - if (!BaseLoader.cache) return null; - return BaseLoader.cache.loaderCustomGet(this.getCustomCacheKey(key)); + if (!BaseLoader.store) return null; + return BaseLoader.store.loaderCustomGet(this.getCustomCacheKey(key)); } protected async saveToCache(key: string, value: CacheTemplate) { - if (!BaseLoader.cache) return; - await BaseLoader.cache.loaderCustomSet(this.getCustomCacheKey(key), value); + if (!BaseLoader.store) return; + await BaseLoader.store.loaderCustomSet(this.uniqueId, this.getCustomCacheKey(key), value); } protected async deleteFromCache(key: string) { - if (!BaseLoader.cache) return false; - return BaseLoader.cache.loaderCustomDelete(this.getCustomCacheKey(key)); + if (!BaseLoader.store) return false; + return BaseLoader.store.loaderCustomDelete(this.getCustomCacheKey(key)); } protected async loadIncrementalChunk( @@ -135,6 +96,7 @@ export abstract class BaseLoader< public async *getChunks(): AsyncGenerator, void, void> { const chunks = await this.getUnfilteredChunks(); + let count = 0; for await (const chunk of chunks) { chunk.pageContent = chunk.pageContent .replace(/(\r\n|\n|\r)/gm, ' ') @@ -146,8 +108,11 @@ export abstract class BaseLoader< ...chunk, contentHash: md5(chunk.pageContent), }; + count++; } } + + await this.recordLoaderInCache(count); } abstract getUnfilteredChunks(): AsyncGenerator, void, void>; diff --git a/core/embedjs-interfaces/src/interfaces/base-model.ts b/core/embedjs-interfaces/src/interfaces/base-model.ts index 961ac6b2..1ce8a940 100644 --- a/core/embedjs-interfaces/src/interfaces/base-model.ts +++ b/core/embedjs-interfaces/src/interfaces/base-model.ts @@ -3,20 +3,20 @@ import createDebugMessages from 'debug'; import { v4 as uuidv4 } from 'uuid'; import { Chunk, QueryResponse, Message, SourceDetail, ModelResponse, Conversation } from '../types.js'; -import { BaseCache } from './base-cache.js'; +import { BaseStore } from './base-store.js'; export abstract class BaseModel { private readonly baseDebug = createDebugMessages('embedjs:model:BaseModel'); - private static cache: BaseCache; + private static store: BaseStore; private static defaultTemperature: number; public static setDefaultTemperature(temperature?: number) { BaseModel.defaultTemperature = temperature; } - public static setCache(cache: BaseCache) { - BaseModel.cache = cache; + public static setStore(cache: BaseStore) { + BaseModel.store = cache; } private readonly _temperature?: number; @@ -83,18 +83,18 @@ export abstract class BaseModel { let conversation: Conversation; if (conversationId) { - if (!(await BaseModel.cache.hasConversation(conversationId))) { + if (!(await BaseModel.store.hasConversation(conversationId))) { this.baseDebug(`Conversation with id '${conversationId}' is new`); - await BaseModel.cache.addConversation(conversationId); + await BaseModel.store.addConversation(conversationId); } - conversation = await BaseModel.cache.getConversation(conversationId); + conversation = await BaseModel.store.getConversation(conversationId); this.baseDebug( `${conversation.entries.length} history entries found for conversationId '${conversationId}'`, ); // Add user query to history - await BaseModel.cache.addEntryToConversation(conversationId, { + await BaseModel.store.addEntryToConversation(conversationId, { id: uuidv4(), timestamp: new Date(), actor: 'HUMAN', @@ -123,7 +123,7 @@ export abstract class BaseModel { if (conversationId) { // Add AI response to history - await BaseModel.cache.addEntryToConversation(conversationId, newEntry); + await BaseModel.store.addEntryToConversation(conversationId, newEntry); } return { diff --git a/core/embedjs-interfaces/src/interfaces/base-store.ts b/core/embedjs-interfaces/src/interfaces/base-store.ts new file mode 100644 index 00000000..f5871eff --- /dev/null +++ b/core/embedjs-interfaces/src/interfaces/base-store.ts @@ -0,0 +1,23 @@ +import { Conversation, LoaderListEntry, Message } from '../types.js'; + +export interface BaseStore { + init(): Promise; + + addLoaderMetadata(loaderId: string, value: LoaderListEntry): Promise; + getLoaderMetadata(loaderId: string): Promise; + hasLoaderMetadata(loaderId: string): Promise; + getAllLoaderMetadata(): Promise; + + loaderCustomSet>(loaderId: string, key: string, value: T): Promise; + loaderCustomGet>(key: string): Promise; + loaderCustomHas(key: string): Promise; + loaderCustomDelete(key: string): Promise; + deleteLoaderMetadataAndCustomValues(loaderId: string): Promise; + + addConversation(conversationId: string): Promise; + getConversation(conversationId: string): Promise; + hasConversation(conversationId: string): Promise; + deleteConversation(conversationId: string): Promise; + addEntryToConversation(conversationId: string, entry: Message): Promise; + clearConversations(): Promise; +} diff --git a/core/embedjs-interfaces/src/interfaces/base-db.ts b/core/embedjs-interfaces/src/interfaces/base-vector-database.ts similarity index 89% rename from core/embedjs-interfaces/src/interfaces/base-db.ts rename to core/embedjs-interfaces/src/interfaces/base-vector-database.ts index 13eae969..3de690d1 100644 --- a/core/embedjs-interfaces/src/interfaces/base-db.ts +++ b/core/embedjs-interfaces/src/interfaces/base-vector-database.ts @@ -1,6 +1,6 @@ import { ExtractChunkData, InsertChunkData } from '../types.js'; -export interface BaseDb { +export interface BaseVectorDatabase { init({ dimensions }: { dimensions: number }): Promise; insertChunks(chunks: InsertChunkData[]): Promise; similaritySearch(query: number[], k: number): Promise; diff --git a/core/embedjs-interfaces/src/types.ts b/core/embedjs-interfaces/src/types.ts index 84dd6b39..b03529cf 100644 --- a/core/embedjs-interfaces/src/types.ts +++ b/core/embedjs-interfaces/src/types.ts @@ -43,11 +43,12 @@ export type SourceDetail = { source: string; }; -export type LoaderList = { +export type LoaderListEntry = { type: string; uniqueId: string; + chunksProcessed: number; loaderMetadata: Record; -}[]; +}; export type Message = { id: string; diff --git a/core/embedjs/package.json b/core/embedjs/package.json index 03f45d4e..92f2de63 100644 --- a/core/embedjs/package.json +++ b/core/embedjs/package.json @@ -8,7 +8,7 @@ "@llm-tools/embedjs-interfaces": "0.1.13", "@llm-tools/embedjs-utils": "0.1.13", "debug": "^4.3.7", - "langchain": "^0.3.4", + "langchain": "^0.3.5", "md5": "^2.3.0", "mime": "^4.0.4", "stream-mime-type": "^2.0.0" @@ -16,7 +16,7 @@ "devDependencies": { "@types/debug": "^4.1.12", "@types/md5": "^2.3.5", - "@types/node": "^22.8.1" + "@types/node": "^22.8.6" }, "main": "./src/index.js", "license": "Apache-2.0", diff --git a/core/embedjs/src/cache/memory-cache.ts b/core/embedjs/src/cache/memory-cache.ts deleted file mode 100644 index dc20061a..00000000 --- a/core/embedjs/src/cache/memory-cache.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { BaseCache, Conversation, Message } from '@llm-tools/embedjs-interfaces'; - -export class MemoryCache implements BaseCache { - private loaderList: Record; - private loaderCustomValues: Record>; - private conversations: Map; - - async init(): Promise { - this.loaderList = {}; - this.loaderCustomValues = {}; - this.conversations = new Map(); - } - - async addLoader(loaderId: string, chunkCount: number): Promise { - this.loaderList[loaderId] = { chunkCount }; - } - - async getLoader(loaderId: string): Promise<{ chunkCount: number }> { - return this.loaderList[loaderId]; - } - - async hasLoader(loaderId: string): Promise { - return !!this.loaderList[loaderId]; - } - - async loaderCustomSet>(loaderCombinedId: string, value: T): Promise { - this.loaderCustomValues[loaderCombinedId] = value; - } - - async loaderCustomGet>(loaderCombinedId: string): Promise { - return this.loaderCustomValues[loaderCombinedId]; - } - - async loaderCustomHas(loaderCombinedId: string): Promise { - return !!this.loaderCustomValues[loaderCombinedId]; - } - - async deleteLoader(loaderId: string): Promise { - delete this.loaderList[loaderId]; - } - - async loaderCustomDelete(loaderCombinedId: string): Promise { - delete this.loaderList[loaderCombinedId]; - } - - async addConversation(conversationId: string): Promise { - if (!this.conversations.has(conversationId)) { - this.conversations.set(conversationId, { conversationId, entries: [] }); - } - } - - async getConversation(conversationId: string): Promise { - return this.conversations.get(conversationId); - } - - async hasConversation(conversationId: string): Promise { - return this.conversations.has(conversationId); - } - - async deleteConversation(conversationId: string): Promise { - this.conversations.delete(conversationId); - } - - async addEntryToConversation(conversationId: string, entry: Message): Promise { - const conversation = await this.getConversation(conversationId); - conversation.entries.push(entry); - } - - async clearConversations(): Promise { - this.conversations.clear(); - } -} diff --git a/core/embedjs/src/core/rag-application-builder.ts b/core/embedjs/src/core/rag-application-builder.ts index 999c0e60..8917a288 100644 --- a/core/embedjs/src/core/rag-application-builder.ts +++ b/core/embedjs/src/core/rag-application-builder.ts @@ -1,13 +1,20 @@ -import { BaseCache, BaseDb, BaseEmbeddings, BaseLoader, BaseModel, SIMPLE_MODELS } from '@llm-tools/embedjs-interfaces'; -import { MemoryCache } from '../cache/memory-cache.js'; +import { + BaseStore, + BaseVectorDatabase, + BaseEmbeddings, + BaseLoader, + BaseModel, + SIMPLE_MODELS, +} from '@llm-tools/embedjs-interfaces'; +import { MemoryStore } from '../store/memory-store.js'; import { RAGApplication } from './rag-application.js'; export class RAGApplicationBuilder { private temperature: number; private model: BaseModel | SIMPLE_MODELS | null; + private vectorDatabase: BaseVectorDatabase; private loaders: BaseLoader[]; - private vectorDb: BaseDb; - private cache: BaseCache; + private store: BaseStore; private systemMessage: string; private searchResultCount: number; private embeddingModel: BaseEmbeddings; @@ -27,7 +34,7 @@ export class RAGApplicationBuilder { this.storeConversationsToDefaultThread = true; this.embeddingRelevanceCutOff = 0; - this.cache = new MemoryCache(); + this.store = new MemoryStore(); } /** @@ -41,13 +48,13 @@ export class RAGApplicationBuilder { } /** - * The function setVectorDb sets a BaseDb object - * @param {BaseDb} vectorDb - The `vectorDb` parameter is an instance of the `BaseDb` class, which + * The function setVectorDb sets a BaseVectorDatabase object + * @param {BaseVectorDatabase} vectorDb - The `vectorDb` parameter is an instance of the `BaseVectorDatabase` class, which * is used to store vectors in a database. * @returns The `this` object is being returned, which allows for method chaining. */ - setVectorDb(vectorDb: BaseDb) { - this.vectorDb = vectorDb; + setVectorDatabase(vectorDatabase: BaseVectorDatabase) { + this.vectorDatabase = vectorDatabase; return this; } @@ -66,8 +73,8 @@ export class RAGApplicationBuilder { return this; } - setCache(cache: BaseCache) { - this.cache = cache; + setStore(store: BaseStore) { + this.store = store; return this; } @@ -120,8 +127,8 @@ export class RAGApplicationBuilder { return this.searchResultCount; } - getVectorDb() { - return this.vectorDb; + getVectorDatabase() { + return this.vectorDatabase; } getTemperature() { @@ -136,8 +143,8 @@ export class RAGApplicationBuilder { return this.systemMessage; } - getCache() { - return this.cache; + getStore() { + return this.store; } getEmbeddingModel() { diff --git a/core/embedjs/src/core/rag-application.ts b/core/embedjs/src/core/rag-application.ts index cb861c8a..2cac7269 100644 --- a/core/embedjs/src/core/rag-application.ts +++ b/core/embedjs/src/core/rag-application.ts @@ -4,16 +4,16 @@ import { RAGEmbedding } from './rag-embedding.js'; import { RAGApplicationBuilder } from './rag-application-builder.js'; import { AddLoaderReturn, - BaseCache, - BaseDb, BaseLoader, BaseModel, + BaseStore, + BaseVectorDatabase, Chunk, - DEFAULT_INSERT_BATCH_SIZE, InsertChunkData, LoaderChunk, QueryResponse, SIMPLE_MODELS, + DEFAULT_INSERT_BATCH_SIZE, } from '@llm-tools/embedjs-interfaces'; import { cleanString, getUnique } from '@llm-tools/embedjs-utils'; @@ -23,8 +23,8 @@ export class RAGApplication { private readonly embeddingRelevanceCutOff: number; private readonly searchResultCount: number; private readonly systemMessage: string; - private readonly cache: BaseCache; - private readonly vectorDb: BaseDb; + private readonly vectorDb: BaseVectorDatabase; + private readonly store: BaseStore; private loaders: BaseLoader[]; private model: BaseModel; @@ -32,14 +32,14 @@ export class RAGApplication { if (!llmBuilder.getEmbeddingModel()) throw new Error('Embedding model must be set!'); this.storeConversationsToDefaultThread = llmBuilder.getParamStoreConversationsToDefaultThread(); - this.cache = llmBuilder.getCache(); - BaseLoader.setCache(this.cache); - BaseModel.setCache(this.cache); + this.store = llmBuilder.getStore(); + BaseLoader.setCache(this.store); + BaseModel.setStore(this.store); this.systemMessage = cleanString(llmBuilder.getSystemMessage()); this.debug(`Using system query template - "${this.systemMessage}"`); - this.vectorDb = llmBuilder.getVectorDb(); + this.vectorDb = llmBuilder.getVectorDatabase(); if (!this.vectorDb) throw new SyntaxError('VectorDb not set'); this.searchResultCount = llmBuilder.getSearchResultCount(); @@ -71,8 +71,8 @@ export class RAGApplication { await this.vectorDb.init({ dimensions: await RAGEmbedding.getEmbedding().getDimensions() }); this.debug('Initialized vector database'); - if (this.cache) { - await this.cache.init(); + if (this.store) { + await this.store.init(); this.debug('Initialized cache'); } @@ -138,13 +138,15 @@ export class RAGApplication { * it to the system. * @param {LoaderParam} loaderParam - The `loaderParam` parameter is a string, object or instance of BaseLoader * that contains the necessary information to create a loader. + * @param {boolean} forceReload - The `forceReload` parameter is a boolean used to indicate if a loader should be reloaded. + * By default, loaders which have been previously run are not reloaded. * @returns The function `addLoader` returns an object with the following properties: * - `entriesAdded`: Number of new entries added during the loader operation * - `uniqueId`: Unique identifier of the loader * - `loaderType`: Name of the loader's constructor class */ - public async addLoader(loaderParam: BaseLoader): Promise { - return this._addLoader(loaderParam); + public async addLoader(loaderParam: BaseLoader, forceReload = false): Promise { + return this._addLoader(loaderParam, forceReload); } /** @@ -157,23 +159,31 @@ export class RAGApplication { * - `uniqueId`: Unique identifier of the loader * - `loaderType`: Name of the loader's constructor class */ - private async _addLoader(loader: BaseLoader): Promise { + private async _addLoader(loader: BaseLoader, forceReload: boolean): Promise { const uniqueId = loader.getUniqueId(); - this.debug('Adding loader', uniqueId); - await loader.init(); - - const chunks = await loader.getChunks(); - if (this.cache && (await this.cache.hasLoader(uniqueId))) { - const { chunkCount: previousChunkCount } = await this.cache.getLoader(uniqueId); - - this.debug(`Loader previously run. Deleting previous ${previousChunkCount} keys`, uniqueId); - if (previousChunkCount > 0) { - await this.deleteLoader(uniqueId); + this.debug('Exploring loader', uniqueId); + + if (this.store && (await this.store.hasLoaderMetadata(uniqueId))) { + if (forceReload) { + const { chunksProcessed } = await this.store.getLoaderMetadata(uniqueId); + + this.debug( + `Loader previously run but forceReload set! Deleting previous ${chunksProcessed} keys...`, + uniqueId, + ); + + this.loaders = this.loaders.filter((x) => x.getUniqueId() != loader.getUniqueId()); + if (chunksProcessed > 0) await this.deleteLoader(uniqueId); + } else { + this.debug('Loader previously run. Skipping...', uniqueId); + return { entriesAdded: 0, uniqueId, loaderType: loader.constructor.name }; } } - const { newInserts, formattedChunks } = await this.batchLoadChunks(uniqueId, chunks); - if (this.cache) await this.cache.addLoader(uniqueId, formattedChunks.length); + await loader.init(); + const chunks = await loader.getChunks(); + + const { newInserts } = await this.batchLoadChunks(uniqueId, chunks); this.debug(`Add loader completed with ${newInserts} new entries for`, uniqueId); if (loader.canIncrementallyLoad) { @@ -184,10 +194,8 @@ export class RAGApplication { }); } - this.loaders = this.loaders.filter((x) => x.getUniqueId() != loader.getUniqueId()); this.loaders.push(loader); - - this.debug(`Add loader ${uniqueId} wrap`); + this.debug(`Add loader ${uniqueId} wrap up done`); return { entriesAdded: newInserts, uniqueId, loaderType: loader.constructor.name }; } @@ -210,7 +218,8 @@ export class RAGApplication { * @returns The list of loaders with some metadata about them. */ public async getLoaders() { - return BaseLoader.getLoadersList(); + if (!this.store) return []; + return this.store.getAllLoaderMetadata(); } /** @@ -304,7 +313,7 @@ export class RAGApplication { */ public async deleteLoader(uniqueLoaderId: string) { const deleteResult = await this.vectorDb.deleteKeys(uniqueLoaderId); - if (this.cache && deleteResult) await this.cache.deleteLoader(uniqueLoaderId); + if (this.store && deleteResult) await this.store.deleteLoaderMetadataAndCustomValues(uniqueLoaderId); this.loaders = this.loaders.filter((x) => x.getUniqueId() != uniqueLoaderId); return deleteResult; } diff --git a/core/embedjs/src/store/memory-store.ts b/core/embedjs/src/store/memory-store.ts new file mode 100644 index 00000000..a5cc6d1e --- /dev/null +++ b/core/embedjs/src/store/memory-store.ts @@ -0,0 +1,93 @@ +import { BaseStore, Conversation, LoaderListEntry, Message } from '@llm-tools/embedjs-interfaces'; + +export class MemoryStore implements BaseStore { + private loaderCustomValues: Record>; + private loaderCustomValuesMap: Map; + private loaderList: Record; + private conversations: Map; + + async init(): Promise { + this.loaderList = {}; + this.loaderCustomValues = {}; + this.conversations = new Map(); + this.loaderCustomValuesMap = new Map(); + } + + async addLoaderMetadata(loaderId: string, value: LoaderListEntry): Promise { + this.loaderList[loaderId] = value; + } + + async getLoaderMetadata(loaderId: string): Promise { + return this.loaderList[loaderId]; + } + + async hasLoaderMetadata(loaderId: string): Promise { + return !!this.loaderList[loaderId]; + } + + async getAllLoaderMetadata(): Promise { + return Object.values(this.loaderList); + } + + async loaderCustomSet>(loaderId: string, key: string, value: T): Promise { + if (!this.loaderCustomValuesMap.has(loaderId)) this.loaderCustomValuesMap.set(loaderId, []); + this.loaderCustomValuesMap.get(loaderId).push(key); + + this.loaderCustomValues[key] = { ...value, loaderId }; + } + + async loaderCustomGet>(key: string): Promise { + const data = this.loaderCustomValues[key]; + delete data.loaderId; + return data; + } + + async loaderCustomHas(key: string): Promise { + return !!this.loaderCustomValues[key]; + } + + async loaderCustomDelete(key: string): Promise { + const loaderId = this.loaderCustomValues[key].loaderId; + + delete this.loaderList[key]; + this.loaderCustomValuesMap.set( + loaderId, + this.loaderCustomValuesMap.get(loaderId).filter((k) => k !== key), + ); + } + + async deleteLoaderMetadataAndCustomValues(loaderId: string): Promise { + this.loaderCustomValuesMap.get(loaderId).forEach((key) => { + delete this.loaderCustomValues[key]; + }); + this.loaderCustomValuesMap.delete(loaderId); + delete this.loaderList[loaderId]; + } + + async addConversation(conversationId: string): Promise { + if (!this.conversations.has(conversationId)) { + this.conversations.set(conversationId, { conversationId, entries: [] }); + } + } + + async getConversation(conversationId: string): Promise { + return this.conversations.get(conversationId); + } + + async hasConversation(conversationId: string): Promise { + return this.conversations.has(conversationId); + } + + async deleteConversation(conversationId: string): Promise { + this.conversations.delete(conversationId); + } + + async addEntryToConversation(conversationId: string, entry: Message): Promise { + const conversation = await this.getConversation(conversationId); + conversation.entries.push(entry); + } + + async clearConversations(): Promise { + this.conversations.clear(); + } +} diff --git a/databases/embedjs-astra/src/astra-db.ts b/databases/embedjs-astra/src/astra-db.ts index 3a87433d..2de2d042 100644 --- a/databases/embedjs-astra/src/astra-db.ts +++ b/databases/embedjs-astra/src/astra-db.ts @@ -1,7 +1,7 @@ import { Collection, DataAPIClient, Db } from '@datastax/astra-db-ts'; -import { BaseDb, InsertChunkData, ExtractChunkData } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, InsertChunkData, ExtractChunkData } from '@llm-tools/embedjs-interfaces'; -export class AstraDb implements BaseDb { +export class AstraDb implements BaseVectorDatabase { private db: Db; private collectionName: string; private collection: Collection; diff --git a/databases/embedjs-cosmos/src/cosmos-db.ts b/databases/embedjs-cosmos/src/cosmos-db.ts index 8e248946..0c7ad27b 100644 --- a/databases/embedjs-cosmos/src/cosmos-db.ts +++ b/databases/embedjs-cosmos/src/cosmos-db.ts @@ -1,8 +1,8 @@ import createDebugMessages from 'debug'; import { CosmosClient, CosmosClientOptions, Container } from '@azure/cosmos'; -import { BaseDb, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; -export class CosmosDb implements BaseDb { +export class CosmosDb implements BaseVectorDatabase { private readonly debug = createDebugMessages('embedjs:vector:CosmosDb'); private static readonly DEFAULT_DB_NAME = 'embedjs'; @@ -104,7 +104,7 @@ export class CosmosDb implements BaseDb { `SELECT c.id, c.${CosmosDb.LOADER_FIELD_NAME}, c.pageContent, c.metadata, VectorDistance(c.${CosmosDb.VECTOR_FIELD_NAME}, [${encodedQuery}]) AS score FROM c - ORDER BY VectorDistance(c.${CosmosDb.VECTOR_FIELD_NAME}, [${encodedQuery}]) + ORDER BY VectorDistance(c.${CosmosDb.VECTOR_FIELD_NAME}, [${encodedQuery}]) OFFSET 0 LIMIT ${k}`, { forceQueryPlan: true, maxItemCount: k }, ) diff --git a/databases/embedjs-hnswlib/src/hnswlib-db.ts b/databases/embedjs-hnswlib/src/hnswlib-db.ts index b49dec84..0d9ede20 100644 --- a/databases/embedjs-hnswlib/src/hnswlib-db.ts +++ b/databases/embedjs-hnswlib/src/hnswlib-db.ts @@ -1,9 +1,9 @@ import HNSWLib from 'hnswlib-node'; import createDebugMessages from 'debug'; -import { BaseDb, ExtractChunkData, InsertChunkData, Metadata } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData, Metadata } from '@llm-tools/embedjs-interfaces'; -export class HNSWDb implements BaseDb { +export class HNSWDb implements BaseVectorDatabase { private readonly debug = createDebugMessages('embedjs:vector:HNSWDb'); private index: HNSWLib.HierarchicalNSW; diff --git a/databases/embedjs-lancedb/package.json b/databases/embedjs-lancedb/package.json index 921fc297..3b89536c 100644 --- a/databases/embedjs-lancedb/package.json +++ b/databases/embedjs-lancedb/package.json @@ -3,7 +3,7 @@ "version": "0.1.13", "description": "Add LanceDb support to embedjs", "dependencies": { - "@lancedb/lancedb": "^0.11.0", + "@lancedb/lancedb": "^0.12.0", "@llm-tools/embedjs-interfaces": "0.1.13", "compute-cosine-similarity": "^1.1.0" }, diff --git a/databases/embedjs-lancedb/src/lance-db.ts b/databases/embedjs-lancedb/src/lance-db.ts index 45dcf8a8..3dc1f132 100644 --- a/databases/embedjs-lancedb/src/lance-db.ts +++ b/databases/embedjs-lancedb/src/lance-db.ts @@ -3,9 +3,9 @@ import * as fs from 'node:fs/promises'; import similarity from 'compute-cosine-similarity'; import { Table, connect } from '@lancedb/lancedb'; -import { BaseDb, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; -export class LanceDb implements BaseDb { +export class LanceDb implements BaseVectorDatabase { private static readonly STATIC_DB_NAME = 'vectors'; private readonly isTemp: boolean = true; private readonly path: string; diff --git a/databases/embedjs-lmdb/package.json b/databases/embedjs-lmdb/package.json index 503bdc8e..8fb26642 100644 --- a/databases/embedjs-lmdb/package.json +++ b/databases/embedjs-lmdb/package.json @@ -4,7 +4,7 @@ "description": "Add LMDB support to embedjs", "dependencies": { "@llm-tools/embedjs-interfaces": "0.1.13", - "lmdb": "^3.1.3" + "lmdb": "^3.1.4" }, "type": "module", "main": "./src/index.js", diff --git a/databases/embedjs-lmdb/src/index.ts b/databases/embedjs-lmdb/src/index.ts index b9f687d6..756a5677 100644 --- a/databases/embedjs-lmdb/src/index.ts +++ b/databases/embedjs-lmdb/src/index.ts @@ -1 +1 @@ -export * from './lmdb-cache.js'; +export * from './lmdb-store.js'; diff --git a/databases/embedjs-lmdb/src/lmdb-cache.ts b/databases/embedjs-lmdb/src/lmdb-cache.ts deleted file mode 100644 index 1bc88c09..00000000 --- a/databases/embedjs-lmdb/src/lmdb-cache.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { BaseCache, Conversation, Message } from '@llm-tools/embedjs-interfaces'; -import * as lmdb from 'lmdb'; - -export class LmdbCache implements BaseCache { - private readonly dataPath: string; - private database: lmdb.RootDatabase, lmdb.Key>; - - constructor({ path }: { path: string }) { - this.dataPath = path; - } - - async init(): Promise { - this.database = lmdb.open({ - path: this.dataPath, - compression: true, - }); - } - - async addLoader(loaderId: string, chunkCount: number): Promise { - await this.database.put(loaderId, { chunkCount }); - } - - async getLoader(loaderId: string): Promise<{ chunkCount: number }> { - return <{ chunkCount: number }>this.database.get(loaderId); - } - - async hasLoader(loaderId: string): Promise { - return this.database.doesExist(loaderId); - } - - async loaderCustomSet>(loaderCombinedId: string, value: T): Promise { - await this.database.put(loaderCombinedId, value); - } - - async loaderCustomGet>(loaderCombinedId: string): Promise { - return this.database.get(loaderCombinedId); - } - - async loaderCustomHas(loaderCombinedId: string): Promise { - return this.database.doesExist(loaderCombinedId); - } - - async deleteLoader(loaderId: string): Promise { - await this.database.remove(loaderId); - } - - async loaderCustomDelete(loaderCombinedId: string): Promise { - await this.database.remove(loaderCombinedId); - } - - async addConversation(conversationId: string): Promise { - await this.database.put(`conversation_${conversationId}`, { conversationId, entries: [] }); - } - - async getConversation(conversationId: string): Promise { - return this.database.get(`conversation_${conversationId}`); - } - - async hasConversation(conversationId: string): Promise { - return this.database.doesExist(`conversation_${conversationId}`); - } - - async deleteConversation(conversationId: string): Promise { - await this.database.remove(`conversation_${conversationId}`); - } - - async addEntryToConversation(conversationId: string, entry: Message): Promise { - const conversation = await this.getConversation(`conversation_${conversationId}`); - conversation.entries.push(entry); - - await this.database.put(`conversation_${conversationId}`, conversation); - } - - async clearConversations(): Promise { - throw new Error('Method not implemented.'); - } -} diff --git a/databases/embedjs-lmdb/src/lmdb-store.ts b/databases/embedjs-lmdb/src/lmdb-store.ts new file mode 100644 index 00000000..c582c3ce --- /dev/null +++ b/databases/embedjs-lmdb/src/lmdb-store.ts @@ -0,0 +1,112 @@ +import { BaseStore, Conversation, LoaderListEntry, Message } from '@llm-tools/embedjs-interfaces'; +import * as lmdb from 'lmdb'; + +export class LmdbStore implements BaseStore { + private static readonly LOADER_METADATA_PREFIX = 'LOADER_METADATA_'; + private static readonly CUSTOM_KEYS_PREFIX = 'CUSTOM_KEYS_'; + + private readonly dataPath: string; + private database: lmdb.RootDatabase, lmdb.Key>; + + constructor({ path }: { path: string }) { + this.dataPath = path; + } + + async init(): Promise { + this.database = lmdb.open({ + path: this.dataPath, + compression: true, + }); + } + + async addLoaderMetadata(loaderId: string, value: LoaderListEntry): Promise { + let loaderKeys: { list: string[] }; + if (this.database.doesExist(`${LmdbStore.LOADER_METADATA_PREFIX}_ALL`)) + loaderKeys = <{ list: [] }>this.database.get(`${LmdbStore.LOADER_METADATA_PREFIX}_ALL`); + else loaderKeys = { list: [] }; + loaderKeys.list.push(loaderId); + + await this.database.put(`${LmdbStore.LOADER_METADATA_PREFIX}_ALL`, loaderKeys); + await this.database.put(`${LmdbStore.LOADER_METADATA_PREFIX}_${loaderId}`, value); + } + + async getLoaderMetadata(loaderId: string): Promise { + return this.database.get(`${LmdbStore.LOADER_METADATA_PREFIX}_${loaderId}`); + } + + async hasLoaderMetadata(loaderId: string): Promise { + return this.database.doesExist(`${LmdbStore.LOADER_METADATA_PREFIX}_${loaderId}`); + } + + async getAllLoaderMetadata(): Promise { + const loaderKeys = <{ list: string[] }>this.database.get(`${LmdbStore.LOADER_METADATA_PREFIX}_ALL`); + return loaderKeys.list.map( + (loaderId) => this.database.get(`${LmdbStore.LOADER_METADATA_PREFIX}_${loaderId}`), + ); + } + + async loaderCustomSet>(loaderId: string, key: string, value: T): Promise { + let customKeys: { list: string[] }; + if (this.database.doesExist(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`)) + customKeys = <{ list: [] }>this.database.get(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + else customKeys = { list: [] }; + customKeys.list.push(key); + + await this.database.put(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`, customKeys); + await this.database.put(key, { ...value, loaderId }); + } + + async loaderCustomGet>(key: string): Promise { + const data = this.database.get(key); + delete data.loaderId; + return data; + } + + async loaderCustomHas(key: string): Promise { + return this.database.doesExist(key); + } + + async loaderCustomDelete(key: string): Promise { + const { loaderId } = <{ loaderId: string }>this.database.get(key); + const customKeys = <{ list: string[] }>this.database.get(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + customKeys.list = customKeys.list.filter((k) => k !== key); + await this.database.put(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`, customKeys); + await this.database.remove(key); + } + + async deleteLoaderMetadataAndCustomValues(loaderId: string): Promise { + const customKeys = <{ list: string[] }>this.database.get(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + for (const key of customKeys.list) { + await this.database.remove(key); + } + await this.database.remove(`${LmdbStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + await this.database.remove(`${LmdbStore.LOADER_METADATA_PREFIX}_${loaderId}`); + } + + async addConversation(conversationId: string): Promise { + await this.database.put(`conversation_${conversationId}`, { conversationId, entries: [] }); + } + + async getConversation(conversationId: string): Promise { + return this.database.get(`conversation_${conversationId}`); + } + + async hasConversation(conversationId: string): Promise { + return this.database.doesExist(`conversation_${conversationId}`); + } + + async deleteConversation(conversationId: string): Promise { + await this.database.remove(`conversation_${conversationId}`); + } + + async addEntryToConversation(conversationId: string, entry: Message): Promise { + const conversation = await this.getConversation(`conversation_${conversationId}`); + conversation.entries.push(entry); + + await this.database.put(`conversation_${conversationId}`, conversation); + } + + async clearConversations(): Promise { + throw new Error('Method not implemented.'); + } +} diff --git a/databases/embedjs-mongodb/src/index.ts b/databases/embedjs-mongodb/src/index.ts index aceff751..9d2fed4f 100644 --- a/databases/embedjs-mongodb/src/index.ts +++ b/databases/embedjs-mongodb/src/index.ts @@ -1,2 +1,2 @@ -export * from './mongo-cache.js'; +export * from './mongo-store.js'; export * from './mongo-db.js'; diff --git a/databases/embedjs-mongodb/src/mongo-cache.ts b/databases/embedjs-mongodb/src/mongo-cache.ts deleted file mode 100644 index e67957e4..00000000 --- a/databases/embedjs-mongodb/src/mongo-cache.ts +++ /dev/null @@ -1,132 +0,0 @@ -import createDebugMessages from 'debug'; -import { Collection, Document, MongoClient } from 'mongodb'; -import { BaseCache, Conversation, Message } from '@llm-tools/embedjs-interfaces'; - -interface ConversationDocument { - _id?: string; // optional MongoDB ID field - conversationId: string; - entries: Message[]; // Explicitly stating this is an array of ConversationHistory -} - -export class MongoCache implements BaseCache { - private readonly debug = createDebugMessages('embedjs:cache:MongoCache'); - private readonly uri: string; - private readonly dbName: string; - private readonly cacheCollectionName: string; - private cacheCollection: Collection; - private readonly conversationCollectionName: string; - private conversationCollection: Collection; - - constructor({ uri, dbName, collectionName }: { uri: string; dbName: string; collectionName: string }) { - this.uri = uri; - this.dbName = dbName; - this.cacheCollectionName = collectionName; - } - - async init(): Promise { - const client = new MongoClient(this.uri); - await client.connect(); - - // Create index on loaderId field - this.cacheCollection = client.db(this.dbName).collection(this.cacheCollectionName); - try { - await this.cacheCollection.createIndex({ loaderId: 1 }, { unique: true }); - } catch { - this.debug('Index on loaderId already exists.'); - } - - // Create index on conversationId field - this.conversationCollection = client - .db(this.dbName) - .collection(this.conversationCollectionName); - try { - await this.conversationCollection.createIndex({ conversationId: 1 }); - } catch { - this.debug('Index on conversationId already exists.'); - } - // Create index on entries._id field - try { - await this.conversationCollection.createIndex({ 'entries._id': 1 }); - } catch { - this.debug('Index on `entries._id` already exists.'); - } - } - - async addLoader(loaderId: string, chunkCount: number): Promise { - await this.cacheCollection.insertOne({ loaderId, chunkCount }); - } - - async getLoader(loaderId: string): Promise<{ chunkCount: number }> { - const result = await this.cacheCollection.findOne({ loaderId }); - return { chunkCount: result ? result.chunkCount : 0 }; // Assuming a default value of 0 if result is null - } - - async hasLoader(loaderId: string): Promise { - return !!(await this.cacheCollection.findOne({ loaderId })); - } - - async loaderCustomSet>(loaderCombinedId: string, value: T): Promise { - const result = await this.cacheCollection.updateOne( - { loaderId: loaderCombinedId }, - { $setOnInsert: { loaderId: loaderCombinedId, value } }, - { upsert: false }, - ); - - if (result.matchedCount === 0) { - await this.cacheCollection.insertOne({ loaderId: loaderCombinedId, value }); - } - } - - async loaderCustomGet>(loaderCombinedId: string): Promise { - const result = await this.cacheCollection.findOne({ loaderId: loaderCombinedId }); - return result?.value; - } - - async loaderCustomHas(loaderCombinedId: string): Promise { - return !!(await this.cacheCollection.findOne({ loaderId: loaderCombinedId })); - } - - async clear(): Promise { - await this.cacheCollection.deleteMany({}); - } - - async deleteLoader(loaderId: string): Promise { - await this.cacheCollection.deleteOne({ loaderId }); - } - - async loaderCustomDelete(loaderCombinedId: string): Promise { - await this.cacheCollection.deleteOne({ loaderId: loaderCombinedId }); - } - - async addConversation(conversationId: string): Promise { - await this.conversationCollection.insertOne({ conversationId, entries: [] }); - } - - async getConversation(conversationId: string): Promise { - const document = await this.conversationCollection.findOne({ conversationId }); - - return { - conversationId: document.conversationId, - entries: document.entries as Message[], - }; - } - - async hasConversation(conversationId: string): Promise { - return !!(await this.conversationCollection.findOne({ conversationId })); - } - - async deleteConversation(conversationId: string): Promise { - await this.conversationCollection.deleteOne({ conversationId }); - } - - async addEntryToConversation(conversationId: string, entry: Message): Promise { - await this.conversationCollection.updateOne( - { conversationId }, - { $push: { entries: entry } }, // Correctly structured $push operation - ); - } - - async clearConversations(): Promise { - await this.conversationCollection.deleteMany({}); - } -} diff --git a/databases/embedjs-mongodb/src/mongo-db.ts b/databases/embedjs-mongodb/src/mongo-db.ts index 52ac375d..150da12d 100644 --- a/databases/embedjs-mongodb/src/mongo-db.ts +++ b/databases/embedjs-mongodb/src/mongo-db.ts @@ -1,9 +1,9 @@ import { Collection, MongoClient } from 'mongodb'; import createDebugMessages from 'debug'; -import { BaseDb, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; -export class MongoDb implements BaseDb { +export class MongoDb implements BaseVectorDatabase { private readonly debug = createDebugMessages('embedjs:vector:MongoDb'); private static readonly DEFAULT_DB_NAME = 'embedjs'; diff --git a/databases/embedjs-mongodb/src/mongo-store.ts b/databases/embedjs-mongodb/src/mongo-store.ts new file mode 100644 index 00000000..cfc6ee44 --- /dev/null +++ b/databases/embedjs-mongodb/src/mongo-store.ts @@ -0,0 +1,161 @@ +import createDebugMessages from 'debug'; +import { Collection, MongoClient } from 'mongodb'; +import { BaseStore, Conversation, LoaderListEntry, Message } from '@llm-tools/embedjs-interfaces'; + +export class MongoStore implements BaseStore { + private readonly debug = createDebugMessages('embedjs:cache:MongoCache'); + private readonly uri: string; + private readonly dbName: string; + private readonly cacheCollectionName: string; + private metadataCollection: Collection; + private readonly customDataCollectionName: string; + private customDataCollection: Collection<{ loaderId: string; key: string } & Record>; + private readonly conversationCollectionName: string; + private conversationCollection: Collection<{ conversationId: string; entries: Message[] }>; + + constructor({ + uri, + dbName, + cacheCollectionName = 'cache', + customDataCollectionName = 'customData', + conversationCollectionName = 'conversations', + }: { + uri: string; + dbName: string; + cacheCollectionName: string; + customDataCollectionName: string; + conversationCollectionName: string; + }) { + this.uri = uri; + this.dbName = dbName; + this.cacheCollectionName = cacheCollectionName; + this.customDataCollectionName = customDataCollectionName; + this.conversationCollectionName = conversationCollectionName; + } + + async init(): Promise { + const client = new MongoClient(this.uri); + await client.connect(); + + // Create index on loaderId field + this.metadataCollection = client.db(this.dbName).collection(this.cacheCollectionName); + try { + await this.metadataCollection.createIndex({ loaderId: 1 }, { unique: true }); + } catch { + this.debug('Index on loaderId already exists on metadataCollection'); + } + + // Create index on loaderId field + this.customDataCollection = client.db(this.dbName).collection(this.customDataCollectionName); + try { + await this.customDataCollection.createIndex({ loaderId: 1 }); + } catch { + this.debug('Index on loaderId already exists on customDataCollection'); + } + try { + await this.customDataCollection.createIndex({ key: 1 }, { unique: true }); + } catch { + this.debug('Index on key already exists on customDataCollection'); + } + + // Create index on conversationId field + this.conversationCollection = client.db(this.dbName).collection(this.conversationCollectionName); + try { + await this.conversationCollection.createIndex({ conversationId: 1 }, { unique: true }); + } catch { + this.debug('Index on conversationId already exists on conversationCollection'); + } + // Create index on entries._id field + try { + await this.conversationCollection.createIndex({ 'entries._id': 1 }); + } catch { + this.debug('Index on `entries._id` already exists on conversationCollection'); + } + } + + async addLoaderMetadata(loaderId: string, value: LoaderListEntry): Promise { + await this.metadataCollection.insertOne({ ...value, loaderId }); + } + + async getLoaderMetadata(loaderId: string): Promise { + const result = await this.metadataCollection.findOne({ loaderId }); + delete result.loaderId; + delete result._id; + return result; + } + + async hasLoaderMetadata(loaderId: string): Promise { + return !!(await this.metadataCollection.findOne({ loaderId })); + } + + async getAllLoaderMetadata(): Promise { + const result = await this.metadataCollection.find({}).toArray(); + + return result.map((entry) => { + delete entry.loaderId; + delete entry._id; + return entry; + }); + } + + async loaderCustomSet>(loaderId: string, key: string, value: T): Promise { + await this.customDataCollection.updateOne( + { key }, + { $setOnInsert: { ...value, key, loaderId }, $setOnUpdate: { ...value } }, + { upsert: true }, + ); + } + + async loaderCustomGet>(key: string): Promise { + const result = await this.customDataCollection.findOne({ key }); + delete result.loaderId; + delete result.key; + delete result._id; + return result; + } + + async loaderCustomHas(key: string): Promise { + return !!(await this.customDataCollection.findOne({ key })); + } + + async loaderCustomDelete(key: string): Promise { + await this.customDataCollection.deleteOne({ key }); + } + + async deleteLoaderMetadataAndCustomValues(loaderId: string): Promise { + await this.metadataCollection.deleteOne({ loaderId }); + await this.customDataCollection.deleteMany({ loaderId }); + } + + async addConversation(conversationId: string): Promise { + await this.conversationCollection.insertOne({ conversationId, entries: [] }); + } + + async getConversation(conversationId: string): Promise { + const document = await this.conversationCollection.findOne({ conversationId }); + + return { + conversationId: document.conversationId, + entries: document.entries as Message[], + }; + } + + async hasConversation(conversationId: string): Promise { + return !!(await this.conversationCollection.findOne({ conversationId })); + } + + async deleteConversation(conversationId: string): Promise { + await this.conversationCollection.deleteOne({ conversationId }); + } + + async addEntryToConversation(conversationId: string, entry: Message): Promise { + await this.conversationCollection.updateOne( + { conversationId }, + { $push: { entries: entry } }, // Correctly structured $push operation + ); + } + + async clearConversations(): Promise { + await this.conversationCollection.deleteMany({}); + } +} diff --git a/databases/embedjs-pinecone/src/pinecone-db.ts b/databases/embedjs-pinecone/src/pinecone-db.ts index e08909e1..e62242d7 100644 --- a/databases/embedjs-pinecone/src/pinecone-db.ts +++ b/databases/embedjs-pinecone/src/pinecone-db.ts @@ -2,9 +2,9 @@ import { CreateIndexSpec } from '@pinecone-database/pinecone/dist/control/create import { Pinecone, PineconeRecord } from '@pinecone-database/pinecone'; import createDebugMessages from 'debug'; -import { BaseDb, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; -export class PineconeDb implements BaseDb { +export class PineconeDb implements BaseVectorDatabase { private readonly debug = createDebugMessages('embedjs:vector:PineconeDb'); private static readonly PINECONE_INSERT_CHUNK_SIZE = 200; //Pinecone only allows inserting 2MB worth of chunks at a time; this is an approximation diff --git a/databases/embedjs-qdrant/package.json b/databases/embedjs-qdrant/package.json index fafb0218..87410e9b 100644 --- a/databases/embedjs-qdrant/package.json +++ b/databases/embedjs-qdrant/package.json @@ -6,7 +6,7 @@ "@llm-tools/embedjs-interfaces": "0.1.13", "@qdrant/js-client-rest": "^1.12.0", "debug": "^4.3.7", - "uuid": "^10.0.0" + "uuid": "^11.0.2" }, "type": "module", "main": "./src/index.js", diff --git a/databases/embedjs-qdrant/src/qdrant-db.ts b/databases/embedjs-qdrant/src/qdrant-db.ts index 46dca4e7..28cb8026 100644 --- a/databases/embedjs-qdrant/src/qdrant-db.ts +++ b/databases/embedjs-qdrant/src/qdrant-db.ts @@ -1,9 +1,10 @@ import { QdrantClient } from '@qdrant/js-client-rest'; import createDebugMessages from 'debug'; import { v4 as uuid } from 'uuid'; -import { BaseDb, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; -export class QdrantDb implements BaseDb { +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; + +export class QdrantDb implements BaseVectorDatabase { private readonly debug = createDebugMessages('embedjs:vector:QdrantDb'); private static readonly QDRANT_INSERT_CHUNK_SIZE = 500; diff --git a/databases/embedjs-redis/src/index.ts b/databases/embedjs-redis/src/index.ts index acaf8221..a5afd03b 100644 --- a/databases/embedjs-redis/src/index.ts +++ b/databases/embedjs-redis/src/index.ts @@ -1 +1 @@ -export * from './redis-cache.js'; +export * from './redis-store.js'; diff --git a/databases/embedjs-redis/src/redis-cache.ts b/databases/embedjs-redis/src/redis-cache.ts deleted file mode 100644 index 664b7ad8..00000000 --- a/databases/embedjs-redis/src/redis-cache.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { BaseCache, Conversation, Message } from '@llm-tools/embedjs-interfaces'; -import { Redis, RedisOptions } from 'ioredis'; - -export class RedisCache implements BaseCache { - private readonly options: RedisOptions; - private redis: Redis; - - constructor(options: RedisOptions) { - options.keyPrefix = options.keyPrefix ?? 'REDIS_CACHE'; - this.options = options; - } - - async init(): Promise { - this.redis = new Redis(this.options); - } - - async addLoader(loaderId: string, chunkCount: number): Promise { - await this.redis.set(loaderId, JSON.stringify({ chunkCount })); - } - - async getLoader(loaderId: string): Promise<{ chunkCount: number } | null> { - const result = await this.redis.get(loaderId); - - if (!result) return null; - return JSON.parse(result); - } - - async hasLoader(loaderId: string): Promise { - return !!(await this.redis.get(loaderId)); - } - - async loaderCustomSet>(loaderCombinedId: string, value: T): Promise { - await this.redis.set(loaderCombinedId, JSON.stringify(value)); - } - - async loaderCustomGet>(loaderCombinedId: string): Promise { - const result = await this.redis.get(loaderCombinedId); - - if (!result) return null; - return JSON.parse(result); - } - - async loaderCustomHas(loaderCombinedId: string): Promise { - return !!(await this.redis.get(loaderCombinedId)); - } - - async deleteLoader(loaderId: string): Promise { - await this.redis.del(loaderId); - } - - async loaderCustomDelete(loaderCombinedId: string): Promise { - await this.redis.del(loaderCombinedId); - } - - async addConversation(conversationId: string): Promise { - await this.redis.set(`conversation_${conversationId}`, JSON.stringify({ conversationId, entries: [] })); - } - - async getConversation(conversationId: string): Promise { - const result = await this.redis.get(`conversation_${conversationId}`); - return JSON.parse(result); - } - - async hasConversation(conversationId: string): Promise { - return !!(await this.redis.get(`conversation_${conversationId}`)); - } - - async deleteConversation(conversationId: string): Promise { - await this.redis.del(`conversation_${conversationId}`); - } - - async addEntryToConversation(conversationId: string, entry: Message): Promise { - const conversation = await this.getConversation(conversationId); - conversation.entries.push(entry); - - await this.redis.set(`conversation_${conversationId}`, JSON.stringify(conversation)); - } - - clearConversations(): Promise { - throw new Error('Method not implemented.'); - } -} diff --git a/databases/embedjs-redis/src/redis-store.ts b/databases/embedjs-redis/src/redis-store.ts new file mode 100644 index 00000000..95173036 --- /dev/null +++ b/databases/embedjs-redis/src/redis-store.ts @@ -0,0 +1,104 @@ +import { BaseStore, Conversation, LoaderListEntry, Message } from '@llm-tools/embedjs-interfaces'; +import { Redis, RedisOptions } from 'ioredis'; + +export class RedisStore implements BaseStore { + private static readonly LOADER_METADATA_PREFIX = 'LOADER_METADATA_'; + private static readonly CUSTOM_KEYS_PREFIX = 'CUSTOM_KEYS_'; + private readonly options: RedisOptions; + private redis: Redis; + + constructor(options: RedisOptions) { + options.keyPrefix = options.keyPrefix ?? 'EmbedJS'; + this.options = options; + } + + async init(): Promise { + this.redis = new Redis(this.options); + } + + async addLoaderMetadata(loaderId: string, value: LoaderListEntry): Promise { + await this.redis.set(`${RedisStore.LOADER_METADATA_PREFIX}_${loaderId}`, JSON.stringify(value)); + } + + async getLoaderMetadata(loaderId: string): Promise { + const result = await this.redis.get(`${RedisStore.LOADER_METADATA_PREFIX}_${loaderId}`); + return JSON.parse(result); + } + + async hasLoaderMetadata(loaderId: string): Promise { + return !!(await this.redis.get(`${RedisStore.LOADER_METADATA_PREFIX}_${loaderId}`)); + } + + async getAllLoaderMetadata(): Promise { + const loaderKeys = await this.redis.keys(`${RedisStore.LOADER_METADATA_PREFIX}_*`); + const loaderEntries = await this.redis.mget(loaderKeys); + return loaderEntries.map((entry) => JSON.parse(entry)); + } + + async loaderCustomSet>(loaderId: string, key: string, value: T): Promise { + const customKeys = await this.redis.get(`${RedisStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + + let customKeysList: string[]; + if (!customKeys) customKeysList = []; + else customKeysList = JSON.parse(customKeys); + customKeysList.push(key); + + await this.redis.set(key, JSON.stringify(value)); + await this.redis.set(`${RedisStore.CUSTOM_KEYS_PREFIX}_${loaderId}`, JSON.stringify(customKeysList)); + } + + async loaderCustomGet>(key: string): Promise { + const result = await this.redis.get(key); + return JSON.parse(result); + } + + async loaderCustomHas(key: string): Promise { + return !!(await this.redis.get(key)); + } + + async loaderCustomDelete(key: string): Promise { + await this.redis.del(key); + } + + async deleteLoaderMetadataAndCustomValues(loaderId: string): Promise { + const customKeys = await this.redis.get(`${RedisStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + + if (customKeys) { + const customKeysList = JSON.parse(customKeys); + for (const key of customKeysList) { + await this.redis.del(key); + } + } + + await this.redis.del(`${RedisStore.LOADER_METADATA_PREFIX}_${loaderId}`); + await this.redis.del(`${RedisStore.CUSTOM_KEYS_PREFIX}_${loaderId}`); + } + + async addConversation(conversationId: string): Promise { + await this.redis.set(`conversation_${conversationId}`, JSON.stringify({ conversationId, entries: [] })); + } + + async getConversation(conversationId: string): Promise { + const result = await this.redis.get(`conversation_${conversationId}`); + return JSON.parse(result); + } + + async hasConversation(conversationId: string): Promise { + return !!(await this.redis.get(`conversation_${conversationId}`)); + } + + async deleteConversation(conversationId: string): Promise { + await this.redis.del(`conversation_${conversationId}`); + } + + async addEntryToConversation(conversationId: string, entry: Message): Promise { + const conversation = await this.getConversation(conversationId); + conversation.entries.push(entry); + + await this.redis.set(`conversation_${conversationId}`, JSON.stringify(conversation)); + } + + clearConversations(): Promise { + throw new Error('Method not implemented.'); + } +} diff --git a/databases/embedjs-weaviate/src/weaviate-db.ts b/databases/embedjs-weaviate/src/weaviate-db.ts index 45435b13..bd4a71dd 100644 --- a/databases/embedjs-weaviate/src/weaviate-db.ts +++ b/databases/embedjs-weaviate/src/weaviate-db.ts @@ -2,10 +2,10 @@ import createDebugMessages from 'debug'; import weaviate, { WeaviateClient, ApiKey, generateUuid5 } from 'weaviate-ts-client'; import similarity from 'compute-cosine-similarity'; -import { BaseDb, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; +import { BaseVectorDatabase, ExtractChunkData, InsertChunkData } from '@llm-tools/embedjs-interfaces'; import { toTitleCase } from '@llm-tools/embedjs-utils'; -export class WeaviateDb implements BaseDb { +export class WeaviateDb implements BaseVectorDatabase { private readonly debug = createDebugMessages('embedjs:vector:WeaviateDb'); private static readonly WEAVIATE_INSERT_CHUNK_SIZE = 500; diff --git a/docs/_snippets/missing-cache-tip.mdx b/docs/_snippets/missing-store-tip.mdx similarity index 100% rename from docs/_snippets/missing-cache-tip.mdx rename to docs/_snippets/missing-store-tip.mdx diff --git a/docs/api-reference/methods/delete-loader.mdx b/docs/api-reference/methods/delete-loader.mdx index e760642c..4d8daf47 100644 --- a/docs/api-reference/methods/delete-loader.mdx +++ b/docs/api-reference/methods/delete-loader.mdx @@ -16,7 +16,7 @@ The `deleteLoader()` method allows you to delete the data loaded by a loader pre import { RAGApplicationBuilder } from '@llm-tools/embedjs'; import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai'; import { HNSWDb } from '@llm-tools/embedjs-hnswlib'; -import { RedisCache } from '@llm-tools/embedjs-redis'; +import { RedisStore } from '@llm-tools/embedjs-redis'; import { WebLoader } from '@llm-tools/embedjs-loader-web'; import { SitemapLoader } from '@llm-tools/embedjs-loader-sitemap'; @@ -24,8 +24,8 @@ const app = await new RAGApplicationBuilder() .setModel(SIMPLE_MODELS.OPENAI_GPT4_O) .setEmbeddingModel(new OpenAiEmbeddings()) .setVectorDb(new HNSWDb()) -.setCache( - new RedisCache({ +.setStore( + new RedisStore({ host: this.configService.get('REDIS_HOST'), port: this.configService.get('REDIS_PORT'), password: this.configService.get('REDIS_PASSWORD'), diff --git a/docs/api-reference/methods/get-loaders.mdx b/docs/api-reference/methods/get-loaders.mdx index d5b04002..fc2dc570 100644 --- a/docs/api-reference/methods/get-loaders.mdx +++ b/docs/api-reference/methods/get-loaders.mdx @@ -3,7 +3,7 @@ title: 📄 getLoaders --- The `getLoaders()` method returns a list of all the data sources / loaders added so far. -This data comes from the cache and if the cache is inMemory, then the list will not include the loaders from before the restart. +This data comes from the store and if the store is inMemory, then the list will not include the loaders from before the restart. ### Usage @@ -12,7 +12,7 @@ This data comes from the cache and if the cache is inMemory, then the list will import { RAGApplicationBuilder } from '@llm-tools/embedjs'; import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai'; import { HNSWDb } from '@llm-tools/embedjs-hnswlib'; -import { RedisCache } from '@llm-tools/embedjs-redis'; +import { RedisStore } from '@llm-tools/embedjs-redis'; import { WebLoader } from '@llm-tools/embedjs-loader-web'; import { SitemapLoader } from '@llm-tools/embedjs-loader-sitemap'; @@ -20,8 +20,8 @@ const app = await new RAGApplicationBuilder() .setModel(SIMPLE_MODELS.OPENAI_GPT4_O) .setEmbeddingModel(new OpenAiEmbeddings()) .setVectorDb(new HNSWDb()) -.setCache( - new RedisCache({ +.setStore( + new RedisStore({ host: this.configService.get('REDIS_HOST'), port: this.configService.get('REDIS_PORT'), password: this.configService.get('REDIS_PASSWORD'), diff --git a/docs/api-reference/overview.mdx b/docs/api-reference/overview.mdx index 1247da91..212addcd 100644 --- a/docs/api-reference/overview.mdx +++ b/docs/api-reference/overview.mdx @@ -17,15 +17,15 @@ Create a EmbedJs `RAGApplication` using `RAGApplicationBuilder`. `RAGApplication This configures the embedding model for use with the RAG application. Embedding models are used to convert text into vectors. For a list of predefined embedding models, refer the section on [embedding models](/components/embedding-models). - + This configures the vector database to be used with RAG application. For a list of available vector databases, refer the section on [vector databases](/components/vector-databases). - - This configures a cache that is used internally by the appliation to keep track of what sources and data have been previously processed. + + This configures a stores that is used internally by the appliation to keep track of what sources and data have been previously processed. Previously processed data is not reprocessed - thus removing the need for this logic to be implemented at your end. - If this is not provided, the application will maintain in memory this cache which will be lost on app restart. - For a list of available caches, refer the section on [caches](/components/caches). + If this is not provided, the application will maintain this data in memorywhich will be lost on app restart. + For a list of built-in stores, refer the section on [stores](/components/stores). This configures a temperature to be used with the LLM. This controls the randomness of the LLM output. diff --git a/docs/components/caches/mongodb.mdx b/docs/components/caches/mongodb.mdx deleted file mode 100644 index d9f4f760..00000000 --- a/docs/components/caches/mongodb.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: MongoDB ---- - -You can use MongoDB as a cache / datastore. This creates two new collections in the database - which are configureable. - - -MongoDB is also supported as a store for the vector data. This is separate from that. - - -## Install MongoDB addon - -```bash -npm install @llm-tools/embedjs-mongodb -``` - -## Usage - -```ts Partial example -import { RAGApplicationBuilder } from '@llm-tools/embedjs'; -import { MongoCache } from '@llm-tools/embedjs-mongodb'; - -const app = await new RAGApplicationBuilder() -.setCache(new MongoCache({ ... })) -``` - - - diff --git a/docs/components/introduction.mdx b/docs/components/introduction.mdx index fbfa23e2..af7ca02b 100644 --- a/docs/components/introduction.mdx +++ b/docs/components/introduction.mdx @@ -10,4 +10,4 @@ You can configure following components in an EmbedJs application - * [Embedding Model](/components/embeddings) * [Data Source](/components/data-sources) * [Vector Database](/components/vector-databases) -* [Caches](/components/caches) +* [Stores](/components/stores) diff --git a/docs/components/caches/lmdb.mdx b/docs/components/stores/lmdb.mdx similarity index 53% rename from docs/components/caches/lmdb.mdx rename to docs/components/stores/lmdb.mdx index 4aea1207..81f50bcf 100644 --- a/docs/components/caches/lmdb.mdx +++ b/docs/components/stores/lmdb.mdx @@ -2,7 +2,7 @@ title: LMDB --- -You can use [LMDB](https://dbdb.io/db/lmdb) to cache values locally on disk. +You can use [LMDB](https://dbdb.io/db/lmdb) to store values locally on disk. ## Install LMDB addon @@ -14,11 +14,11 @@ npm install @llm-tools/embedjs-lmdb ```ts Partial example import { RAGApplicationBuilder } from '@llm-tools/embedjs'; -import { LmdbCache } from '@llm-tools/embedjs-lmdb'; +import { LmdbStore } from '@llm-tools/embedjs-lmdb'; const app = await new RAGApplicationBuilder() -.setCache(new LmdbCache({ path: path.resolve('./cache') })) +.setStore(new LmdbStore({ path: path.resolve('./store') })) ``` - + diff --git a/docs/components/stores/mongodb.mdx b/docs/components/stores/mongodb.mdx new file mode 100644 index 00000000..3fa9c0d5 --- /dev/null +++ b/docs/components/stores/mongodb.mdx @@ -0,0 +1,28 @@ +--- +title: MongoDB +--- + +You can use MongoDB as a data store. This creates three new collections in the database - which are configureable. + + +MongoDB is also supported as a vector database. This is separate from that. + + +## Install MongoDB addon + +```bash +npm install @llm-tools/embedjs-mongodb +``` + +## Usage + +```ts Partial example +import { RAGApplicationBuilder } from '@llm-tools/embedjs'; +import { MongoStore } from '@llm-tools/embedjs-mongodb'; + +const app = await new RAGApplicationBuilder() +.setStore(new MongoStore({ ... })) +``` + + + diff --git a/docs/components/caches/overview.mdx b/docs/components/stores/overview.mdx similarity index 52% rename from docs/components/caches/overview.mdx rename to docs/components/stores/overview.mdx index f2a5ba37..c63c3e58 100644 --- a/docs/components/caches/overview.mdx +++ b/docs/components/stores/overview.mdx @@ -8,14 +8,14 @@ EmbedJs comes with built-in support for data persistance beyond vector embedding - Loader specific caching - Conversation history -The library handles the complexity of being able to swap the data persistance layer by the abstraction of caching. The following caches are supported - +The library handles the complexity of being able to swap the data persistance layer by the abstraction of stores. The following stores have built-in support - - - - + + +
- + diff --git a/docs/components/caches/redis.mdx b/docs/components/stores/redis.mdx similarity index 57% rename from docs/components/caches/redis.mdx rename to docs/components/stores/redis.mdx index 29afe61b..07634859 100644 --- a/docs/components/caches/redis.mdx +++ b/docs/components/stores/redis.mdx @@ -2,7 +2,7 @@ title: Redis --- -You can use redis as a cache / datastore. +You can use redis as a data store. ## Install Redis addon @@ -14,11 +14,11 @@ npm install @llm-tools/embedjs-redis ```ts Partial example import { RAGApplicationBuilder } from '@llm-tools/embedjs'; -import { RedisCache } from '@llm-tools/embedjs-redis'; +import { RedisStore } from '@llm-tools/embedjs-redis'; const app = await new RAGApplicationBuilder() -.setCache(new RedisCache({ ... })) +.setStore(new RedisStore({ ... })) ``` - + diff --git a/docs/components/vector-databases/astradb.mdx b/docs/components/vector-databases/astradb.mdx index 8ca04510..fbbaa71a 100644 --- a/docs/components/vector-databases/astradb.mdx +++ b/docs/components/vector-databases/astradb.mdx @@ -2,11 +2,11 @@ title: AstraDB --- -[Astra DB](https://www.datastax.com/products/datastax-astra) is a document database with a highly performant vector index powered by Apache Cassandra and available as a managed service. +[AstraDB](https://www.datastax.com/products/datastax-astra) is a document database with a highly performant vector index powered by Apache Cassandra and available as a managed service. -To use Astra DB - +To use Astra as database - -- [Sign up](https://astra.datastax.com/signup) for an Astra DB account. It is free to sign up and doesn't require a credit card. +- [Sign up](https://astra.datastax.com/signup) for an AstraDB account. It is free to sign up and doesn't require a credit card. - Create a database (this takes a couple of minutes to provision) - From the database overview page get the API Endpoint and generate an Application Token diff --git a/docs/mint.json b/docs/mint.json index cf954e38..0eff2c64 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -141,12 +141,12 @@ ] }, { - "group": "âš¡ Caches", + "group": "âš¡ Stores", "pages": [ - "components/caches/overview", + "components/stores/overview", { "group": "Built in", - "pages": ["components/caches/lmdb", "components/caches/mongodb", "components/caches/redis"] + "pages": ["components/stores/lmdb", "components/stores/mongodb", "components/stores/redis"] } ] } diff --git a/examples/confluence/src/main.ts b/examples/confluence/src/main.ts index 2da9e407..5133de6e 100644 --- a/examples/confluence/src/main.ts +++ b/examples/confluence/src/main.ts @@ -7,7 +7,7 @@ import { HNSWDb } from '@llm-tools/embedjs-hnswlib'; const llmApplication = await new RAGApplicationBuilder() .setModel(new OpenAi({ modelName: 'gpt-4o' })) .setEmbeddingModel(new OpenAiEmbeddings()) - .setVectorDb(new HNSWDb()) + .setVectorDatabase(new HNSWDb()) .setSearchResultCount(30) .build(); diff --git a/examples/dynamic/src/main.ts b/examples/dynamic/src/main.ts index 3357244e..d29372fc 100644 --- a/examples/dynamic/src/main.ts +++ b/examples/dynamic/src/main.ts @@ -6,7 +6,7 @@ import { HNSWDb } from '@llm-tools/embedjs-hnswlib'; const llmApplication = await new RAGApplicationBuilder() .setModel(new OpenAi({ modelName: 'gpt-4o' })) .setEmbeddingModel(new OpenAiEmbeddings()) - .setVectorDb(new HNSWDb()) + .setVectorDatabase(new HNSWDb()) .setSearchResultCount(30) .build(); diff --git a/examples/pinecone/src/main.ts b/examples/pinecone/src/main.ts index 1b4c1712..69efbc39 100644 --- a/examples/pinecone/src/main.ts +++ b/examples/pinecone/src/main.ts @@ -5,7 +5,7 @@ import { PineconeDb } from '@llm-tools/embedjs-pinecone'; const llmApplication = await new RAGApplicationBuilder() .setEmbeddingModel(new OpenAiEmbeddings()) - .setVectorDb( + .setVectorDatabase( new PineconeDb({ projectName: 'test', namespace: 'dev', diff --git a/examples/simple/src/main.ts b/examples/simple/src/main.ts index 4b6ff0e3..a299b52c 100644 --- a/examples/simple/src/main.ts +++ b/examples/simple/src/main.ts @@ -7,7 +7,7 @@ import { HNSWDb } from '@llm-tools/embedjs-hnswlib'; const llmApplication = await new RAGApplicationBuilder() .setModel(new OpenAi({ modelName: 'gpt-4o' })) .setEmbeddingModel(new OpenAiEmbeddings()) - .setVectorDb(new HNSWDb()) + .setVectorDatabase(new HNSWDb()) .setSearchResultCount(30) .build(); diff --git a/models/embedjs-anthropic/package.json b/models/embedjs-anthropic/package.json index f680a06c..d74de4d3 100644 --- a/models/embedjs-anthropic/package.json +++ b/models/embedjs-anthropic/package.json @@ -3,8 +3,8 @@ "version": "0.1.13", "description": "Enable usage of Anthropic models with embedjs", "dependencies": { - "@langchain/anthropic": "^0.3.5", - "@langchain/core": "^0.3.15", + "@langchain/anthropic": "^0.3.7", + "@langchain/core": "^0.3.16", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" }, diff --git a/models/embedjs-huggingface/package.json b/models/embedjs-huggingface/package.json index bfe0a5aa..1b66cca2 100644 --- a/models/embedjs-huggingface/package.json +++ b/models/embedjs-huggingface/package.json @@ -4,8 +4,8 @@ "description": "Enable usage of HuggingFace models with embedjs", "dependencies": { "@huggingface/inference": "^2.8.1", - "@langchain/community": "^0.3.10", - "@langchain/core": "^0.3.15", + "@langchain/community": "^0.3.11", + "@langchain/core": "^0.3.16", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" }, diff --git a/models/embedjs-mistral/package.json b/models/embedjs-mistral/package.json index 7868e9ef..c1b4c185 100644 --- a/models/embedjs-mistral/package.json +++ b/models/embedjs-mistral/package.json @@ -3,7 +3,7 @@ "version": "0.1.13", "description": "Enable usage of Mistral models with embedjs", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "@langchain/mistralai": "^0.1.1", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" diff --git a/models/embedjs-ollama/package.json b/models/embedjs-ollama/package.json index 743374c8..79fb7543 100644 --- a/models/embedjs-ollama/package.json +++ b/models/embedjs-ollama/package.json @@ -3,8 +3,8 @@ "version": "0.1.13", "description": "Enable usage of Ollama with embedjs", "dependencies": { - "@langchain/core": "^0.3.15", - "@langchain/ollama": "^0.1.0", + "@langchain/core": "^0.3.16", + "@langchain/ollama": "^0.1.1", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" }, diff --git a/models/embedjs-openai/package.json b/models/embedjs-openai/package.json index ba768567..c7c965f9 100644 --- a/models/embedjs-openai/package.json +++ b/models/embedjs-openai/package.json @@ -3,7 +3,7 @@ "version": "0.1.13", "description": "Enable usage of OpenAI models with embedjs", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "@langchain/openai": "^0.3.11", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" diff --git a/models/embedjs-vertexai/package.json b/models/embedjs-vertexai/package.json index deeff49f..91bb515a 100644 --- a/models/embedjs-vertexai/package.json +++ b/models/embedjs-vertexai/package.json @@ -3,7 +3,7 @@ "version": "0.1.13", "description": "Enable usage of VertexAI models with embedjs", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "@langchain/google-vertexai": "^0.1.0", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" diff --git a/package-lock.json b/package-lock.json index 4169d9be..9b9ab1d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,15 +19,15 @@ "@eslint/eslintrc": "^3.1.0", "@inquirer/prompts": "^7.0.1", "@npmcli/package-json": "^6.0.1", - "@nx/esbuild": "20.0.6", - "@nx/eslint": "20.0.6", - "@nx/eslint-plugin": "20.0.6", - "@nx/js": "20.0.6", - "@nx/node": "20.0.6", + "@nx/esbuild": "20.0.7", + "@nx/eslint": "20.0.7", + "@nx/eslint-plugin": "20.0.7", + "@nx/js": "20.0.7", + "@nx/node": "20.0.7", "@swc-node/register": "~1.10.9", - "@swc/core": "~1.7.40", + "@swc/core": "~1.7.42", "@swc/helpers": "~0.5.13", - "@types/node": "22.8.4", + "@types/node": "22.8.6", "@typescript-eslint/eslint-plugin": "^8.12.2", "@typescript-eslint/parser": "^8.12.2", "arg": "^5.0.2", @@ -35,10 +35,10 @@ "eslint": "~9.13.0", "eslint-config-prettier": "^9.1.0", "husky": "^9.1.6", - "nx": "20.0.6", + "nx": "20.0.7", "prettier": "^3.3.3", "simple-git": "^3.27.0", - "tslib": "^2.8.0", + "tslib": "^2.8.1", "typescript": "5.6.3", "typescript-eslint": "^8.12.2" }, @@ -55,7 +55,7 @@ "@llm-tools/embedjs-interfaces": "0.1.13", "@llm-tools/embedjs-utils": "0.1.13", "debug": "^4.3.7", - "langchain": "^0.3.4", + "langchain": "^0.3.5", "md5": "^2.3.0", "mime": "^4.0.4", "stream-mime-type": "^2.0.0" @@ -63,7 +63,7 @@ "devDependencies": { "@types/debug": "^4.1.12", "@types/md5": "^2.3.5", - "@types/node": "^22.8.1" + "@types/node": "^22.8.6" } }, "core/embedjs-interfaces": { @@ -71,10 +71,23 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "debug": "^4.3.7", "md5": "^2.3.0", - "uuid": "^10.0.0" + "uuid": "^11.0.2" + } + }, + "core/embedjs-interfaces/node_modules/uuid": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", + "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" } }, "core/embedjs-types": { @@ -104,9 +117,9 @@ } }, "core/embedjs/node_modules/langchain": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.3.4.tgz", - "integrity": "sha512-s0FAtrg22jgCSkuwhZdw4c+ksdGQjNCf2vCzV6qZpZohTKGsN7lgjWy+OpnG76L917P/l95qem+3wivS3tANXQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.3.5.tgz", + "integrity": "sha512-Gq0xC45Sq6nszS8kQG9suCrmBsuXH0INMmiF7D2TwPb6mtG35Jiq4grCk9ykpwPsarTHdty3SzUbII/FqiYSSw==", "license": "MIT", "dependencies": { "@langchain/openai": ">=0.1.0 <0.4.0", @@ -252,129 +265,18 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@lancedb/lancedb": "^0.11.0", + "@lancedb/lancedb": "^0.12.0", "@llm-tools/embedjs-interfaces": "0.1.13", "compute-cosine-similarity": "^1.1.0" } }, - "databases/embedjs-lancedb/node_modules/@lancedb/lancedb": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@lancedb/lancedb/-/lancedb-0.11.0.tgz", - "integrity": "sha512-oZSoKgaAoZIo5Oz4yhO7Z0kFzXRbXRgBK7zoNnA4/4m74T5KRRWovKSgHUwGNw18sBP2lnT2hT5WV3r20PKfzQ==", - "cpu": [ - "x64", - "arm64" - ], - "license": "Apache 2.0", - "os": [ - "darwin", - "linux", - "win32" - ], - "dependencies": { - "reflect-metadata": "^0.2.2" - }, - "engines": { - "node": ">= 18" - }, - "optionalDependencies": { - "@lancedb/lancedb-darwin-arm64": "0.11.0", - "@lancedb/lancedb-darwin-x64": "0.11.0", - "@lancedb/lancedb-linux-arm64-gnu": "0.11.0", - "@lancedb/lancedb-linux-x64-gnu": "0.11.0", - "@lancedb/lancedb-win32-x64-msvc": "0.11.0" - }, - "peerDependencies": { - "apache-arrow": ">=13.0.0 <=17.0.0" - } - }, - "databases/embedjs-lancedb/node_modules/@lancedb/lancedb-darwin-arm64": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-arm64/-/lancedb-darwin-arm64-0.11.0.tgz", - "integrity": "sha512-czULKIjoTNZ5rHZOm+Db2dgHY3dpiH3X/k+m7duvzRPHMP0Jx2IXhNuawFhOZiT0TSsMZdpnAy7mETb7mhNY+Q==", - "cpu": [ - "arm64" - ], - "license": "Apache 2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 18" - } - }, - "databases/embedjs-lancedb/node_modules/@lancedb/lancedb-darwin-x64": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-x64/-/lancedb-darwin-x64-0.11.0.tgz", - "integrity": "sha512-sq8BTdy6d8FQcLo46zPmdlW26gO57BkRjmH3lQLYaklg6fz5ED70ynhbyxD6Tfiog5YSB3ky3odHz3X4/hsPKw==", - "cpu": [ - "x64" - ], - "license": "Apache 2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 18" - } - }, - "databases/embedjs-lancedb/node_modules/@lancedb/lancedb-linux-arm64-gnu": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-arm64-gnu/-/lancedb-linux-arm64-gnu-0.11.0.tgz", - "integrity": "sha512-XRosbDtCBSDlYyP9/fI+1iCFHcuadicATrlnqWsi2XBkNkQN/LiHsUNl1ztlesx4z7FFWrHTOES4dmgsGQYXVg==", - "cpu": [ - "arm64" - ], - "license": "Apache 2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 18" - } - }, - "databases/embedjs-lancedb/node_modules/@lancedb/lancedb-linux-x64-gnu": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-x64-gnu/-/lancedb-linux-x64-gnu-0.11.0.tgz", - "integrity": "sha512-WGFwU+4sdvQwSvDIvbgAFqAgW0XEEUUn24GJ9HcvWzC3eU9ZT1ZPs7QYLLOlqC/7WjZXzzVeg+PdbP6pdSSH0w==", - "cpu": [ - "x64" - ], - "license": "Apache 2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 18" - } - }, - "databases/embedjs-lancedb/node_modules/@lancedb/lancedb-win32-x64-msvc": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@lancedb/lancedb-win32-x64-msvc/-/lancedb-win32-x64-msvc-0.11.0.tgz", - "integrity": "sha512-vcc3h0mzGkgRoir5nK93QjnhU47NGumI/KKnFshBObmFlxRzSSxCu2E792hAhxNUwk0+3vyTR0vQTGhHidRlHQ==", - "cpu": [ - "x64" - ], - "license": "Apache 2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 18" - } - }, "databases/embedjs-lmdb": { "name": "@llm-tools/embedjs-lmdb", "version": "0.1.13", "license": "Apache-2.0", "dependencies": { "@llm-tools/embedjs-interfaces": "0.1.13", - "lmdb": "^3.1.3" + "lmdb": "^3.1.4" } }, "databases/embedjs-mongodb": { @@ -417,7 +319,20 @@ "@llm-tools/embedjs-interfaces": "0.1.13", "@qdrant/js-client-rest": "^1.12.0", "debug": "^4.3.7", - "uuid": "^10.0.0" + "uuid": "^11.0.2" + } + }, + "databases/embedjs-qdrant/node_modules/uuid": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", + "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" } }, "databases/embedjs-redis": { @@ -540,8 +455,8 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@langchain/anthropic": "^0.3.5", - "@langchain/core": "^0.3.15", + "@langchain/anthropic": "^0.3.7", + "@langchain/core": "^0.3.16", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" } @@ -562,16 +477,16 @@ "license": "Apache-2.0", "dependencies": { "@huggingface/inference": "^2.8.1", - "@langchain/community": "^0.3.10", - "@langchain/core": "^0.3.15", + "@langchain/community": "^0.3.11", + "@langchain/core": "^0.3.16", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" } }, "models/embedjs-huggingface/node_modules/@langchain/community": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.10.tgz", - "integrity": "sha512-aIbkkNWvuqDA8mQf1xMC6VbT9rXebFPrK3+qWiA+beq487bfPcOroel540842WvhluAQaIiOAsHp3qGj8b+GXw==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.11.tgz", + "integrity": "sha512-hgnqsgWAhfUj9Kp0y+FGxlKot/qJFxat9GfIPJSJU4ViN434PgeMAQK53tkGZ361E2Zoo1V4RoGlSw4AjJILiA==", "license": "MIT", "dependencies": { "@langchain/openai": ">=0.2.0 <0.4.0", @@ -1076,6 +991,156 @@ } } }, + "models/embedjs-huggingface/node_modules/@smithy/eventstream-codec": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz", + "integrity": "sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "tslib": "^2.6.2" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/protocol-http": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.3.0.tgz", + "integrity": "sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/signature-v4": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.3.0.tgz", + "integrity": "sha512-ui/NlpILU+6HAQBfJX8BBsDXuKSNrjTSuOYArRblcrErwKFutjrCNb/OExfVRyj9+26F9J+ZmfWT+fKWuDrH3Q==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-uri-escape": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/types": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.12.0.tgz", + "integrity": "sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/util-hex-encoding": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz", + "integrity": "sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/util-middleware": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.2.0.tgz", + "integrity": "sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/util-uri-escape": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.2.0.tgz", + "integrity": "sha512-jtmJMyt1xMD/d8OtbVJ2gFZOSKc+ueYJZPW20ULW1GOp/q/YIM0wNh+u8ZFao9UaIGz4WoPW8hC64qlWLIfoDA==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "models/embedjs-huggingface/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, "models/embedjs-huggingface/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1207,7 +1272,7 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "@langchain/mistralai": "^0.1.1", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" @@ -1218,8 +1283,8 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@langchain/core": "^0.3.15", - "@langchain/ollama": "^0.1.0", + "@langchain/core": "^0.3.16", + "@langchain/ollama": "^0.1.1", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" } @@ -1229,7 +1294,7 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "@langchain/openai": "^0.3.11", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" @@ -1240,7 +1305,7 @@ "version": "0.1.13", "license": "Apache-2.0", "dependencies": { - "@langchain/core": "^0.3.15", + "@langchain/core": "^0.3.16", "@langchain/google-vertexai": "^0.1.0", "@llm-tools/embedjs-interfaces": "0.1.13", "debug": "^4.3.7" @@ -5218,6 +5283,38 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@ibm-cloud/watsonx-ai": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ibm-cloud/watsonx-ai/-/watsonx-ai-1.1.2.tgz", + "integrity": "sha512-0+ClK12jk1Jk28Hwc2BDmKkTXPjFkQOfCKzUk82TsoPwAIEVN+rlM1cny52d3oSMXXbeKorVDmnIEbXPseHiQA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@types/node": "^18.0.0", + "extend": "3.0.2", + "ibm-cloud-sdk-core": "^5.0.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@ibm-cloud/watsonx-ai/node_modules/@types/node": { + "version": "18.19.63", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.63.tgz", + "integrity": "sha512-hcUB7THvrGmaEcPcvUZCZtQ2Z3C+UR/aOcraBLCvTsFMh916Gc1kCCYcfcMuB76HM2pSerxl1PoP3KnmHzd9Lw==", + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@ibm-cloud/watsonx-ai/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT", + "peer": true + }, "node_modules/@inquirer/checkbox": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.0.1.tgz", @@ -6062,17 +6159,128 @@ "debug": "^4.1.1" } }, - "node_modules/@kwsites/promise-deferred": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", - "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", - "dev": true, - "license": "MIT" - }, + "node_modules/@kwsites/promise-deferred": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@lancedb/lancedb": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@lancedb/lancedb/-/lancedb-0.12.0.tgz", + "integrity": "sha512-YkfJ0pL0GT6A+goDqVsd/8jYeOJmPvT0A0aWpUbP/hgNn98FKJZicQKUHW6gwWyoZBVKTF9yBNKQS59aZOT+cg==", + "cpu": [ + "x64", + "arm64" + ], + "license": "Apache 2.0", + "os": [ + "darwin", + "linux", + "win32" + ], + "dependencies": { + "reflect-metadata": "^0.2.2" + }, + "engines": { + "node": ">= 18" + }, + "optionalDependencies": { + "@lancedb/lancedb-darwin-arm64": "0.12.0", + "@lancedb/lancedb-darwin-x64": "0.12.0", + "@lancedb/lancedb-linux-arm64-gnu": "0.12.0", + "@lancedb/lancedb-linux-x64-gnu": "0.12.0", + "@lancedb/lancedb-win32-x64-msvc": "0.12.0" + }, + "peerDependencies": { + "apache-arrow": ">=13.0.0 <=17.0.0" + } + }, + "node_modules/@lancedb/lancedb-darwin-arm64": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-arm64/-/lancedb-darwin-arm64-0.12.0.tgz", + "integrity": "sha512-yuQkxgdR7q8eXeQ+8wOupB2789f0gS5+uvzZRiKz3ilf1ZgNTV68Zd3vgGjTTepcYGZvFvVOVlszlhZhVQjlfw==", + "cpu": [ + "arm64" + ], + "license": "Apache 2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 18" + } + }, + "node_modules/@lancedb/lancedb-darwin-x64": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-x64/-/lancedb-darwin-x64-0.12.0.tgz", + "integrity": "sha512-ZOVVDJRaEch/54zbDSVRbFXZRCgOEYRaqrcIUSZMKrMgFhinq5xgrau4zLGRsF7rSrxeCoF6eMx9+qkQHotyig==", + "cpu": [ + "x64" + ], + "license": "Apache 2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 18" + } + }, + "node_modules/@lancedb/lancedb-linux-arm64-gnu": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-arm64-gnu/-/lancedb-linux-arm64-gnu-0.12.0.tgz", + "integrity": "sha512-mAsVwaiaLoNRLB3stocJyAEoDpwsPu++YISd5ZCaYf66CXeYU8MI50z6NV0ZYUbAFHhUzqG85CfwW+Ns2ToJ8g==", + "cpu": [ + "arm64" + ], + "license": "Apache 2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 18" + } + }, + "node_modules/@lancedb/lancedb-linux-x64-gnu": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-x64-gnu/-/lancedb-linux-x64-gnu-0.12.0.tgz", + "integrity": "sha512-tc/A8NQQjbuEFWmq2qEWJ9s+JZFdH2diYPmMO4FNQpcbikjfk8kbJR5AFFtZel/cl2LqE7BnCvWtkI7v/hn5PA==", + "cpu": [ + "x64" + ], + "license": "Apache 2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 18" + } + }, + "node_modules/@lancedb/lancedb-win32-x64-msvc": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@lancedb/lancedb-win32-x64-msvc/-/lancedb-win32-x64-msvc-0.12.0.tgz", + "integrity": "sha512-aLpGwksA4FWvWRxsoDzo1m8ryvmcIHOLjln4BUEPtJcKdX6zWBC5VL9QlBkKribnsyj87V/5UbJpM9KyrCnk5A==", + "cpu": [ + "x64" + ], + "license": "Apache 2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 18" + } + }, "node_modules/@langchain/anthropic": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.5.tgz", - "integrity": "sha512-AWlF8mSTcxlDdLD+FD9TYFnVaQSCp4foblCDzUR/Xnhn8IvZSzK+3nbxkdVM4a8LS+7GnxP9ED88ZAUvZSQmQg==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.7.tgz", + "integrity": "sha512-MjV7BNPalnG3S6PqXYHRtv3nEML1fFHl9OsqjT5KCPcULxJImnIZrJX5qMTnezM5A+Q6KOZt3e07x7aYCmU3Sg==", "license": "MIT", "dependencies": { "@anthropic-ai/sdk": "^0.27.3", @@ -6106,9 +6314,9 @@ } }, "node_modules/@langchain/core": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.15.tgz", - "integrity": "sha512-HheOAhczmIH47fWzLkV+NZjjgYCUjfqjmUb9C9LTKaJMHr+kKnbBi/r9ueSaufeuEHRG2OuKWq+YQ5cHDByU5A==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.16.tgz", + "integrity": "sha512-g83M2Z1XlhECFUtT4C7XLsVVGt2Hk3Y/KhS5tZSsz+Gqtxwd790/MD7MxdUHpZj0VKkvrFuWARWpJmNKlkiY+g==", "license": "MIT", "dependencies": { "ansi-styles": "^5.0.0", @@ -6227,12 +6435,12 @@ } }, "node_modules/@langchain/ollama": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.0.tgz", - "integrity": "sha512-TI4DGenLf1ApoxFf4Bx/VPyO+a+poJKIul8AGm/FEyORtw3JPq1UDR6SdkGETrkDqzzdK9R0DvFRStd1MSTE/w==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@langchain/ollama/-/ollama-0.1.1.tgz", + "integrity": "sha512-IQEdzGkfKzdoyys3GW5hCXc64d/u1xkrYXved73BLO+bnyQfzrM224jdsiYGUpjW3cUaO1ebD6PUiMYcANPPFQ==", "license": "MIT", "dependencies": { - "ollama": "^0.5.6", + "ollama": "^0.5.9", "uuid": "^10.0.0" }, "engines": { @@ -6384,9 +6592,9 @@ "link": true }, "node_modules/@lmdb/lmdb-darwin-arm64": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-3.1.3.tgz", - "integrity": "sha512-VV667lP23gIsQkb80rnQwAHjj6F1uZp30qTnvLSlep3pOomzXcQBMFp4ZmJLeGJnnPy54JjNsYBFyg9X95wCPw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-3.1.4.tgz", + "integrity": "sha512-bXwBegGNDGAlshGqUmV8MxVFPsqEpU2yWWxoJ4AA4UkEd7gA1Rzh7KtvM5Tww0dQfp5t+P/SjNV3vjpAgof+uA==", "cpu": [ "arm64" ], @@ -6397,9 +6605,9 @@ ] }, "node_modules/@lmdb/lmdb-darwin-x64": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-3.1.3.tgz", - "integrity": "sha512-kuhKKJxGCQr9gBtUd7cVBBn6OtwQg7vIiD5gHEZb+jWLJulg6N4uPSLTab8W9tvpb3ryRTAejMt7F89/2MoRrQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-3.1.4.tgz", + "integrity": "sha512-cb1/yeoUfWhVWqo8VImUWo6bXVn57AHPX98VqIkpfRw5Yh0z2DHPBZmsELb1OLJKeikAAOyxM+vPWRJYtAg9rw==", "cpu": [ "x64" ], @@ -6410,9 +6618,9 @@ ] }, "node_modules/@lmdb/lmdb-linux-arm": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-3.1.3.tgz", - "integrity": "sha512-R0CkYoJPHUfxPe2LaAqMGwTf5+1eXchUMNISO8OKEvKkS/zg2emIYTOb29v1k8WGSmdJkgQneBav/W3h5NorzA==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-3.1.4.tgz", + "integrity": "sha512-9O3kU6i7crV0vi+ImbZG6SkD+T8sxjbugq4pY424tjV8X/EjSfs1E0n25We5Z7qpJFxZSJZKsv40tJlz1w4pLg==", "cpu": [ "arm" ], @@ -6423,9 +6631,9 @@ ] }, "node_modules/@lmdb/lmdb-linux-arm64": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-3.1.3.tgz", - "integrity": "sha512-XnSHGKsJ1Fr5LBjyDkG7JnVJlduhg7AhV1J6YQujStsKnehuiidsNW0InEJrAO4QMHqquwnCfLvU9PPJfpFVYw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-3.1.4.tgz", + "integrity": "sha512-Hs1cmv8SKEkczsiQbRYVeqI7vzpJ0LI29RyeaVNDDFJxzoua7IcuyG0wSXu12kpXlGTTLVOh1Wp4rK79Ixpxmg==", "cpu": [ "arm64" ], @@ -6436,9 +6644,9 @@ ] }, "node_modules/@lmdb/lmdb-linux-x64": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-3.1.3.tgz", - "integrity": "sha512-epvFL9/Tem00evtuq05kqWbRppJ4G/D8wa6LnQmOu779VmbrY6+M3v3h4fnt2QqMQt3+J6Cg/gZACDlDcH+eUw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-3.1.4.tgz", + "integrity": "sha512-e/xPxFjSBzuN7/nb5WBYO1t9X1NBiNYy+gvWB3rb95K2W5qJU9fnjx+CNFp7ucvQZWF08EsVzMBa7eXKGGmHjg==", "cpu": [ "x64" ], @@ -6449,9 +6657,9 @@ ] }, "node_modules/@lmdb/lmdb-win32-x64": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-3.1.3.tgz", - "integrity": "sha512-S6P96biJyrt/CUYSP0v4OH1U9ITzHhHCh1kn7hHOscS3S1+T/D74sCJKQ9xb/Raos2NJHqtZ8EyQVEVjOzmqbg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-3.1.4.tgz", + "integrity": "sha512-mUcWgKmpbquKaDEcJ+FBtJpcqHvJW2Ce+GKMP/B/Hm9IxGjUfGs0aGlax2Nh/mjzXx/7qfwyCGD8y+KXfDuMsA==", "cpu": [ "x64" ], @@ -6770,9 +6978,9 @@ } }, "node_modules/@nx/devkit": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.0.6.tgz", - "integrity": "sha512-vUjVVEJgfq/roCzDDZDXduwnhVXl1MM5No2UELUka2oNBK09pPigdFxzUNh8XvmOyFskCGDTLKH/dAO5yTD5Bg==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.0.7.tgz", + "integrity": "sha512-h+B5S+tkHObtKj2pQYUkbiaiYdcim95iS27CaZgasq7FiIXQOoupQ6jrIKduQJKx+GfYbuCCd60zrAYbkyvxiA==", "dev": true, "license": "MIT", "dependencies": { @@ -6790,14 +6998,14 @@ } }, "node_modules/@nx/esbuild": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/esbuild/-/esbuild-20.0.6.tgz", - "integrity": "sha512-cx20e+T4/aYLACM5/Hu3qTe7KEO5xBFS2T75q6Fys3uDWH87Rs6ulD7jVL3YhXeI6JQ4PudlaSS85DkaIOBJww==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/esbuild/-/esbuild-20.0.7.tgz", + "integrity": "sha512-qXAMBqQDPxIp6kQlA7jdjaE4MBYZZ35xOghxKtkgvPJgMhMTfTIu0N1rzCtAO75GL6CKSiO8SQm0qUwidRPu/A==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.0.6", - "@nx/js": "20.0.6", + "@nx/devkit": "20.0.7", + "@nx/js": "20.0.7", "fast-glob": "3.2.7", "picocolors": "^1.1.0", "tsconfig-paths": "^4.1.2", @@ -6813,14 +7021,14 @@ } }, "node_modules/@nx/eslint": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/eslint/-/eslint-20.0.6.tgz", - "integrity": "sha512-07Ign5GQXZif6zHDR2oB4wkf2amSvoGhYWJ17fmqDsMF/nWYOohL+DbjAaqDORXWXL1bnmRBaj/lAkDNsmW3QA==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/eslint/-/eslint-20.0.7.tgz", + "integrity": "sha512-0XpCASmmFD7FCDhAbCRqArfP5X+opZb0+HK5M/KC21XT6froAnurf2lD8q2GP0BpCj01gNChmfAw3dYhLZYU7Q==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.0.6", - "@nx/js": "20.0.6", + "@nx/devkit": "20.0.7", + "@nx/js": "20.0.7", "semver": "^7.5.3", "tslib": "^2.3.0", "typescript": "~5.4.2" @@ -6836,14 +7044,14 @@ } }, "node_modules/@nx/eslint-plugin": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-20.0.6.tgz", - "integrity": "sha512-wFWg9X4dhRVY5pIAuqXLKTQSL3FzWHbV5kpg7S+y2X3jFg3pezqa8EDBkAcerSk7rour1G2hlXAfHX/W3HCrBQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-20.0.7.tgz", + "integrity": "sha512-gRL4esYbZVeMrCyAmFhUtnss+sNOPwS733gucUcss82IW3bAzuOpIGYOEiNkZFL2NY/rt0XjmuUTJ1RoopDSVw==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.0.6", - "@nx/js": "20.0.6", + "@nx/devkit": "20.0.7", + "@nx/js": "20.0.7", "@typescript-eslint/type-utils": "^8.0.0", "@typescript-eslint/utils": "^8.0.0", "chalk": "^4.1.0", @@ -6891,16 +7099,16 @@ } }, "node_modules/@nx/jest": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/jest/-/jest-20.0.6.tgz", - "integrity": "sha512-/v9NavOOWcUpzgbjfYip0zipneJPhKUQd5rU3bTr0CqCJw0I+YQXotToUkzzMQYT6zmNrq7ySTMH1N8rXdy7NQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/jest/-/jest-20.0.7.tgz", + "integrity": "sha512-mV7qQY9EYvOgKRPe3HfFmlnoLWCy+mQ08BXj1HNdV+rtkUH4nEY6ljE9PT3aAA9RyNmVD2PZEXYGHUnISXiDoA==", "dev": true, "license": "MIT", "dependencies": { "@jest/reporters": "^29.4.1", "@jest/test-result": "^29.4.1", - "@nx/devkit": "20.0.6", - "@nx/js": "20.0.6", + "@nx/devkit": "20.0.7", + "@nx/js": "20.0.7", "@phenomnomnominal/tsquery": "~5.0.1", "chalk": "^4.1.0", "identity-obj-proxy": "3.0.0", @@ -6915,9 +7123,9 @@ } }, "node_modules/@nx/js": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/js/-/js-20.0.6.tgz", - "integrity": "sha512-/bAMtcgKX1Te3yCzbbv+QQLnFwb6SxE0iCc6EzxiLepmGhnd0iOArUqepB1mVipfeaO37n00suFjFv1xsaqLHg==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/js/-/js-20.0.7.tgz", + "integrity": "sha512-HehtLu6wXLrdbVnPboy5vkRn6d+8KL0n18IJYlDoZonY2xc7NTuifZ+bZN9n4zoSSUnorJ7ux6QccURaGV+0Yw==", "dev": true, "license": "MIT", "dependencies": { @@ -6928,8 +7136,8 @@ "@babel/preset-env": "^7.23.2", "@babel/preset-typescript": "^7.22.5", "@babel/runtime": "^7.22.6", - "@nx/devkit": "20.0.6", - "@nx/workspace": "20.0.6", + "@nx/devkit": "20.0.7", + "@nx/workspace": "20.0.7", "@zkochan/js-yaml": "0.0.7", "babel-plugin-const-enum": "^1.0.1", "babel-plugin-macros": "^2.8.0", @@ -6991,23 +7199,23 @@ } }, "node_modules/@nx/node": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/node/-/node-20.0.6.tgz", - "integrity": "sha512-/6khofVKgpdglkSE6XDz9tk4kCeEXQaIPOH1PgWqY25hoim/VSXjZ1XMVmPvnvd7m2lsFLDrqZlwIGWTrT2cFw==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/node/-/node-20.0.7.tgz", + "integrity": "sha512-VheVnuKd6ldxohe2wMndlHmZoc/PXdnP2aBI+7Oe0ccuSq0IAm9p+DlXC0ZlkCngBVeKK52IDwU5bUI+fF6bWQ==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.0.6", - "@nx/eslint": "20.0.6", - "@nx/jest": "20.0.6", - "@nx/js": "20.0.6", + "@nx/devkit": "20.0.7", + "@nx/eslint": "20.0.7", + "@nx/jest": "20.0.7", + "@nx/js": "20.0.7", "tslib": "^2.3.0" } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.0.6.tgz", - "integrity": "sha512-SUVfEqzl/iy2NzTbpY2E9lHSxs8c9QERhTILp5OOt0Vgmhn9iTxVEIoSCjzz/MyX066eARarUymUyK4JCg3mqw==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.0.7.tgz", + "integrity": "sha512-QLD0DlyT343okCMHNg4EyM1s9HWU55RGiD36OxopaAmDcJ45j4p7IgmYlwbWCC5TyjIXSnLnZyIAs5DrqaKwrg==", "cpu": [ "arm64" ], @@ -7022,9 +7230,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.0.6.tgz", - "integrity": "sha512-JI0kcJGBeIj3sb+kC0nZMOSXFnvCOtGbAVK3HHJ9DSRxckLq5bImwqdfYSNJL9ocU8YU+Qds/SercEV02gQOkQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.0.7.tgz", + "integrity": "sha512-Sc2h+eAunGKiqpumvjVrrt0LRtk/l6Fev/633WP55svSNuY9muB/MPcP9v/oLyAD1flDnzvIWeUT6eEw6oqvZw==", "cpu": [ "x64" ], @@ -7039,9 +7247,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.0.6.tgz", - "integrity": "sha512-om9Sh5Pg5aRDlBWyHMAX/1swLSj2pCqk1grXN6RcJ8O3tXLI35fj4wz6sPDRASwC1xuHwET2DG/20Ec6n1Ko3A==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.0.7.tgz", + "integrity": "sha512-Sp0pMVGj4LuPaO6oL9R5gsIPjIm8Xt3IyP9f+5uwtqjipiPriw0IdD2uV9bDjPPs0QQc15ncz+eSk30p836qpA==", "cpu": [ "x64" ], @@ -7056,9 +7264,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.0.6.tgz", - "integrity": "sha512-XIomXUqnH3w1aqRu0T+Wcn9roXT1bG1PjuX+bmGLkSiZ+ZyY/zYfhg6WKbox3TqQcdC1jNUkzEQlLGcfWaGc6w==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.0.7.tgz", + "integrity": "sha512-hs15RudLvFkfBtUL20M9Hr0wn8FLije3EGn1j9iPmo8EiZBZn4mDAywwPZXmDiAuxKTU8LKBLT/xJczNe8gzbQ==", "cpu": [ "arm" ], @@ -7073,9 +7281,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.0.6.tgz", - "integrity": "sha512-Asx2F+WtauELssmrQf1y4ZeiMIsgbL/+PnD+WgbvHVWbl7cRUfLJqEhOR5fQG6CiNTIXvOyzXMoaJVA9hTub+Q==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.0.7.tgz", + "integrity": "sha512-t1NSxBvWpyjb9VnbxAN2Oka3JXEKtbQv//aLOer8++8Y+e6INDOHmRADyyp5BcLwBpsaP/lWLKcDa6vlsMzXTg==", "cpu": [ "arm64" ], @@ -7090,9 +7298,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.0.6.tgz", - "integrity": "sha512-4lyBaLWSv7VNMOXWxtuDNiSOE4M5QGiVHimSvQ9PBwgnrvEuc6fCv/Nc8ecU0rINHRQJruYMTD/kKBCsahwJUQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.0.7.tgz", + "integrity": "sha512-lLAzyxQeeALMKM2uBA9728gZ0bihy6rfhMe+fracV1xjGLfcHEa/hNmhXNMp9Vf80sZJ50EUeW6mUPluLROBNQ==", "cpu": [ "arm64" ], @@ -7107,9 +7315,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.0.6.tgz", - "integrity": "sha512-HGZzX7un/rJvADKwN27HM0e3Gx19hSndCoqZUtqHgrFRdUvTfHTWNpT6uZ5XW/5bNnRKdUinY9DHhlYpE0u4KQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.0.7.tgz", + "integrity": "sha512-H9LfEoHEa0ZHnfifseY24RPErtGaXSoWTuW9JAPylUXeYOy66i/FwxwbjsG5BMFJCnL1LGXPN9Oirh442lcsbQ==", "cpu": [ "x64" ], @@ -7124,9 +7332,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.0.6.tgz", - "integrity": "sha512-OwMq+ozzCOCtAViOouHbe/MXqep/q4EKg44YelUqVNIe/2XimcIfMlBQFk1DOcmibesxa3yWMKAdg2IGUnG+pQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.0.7.tgz", + "integrity": "sha512-2VsTSLZZVGHmN2BkSaLoOp/Byj9j20so/Ne/TZg4Lo/HBp0iDSOmUtbPAnkJOS6UiAPvQtb9zqzRKPphhDhnzg==", "cpu": [ "x64" ], @@ -7141,9 +7349,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.0.6.tgz", - "integrity": "sha512-2D8TIjyi5dJLy4cx8u7YKunW6+EG9FAuBUo75qMCozTBw1EPTK2lzwLE2d8C7WOxBA148O2wzD5uiX1vCt2Tzg==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.0.7.tgz", + "integrity": "sha512-lmH7xTPHJe2q/P2tnHEjOTdwzNxnFV08Kp2z6sUU0lAfJ79mye2nydGBDtFq9CeFF1Q6vfCSDTRu5fbxAZ9/Xg==", "cpu": [ "arm64" ], @@ -7158,9 +7366,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.0.6.tgz", - "integrity": "sha512-B83kpN1+KdJ97P0Rw/KRyZ5fZPtKimvwg/TAJdWR1D8oqdrpaZwgTd9dcsTNavvynUsPqM3GdjmFKzTYTZ4MFQ==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.0.7.tgz", + "integrity": "sha512-U8LY1O3XA1yD8FoCM0ozT0DpFJdei2NNSrp/5lBXn5KHb2nkZ8DQ1zh7RKvMhEMwDNfNGbM7JsaBTr+fP6eYJg==", "cpu": [ "x64" ], @@ -7175,16 +7383,16 @@ } }, "node_modules/@nx/workspace": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-20.0.6.tgz", - "integrity": "sha512-A7lle47I4JggbhXoUVvkuvULqF0Xejy4LpE0txz9OIM5a9HxW1aIHYYQFuROBuVlMFxAJusPeYFJCCvb+qBxKw==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-20.0.7.tgz", + "integrity": "sha512-1Vdl7Rti4aKa9kIsuSnD+tNeBfD6tF/Eln5VbUydJ7NpMb1ko7jz4qqWUVm6tLYbLtGcgVoer1AZyD3nWa4qyA==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.0.6", + "@nx/devkit": "20.0.7", "chalk": "^4.1.0", "enquirer": "~2.3.6", - "nx": "20.0.6", + "nx": "20.0.7", "tslib": "^2.3.0", "yargs-parser": "21.1.1" } @@ -8201,9 +8409,9 @@ } }, "node_modules/@swc/core": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.40.tgz", - "integrity": "sha512-0HIzM5vigVT5IvNum+pPuST9p8xFhN6mhdIKju7qYYeNuZG78lwms/2d8WgjTJJlzp6JlPguXGrMMNzjQw0qNg==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.42.tgz", + "integrity": "sha512-iQrRk3SKndQZ4ptJv1rzeQSiCYQIhMjiO97QXOlCcCoaazOLKPnLnXzU4Kv0FuBFyYfG2FE94BoR0XI2BN02qw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -8219,16 +8427,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.7.40", - "@swc/core-darwin-x64": "1.7.40", - "@swc/core-linux-arm-gnueabihf": "1.7.40", - "@swc/core-linux-arm64-gnu": "1.7.40", - "@swc/core-linux-arm64-musl": "1.7.40", - "@swc/core-linux-x64-gnu": "1.7.40", - "@swc/core-linux-x64-musl": "1.7.40", - "@swc/core-win32-arm64-msvc": "1.7.40", - "@swc/core-win32-ia32-msvc": "1.7.40", - "@swc/core-win32-x64-msvc": "1.7.40" + "@swc/core-darwin-arm64": "1.7.42", + "@swc/core-darwin-x64": "1.7.42", + "@swc/core-linux-arm-gnueabihf": "1.7.42", + "@swc/core-linux-arm64-gnu": "1.7.42", + "@swc/core-linux-arm64-musl": "1.7.42", + "@swc/core-linux-x64-gnu": "1.7.42", + "@swc/core-linux-x64-musl": "1.7.42", + "@swc/core-win32-arm64-msvc": "1.7.42", + "@swc/core-win32-ia32-msvc": "1.7.42", + "@swc/core-win32-x64-msvc": "1.7.42" }, "peerDependencies": { "@swc/helpers": "*" @@ -8240,9 +8448,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.40.tgz", - "integrity": "sha512-LRRrCiRJLb1kpQtxMNNsr5W82Inr0dy5Imho+4HQzVx/Ismi0qX4hQBgzJAnyOBNLK1+OBVb/912UVhKXppdfQ==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.42.tgz", + "integrity": "sha512-fWhaCs2+8GDRIcjExVDEIfbptVrxDqG8oHkESnXgymmvqTWzWei5SOnPNMS8Q+MYsn/b++Y2bDxkcwmq35Bvxg==", "cpu": [ "arm64" ], @@ -8257,9 +8465,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.40.tgz", - "integrity": "sha512-Lpl0XK/4fLzS5jsK48opUuGXrqJXwqJckYYPwyGbCfCXm4MsBe+7dX2hq/Kc4YMY25+NeTmzAXhla8TT4WYD/g==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.42.tgz", + "integrity": "sha512-ZaVHD2bijrlkCyD7NDzLmSK849Jgcx+6DdL4x1dScoz1slJ8GTvLtEu0JOUaaScQwA+cVlhmrmlmi9ssjbRLGQ==", "cpu": [ "x64" ], @@ -8274,9 +8482,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.40.tgz", - "integrity": "sha512-4bEvvjptpoc5BRPr/R419h6fXTEuub+frpxxlxBOEKxgXjAF/S3xdxyPijUAakmW/xXBF0u7OC4KYI+38yQp6g==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.42.tgz", + "integrity": "sha512-iF0BJj7hVTbY/vmbvyzVTh/0W80+Q4fbOYschdUM3Bsud39TA+lSaPOefOHywkNH58EQ1z3EAxYcJOWNES7GFQ==", "cpu": [ "arm" ], @@ -8291,9 +8499,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.40.tgz", - "integrity": "sha512-v2fBlHJ/6Ovz0L2xFAI9TRiKyl9DTdx139PuAHD9gyzp16Utl/W0MPd4t2cYdkI6hPXE9PsJCSzMOrduh+YoDg==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.42.tgz", + "integrity": "sha512-xGu8j+DOLYTLkVmsfZPJbNPW1EkiWgSucT0nOlz77bLxImukt/0+HVm2hOwHSKuArQ8C3cjahAMY3b/s4VH2ww==", "cpu": [ "arm64" ], @@ -8308,9 +8516,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.40.tgz", - "integrity": "sha512-uMkduQuU4LFVkW6txv8AVArT8GjJVJ5IHoWloXaUBMT447iE8NALmpePdZWhMyj6KV7j0y23CM5rzV/I2eNGLg==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.42.tgz", + "integrity": "sha512-qtW3JNO7i1yHEko59xxz+jY38+tYmB96JGzj6XzygMbYJYZDYbrOpXQvKbMGNG3YeTDan7Fp2jD0dlKf7NgDPA==", "cpu": [ "arm64" ], @@ -8325,9 +8533,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.40.tgz", - "integrity": "sha512-4LZdY1MBSnXyTpW5fpBU/+JGAhkuHT+VnFTDNegRboN5nSPh7y0Yvn4LmIioESV+sWzjKkEXujJPGjrp+oSp5w==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.42.tgz", + "integrity": "sha512-F9WY1TN+hhhtiEzZjRQziNLt36M5YprMeOBHjsLVNqwgflzleSI7ulgnlQECS8c8zESaXj3ksGduAoJYtPC1cA==", "cpu": [ "x64" ], @@ -8342,9 +8550,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.40.tgz", - "integrity": "sha512-FPjOwT3SgI6PAwH1O8bhOGBPzuvzOlzKeCtxLaCjruHJu9V8KKBrMTWOZT/FJyYC9mX5Ip1+l9j30UqUZdQxtA==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.42.tgz", + "integrity": "sha512-7YMdOaYKLMQ8JGfnmRDwidpLFs/6ka+80zekeM0iCVO48yLrJR36G0QGXzMjKsXI0BPhq+mboZRRENK4JfQnEA==", "cpu": [ "x64" ], @@ -8359,9 +8567,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.40.tgz", - "integrity": "sha512-//ovXdD9GsTmhPmXJlXnIbRQkeuL6PSrYSr7uCMNcclrUdJG0YkO0GMM2afUKYbdJcunylDDWsSS8PFWn0QxmA==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.42.tgz", + "integrity": "sha512-C5CYWaIZEyqPl5W/EwcJ/mLBJFHVoUEa/IwWi0b4q2fCXcSCktQGwKXOQ+d67GneiZoiq0HasgcdMmMpGS9YRQ==", "cpu": [ "arm64" ], @@ -8376,9 +8584,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.40.tgz", - "integrity": "sha512-iD/1auVhHGlhWAPrWmfRWL3w4AvXIWGVXZiSA109/xnRIPiHKb/HqqTp/qB94E/ZHMPRgLKkLTNwamlkueUs8g==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.42.tgz", + "integrity": "sha512-3j47seZ5pO62mbrqvPe1iwhe2BXnM5q7iB+n2xgA38PCGYt0mnaJafqmpCXm/uYZOCMqSNynaoOWCMMZm4sqtA==", "cpu": [ "ia32" ], @@ -8393,9 +8601,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.7.40", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.40.tgz", - "integrity": "sha512-ZlFAV1WFPhhWQ/8esiygmetkb905XIcMMtHRRG0FBGCllO+HVL5nikUaLDgTClz1onmEY9sMXUFQeoPtvliV+w==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.42.tgz", + "integrity": "sha512-FXl9MdeUogZLGDcLr6QIRdDVkpG0dkN4MLM4dwQ5kcAk+XfKPrQibX6M2kcfhsCx+jtBqtK7hRFReRXPWJZGbA==", "cpu": [ "x64" ], @@ -8420,7 +8628,6 @@ "version": "0.5.13", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", - "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.4.0" @@ -8549,6 +8756,20 @@ "@types/responselike": "^1.0.0" } }, + "node_modules/@types/command-line-args": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.3.tgz", + "integrity": "sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/command-line-usage": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.4.tgz", + "integrity": "sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==", + "license": "MIT", + "peer": true + }, "node_modules/@types/conventional-commits-parser": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", @@ -8563,7 +8784,6 @@ "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, "license": "MIT", "dependencies": { "@types/ms": "*" @@ -8653,13 +8873,12 @@ "version": "0.7.34", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", - "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "22.8.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.4.tgz", - "integrity": "sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==", + "version": "22.8.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.6.tgz", + "integrity": "sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==", "license": "MIT", "dependencies": { "undici-types": "~6.19.8" @@ -9166,7 +9385,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -9192,6 +9410,37 @@ "node": ">= 8" } }, + "node_modules/apache-arrow": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-17.0.0.tgz", + "integrity": "sha512-X0p7auzdnGuhYMVKYINdQssS4EcKec9TCXyez/qtJt32DrIMGbzqiaMiQ0X6fQlQpw8Fl0Qygcv4dfRAr5Gu9Q==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/command-line-args": "^5.2.3", + "@types/command-line-usage": "^5.0.4", + "@types/node": "^20.13.0", + "command-line-args": "^5.2.1", + "command-line-usage": "^7.0.1", + "flatbuffers": "^24.3.25", + "json-bignum": "^0.0.3", + "tslib": "^2.6.2" + }, + "bin": { + "arrow2csv": "bin/arrow2csv.cjs" + } + }, + "node_modules/apache-arrow/node_modules/@types/node": { + "version": "20.17.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.5.tgz", + "integrity": "sha512-n8FYY/pRxu496441gIcAQFZPKXbhsd6VZygcq+PTSZ75eMh/Ke0hCAROdUa21qiFqKNsPPYic46yXDO1JGiPBQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -9205,6 +9454,16 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -9754,7 +10013,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -9767,6 +10025,22 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "license": "MIT", + "peer": true, + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -10006,7 +10280,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -10019,7 +10292,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, "license": "MIT" }, "node_modules/colorette": { @@ -10055,6 +10327,58 @@ "node": ">= 0.8" } }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.3.tgz", + "integrity": "sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^6.2.2", + "chalk-template": "^0.4.0", + "table-layout": "^4.1.0", + "typical": "^7.1.1" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.2.0.tgz", + "integrity": "sha512-W1+HdVRUl8fS3MZ9ogD51GOb46xMmhAZzR0WPw5jcgIZQJVvkddYzAl4YTU6g5w33Y1iRQLdIi2/1jhi2RNL0g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.17" + } + }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -10509,7 +10833,6 @@ "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -11317,6 +11640,19 @@ "node": ">=8" } }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -11357,6 +11693,13 @@ "node": ">=16" } }, + "node_modules/flatbuffers": { + "version": "24.3.25", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-24.3.25.tgz", + "integrity": "sha512-3HDgPbgiwWMI9zVB7VYBHaMrbOO7Gm0v+yD2FV/sCKj+9NDeVL7BOBYUuhWAQGKWOzBo8S9WdMvV0eixO233XQ==", + "license": "Apache-2.0", + "peer": true + }, "node_modules/flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", @@ -11837,7 +12180,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -12034,6 +12376,120 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/ibm-cloud-sdk-core": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ibm-cloud-sdk-core/-/ibm-cloud-sdk-core-5.1.0.tgz", + "integrity": "sha512-KJCbPz3tiXB1NGAD7cL4JtwpWV8yd/C7jsaHsxvedMo2ZblNG8emMyvSpGhiKAQVZmi3c0ujz6eJdy22NHuUWQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@types/debug": "^4.1.12", + "@types/node": "~10.14.19", + "@types/tough-cookie": "^4.0.0", + "axios": "1.7.4", + "camelcase": "^6.3.0", + "debug": "^4.3.4", + "dotenv": "^16.4.5", + "extend": "3.0.2", + "file-type": "16.5.4", + "form-data": "4.0.0", + "isstream": "0.1.2", + "jsonwebtoken": "^9.0.2", + "mime-types": "2.1.35", + "retry-axios": "^2.6.0", + "tough-cookie": "^4.1.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/ibm-cloud-sdk-core/node_modules/@types/node": { + "version": "10.14.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", + "integrity": "sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==", + "license": "MIT", + "peer": true + }, + "node_modules/ibm-cloud-sdk-core/node_modules/axios": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", + "peer": true, + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/ibm-cloud-sdk-core/node_modules/file-type": { + "version": "16.5.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz", + "integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==", + "license": "MIT", + "peer": true, + "dependencies": { + "readable-web-to-node-stream": "^3.0.0", + "strtok3": "^6.2.4", + "token-types": "^4.1.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/ibm-cloud-sdk-core/node_modules/peek-readable": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz", + "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/ibm-cloud-sdk-core/node_modules/strtok3": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", + "integrity": "sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^4.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/ibm-cloud-sdk-core/node_modules/token-types": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.1.tgz", + "integrity": "sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -12352,6 +12808,13 @@ "dev": true, "license": "ISC" }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT", + "peer": true + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -13159,6 +13622,15 @@ "bignumber.js": "^9.0.0" } }, + "node_modules/json-bignum": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", + "integrity": "sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==", + "peer": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -13234,6 +13706,52 @@ "node": ">=0.10.0" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "license": "MIT", + "peer": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "license": "MIT", + "peer": true, + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/jsuri": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsuri/-/jsuri-1.3.1.tgz", @@ -13367,28 +13885,28 @@ } }, "node_modules/lmdb": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-3.1.3.tgz", - "integrity": "sha512-WQcfSoOTw+XfBXQN4dRN1Ke5vv+NgmOWs4wH8oh4jYFmPZIaVPiQVF+0nGdjQDLGDcrMMyr2C34cG6WZPes6xQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-3.1.4.tgz", + "integrity": "sha512-M3P0HBm0e6SUCrWqMf+wjs5LTRQekh1TtC10e3NjCfLECCXLRXHFROG2kErdyyv2MQ5335Qvb3KQKCSLUuwUDg==", "hasInstallScript": true, "license": "MIT", "dependencies": { "msgpackr": "^1.10.2", "node-addon-api": "^6.1.0", "node-gyp-build-optional-packages": "5.2.2", - "ordered-binary": "^1.4.1", + "ordered-binary": "^1.5.2", "weak-lru-cache": "^1.2.2" }, "bin": { "download-lmdb-prebuilds": "bin/download-prebuilds.js" }, "optionalDependencies": { - "@lmdb/lmdb-darwin-arm64": "3.1.3", - "@lmdb/lmdb-darwin-x64": "3.1.3", - "@lmdb/lmdb-linux-arm": "3.1.3", - "@lmdb/lmdb-linux-arm64": "3.1.3", - "@lmdb/lmdb-linux-x64": "3.1.3", - "@lmdb/lmdb-win32-x64": "3.1.3" + "@lmdb/lmdb-darwin-arm64": "3.1.4", + "@lmdb/lmdb-darwin-x64": "3.1.4", + "@lmdb/lmdb-linux-arm": "3.1.4", + "@lmdb/lmdb-linux-arm64": "3.1.4", + "@lmdb/lmdb-linux-x64": "3.1.4", + "@lmdb/lmdb-win32-x64": "3.1.4" } }, "node_modules/lmdb/node_modules/node-addon-api": { @@ -13419,6 +13937,13 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "license": "MIT" }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT", + "peer": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -13432,12 +13957,54 @@ "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", "license": "MIT" }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT", + "peer": true + }, "node_modules/lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", "license": "MIT" }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT", + "peer": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -13445,6 +14012,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT", + "peer": true + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -14130,9 +14704,9 @@ } }, "node_modules/nx": { - "version": "20.0.6", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.0.6.tgz", - "integrity": "sha512-z8PMPEXxtADwxsNXamZdDbx65fcNcR4gTmX7N94GKmpZNrjwd3m7RcnoYgQp5vA8kFQkMR+320mtq5NkGJPZvg==", + "version": "20.0.7", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.0.7.tgz", + "integrity": "sha512-Un7eMAqTx+gRB4j6hRWafMvOso4pmFg3Ff+BmfFOgqD8XdE+xV/+Ke9mPTfi4qYD5eQiY1lO15l3dRuBH7+AJw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -14175,16 +14749,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.0.6", - "@nx/nx-darwin-x64": "20.0.6", - "@nx/nx-freebsd-x64": "20.0.6", - "@nx/nx-linux-arm-gnueabihf": "20.0.6", - "@nx/nx-linux-arm64-gnu": "20.0.6", - "@nx/nx-linux-arm64-musl": "20.0.6", - "@nx/nx-linux-x64-gnu": "20.0.6", - "@nx/nx-linux-x64-musl": "20.0.6", - "@nx/nx-win32-arm64-msvc": "20.0.6", - "@nx/nx-win32-x64-msvc": "20.0.6" + "@nx/nx-darwin-arm64": "20.0.7", + "@nx/nx-darwin-x64": "20.0.7", + "@nx/nx-freebsd-x64": "20.0.7", + "@nx/nx-linux-arm-gnueabihf": "20.0.7", + "@nx/nx-linux-arm64-gnu": "20.0.7", + "@nx/nx-linux-arm64-musl": "20.0.7", + "@nx/nx-linux-x64-gnu": "20.0.7", + "@nx/nx-linux-x64-musl": "20.0.7", + "@nx/nx-win32-arm64-msvc": "20.0.7", + "@nx/nx-win32-x64-msvc": "20.0.7" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -15224,6 +15798,19 @@ "node": ">= 4" } }, + "node_modules/retry-axios": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-2.6.0.tgz", + "integrity": "sha512-pOLi+Gdll3JekwuFjXO3fTq+L9lzMQGcSq7M5gIjExcl3Gu1hd4XXuf5o3+LuSBsaULQH7DiNbsqPd1chVpQGQ==", + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=10.7.0" + }, + "peerDependencies": { + "axios": "*" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -15880,7 +16467,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -15902,6 +16488,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/table-layout": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-4.1.1.tgz", + "integrity": "sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==", + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^6.2.2", + "wordwrapjs": "^5.1.0" + }, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.17" + } + }, "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", @@ -16173,9 +16783,9 @@ } }, "node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/type-check": { @@ -16260,6 +16870,16 @@ } } }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/underscore": { "version": "1.13.7", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", @@ -16611,6 +17231,16 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrapjs": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", + "integrity": "sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.17" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 1d1f502a..30c06bbb 100644 --- a/package.json +++ b/package.json @@ -22,15 +22,15 @@ "@eslint/eslintrc": "^3.1.0", "@inquirer/prompts": "^7.0.1", "@npmcli/package-json": "^6.0.1", - "@nx/esbuild": "20.0.6", - "@nx/eslint": "20.0.6", - "@nx/eslint-plugin": "20.0.6", - "@nx/js": "20.0.6", - "@nx/node": "20.0.6", + "@nx/esbuild": "20.0.7", + "@nx/eslint": "20.0.7", + "@nx/eslint-plugin": "20.0.7", + "@nx/js": "20.0.7", + "@nx/node": "20.0.7", "@swc-node/register": "~1.10.9", - "@swc/core": "~1.7.40", + "@swc/core": "~1.7.42", "@swc/helpers": "~0.5.13", - "@types/node": "22.8.4", + "@types/node": "22.8.6", "@typescript-eslint/eslint-plugin": "^8.12.2", "@typescript-eslint/parser": "^8.12.2", "arg": "^5.0.2", @@ -38,10 +38,10 @@ "eslint": "~9.13.0", "eslint-config-prettier": "^9.1.0", "husky": "^9.1.6", - "nx": "20.0.6", + "nx": "20.0.7", "prettier": "^3.3.3", "simple-git": "^3.27.0", - "tslib": "^2.8.0", + "tslib": "^2.8.1", "typescript": "5.6.3", "typescript-eslint": "^8.12.2" },