diff --git a/.changeset/chatty-stingrays-chew.md b/.changeset/chatty-stingrays-chew.md new file mode 100644 index 0000000000000000000000000000000000000000..ccc765feb0ff8e0a4623ae90efc0d80e60215c8c --- /dev/null +++ b/.changeset/chatty-stingrays-chew.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +Added support for MistralAI (LLM and Embeddings) diff --git a/.changeset/sharp-pumpkins-fold.md b/.changeset/sharp-pumpkins-fold.md new file mode 100644 index 0000000000000000000000000000000000000000..cbc0c8070229d4b78a7da778dc10599ea66152f5 --- /dev/null +++ b/.changeset/sharp-pumpkins-fold.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +Add support for AstraDB vector store diff --git a/README.md b/README.md index 866dfc3f834fecd535a8923bf1656aac73800321..772c4eaf006ffc0ba594535cefae68ba4437f409 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ LlamaIndex.TS aims to be a lightweight, easy to use set of libraries to help you ## Getting started with an example: -LlamaIndex.TS requries Node v18 or higher. You can download it from https://nodejs.org or use https://nvm.sh (our preferred option). +LlamaIndex.TS requires Node v18 or higher. You can download it from https://nodejs.org or use https://nvm.sh (our preferred option). In a new folder: @@ -86,7 +86,7 @@ Check out our NextJS playground at https://llama-playground.vercel.app/. The sou ## Note: NextJS: -If you're using NextJS App Router, you'll need to use the NodeJS runtime (default) and add the follow config to your next.config.js to have it use imports/exports in the same way Node does. +If you're using NextJS App Router, you'll need to use the NodeJS runtime (default) and add the following config to your next.config.js to have it use imports/exports in the same way Node does. ```js export const runtime = "nodejs"; // default @@ -96,6 +96,15 @@ export const runtime = "nodejs"; // default // next.config.js /** @type {import('next').NextConfig} */ const nextConfig = { + webpack: (config) => { + config.resolve.alias = { + ...config.resolve.alias, + sharp$: false, + "onnxruntime-node$": false, + mongodb$: false, + }; + return config; + }, experimental: { serverComponentsExternalPackages: ["pdf-parse"], // Puts pdf-parse in actual NodeJS mode with NextJS App Router }, @@ -109,6 +118,7 @@ module.exports = nextConfig; - OpenAI GPT-3.5-turbo and GPT-4 - Anthropic Claude Instant and Claude 2 - Llama2 Chat LLMs (70B, 13B, and 7B parameters) +- MistralAI Chat LLMs ## Contributing: diff --git a/examples/mistral.ts b/examples/mistral.ts new file mode 100644 index 0000000000000000000000000000000000000000..4687add02b4fae2732372078713a33e2b6484834 --- /dev/null +++ b/examples/mistral.ts @@ -0,0 +1,29 @@ +import { MistralAI, MistralAIEmbedding } from "llamaindex"; + +(async () => { + // embeddings + const embedding = new MistralAIEmbedding(); + const embeddingsResponse = await embedding.getTextEmbedding( + "What is the best French cheese?", + ); + console.log( + `MistralAI embeddings are ${embeddingsResponse.length} numbers long\n`, + ); + + // chat api (non-streaming) + const llm = new MistralAI({ model: "mistral-tiny" }); + const response = await llm.chat([ + { content: "What is the best French cheese?", role: "user" }, + ]); + console.log(response.message.content); + + // chat api (streaming) + const stream = await llm.chat( + [{ content: "Who is the most renowned French painter?", role: "user" }], + undefined, + true, + ); + for await (const chunk of stream) { + process.stdout.write(chunk); + } +})(); diff --git a/packages/core/package.json b/packages/core/package.json index c63857acdac48930d7f87eed73954beee26b1cde..5c114f8ae8103038062b9618b660838a169e0e94 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,6 +5,7 @@ "dependencies": { "@anthropic-ai/sdk": "^0.9.1", "@datastax/astra-db-ts": "^0.1.0", + "@mistralai/mistralai": "^0.0.7", "@notionhq/client": "^2.2.14", "@xenova/transformers": "^2.10.0", "assemblyai": "^4.0.0", @@ -29,6 +30,7 @@ }, "devDependencies": { "@types/crypto-js": "^4.2.1", + "@types/jest": "^29.5.11", "@types/lodash": "^4.14.202", "@types/node": "^18.19.2", "@types/papaparse": "^5.3.14", diff --git a/packages/core/src/embeddings/MistralAIEmbedding.ts b/packages/core/src/embeddings/MistralAIEmbedding.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ade99282abf8fc61ec50054e6230fd2f8920a50 --- /dev/null +++ b/packages/core/src/embeddings/MistralAIEmbedding.ts @@ -0,0 +1,37 @@ +import { MistralAISession } from "../llm/mistral"; +import { BaseEmbedding } from "./types"; + +export enum MistralAIEmbeddingModelType { + MISTRAL_EMBED = "mistral-embed", +} + +export class MistralAIEmbedding extends BaseEmbedding { + model: MistralAIEmbeddingModelType; + apiKey?: string; + + private session: MistralAISession; + + constructor(init?: Partial<MistralAIEmbedding>) { + super(); + this.model = MistralAIEmbeddingModelType.MISTRAL_EMBED; + this.session = new MistralAISession(init); + } + + private async getMistralAIEmbedding(input: string) { + const client = await this.session.getClient(); + const { data } = await client.embeddings({ + model: this.model, + input: [input], + }); + + return data[0].embedding; + } + + async getTextEmbedding(text: string): Promise<number[]> { + return this.getMistralAIEmbedding(text); + } + + async getQueryEmbedding(query: string): Promise<number[]> { + return this.getMistralAIEmbedding(query); + } +} diff --git a/packages/core/src/embeddings/index.ts b/packages/core/src/embeddings/index.ts index 1a6a4df04ef2225f44049e2819660afbc0e2b836..092e5fb86f1c982a06c98cf6ada8dad929b549eb 100644 --- a/packages/core/src/embeddings/index.ts +++ b/packages/core/src/embeddings/index.ts @@ -1,4 +1,5 @@ export * from "./ClipEmbedding"; +export * from "./MistralAIEmbedding"; export * from "./MultiModalEmbedding"; export * from "./OpenAIEmbedding"; export * from "./types"; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index c049a0710edd6b362be6784a3579850f3d1957c7..eacdfc6cc9212f5de1941f9d2d929cdb61e70b49 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -18,7 +18,7 @@ export * from "./callbacks/CallbackManager"; export * from "./constants"; export * from "./embeddings"; export * from "./indices"; -export * from "./llm/LLM"; +export * from "./llm"; export * from "./readers/AssemblyAI"; export * from "./readers/CSVReader"; export * from "./readers/HTMLReader"; diff --git a/packages/core/src/llm/index.ts b/packages/core/src/llm/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..edb5d287641bc96ba14ed0748bd3bdf8f071914a --- /dev/null +++ b/packages/core/src/llm/index.ts @@ -0,0 +1,2 @@ +export * from "./LLM"; +export * from "./mistral"; diff --git a/packages/core/src/llm/mistral.ts b/packages/core/src/llm/mistral.ts new file mode 100644 index 0000000000000000000000000000000000000000..aded9ef729e33a1d5ee909ca779b32a7000d0925 --- /dev/null +++ b/packages/core/src/llm/mistral.ts @@ -0,0 +1,178 @@ +import { + CallbackManager, + Event, + EventType, + StreamCallbackResponse, +} from "../callbacks/CallbackManager"; +import { ChatMessage, ChatResponse, LLM } from "./LLM"; + +export const ALL_AVAILABLE_MISTRAL_MODELS = { + "mistral-tiny": { contextWindow: 32000 }, + "mistral-small": { contextWindow: 32000 }, + "mistral-medium": { contextWindow: 32000 }, +}; + +export class MistralAISession { + apiKey?: string; + private client: any; + + constructor(init?: Partial<MistralAISession>) { + if (init?.apiKey) { + this.apiKey = init?.apiKey; + } else { + if (typeof process !== undefined) { + this.apiKey = process.env.MISTRAL_API_KEY; + } + } + if (!this.apiKey) { + throw new Error("Set Mistral API key in MISTRAL_API_KEY env variable"); // Overriding MistralAI package's error message + } + } + + async getClient() { + const { default: MistralClient } = await import("@mistralai/mistralai"); + if (!this.client) { + this.client = new MistralClient(this.apiKey); + } + return this.client; + } +} + +/** + * MistralAI LLM implementation + */ +export class MistralAI implements LLM { + hasStreaming: boolean = true; + + // Per completion MistralAI params + model: keyof typeof ALL_AVAILABLE_MISTRAL_MODELS; + temperature: number; + topP: number; + maxTokens?: number; + apiKey?: string; + callbackManager?: CallbackManager; + safeMode: boolean; + randomSeed?: number; + + private session: MistralAISession; + + constructor(init?: Partial<MistralAI>) { + this.model = init?.model ?? "mistral-small"; + this.temperature = init?.temperature ?? 0.1; + this.topP = init?.topP ?? 1; + this.maxTokens = init?.maxTokens ?? undefined; + this.callbackManager = init?.callbackManager; + this.safeMode = init?.safeMode ?? false; + this.randomSeed = init?.randomSeed ?? undefined; + this.session = new MistralAISession(init); + } + + get metadata() { + return { + model: this.model, + temperature: this.temperature, + topP: this.topP, + maxTokens: this.maxTokens, + contextWindow: ALL_AVAILABLE_MISTRAL_MODELS[this.model].contextWindow, + tokenizer: undefined, + }; + } + + tokens(messages: ChatMessage[]): number { + throw new Error("Method not implemented."); + } + + private buildParams(messages: ChatMessage[]): any { + return { + model: this.model, + temperature: this.temperature, + maxTokens: this.maxTokens, + topP: this.topP, + safeMode: this.safeMode, + randomSeed: this.randomSeed, + messages, + }; + } + + async chat< + T extends boolean | undefined = undefined, + R = T extends true ? AsyncGenerator<string, void, unknown> : ChatResponse, + >(messages: ChatMessage[], parentEvent?: Event, streaming?: T): Promise<R> { + // Streaming + if (streaming) { + if (!this.hasStreaming) { + throw Error("No streaming support for this LLM."); + } + return this.streamChat(messages, parentEvent) as R; + } + // Non-streaming + const client = await this.session.getClient(); + const response = await client.chat(this.buildParams(messages)); + const message = response.choices[0].message; + return { + message, + } as R; + } + + async complete< + T extends boolean | undefined = undefined, + R = T extends true ? AsyncGenerator<string, void, unknown> : ChatResponse, + >(prompt: string, parentEvent?: Event, streaming?: T): Promise<R> { + return this.chat( + [{ content: prompt, role: "user" }], + parentEvent, + streaming, + ); + } + + protected async *streamChat( + messages: ChatMessage[], + parentEvent?: Event, + ): AsyncGenerator<string, void, unknown> { + //Now let's wrap our stream in a callback + const onLLMStream = this.callbackManager?.onLLMStream + ? this.callbackManager.onLLMStream + : () => {}; + + const client = await this.session.getClient(); + const chunkStream = await client.chatStream(this.buildParams(messages)); + + const event: Event = parentEvent + ? parentEvent + : { + id: "unspecified", + type: "llmPredict" as EventType, + }; + + //Indices + var idx_counter: number = 0; + for await (const part of chunkStream) { + if (!part.choices.length) continue; + + part.choices[0].index = idx_counter; + const isDone: boolean = + part.choices[0].finish_reason === "stop" ? true : false; + + const stream_callback: StreamCallbackResponse = { + event: event, + index: idx_counter, + isDone: isDone, + token: part, + }; + onLLMStream(stream_callback); + + idx_counter++; + + yield part.choices[0].delta.content ?? ""; + } + return; + } + + //streamComplete doesn't need to be async because it's child function is already async + protected streamComplete( + query: string, + parentEvent?: Event, + ): AsyncGenerator<string, void, unknown> { + return this.streamChat([{ content: query, role: "user" }], parentEvent); + } +} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index cde87d6fb6f8588d39b4ce59fc5852994f0eab03..37fda5e0572aae0a24cd1a08585fa1dcd0aed180 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -8,9 +8,18 @@ "preserveWatchOutput": true, "skipLibCheck": true, "strict": true, - "lib": ["es2015", "dom"], + "lib": [ + "es2015", + "dom" + ], "target": "ES2015", - "resolveJsonModule": true + "resolveJsonModule": true, + "typeRoots": [ + "./types", + "./node_modules/@types" + ] }, - "exclude": ["node_modules"] -} + "exclude": [ + "node_modules" + ], +} \ No newline at end of file diff --git a/packages/core/types/mistral.d.ts b/packages/core/types/mistral.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b58ac5718ff748554ccd3c2b9aeca75530264487 --- /dev/null +++ b/packages/core/types/mistral.d.ts @@ -0,0 +1,3 @@ +declare module "@mistralai/mistralai" { + export = MistralClient; +} diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js index 28523d13ecb090df1bea343370879e31acc1708e..4c5366aa558c8ce3eaaa30eb9cc89c0e560e37df 100644 --- a/packages/eslint-config-custom/index.js +++ b/packages/eslint-config-custom/index.js @@ -35,6 +35,8 @@ module.exports = { "AZURE_OPENAI_API_INSTANCE_NAME", "AZURE_OPENAI_API_DEPLOYMENT_NAME", + "MISTRAL_API_KEY", + "DEBUG", "no_proxy", "NO_PROXY", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a3531ddc1a024f4a04bf64bca454836565efd8d3..68aa78cea4d7e503c0434c644fd353d01cab1861 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,7 +17,7 @@ importers: version: 2.26.2 '@turbo/gen': specifier: ^1.10.16 - version: 1.10.16(@types/node@20.10.3)(typescript@5.3.2) + version: 1.10.16(@types/node@18.19.2)(typescript@5.3.2) '@types/jest': specifier: ^29.5.10 version: 29.5.10 @@ -32,7 +32,7 @@ importers: version: 8.0.3 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.10.3) + version: 29.7.0(@types/node@18.19.2) lint-staged: specifier: ^15.1.0 version: 15.1.0 @@ -143,6 +143,9 @@ importers: '@datastax/astra-db-ts': specifier: ^0.1.0 version: 0.1.0 + '@mistralai/mistralai': + specifier: ^0.0.7 + version: 0.0.7 '@notionhq/client': specifier: ^2.2.14 version: 2.2.14 @@ -210,6 +213,9 @@ importers: '@types/crypto-js': specifier: ^4.2.1 version: 4.2.1 + '@types/jest': + specifier: ^29.5.11 + version: 29.5.11 '@types/lodash': specifier: ^4.14.202 version: 4.14.202 @@ -808,10 +814,6 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} - engines: {node: '>=6.9.0'} - /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} @@ -851,7 +853,7 @@ packages: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 @@ -2076,7 +2078,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 /@babel/types@7.23.0: @@ -3498,7 +3500,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.10.3 + '@types/node': 18.19.2 jest-mock: 29.7.0 dev: true @@ -3525,7 +3527,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.10.3 + '@types/node': 18.19.2 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -3749,6 +3751,15 @@ packages: resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==} dev: false + /@mistralai/mistralai@0.0.7: + resolution: {integrity: sha512-47FiV/GBnt6gug99ZfDBcBofYuYvqT5AyhUDdtktUbCN+gq52tmiAbtwc88k7hlyUWHzJ28VpHRDfNTRfaWKxA==} + dependencies: + axios: 1.6.2 + axios-retry: 4.0.0(axios@1.6.2) + transitivePeerDependencies: + - debug + dev: false + /@mongodb-js/saslprep@1.1.1: resolution: {integrity: sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==} dependencies: @@ -4219,7 +4230,7 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true - /@turbo/gen@1.10.16(@types/node@20.10.3)(typescript@5.3.2): + /@turbo/gen@1.10.16(@types/node@18.19.2)(typescript@5.3.2): resolution: {integrity: sha512-PzyluADjVuy5OcIi+/aRcD70OElQpRVRDdfZ9fH8G5Fv75lQcNrjd1bBGKmhjSw+g+eTEkXMGnY7s6gsCYjYTQ==} hasBin: true dependencies: @@ -4231,7 +4242,7 @@ packages: minimatch: 9.0.3 node-plop: 0.26.3 proxy-agent: 6.3.1 - ts-node: 10.9.1(@types/node@20.10.3)(typescript@5.3.2) + ts-node: 10.9.1(@types/node@18.19.2)(typescript@5.3.2) update-check: 1.5.4 validate-npm-package-name: 5.0.0 transitivePeerDependencies: @@ -4299,13 +4310,13 @@ packages: resolution: {integrity: sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==} dependencies: '@types/connect': 3.4.36 - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/bonjour@3.5.11: resolution: {integrity: sha512-isGhjmBtLIxdHBDl2xGwUzEM8AOyOvWsADWq7rqirdi/ZQoHnLWErHvsThcEzTX8juDRiZtzp2Qkv5bgNh6mAg==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/cacheable-request@6.0.3: @@ -4325,13 +4336,13 @@ packages: resolution: {integrity: sha512-iaQslNbARe8fctL5Lk+DsmgWOM83lM+7FzP0eQUJs1jd3kBE8NWqBTIT2S8SqQOJjxvt2eyIjpOuYeRXq2AdMw==} dependencies: '@types/express-serve-static-core': 4.17.37 - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/connect@3.4.36: resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/cross-spawn@6.0.0: @@ -4380,7 +4391,7 @@ packages: /@types/express-serve-static-core@4.17.37: resolution: {integrity: sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 '@types/qs': 6.9.8 '@types/range-parser': 1.2.5 '@types/send': 0.17.2 @@ -4399,13 +4410,13 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: true /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: true /@types/hast@2.3.6: @@ -4432,7 +4443,7 @@ packages: /@types/http-proxy@1.17.12: resolution: {integrity: sha512-kQtujO08dVtQ2wXAuSFfk9ASy3sug4+ogFR8Kd8UgP8PEuc1/G/8yjYRmp//PcDNJEUKOza/MrQu15bouEUCiw==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/inquirer@6.5.0: @@ -4468,6 +4479,13 @@ packages: pretty-format: 29.7.0 dev: true + /@types/jest@29.5.11: + resolution: {integrity: sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==} + dependencies: + expect: 29.7.0 + pretty-format: 29.7.0 + dev: true + /@types/json-schema@7.0.13: resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} @@ -4642,7 +4660,7 @@ packages: /@types/sax@1.2.5: resolution: {integrity: sha512-9jWta97bBVC027/MShr3gLab8gPhKy4l6qpb+UJLF5pDm3501NvA7uvqVCW+REFtx00oTi6Cq9JzLwgq6evVgw==} dependencies: - '@types/node': 17.0.45 + '@types/node': 18.19.2 dev: false /@types/scheduler@0.16.4: @@ -4656,7 +4674,7 @@ packages: resolution: {integrity: sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==} dependencies: '@types/mime': 1.3.3 - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/serve-index@1.9.2: @@ -4670,13 +4688,13 @@ packages: dependencies: '@types/http-errors': 2.0.2 '@types/mime': 3.0.2 - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/sockjs@0.3.34: resolution: {integrity: sha512-R+n7qBFnm/6jinlteC9DBL5dGiDGjWAvjo4viUanpnc/dG1y7uDoacXPIQ/PQEg1fI912SMHIa014ZjRpvDw4g==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/stack-utils@2.0.3: @@ -4693,7 +4711,7 @@ packages: /@types/through@0.0.33: resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: true /@types/tinycolor2@1.4.6: @@ -4729,7 +4747,7 @@ packages: /@types/ws@8.5.6: resolution: {integrity: sha512-8B5EO9jLVCy+B58PLHvLDuOD8DRVMgQzq8d55SjLCOn9kqGyqOvy27exVaTio1q1nX5zLu8/6N0n2ThSxOM6tg==} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 dev: false /@types/yargs-parser@21.0.3: @@ -5337,6 +5355,15 @@ packages: engines: {node: '>=4'} dev: false + /axios-retry@4.0.0(axios@1.6.2): + resolution: {integrity: sha512-F6P4HVGITD/v4z9Lw2mIA24IabTajvpDZmKa6zq/gGwn57wN5j1P3uWrAV0+diqnW6kTM2fTqmWNfgYWGmMuiA==} + peerDependencies: + axios: 0.x || 1.x + dependencies: + axios: 1.6.2 + is-retry-allowed: 2.2.0 + dev: false + /axios@0.25.0: resolution: {integrity: sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==} dependencies: @@ -6571,7 +6598,7 @@ packages: sha.js: 2.4.11 dev: true - /create-jest@29.7.0(@types/node@20.10.3): + /create-jest@29.7.0(@types/node@18.19.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6580,7 +6607,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.10.3) + jest-config: 29.7.0(@types/node@18.19.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -8059,7 +8086,7 @@ packages: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 require-like: 0.1.2 dev: false @@ -9778,6 +9805,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /is-retry-allowed@2.2.0: + resolution: {integrity: sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==} + engines: {node: '>=10'} + dev: false + /is-root@2.1.0: resolution: {integrity: sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==} engines: {node: '>=6'} @@ -9984,7 +10016,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.10.3 + '@types/node': 18.19.2 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -10005,7 +10037,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@20.10.3): + /jest-cli@29.7.0(@types/node@18.19.2): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10019,10 +10051,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.10.3) + create-jest: 29.7.0(@types/node@18.19.2) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.10.3) + jest-config: 29.7.0(@types/node@18.19.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10033,6 +10065,46 @@ packages: - ts-node dev: true + /jest-config@29.7.0(@types/node@18.19.2): + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.23.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 18.19.2 + babel-jest: 29.7.0(@babel/core@7.23.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + dev: true + /jest-config@29.7.0(@types/node@20.10.3): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -10108,7 +10180,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.10.3 + '@types/node': 18.19.2 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -10175,7 +10247,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.10.3 + '@types/node': 18.19.2 jest-util: 29.7.0 dev: true @@ -10349,7 +10421,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -10357,12 +10429,12 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.10.3 + '@types/node': 18.19.2 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - /jest@29.7.0(@types/node@20.10.3): + /jest@29.7.0(@types/node@18.19.2): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10375,7 +10447,7 @@ packages: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.10.3) + jest-cli: 29.7.0(@types/node@18.19.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -14919,7 +14991,7 @@ packages: '@babel/core': 7.23.3 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.10.3) + jest: 29.7.0(@types/node@18.19.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -14960,7 +15032,7 @@ packages: yn: 3.1.1 dev: true - /ts-node@10.9.1(@types/node@20.10.3)(typescript@5.3.2): + /ts-node@10.9.1(@types/node@18.19.2)(typescript@5.3.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -14979,7 +15051,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.10.3 + '@types/node': 18.19.2 acorn: 8.11.2 acorn-walk: 8.3.0 arg: 4.1.3