From 6c63aeb5dc0b4eede7508cb448545d90757ee21c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 14 Jun 2024 09:11:01 -0700 Subject: [PATCH 01/29] allow setting apiBase for bedrock provider --- core/llm/llms/Bedrock.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index de3055189..04af2b7c2 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -38,7 +38,9 @@ class Bedrock extends BaseLLM { constructor(options: LLMOptions) { super(options); - this.apiBase = `https://bedrock-runtime.${options.region}.amazonaws.com`; + if (!options.apiBase) { + this.apiBase = `https://bedrock-runtime.${options.region}.amazonaws.com`; + } } private _convertModelName(model: string): string { From 3a96050e3da0c54ed046fab7997e53f47f367eb3 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 14 Jun 2024 15:45:25 -0700 Subject: [PATCH 02/29] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20better=20linking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/ideProtocol.ts | 15 ++-- gui/src/components/markdown/LinkableCode.tsx | 87 ++++++++++++++++---- 2 files changed, 75 insertions(+), 27 deletions(-) diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index a9181e8cd..80f3e5e8a 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -365,15 +365,12 @@ class VsCodeIde implements IDE { new vscode.Position(startLine, 0), new vscode.Position(endLine, 0), ); - openEditorAndRevealRange(filepath, range).then(() => { - // TODO: Highlight lines - // this.ideUtils.highlightCode( - // { - // filepath, - // range, - // }, - // "#fff1" - // ); + openEditorAndRevealRange(filepath, range).then((editor) => { + // Select the lines + editor.selection = new vscode.Selection( + new vscode.Position(startLine, 0), + new vscode.Position(endLine, 0), + ); }); } diff --git a/gui/src/components/markdown/LinkableCode.tsx b/gui/src/components/markdown/LinkableCode.tsx index 8f323a003..24c85426d 100644 --- a/gui/src/components/markdown/LinkableCode.tsx +++ b/gui/src/components/markdown/LinkableCode.tsx @@ -1,3 +1,4 @@ +import { RangeInFile } from "core"; import { useContext, useEffect, useState } from "react"; import { useSelector } from "react-redux"; import styled from "styled-components"; @@ -24,14 +25,13 @@ function LinkableCode(props: any) { const [linkingDone, setLinkingDone] = useState(false); const [isLink, setIsLink] = useState(false); - const [filepath, setFilepath] = useState(""); - const [line, setLine] = useState(0); + const [rif, setRif] = useState(undefined); useEffect(() => { if (linkingDone) return; setLinkingDone(true); - // Get filename from props.children + // Get content of the code tag let content: string | undefined = undefined; if (typeof props.children === "string") { content = props.children; @@ -44,7 +44,7 @@ function LinkableCode(props: any) { } if (!content) return; - // Check if this is a real file + // Match filepath with context items const contextItemFileMatch = contextItems.find( (item) => ["file", "codebase", "folder"].includes(item.id.providerTitle) && @@ -58,38 +58,89 @@ function LinkableCode(props: any) { .split(" (")[1] .split(")")[0] .split("-"); - setFilepath(contextItemFileMatch.description.split(" (")[0]); - setLine(parseInt(startLine)); + const filepath = contextItemFileMatch.description.split(" (")[0]; + setRif({ + filepath, + range: { + start: { + line: 0, + character: 0, + }, + end: { + line: 0, + character: 0, + }, + }, + }); + return; } else { - setFilepath(contextItemFileMatch.description.split(" (")[0]); - setLine(0); + // If no line number, just open the file + setRif({ + filepath: contextItemFileMatch.description.split(" (")[0], + range: { + start: { + line: 0, + character: 0, + }, + end: { + line: 0, + character: 0, + }, + }, + }); + return; } } - if (content.length > 6) { + // Try to match the content with a line in a file + if (content.length > 8) { const contextItemContentMatch = contextItems.find( (item) => ["file", "codebase", "folder"].includes(item.id.providerTitle) && item.content.includes(content), ); if (contextItemContentMatch) { + const line = contextItemContentMatch.content + .split("\n") + .slice(1) // code block fence + .findIndex((line) => line.includes(content)); + + const [filepath, rest] = + contextItemContentMatch.description.split(" ("); + const [startLine, endLine] = rest.split(")")[0]?.split("-") || [ + "0", + "0", + ]; + const start = parseInt(startLine); + const end = parseInt(endLine); + setIsLink(true); - setFilepath(contextItemContentMatch.description.split(" (")[0]); - setLine( - contextItemContentMatch.content - .split("\n") - .findIndex((line) => line.includes(content)) + 1, - ); + setRif({ + filepath, + range: { + start: { + line: start + line, + character: 0, + }, + end: { + line: start + line + 1, + character: 0, + }, + }, + }); + + console.log("MATCH: ", content, contextItemContentMatch, line); } } }, [linkingDone, contextItems]); const onClick = () => { if (!isLink) return; + if (!rif) return; ideMessenger.post("showLines", { - filepath, - startLine: line, - endLine: line + 1, + filepath: rif.filepath, + startLine: rif.range.start.line, + endLine: rif.range.end.line, }); }; From 5a7083ba544fdc1b7f38ebfd3d12666b74055295 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 14 Jun 2024 16:30:34 -0700 Subject: [PATCH 03/29] =?UTF-8?q?=E2=9C=A8=20new=20prompt=20file=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 11 +++- core/config/promptFile.ts | 57 +++++++++++++++++++ core/core.ts | 7 +++ core/protocol/core.ts | 1 + core/protocol/passThrough.ts | 1 + .../toolWindow/ContinueBrowser.kt | 1 + gui/src/components/mainInput/TipTapEditor.tsx | 1 + gui/src/components/mainInput/getSuggestion.ts | 21 ++++++- 8 files changed, 96 insertions(+), 4 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 8dd708b7e..0745614d7 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -54,7 +54,11 @@ import { defaultSlashCommandsJetBrains, defaultSlashCommandsVscode, } from "./default.js"; -import { getPromptFiles, slashCommandFromPromptFile } from "./promptFile.js"; +import { + DEFAULT_PROMPTS_FOLDER, + getPromptFiles, + slashCommandFromPromptFile, +} from "./promptFile.js"; const { execSync } = require("child_process"); function resolveSerializedConfig(filepath: string): SerializedContinueConfig { @@ -171,7 +175,10 @@ async function serializedToIntermediateConfig( promptFiles = ( await Promise.all( workspaceDirs.map((dir) => - getPromptFiles(ide, path.join(dir, promptFolder ?? ".prompts")), + getPromptFiles( + ide, + path.join(dir, promptFolder ?? DEFAULT_PROMPTS_FOLDER), + ), ), ) ) diff --git a/core/config/promptFile.ts b/core/config/promptFile.ts index 9fa66c892..e537dd4d5 100644 --- a/core/config/promptFile.ts +++ b/core/config/promptFile.ts @@ -1,9 +1,12 @@ +import path from "path"; import * as YAML from "yaml"; import type { IDE, SlashCommand } from ".."; import { stripImages } from "../llm/countTokens.js"; import { renderTemplatedString } from "../llm/llms/index.js"; import { getBasename } from "../util/index.js"; +export const DEFAULT_PROMPTS_FOLDER = ".prompts"; + export async function getPromptFiles( ide: IDE, dir: string, @@ -21,6 +24,60 @@ export async function getPromptFiles( } } +const DEFAULT_PROMPT_FILE = `# This is an example ".prompt" file +# It is used to define and reuse prompts within Continue +# Continue will automatically create a slash command for each prompt in the .prompts folder +# To learn more, see the full .prompt file reference: https://docs.continue.dev/walkthroughs/prompt-files +temperature: 0.0 +--- +{{{ diff }}} + +Give me feedback on the above changes. For each file, you should output a markdown section including the following: +- If you found any problems, an h3 like "❌ " +- If you didn't find any problems, an h3 like "✅ " +- If you found any problems, add below a bullet point description of what you found, including a minimal code snippet explaining how to fix it +- If you didn't find any problems, you don't need to add anything else + +Here is an example. The example is surrounded in backticks, but your response should not be: + +\`\`\` +### ✅ + +### ❌ + + +\`\`\` + +You should look primarily for the following types of issues, and only mention other problems if they are highly pressing. + +- console.logs that have been left after debugging +- repeated code +- algorithmic errors that could fail under edge cases +- something that could be refactored + +Make sure to review ALL files that were changed, do not skip any. +`; + +export async function createNewPromptFile( + ide: IDE, + promptPath: string | undefined, +): Promise { + const workspaceDirs = await ide.getWorkspaceDirs(); + if (workspaceDirs.length === 0) { + throw new Error( + "No workspace directories found. Make sure you've opened a folder in your IDE.", + ); + } + const promptFilePath = path.join( + workspaceDirs[0], + promptPath ?? DEFAULT_PROMPTS_FOLDER, + "new-prompt-file.prompt", + ); + + await ide.writeFile(promptFilePath, DEFAULT_PROMPT_FILE); + await ide.openFile(promptFilePath); +} + export function slashCommandFromPromptFile( path: string, content: string, diff --git a/core/core.ts b/core/core.ts index 8aa577251..5bc049255 100644 --- a/core/core.ts +++ b/core/core.ts @@ -14,6 +14,7 @@ import { setupLocalMode, setupOptimizedExistingUserMode, } from "./config/onboarding.js"; +import { createNewPromptFile } from "./config/promptFile"; import { addModel, addOpenAIKey, deleteModel } from "./config/util.js"; import { ContinueServerClient } from "./continueServer/stubs/client.js"; import { indexDocs } from "./indexing/docs/index.js"; @@ -190,6 +191,12 @@ export class Core { deleteModel(msg.data.title); this.configHandler.reloadConfig(); }); + on("config/newPromptFile", async (msg) => { + createNewPromptFile( + this.ide, + (await this.config()).experimental?.promptPath, + ); + }); on("config/reload", (msg) => { this.configHandler.reloadConfig(); return this.configHandler.getSerializedConfig(); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 977e4edcd..995c6a961 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -45,6 +45,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { { model: SerializedContinueConfig["models"][number] }, void, ]; + "config/newPromptFile": [undefined, void]; "config/ideSettingsUpdate": [IdeSettings, void]; "config/getBrowserSerialized": [undefined, BrowserSerializedContinueConfig]; "config/deleteModel": [{ title: string }, void]; diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 441659823..9e22bda32 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -16,6 +16,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "devdata/log", "config/addOpenAiKey", "config/addModel", + "config/newPromptFile", "config/ideSettingsUpdate", "config/getBrowserSerialized", "config/deleteModel", diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index 159e8471f..e230658fa 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -48,6 +48,7 @@ class ContinueBrowser(val project: Project, url: String, useOsr: Boolean = false "config/ideSettingsUpdate", "config/getBrowserSerialized", "config/deleteModel", + "config/newPromptFile", "config/reload", "context/getContextItems", "context/loadSubmenuItems", diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 19dea7770..04e3f8c62 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -374,6 +374,7 @@ function TipTapEditor(props: TipTapEditorProps) { availableSlashCommandsRef, onClose, onOpen, + ideMessenger, ), renderText: (props) => { return props.node.attrs.label; diff --git a/gui/src/components/mainInput/getSuggestion.ts b/gui/src/components/mainInput/getSuggestion.ts index 5e7dd605b..7fb953b10 100644 --- a/gui/src/components/mainInput/getSuggestion.ts +++ b/gui/src/components/mainInput/getSuggestion.ts @@ -161,10 +161,26 @@ export function getCommandSuggestion( availableSlashCommandsRef: MutableRefObject, onClose: () => void, onOpen: () => void, + ideMessenger: IIdeMessenger, ) { const items = async ({ query }) => { + const options = [ + ...availableSlashCommandsRef.current, + { + title: "Build a custom prompt", + description: "Build a custom prompt", + type: "action", + id: "createPromptFile", + label: "Create Prompt File", + action: () => { + console.log("I", ideMessenger.request); + ideMessenger.request("config/newPromptFile", undefined); + }, + name: "Create Prompt File", + }, + ]; return ( - availableSlashCommandsRef.current?.filter((slashCommand) => { + options.filter((slashCommand) => { const sc = slashCommand.title.substring(1).toLowerCase(); const iv = query.toLowerCase(); return sc.startsWith(iv); @@ -175,7 +191,8 @@ export function getCommandSuggestion( id: provider.title, title: provider.title, label: provider.title, - type: "slashCommand" as ComboBoxItemType, + type: (provider.type ?? "slashCommand") as ComboBoxItemType, + action: provider.action, })); }; return getSuggestion(items, undefined, onClose, onOpen); From f97573e77ee3f7073142ceca9da30a7de07562d0 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 16 Jun 2024 19:15:22 -0700 Subject: [PATCH 04/29] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20strip=20?= =?UTF-8?q?=20from=20GPT-4=20completion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/completionProvider.ts | 2 ++ core/autocomplete/lineStream.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 3590a2383..873515bf5 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -38,6 +38,7 @@ import { AutocompleteLanguageInfo } from "./languages.js"; import { avoidPathLine, noTopLevelKeywordsMidline, + skipPrefixes, stopAtLines, stopAtRepeatingLines, stopAtSimilarLine, @@ -407,6 +408,7 @@ export async function getTabCompletion( lineGenerator = stopAtLines(lineGenerator, fullStop); lineGenerator = stopAtRepeatingLines(lineGenerator, fullStop); lineGenerator = avoidPathLine(lineGenerator, lang.singleLineComment); + lineGenerator = skipPrefixes(lineGenerator); lineGenerator = noTopLevelKeywordsMidline( lineGenerator, lang.topLevelKeywords, diff --git a/core/autocomplete/lineStream.ts b/core/autocomplete/lineStream.ts index 3f552e5f5..14d4c4ab7 100644 --- a/core/autocomplete/lineStream.ts +++ b/core/autocomplete/lineStream.ts @@ -121,6 +121,22 @@ export async function* stopAtLines( } } +const PREFIXES_TO_SKIP = [""]; +export async function* skipPrefixes(lines: LineStream): LineStream { + let isFirstLine = true; + for await (const line of lines) { + if (isFirstLine) { + const match = PREFIXES_TO_SKIP.find((prefix) => line.startsWith(prefix)); + if (match) { + yield line.slice(match.length); + continue; + } + isFirstLine = false; + } + yield line; + } +} + const LINES_TO_SKIP = [""]; export async function* skipLines(stream: LineStream): LineStream { From c8709c299fc9d3e37cd87745ff67c8add4e80eab Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 17 Jun 2024 17:34:45 -0700 Subject: [PATCH 05/29] continue proxy FIM support --- core/llm/llms/Mistral.ts | 40 +--------------------------- core/llm/llms/OpenAI.ts | 32 ++++++++++++++++++++++ core/llm/llms/stubs/ContinueProxy.ts | 4 +++ 3 files changed, 37 insertions(+), 39 deletions(-) diff --git a/core/llm/llms/Mistral.ts b/core/llm/llms/Mistral.ts index d05615db8..fee8fadac 100644 --- a/core/llm/llms/Mistral.ts +++ b/core/llm/llms/Mistral.ts @@ -1,10 +1,4 @@ -import { - ChatMessage, - CompletionOptions, - LLMOptions, - ModelProvider, -} from "../../index.js"; -import { streamSse } from "../stream.js"; +import { ChatMessage, LLMOptions, ModelProvider } from "../../index.js"; import { gptEditPrompt } from "../templates/edit.js"; import OpenAI from "./OpenAI.js"; @@ -47,38 +41,6 @@ class Mistral extends OpenAI { supportsFim(): boolean { return true; } - - async *_streamFim( - prefix: string, - suffix: string, - options: CompletionOptions, - ): AsyncGenerator { - const endpoint = new URL("fim/completions", this.apiBase); - const resp = await this.fetch(endpoint, { - method: "POST", - body: JSON.stringify({ - model: options.model, - prompt: prefix, - suffix, - max_tokens: options.maxTokens, - temperature: options.temperature, - top_p: options.topP, - frequency_penalty: options.frequencyPenalty, - presence_penalty: options.presencePenalty, - stop: options.stop, - stream: true, - }), - headers: { - "Content-Type": "application/json", - Accept: "application/json", - "x-api-key": this.apiKey ?? "", - Authorization: `Bearer ${this.apiKey}`, - }, - }); - for await (const chunk of streamSse(resp)) { - yield chunk.choices[0].delta.content; - } - } } export default Mistral; diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index d05c3315c..08b728f2f 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -226,6 +226,38 @@ class OpenAI extends BaseLLM { } } + async *_streamFim( + prefix: string, + suffix: string, + options: CompletionOptions, + ): AsyncGenerator { + const endpoint = new URL("fim/completions", this.apiBase); + const resp = await this.fetch(endpoint, { + method: "POST", + body: JSON.stringify({ + model: options.model, + prompt: prefix, + suffix, + max_tokens: options.maxTokens, + temperature: options.temperature, + top_p: options.topP, + frequency_penalty: options.frequencyPenalty, + presence_penalty: options.presencePenalty, + stop: options.stop, + stream: true, + }), + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "x-api-key": this.apiKey ?? "", + Authorization: `Bearer ${this.apiKey}`, + }, + }); + for await (const chunk of streamSse(resp)) { + yield chunk.choices[0].delta.content; + } + } + async listModels(): Promise { const response = await this.fetch(this._getEndpoint("models"), { method: "GET", diff --git a/core/llm/llms/stubs/ContinueProxy.ts b/core/llm/llms/stubs/ContinueProxy.ts index 8db6b4518..f23ea35cc 100644 --- a/core/llm/llms/stubs/ContinueProxy.ts +++ b/core/llm/llms/stubs/ContinueProxy.ts @@ -6,6 +6,10 @@ class ContinueProxy extends OpenAI { static defaultOptions: Partial = { apiBase: "http://localhost:3000/proxy/v1", }; + + supportsFim(): boolean { + return true; + } } export default ContinueProxy; From 82f032912456501df6c045642ff0a2635d39fe39 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 19 Jun 2024 10:11:15 -0700 Subject: [PATCH 06/29] warn user if potentially dangerous command is generated --- core/commands/slash/cmd.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/commands/slash/cmd.ts b/core/commands/slash/cmd.ts index 797bd9826..c171384bd 100644 --- a/core/commands/slash/cmd.ts +++ b/core/commands/slash/cmd.ts @@ -2,6 +2,14 @@ import { streamLines } from "../../diff/util.js"; import { SlashCommand } from "../../index.js"; import { removeQuotesAndEscapes } from "../../util/index.js"; +function commandIsPotentiallyDangerous(command: string) { + return ( + command.includes("rm -rf") || + command.includes("sudo") || + command.includes("cd / ") + ); +} + const GenerateTerminalCommand: SlashCommand = { name: "cmd", description: "Generate a shell command", @@ -35,8 +43,12 @@ Please write a shell command that will do what the user requested. Your output s break; } - await ide.runCommand(cmd); yield `Generated shell command: ${cmd}`; + if (commandIsPotentiallyDangerous(cmd)) { + yield "\n\nWarning: This command may be potentially dangerous. Please double-check before pasting it in your terminal."; + } else { + await ide.runCommand(cmd); + } }, }; From 07f682e7fdc91a9d9ab3bb6dc02c4761d1984db3 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 19 Jun 2024 11:37:41 -0700 Subject: [PATCH 07/29] tab autocomplete docs --- docs/docs/walkthroughs/tab-autocomplete.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index 4790808d9..959384f72 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -89,7 +89,7 @@ This is just another object like the ones in the `"models"` array of `config.jso ### `tabAutocompleteOptions` -This object allows you to customize the behavior of tab-autocomplete. The available options are: +This object allows you to customize the behavior of tab-autocomplete. The available options are shown below, and you can find their default values [here](https://github.com/continuedev/continue/blob/fbeb2e4fe15d4b434a30a136f74b672485c852d9/core/util/parameters.ts). - `disable`: Disable autocomplete (can also be done from IDE settings) - `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String) From a6ff923ddecab7d3fecad58d9e56d88614d244c4 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 20 Jun 2024 15:16:12 -0500 Subject: [PATCH 08/29] docs: update PR template (#1531) --- .github/pull_request_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 83dbcefd8..4bb4e6de4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,4 +4,5 @@ ## Checklist -- [ ] The base branch of this PR is `preview`, rather than `main` +- [ ] The base branch of this PR is `dev`, rather than `main` +- [ ] The relevant docs, if any, have been updated or created From 5876649991ae87aa5f04f746ad4b55ff4d6b3c59 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 20 Jun 2024 16:50:10 -0500 Subject: [PATCH 09/29] chore: add docs to install script (#1533) --- .vscode/tasks.json | 10 + docs/package-lock.json | 1350 +++++++++++++-------------- docs/package.json | 6 +- extensions/vscode/package-lock.json | 4 +- extensions/vscode/package.json | 2 +- scripts/install-dependencies.ps1 | 3 + scripts/install-dependencies.sh | 13 +- 7 files changed, 662 insertions(+), 726 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 19992f866..e1fa3e1b3 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -154,6 +154,16 @@ "options": { "cwd": "binary" } + }, + { + "label": "docs:start", + "type": "shell", + "command": "npm", + "args": ["run", "start"], + "problemMatcher": [], + "options": { + "cwd": "docs" + } } ] } diff --git a/docs/package-lock.json b/docs/package-lock.json index c1cba2aef..68e4cd8fa 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,9 +8,9 @@ "name": "continue-docs", "version": "0.0.0", "dependencies": { - "@docusaurus/core": "^3.2.1", - "@docusaurus/plugin-client-redirects": "^3.2.1", - "@docusaurus/preset-classic": "^3.2.1", + "@docusaurus/core": "^3.4.0", + "@docusaurus/plugin-client-redirects": "^3.4.0", + "@docusaurus/preset-classic": "^3.4.0", "@mdx-js/react": "^3.0.0", "clsx": "^2.1.0", "docusaurus-json-schema-plugin": "^1.11.0", @@ -548,9 +548,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", "engines": { "node": ">=6.9.0" } @@ -1625,11 +1625,11 @@ } }, "node_modules/@babel/plugin-transform-react-constant-elements": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.23.3.tgz", - "integrity": "sha512-zP0QKq/p6O42OL94udMgSfKXyse4RyJ0JqbQ34zDAONWjyrEsghYEyTSK5FIpmXmCpB55SHokL1cRRKHv8L2Qw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.24.7.tgz", + "integrity": "sha512-7LidzZfUXyfZ8/buRW6qIIHBY8wAZ1OrY9c/wTr8YhZ6vMPo+Uc/CVFLYY1spZrEQlD4w5u8wjqk5NQ3OVqQKA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -2181,9 +2181,9 @@ } }, "node_modules/@docusaurus/core": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.2.1.tgz", - "integrity": "sha512-ZeMAqNvy0eBv2dThEeMuNzzuu+4thqMQakhxsgT5s02A8LqRcdkg+rbcnuNqUIpekQ4GRx3+M5nj0ODJhBXo9w==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.4.0.tgz", + "integrity": "sha512-g+0wwmN2UJsBqy2fQRQ6fhXruoEa62JDeEa5d8IdTJlMoaDaEDfHh7WjwGRn4opuTQWpjAwP/fbcgyHKlE+64w==", "dependencies": { "@babel/core": "^7.23.3", "@babel/generator": "^7.23.3", @@ -2195,14 +2195,12 @@ "@babel/runtime": "^7.22.6", "@babel/runtime-corejs3": "^7.22.6", "@babel/traverse": "^7.22.8", - "@docusaurus/cssnano-preset": "3.2.1", - "@docusaurus/logger": "3.2.1", - "@docusaurus/mdx-loader": "3.2.1", - "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", - "@svgr/webpack": "^6.5.1", + "@docusaurus/cssnano-preset": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "autoprefixer": "^10.4.14", "babel-loader": "^9.1.3", "babel-plugin-dynamic-import-node": "^2.3.3", @@ -2216,8 +2214,8 @@ "copy-webpack-plugin": "^11.0.0", "core-js": "^3.31.1", "css-loader": "^6.8.1", - "css-minimizer-webpack-plugin": "^4.2.2", - "cssnano": "^5.1.15", + "css-minimizer-webpack-plugin": "^5.0.1", + "cssnano": "^6.1.2", "del": "^6.1.1", "detect-port": "^1.5.1", "escape-html": "^1.0.3", @@ -2237,7 +2235,7 @@ "prompts": "^2.4.2", "react-dev-utils": "^12.0.1", "react-helmet-async": "^1.3.0", - "react-loadable": "npm:@docusaurus/react-loadable@5.5.2", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", "react-loadable-ssr-addon-v5-slorber": "^1.0.1", "react-router": "^5.3.4", "react-router-config": "^5.1.1", @@ -2268,13 +2266,13 @@ } }, "node_modules/@docusaurus/cssnano-preset": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.2.1.tgz", - "integrity": "sha512-wTL9KuSSbMJjKrfu385HZEzAoamUsbKqwscAQByZw4k6Ja/RWpqgVvt/CbAC+aYEH6inLzOt+MjuRwMOrD3VBA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.4.0.tgz", + "integrity": "sha512-qwLFSz6v/pZHy/UP32IrprmH5ORce86BGtN0eBtG75PpzQJAzp9gefspox+s8IEOr0oZKuQ/nhzZ3xwyc3jYJQ==", "dependencies": { - "cssnano-preset-advanced": "^5.3.10", - "postcss": "^8.4.26", - "postcss-sort-media-queries": "^4.4.1", + "cssnano-preset-advanced": "^6.1.2", + "postcss": "^8.4.38", + "postcss-sort-media-queries": "^5.2.0", "tslib": "^2.6.0" }, "engines": { @@ -2282,9 +2280,9 @@ } }, "node_modules/@docusaurus/logger": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.2.1.tgz", - "integrity": "sha512-0voOKJCn9RaM3np6soqEfo7SsVvf2C+CDTWhW+H/1AyBhybASpExtDEz+7ECck9TwPzFQ5tt+I3zVugUJbJWDg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.4.0.tgz", + "integrity": "sha512-bZwkX+9SJ8lB9kVRkXw+xvHYSMGG4bpYHKGXeXFvyVc79NMeeBSGgzd4TQLHH+DYeOJoCdl8flrFJVxlZ0wo/Q==", "dependencies": { "chalk": "^4.1.2", "tslib": "^2.6.0" @@ -2294,13 +2292,13 @@ } }, "node_modules/@docusaurus/mdx-loader": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.2.1.tgz", - "integrity": "sha512-Fs8tXhXKZjNkdGaOy1xSLXSwfjCMT73J3Zfrju2U16uGedRFRjgK0ojpK5tiC7TnunsL3tOFgp1BSMBRflX9gw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.4.0.tgz", + "integrity": "sha512-kSSbrrk4nTjf4d+wtBA9H+FGauf2gCax89kV8SUSJu3qaTdSIKdWERlngsiHaCFgZ7laTJ8a67UFf+xlFPtuTw==", "dependencies": { - "@docusaurus/logger": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "@mdx-js/mdx": "^3.0.0", "@slorber/remark-comment": "^1.0.0", "escape-html": "^1.0.3", @@ -2332,18 +2330,17 @@ } }, "node_modules/@docusaurus/module-type-aliases": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.2.1.tgz", - "integrity": "sha512-FyViV5TqhL1vsM7eh29nJ5NtbRE6Ra6LP1PDcPvhwPSlA7eiWGRKAn3jWwMUcmjkos5SYY+sr0/feCdbM3eQHQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.4.0.tgz", + "integrity": "sha512-A1AyS8WF5Bkjnb8s+guTDuYmUiwJzNrtchebBHpc0gz0PyHJNMaybUlSrmJjHVcGrya0LKI4YcR3lBDQfXRYLw==", "dependencies": { - "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/types": "3.2.1", + "@docusaurus/types": "3.4.0", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", "@types/react-router-dom": "*", "react-helmet-async": "*", - "react-loadable": "npm:@docusaurus/react-loadable@5.5.2" + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0" }, "peerDependencies": { "react": "*", @@ -2351,15 +2348,15 @@ } }, "node_modules/@docusaurus/plugin-client-redirects": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.2.1.tgz", - "integrity": "sha512-GgzuqwbqNQSP5s/ouUrOQFuHI8m4Rn8a5CHuWkwpqj+5lbQMsABcvsoiWjrH9M00CzN48q+slSbJy7rtHjn7zg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.4.0.tgz", + "integrity": "sha512-Pr8kyh/+OsmYCvdZhc60jy/FnrY6flD2TEAhl4rJxeVFxnvvRgEhoaIVX8q9MuJmaQoh6frPk94pjs7/6YgBDQ==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/logger": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "eta": "^2.2.0", "fs-extra": "^11.1.1", "lodash": "^4.17.21", @@ -2374,17 +2371,17 @@ } }, "node_modules/@docusaurus/plugin-content-blog": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.2.1.tgz", - "integrity": "sha512-lOx0JfhlGZoZu6pEJfeEpSISZR5dQbJGGvb42IP13G5YThNHhG9R9uoWuo4IOimPqBC7sHThdLA3VLevk61Fsw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.4.0.tgz", + "integrity": "sha512-vv6ZAj78ibR5Jh7XBUT4ndIjmlAxkijM3Sx5MAAzC1gyv0vupDQNhzuFg1USQmQVj3P5I6bquk12etPV3LJ+Xw==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/logger": "3.2.1", - "@docusaurus/mdx-loader": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "cheerio": "^1.0.0-rc.12", "feed": "^4.2.2", "fs-extra": "^11.1.1", @@ -2405,18 +2402,18 @@ } }, "node_modules/@docusaurus/plugin-content-docs": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.2.1.tgz", - "integrity": "sha512-GHe5b/lCskAR8QVbfWAfPAApvRZgqk7FN3sOHgjCtjzQACZxkHmq6QqyqZ8Jp45V7lVck4wt2Xw2IzBJ7Cz3bA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.4.0.tgz", + "integrity": "sha512-HkUCZffhBo7ocYheD9oZvMcDloRnGhBMOZRyVcAQRFmZPmNqSyISlXA1tQCIxW+r478fty97XXAGjNYzBjpCsg==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/logger": "3.2.1", - "@docusaurus/mdx-loader": "3.2.1", - "@docusaurus/module-type-aliases": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "@types/react-router-config": "^5.0.7", "combine-promises": "^1.1.0", "fs-extra": "^11.1.1", @@ -2435,15 +2432,15 @@ } }, "node_modules/@docusaurus/plugin-content-pages": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.2.1.tgz", - "integrity": "sha512-TOqVfMVTAHqWNEGM94Drz+PUpHDbwFy6ucHFgyTx9zJY7wPNSG5EN+rd/mU7OvAi26qpOn2o9xTdUmb28QLjEQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.4.0.tgz", + "integrity": "sha512-h2+VN/0JjpR8fIkDEAoadNjfR3oLzB+v1qSXbIAKjQ46JAHx3X22n9nqS+BWSQnTnp1AjkjSvZyJMekmcwxzxg==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/mdx-loader": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "fs-extra": "^11.1.1", "tslib": "^2.6.0", "webpack": "^5.88.1" @@ -2457,13 +2454,13 @@ } }, "node_modules/@docusaurus/plugin-debug": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.2.1.tgz", - "integrity": "sha512-AMKq8NuUKf2sRpN1m/sIbqbRbnmk+rSA+8mNU1LNxEl9BW9F/Gng8m9HKlzeyMPrf5XidzS1jqkuTLDJ6KIrFw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.4.0.tgz", + "integrity": "sha512-uV7FDUNXGyDSD3PwUaf5YijX91T5/H9SX4ErEcshzwgzWwBtK37nUWPU3ZLJfeTavX3fycTOqk9TglpOLaWkCg==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", "fs-extra": "^11.1.1", "react-json-view-lite": "^1.2.0", "tslib": "^2.6.0" @@ -2477,13 +2474,13 @@ } }, "node_modules/@docusaurus/plugin-google-analytics": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.2.1.tgz", - "integrity": "sha512-/rJ+9u+Px0eTCiF4TNcNtj3kHf8cp6K1HCwOTdbsSlz6Xn21syZYcy+f1VM9wF6HrvUkXUcbM5TDCvg2IRL6bQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.4.0.tgz", + "integrity": "sha512-mCArluxEGi3cmYHqsgpGGt3IyLCrFBxPsxNZ56Mpur0xSlInnIHoeLDH7FvVVcPJRPSQ9/MfRqLsainRw+BojA==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "tslib": "^2.6.0" }, "engines": { @@ -2495,13 +2492,13 @@ } }, "node_modules/@docusaurus/plugin-google-gtag": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.2.1.tgz", - "integrity": "sha512-XtuJnlMvYfppeVdUyKiDIJAa/gTJKCQU92z8CLZZ9ibJdgVjFOLS10s0hIC0eL5z0U2u2loJz2rZ63HOkNHbBA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.4.0.tgz", + "integrity": "sha512-Dsgg6PLAqzZw5wZ4QjUYc8Z2KqJqXxHxq3vIoyoBWiLEEfigIs7wHR+oiWUQy3Zk9MIk6JTYj7tMoQU0Jm3nqA==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "@types/gtag.js": "^0.0.12", "tslib": "^2.6.0" }, @@ -2514,13 +2511,13 @@ } }, "node_modules/@docusaurus/plugin-google-tag-manager": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.2.1.tgz", - "integrity": "sha512-wiS/kE0Ny5pnjTxVCs8ljRnkL1RVMj59t6jmSsgEX7piDOoaXSMIUaoIt9ogS/v132uO0xEsxHstkRUZHQyPcQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.4.0.tgz", + "integrity": "sha512-O9tX1BTwxIhgXpOLpFDueYA9DWk69WCbDRrjYoMQtFHSkTyE7RhNgyjSPREUWJb9i+YUg3OrsvrBYRl64FCPCQ==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "tslib": "^2.6.0" }, "engines": { @@ -2532,16 +2529,16 @@ } }, "node_modules/@docusaurus/plugin-sitemap": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.2.1.tgz", - "integrity": "sha512-uWZ7AxzdeaQSTCwD2yZtOiEm9zyKU+wqCmi/Sf25kQQqqFSBZUStXfaQ8OHP9cecnw893ZpZ811rPhB/wfujJw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.4.0.tgz", + "integrity": "sha512-+0VDvx9SmNrFNgwPoeoCha+tRoAjopwT0+pYO1xAbyLcewXSemq+eLxEa46Q1/aoOaJQ0qqHELuQM7iS2gp33Q==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/logger": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "fs-extra": "^11.1.1", "sitemap": "^7.1.1", "tslib": "^2.6.0" @@ -2555,23 +2552,23 @@ } }, "node_modules/@docusaurus/preset-classic": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.2.1.tgz", - "integrity": "sha512-E3OHSmttpEBcSMhfPBq3EJMBxZBM01W1rnaCUTXy9EHvkmB5AwgTfW1PwGAybPAX579ntE03R+2zmXdizWfKnQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.4.0.tgz", + "integrity": "sha512-Ohj6KB7siKqZaQhNJVMBBUzT3Nnp6eTKqO+FXO3qu/n1hJl3YLwVKTWBg28LF7MWrKu46UuYavwMRxud0VyqHg==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/plugin-content-blog": "3.2.1", - "@docusaurus/plugin-content-docs": "3.2.1", - "@docusaurus/plugin-content-pages": "3.2.1", - "@docusaurus/plugin-debug": "3.2.1", - "@docusaurus/plugin-google-analytics": "3.2.1", - "@docusaurus/plugin-google-gtag": "3.2.1", - "@docusaurus/plugin-google-tag-manager": "3.2.1", - "@docusaurus/plugin-sitemap": "3.2.1", - "@docusaurus/theme-classic": "3.2.1", - "@docusaurus/theme-common": "3.2.1", - "@docusaurus/theme-search-algolia": "3.2.1", - "@docusaurus/types": "3.2.1" + "@docusaurus/core": "3.4.0", + "@docusaurus/plugin-content-blog": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/plugin-content-pages": "3.4.0", + "@docusaurus/plugin-debug": "3.4.0", + "@docusaurus/plugin-google-analytics": "3.4.0", + "@docusaurus/plugin-google-gtag": "3.4.0", + "@docusaurus/plugin-google-tag-manager": "3.4.0", + "@docusaurus/plugin-sitemap": "3.4.0", + "@docusaurus/theme-classic": "3.4.0", + "@docusaurus/theme-common": "3.4.0", + "@docusaurus/theme-search-algolia": "3.4.0", + "@docusaurus/types": "3.4.0" }, "engines": { "node": ">=18.0" @@ -2581,35 +2578,23 @@ "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/react-loadable": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz", - "integrity": "sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==", - "dependencies": { - "@types/react": "*", - "prop-types": "^15.6.2" - }, - "peerDependencies": { - "react": "*" - } - }, "node_modules/@docusaurus/theme-classic": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.2.1.tgz", - "integrity": "sha512-+vSbnQyoWjc6vRZi4vJO2dBU02wqzynsai15KK+FANZudrYaBHtkbLZAQhgmxzBGVpxzi87gRohlMm+5D8f4tA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.4.0.tgz", + "integrity": "sha512-0IPtmxsBYv2adr1GnZRdMkEQt1YW6tpzrUPj02YxNpvJ5+ju4E13J5tB4nfdaen/tfR1hmpSPlTFPvTf4kwy8Q==", "dependencies": { - "@docusaurus/core": "3.2.1", - "@docusaurus/mdx-loader": "3.2.1", - "@docusaurus/module-type-aliases": "3.2.1", - "@docusaurus/plugin-content-blog": "3.2.1", - "@docusaurus/plugin-content-docs": "3.2.1", - "@docusaurus/plugin-content-pages": "3.2.1", - "@docusaurus/theme-common": "3.2.1", - "@docusaurus/theme-translations": "3.2.1", - "@docusaurus/types": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/plugin-content-blog": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/plugin-content-pages": "3.4.0", + "@docusaurus/theme-common": "3.4.0", + "@docusaurus/theme-translations": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "copy-text-to-clipboard": "^3.2.0", @@ -2633,17 +2618,17 @@ } }, "node_modules/@docusaurus/theme-common": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.2.1.tgz", - "integrity": "sha512-d+adiD7L9xv6EvfaAwUqdKf4orsM3jqgeqAM+HAjgL/Ux0GkVVnfKr+tsoe+4ow4rHe6NUt+nkkW8/K8dKdilA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.4.0.tgz", + "integrity": "sha512-0A27alXuv7ZdCg28oPE8nH/Iz73/IUejVaCazqu9elS4ypjiLhK3KfzdSQBnL/g7YfHSlymZKdiOHEo8fJ0qMA==", "dependencies": { - "@docusaurus/mdx-loader": "3.2.1", - "@docusaurus/module-type-aliases": "3.2.1", - "@docusaurus/plugin-content-blog": "3.2.1", - "@docusaurus/plugin-content-docs": "3.2.1", - "@docusaurus/plugin-content-pages": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/plugin-content-blog": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/plugin-content-pages": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2662,18 +2647,18 @@ } }, "node_modules/@docusaurus/theme-search-algolia": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.2.1.tgz", - "integrity": "sha512-bzhCrpyXBXzeydNUH83II2akvFEGfhsNTPPWsk5N7e+odgQCQwoHhcF+2qILbQXjaoZ6B3c48hrvkyCpeyqGHw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.4.0.tgz", + "integrity": "sha512-aiHFx7OCw4Wck1z6IoShVdUWIjntC8FHCw9c5dR8r3q4Ynh+zkS8y2eFFunN/DL6RXPzpnvKCg3vhLQYJDmT9Q==", "dependencies": { "@docsearch/react": "^3.5.2", - "@docusaurus/core": "3.2.1", - "@docusaurus/logger": "3.2.1", - "@docusaurus/plugin-content-docs": "3.2.1", - "@docusaurus/theme-common": "3.2.1", - "@docusaurus/theme-translations": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-validation": "3.2.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/theme-common": "3.4.0", + "@docusaurus/theme-translations": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "algoliasearch": "^4.18.0", "algoliasearch-helper": "^3.13.3", "clsx": "^2.0.0", @@ -2692,9 +2677,9 @@ } }, "node_modules/@docusaurus/theme-translations": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.2.1.tgz", - "integrity": "sha512-jAUMkIkFfY+OAhJhv6mV8zlwY6J4AQxJPTgLdR2l+Otof9+QdJjHNh/ifVEu9q0lp3oSPlJj9l05AaP7Ref+cg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.4.0.tgz", + "integrity": "sha512-zSxCSpmQCCdQU5Q4CnX/ID8CSUUI3fvmq4hU/GNP/XoAWtXo9SAVnM3TzpU8Gb//H3WCsT8mJcTfyOk3d9ftNg==", "dependencies": { "fs-extra": "^11.1.1", "tslib": "^2.6.0" @@ -2704,9 +2689,9 @@ } }, "node_modules/@docusaurus/types": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.2.1.tgz", - "integrity": "sha512-n/toxBzL2oxTtRTOFiGKsHypzn/Pm+sXyw+VSk1UbqbXQiHOwHwts55bpKwbcUgA530Is6kix3ELiFOv9GAMfw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "dependencies": { "@mdx-js/mdx": "^3.0.0", "@types/history": "^4.7.11", @@ -2724,13 +2709,13 @@ } }, "node_modules/@docusaurus/utils": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.2.1.tgz", - "integrity": "sha512-DPkIS/EPc+pGAV798PUXgNzJFM3HJouoQXgr0KDZuJVz1EkWbDLOcQwLIz8Qx7liI9ddfkN/TXTRQdsTPZNakw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.4.0.tgz", + "integrity": "sha512-fRwnu3L3nnWaXOgs88BVBmG1yGjcQqZNHG+vInhEa2Sz2oQB+ZjbEMO5Rh9ePFpZ0YDiDUhpaVjwmS+AU2F14g==", "dependencies": { - "@docusaurus/logger": "3.2.1", - "@docusaurus/utils-common": "3.2.1", - "@svgr/webpack": "^6.5.1", + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@svgr/webpack": "^8.1.0", "escape-string-regexp": "^4.0.0", "file-loader": "^6.2.0", "fs-extra": "^11.1.1", @@ -2746,6 +2731,7 @@ "shelljs": "^0.8.5", "tslib": "^2.6.0", "url-loader": "^4.1.1", + "utility-types": "^3.10.0", "webpack": "^5.88.1" }, "engines": { @@ -2761,9 +2747,9 @@ } }, "node_modules/@docusaurus/utils-common": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.2.1.tgz", - "integrity": "sha512-N5vadULnRLiqX2QfTjVEU3u5vo6RG2EZTdyXvJdzDOdrLCGIZAfnf/VkssinFZ922sVfaFfQ4FnStdhn5TWdVg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.4.0.tgz", + "integrity": "sha512-NVx54Wr4rCEKsjOH5QEVvxIqVvm+9kh7q8aYTU5WzUU9/Hctd6aTrcZ3G0Id4zYJ+AeaG5K5qHA4CY5Kcm2iyQ==", "dependencies": { "tslib": "^2.6.0" }, @@ -2780,15 +2766,17 @@ } }, "node_modules/@docusaurus/utils-validation": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.2.1.tgz", - "integrity": "sha512-+x7IR9hNMXi62L1YAglwd0s95fR7+EtirjTxSN4kahYRWGqOi3jlQl1EV0az/yTEvKbxVvOPcdYicGu9dk4LJw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.4.0.tgz", + "integrity": "sha512-hYQ9fM+AXYVTWxJOT1EuNaRnrR2WGpRdLDQG07O8UOpsvCPWUVOeo26Rbm0JWY2sGLfzAb+tvJ62yF+8F+TV0g==", "dependencies": { - "@docusaurus/logger": "3.2.1", - "@docusaurus/utils": "3.2.1", - "@docusaurus/utils-common": "3.2.1", + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "fs-extra": "^11.2.0", "joi": "^17.9.2", "js-yaml": "^4.1.0", + "lodash": "^4.17.21", "tslib": "^2.6.0" }, "engines": { @@ -3125,11 +3113,11 @@ } }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz", - "integrity": "sha512-9PYGcXrAxitycIjRmZB+Q0JaN07GZIWaTBIGQzfaZv+qr1n8X1XUEJ5rZ/vx6OVD9RRYlrNnXWExQXcmZeD/BQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3170,11 +3158,11 @@ } }, "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.5.1.tgz", - "integrity": "sha512-8DPaVVE3fd5JKuIC29dqyMB54sA6mfgki2H2+swh+zNJoynC8pMPzOkidqHOSc6Wj032fhl8Z0TVn1GiPpAiJg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", + "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3185,11 +3173,11 @@ } }, "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.5.1.tgz", - "integrity": "sha512-FwOEi0Il72iAzlkaHrlemVurgSQRDFbk0OC8dSvD5fSBPHltNh7JtLsxmZUhjYBZo2PpcU/RJvvi6Q0l7O7ogw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", + "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3200,11 +3188,11 @@ } }, "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.5.1.tgz", - "integrity": "sha512-gWGsiwjb4tw+ITOJ86ndY/DZZ6cuXMNE/SjcDRg+HLuCmwpcjOktwRF9WgAiycTqJD/QXqL2f8IzE2Rzh7aVXA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", + "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3215,11 +3203,11 @@ } }, "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.5.1.tgz", - "integrity": "sha512-2jT3nTayyYP7kI6aGutkyfJ7UMGtuguD72OjeGLwVNyfPRBD8zQthlvL+fAbAKk5n9ZNcvFkp/b1lZ7VsYqVJg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", + "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3230,9 +3218,9 @@ } }, "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.5.1.tgz", - "integrity": "sha512-a1p6LF5Jt33O3rZoVRBqdxL350oge54iZWHNI6LJB5tQ7EelvD/Mb1mfBiZNAan0dt4i3VArkFRjA4iObuNykQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", + "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", "engines": { "node": ">=12" }, @@ -3245,21 +3233,21 @@ } }, "node_modules/@svgr/babel-preset": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-6.5.1.tgz", - "integrity": "sha512-6127fvO/FF2oi5EzSQOAjo1LE3OtNVh11R+/8FXa+mHx1ptAaS4cknIjnUA7e6j6fwGGJ17NzaTJFUwOV2zwCw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", + "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "^6.5.1", - "@svgr/babel-plugin-remove-jsx-attribute": "*", - "@svgr/babel-plugin-remove-jsx-empty-expression": "*", - "@svgr/babel-plugin-replace-jsx-attribute-value": "^6.5.1", - "@svgr/babel-plugin-svg-dynamic-title": "^6.5.1", - "@svgr/babel-plugin-svg-em-dimensions": "^6.5.1", - "@svgr/babel-plugin-transform-react-native-svg": "^6.5.1", - "@svgr/babel-plugin-transform-svg-component": "^6.5.1" + "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", + "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", + "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", + "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", + "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", + "@svgr/babel-plugin-transform-svg-component": "8.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3270,18 +3258,18 @@ } }, "node_modules/@svgr/core": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-6.5.1.tgz", - "integrity": "sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", + "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", "dependencies": { - "@babel/core": "^7.19.6", - "@svgr/babel-preset": "^6.5.1", - "@svgr/plugin-jsx": "^6.5.1", + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", "camelcase": "^6.2.0", - "cosmiconfig": "^7.0.1" + "cosmiconfig": "^8.1.3", + "snake-case": "^3.0.4" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3289,15 +3277,15 @@ } }, "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.5.1.tgz", - "integrity": "sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", + "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", "dependencies": { - "@babel/types": "^7.20.0", + "@babel/types": "^7.21.3", "entities": "^4.4.0" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3305,37 +3293,37 @@ } }, "node_modules/@svgr/plugin-jsx": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-6.5.1.tgz", - "integrity": "sha512-+UdQxI3jgtSjCykNSlEMuy1jSRQlGC7pqBCPvkG/2dATdWo082zHTTK3uhnAju2/6XpE6B5mZ3z4Z8Ns01S8Gw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", + "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", "dependencies": { - "@babel/core": "^7.19.6", - "@svgr/babel-preset": "^6.5.1", - "@svgr/hast-util-to-babel-ast": "^6.5.1", + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "@svgr/hast-util-to-babel-ast": "8.0.0", "svg-parser": "^2.0.4" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", "url": "https://github.com/sponsors/gregberge" }, "peerDependencies": { - "@svgr/core": "^6.0.0" + "@svgr/core": "*" } }, "node_modules/@svgr/plugin-svgo": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-6.5.1.tgz", - "integrity": "sha512-omvZKf8ixP9z6GWgwbtmP9qQMPX4ODXi+wzbVZgomNFsUIlHA1sf4fThdwTWSsZGgvGAG6yE+b/F5gWUkcZ/iQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-8.1.0.tgz", + "integrity": "sha512-Ywtl837OGO9pTLIN/onoWLmDQ4zFUycI1g76vuKGEz6evR/ZTJlJuz3G/fIkb6OVBJ2g0o6CGJzaEjfmEo3AHA==", "dependencies": { - "cosmiconfig": "^7.0.1", - "deepmerge": "^4.2.2", - "svgo": "^2.8.0" + "cosmiconfig": "^8.1.3", + "deepmerge": "^4.3.1", + "svgo": "^3.0.2" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -3346,21 +3334,21 @@ } }, "node_modules/@svgr/webpack": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-6.5.1.tgz", - "integrity": "sha512-cQ/AsnBkXPkEK8cLbv4Dm7JGXq2XrumKnL1dRpJD9rIO2fTIlJI9a1uCciYG1F2aUsox/hJQyNGbt3soDxSRkA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-8.1.0.tgz", + "integrity": "sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==", "dependencies": { - "@babel/core": "^7.19.6", - "@babel/plugin-transform-react-constant-elements": "^7.18.12", - "@babel/preset-env": "^7.19.4", + "@babel/core": "^7.21.3", + "@babel/plugin-transform-react-constant-elements": "^7.21.3", + "@babel/preset-env": "^7.20.2", "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.18.6", - "@svgr/core": "^6.5.1", - "@svgr/plugin-jsx": "^6.5.1", - "@svgr/plugin-svgo": "^6.5.1" + "@babel/preset-typescript": "^7.21.0", + "@svgr/core": "8.1.0", + "@svgr/plugin-jsx": "8.1.0", + "@svgr/plugin-svgo": "8.1.0" }, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { "type": "github", @@ -4040,9 +4028,9 @@ } }, "node_modules/algoliasearch-helper": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.18.0.tgz", - "integrity": "sha512-ZXvA8r6VG46V343jnIE7Tei8Xr0/9N8YhD27joC0BKxeogQyvNu7O37i510wA7FnrDjoa/tFhK90WUaBlkaqnw==", + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.22.1.tgz", + "integrity": "sha512-fSxJ4YreH4kOME9CnKazbAn2tK/rvBoV37ETd6nTt4j7QfkcnW+c+F22WfuE9Q/sRpvOMnUwU/BXAVEiwW7p/w==", "dependencies": { "@algolia/events": "^4.0.1" }, @@ -5128,18 +5116,28 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/cross-spawn": { @@ -5181,11 +5179,11 @@ } }, "node_modules/css-declaration-sorter": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz", - "integrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", + "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", "engines": { - "node": "^10 || ^12 || >=14" + "node": "^14 || ^16 || >=18" }, "peerDependencies": { "postcss": "^8.0.9" @@ -5217,16 +5215,16 @@ } }, "node_modules/css-minimizer-webpack-plugin": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.2.2.tgz", - "integrity": "sha512-s3Of/4jKfw1Hj9CxEO1E5oXhQAxlayuHO2y/ML+C6I9sQ7FdzfEV6QgMLN3vI+qFsjJGIAFLKtQK7t8BOXAIyA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-5.0.1.tgz", + "integrity": "sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==", "dependencies": { - "cssnano": "^5.1.8", - "jest-worker": "^29.1.2", - "postcss": "^8.4.17", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1" + "@jridgewell/trace-mapping": "^0.3.18", + "cssnano": "^6.0.1", + "jest-worker": "^29.4.3", + "postcss": "^8.4.24", + "schema-utils": "^4.0.1", + "serialize-javascript": "^6.0.1" }, "engines": { "node": ">= 14.15.0" @@ -5259,14 +5257,6 @@ } } }, - "node_modules/css-minimizer-webpack-plugin/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -5283,23 +5273,15 @@ } }, "node_modules/css-tree": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", - "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "dependencies": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/css-tree/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, "node_modules/css-what": { @@ -5325,108 +5307,128 @@ } }, "node_modules/cssnano": { - "version": "5.1.15", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.15.tgz", - "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.1.2.tgz", + "integrity": "sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==", "dependencies": { - "cssnano-preset-default": "^5.2.14", - "lilconfig": "^2.0.3", - "yaml": "^1.10.2" + "cssnano-preset-default": "^6.1.2", + "lilconfig": "^3.1.1" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/cssnano" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/cssnano-preset-advanced": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.10.tgz", - "integrity": "sha512-fnYJyCS9jgMU+cmHO1rPSPf9axbQyD7iUhLO5Df6O4G+fKIOMps+ZbU0PdGFejFBBZ3Pftf18fn1eG7MAPUSWQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-6.1.2.tgz", + "integrity": "sha512-Nhao7eD8ph2DoHolEzQs5CfRpiEP0xa1HBdnFZ82kvqdmbwVBUr2r1QuQ4t1pi+D1ZpqpcO4T+wy/7RxzJ/WPQ==", "dependencies": { - "autoprefixer": "^10.4.12", - "cssnano-preset-default": "^5.2.14", - "postcss-discard-unused": "^5.1.0", - "postcss-merge-idents": "^5.1.1", - "postcss-reduce-idents": "^5.2.0", - "postcss-zindex": "^5.1.0" + "autoprefixer": "^10.4.19", + "browserslist": "^4.23.0", + "cssnano-preset-default": "^6.1.2", + "postcss-discard-unused": "^6.0.5", + "postcss-merge-idents": "^6.0.3", + "postcss-reduce-idents": "^6.0.3", + "postcss-zindex": "^6.0.2" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/cssnano-preset-default": { - "version": "5.2.14", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", - "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz", + "integrity": "sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==", "dependencies": { - "css-declaration-sorter": "^6.3.1", - "cssnano-utils": "^3.1.0", - "postcss-calc": "^8.2.3", - "postcss-colormin": "^5.3.1", - "postcss-convert-values": "^5.1.3", - "postcss-discard-comments": "^5.1.2", - "postcss-discard-duplicates": "^5.1.0", - "postcss-discard-empty": "^5.1.1", - "postcss-discard-overridden": "^5.1.0", - "postcss-merge-longhand": "^5.1.7", - "postcss-merge-rules": "^5.1.4", - "postcss-minify-font-values": "^5.1.0", - "postcss-minify-gradients": "^5.1.1", - "postcss-minify-params": "^5.1.4", - "postcss-minify-selectors": "^5.2.1", - "postcss-normalize-charset": "^5.1.0", - "postcss-normalize-display-values": "^5.1.0", - "postcss-normalize-positions": "^5.1.1", - "postcss-normalize-repeat-style": "^5.1.1", - "postcss-normalize-string": "^5.1.0", - "postcss-normalize-timing-functions": "^5.1.0", - "postcss-normalize-unicode": "^5.1.1", - "postcss-normalize-url": "^5.1.0", - "postcss-normalize-whitespace": "^5.1.1", - "postcss-ordered-values": "^5.1.3", - "postcss-reduce-initial": "^5.1.2", - "postcss-reduce-transforms": "^5.1.0", - "postcss-svgo": "^5.1.0", - "postcss-unique-selectors": "^5.1.1" + "browserslist": "^4.23.0", + "css-declaration-sorter": "^7.2.0", + "cssnano-utils": "^4.0.2", + "postcss-calc": "^9.0.1", + "postcss-colormin": "^6.1.0", + "postcss-convert-values": "^6.1.0", + "postcss-discard-comments": "^6.0.2", + "postcss-discard-duplicates": "^6.0.3", + "postcss-discard-empty": "^6.0.3", + "postcss-discard-overridden": "^6.0.2", + "postcss-merge-longhand": "^6.0.5", + "postcss-merge-rules": "^6.1.1", + "postcss-minify-font-values": "^6.1.0", + "postcss-minify-gradients": "^6.0.3", + "postcss-minify-params": "^6.1.0", + "postcss-minify-selectors": "^6.0.4", + "postcss-normalize-charset": "^6.0.2", + "postcss-normalize-display-values": "^6.0.2", + "postcss-normalize-positions": "^6.0.2", + "postcss-normalize-repeat-style": "^6.0.2", + "postcss-normalize-string": "^6.0.2", + "postcss-normalize-timing-functions": "^6.0.2", + "postcss-normalize-unicode": "^6.1.0", + "postcss-normalize-url": "^6.0.2", + "postcss-normalize-whitespace": "^6.0.2", + "postcss-ordered-values": "^6.0.2", + "postcss-reduce-initial": "^6.1.0", + "postcss-reduce-transforms": "^6.0.2", + "postcss-svgo": "^6.0.3", + "postcss-unique-selectors": "^6.0.4" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/cssnano-utils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", - "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.2.tgz", + "integrity": "sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/csso": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", - "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", "dependencies": { - "css-tree": "^1.1.2" + "css-tree": "~2.2.0" }, "engines": { - "node": ">=8.0.0" + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" } }, + "node_modules/csso/node_modules/css-tree": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", + "dependencies": { + "mdn-data": "2.0.28", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==" + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", @@ -8120,11 +8122,14 @@ } }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -8633,9 +8638,9 @@ } }, "node_modules/mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" }, "node_modules/media-typer": { "version": "0.3.0", @@ -10580,17 +10585,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -11080,9 +11074,9 @@ } }, "node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "funding": [ { "type": "opencollective", @@ -11100,112 +11094,115 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-calc": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", - "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", + "integrity": "sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==", "dependencies": { - "postcss-selector-parser": "^6.0.9", + "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0" }, + "engines": { + "node": "^14 || ^16 || >=18.0" + }, "peerDependencies": { "postcss": "^8.2.2" } }, "node_modules/postcss-colormin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz", - "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.1.0.tgz", + "integrity": "sha512-x9yX7DOxeMAR+BgGVnNSAxmAj98NX/YxEMNFP+SDCEeNLb2r3i6Hh1ksMsnW8Ub5SLCpbescQqn9YEbE9554Sw==", "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.23.0", "caniuse-api": "^3.0.0", - "colord": "^2.9.1", + "colord": "^2.9.3", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-convert-values": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz", - "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.1.0.tgz", + "integrity": "sha512-zx8IwP/ts9WvUM6NkVSkiU902QZL1bwPhaVaLynPtCsOTqp+ZKbNi+s6XJg3rfqpKGA/oc7Oxk5t8pOQJcwl/w==", "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.23.0", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-comments": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", - "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", + "integrity": "sha512-65w/uIqhSBBfQmYnG92FO1mWZjJ4GL5b8atm5Yw2UgrwD7HiNiSSNwJor1eCFGzUgYnN/iIknhNRVqjrrpuglw==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-duplicates": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", - "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.3.tgz", + "integrity": "sha512-+JA0DCvc5XvFAxwx6f/e68gQu/7Z9ud584VLmcgto28eB8FqSFZwtrLwB5Kcp70eIoWP/HXqz4wpo8rD8gpsTw==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-empty": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", - "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.3.tgz", + "integrity": "sha512-znyno9cHKQsK6PtxL5D19Fj9uwSzC2mB74cpT66fhgOadEUPyXFkbgwm5tvc3bt3NAy8ltE5MrghxovZRVnOjQ==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-overridden": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", - "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.2.tgz", + "integrity": "sha512-j87xzI4LUggC5zND7KdjsI25APtyMuynXZSujByMaav2roV6OZX+8AaCUcZSWqckZpjAjRyFDdpqybgjFO0HJQ==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-unused": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-5.1.0.tgz", - "integrity": "sha512-KwLWymI9hbwXmJa0dkrzpRbSJEh0vVUd7r8t0yOGPcfKzyJJxFM8kLyC5Ev9avji6nY95pOp1W6HqIrfT+0VGw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-6.0.5.tgz", + "integrity": "sha512-wHalBlRHkaNnNwfC8z+ppX57VhvS+HWgjW508esjdaEYr3Mx7Gnn2xA4R/CKf5+Z9S5qsqC+Uzh4ueENWwCVUA==", "dependencies": { - "postcss-selector-parser": "^6.0.5" + "postcss-selector-parser": "^6.0.16" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-loader": { @@ -11229,136 +11226,111 @@ "webpack": "^5.0.0" } }, - "node_modules/postcss-loader/node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/postcss-merge-idents": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-5.1.1.tgz", - "integrity": "sha512-pCijL1TREiCoog5nQp7wUe+TUonA2tC2sQ54UGeMmryK3UFGIYKqDyjnqd6RcuI4znFn9hWSLNN8xKE/vWcUQw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-6.0.3.tgz", + "integrity": "sha512-1oIoAsODUs6IHQZkLQGO15uGEbK3EAl5wi9SS8hs45VgsxQfMnxvt+L+zIr7ifZFIH14cfAeVe2uCTa+SPRa3g==", "dependencies": { - "cssnano-utils": "^3.1.0", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-merge-longhand": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", - "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.5.tgz", + "integrity": "sha512-5LOiordeTfi64QhICp07nzzuTDjNSO8g5Ksdibt44d+uvIIAE1oZdRn8y/W5ZtYgRH/lnLDlvi9F8btZcVzu3w==", "dependencies": { "postcss-value-parser": "^4.2.0", - "stylehacks": "^5.1.1" + "stylehacks": "^6.1.1" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-merge-rules": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", - "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.1.1.tgz", + "integrity": "sha512-KOdWF0gju31AQPZiD+2Ar9Qjowz1LTChSjFFbS+e2sFgc4uHOp3ZvVX4sNeTlk0w2O31ecFGgrFzhO0RSWbWwQ==", "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.23.0", "caniuse-api": "^3.0.0", - "cssnano-utils": "^3.1.0", - "postcss-selector-parser": "^6.0.5" + "cssnano-utils": "^4.0.2", + "postcss-selector-parser": "^6.0.16" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-font-values": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", - "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.1.0.tgz", + "integrity": "sha512-gklfI/n+9rTh8nYaSJXlCo3nOKqMNkxuGpTn/Qm0gstL3ywTr9/WRKznE+oy6fvfolH6dF+QM4nCo8yPLdvGJg==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-gradients": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz", - "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.3.tgz", + "integrity": "sha512-4KXAHrYlzF0Rr7uc4VrfwDJ2ajrtNEpNEuLxFgwkhFZ56/7gaE4Nr49nLsQDZyUe+ds+kEhf+YAUolJiYXF8+Q==", "dependencies": { - "colord": "^2.9.1", - "cssnano-utils": "^3.1.0", + "colord": "^2.9.3", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-params": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz", - "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.1.0.tgz", + "integrity": "sha512-bmSKnDtyyE8ujHQK0RQJDIKhQ20Jq1LYiez54WiaOoBtcSuflfK3Nm596LvbtlFcpipMjgClQGyGr7GAs+H1uA==", "dependencies": { - "browserslist": "^4.21.4", - "cssnano-utils": "^3.1.0", + "browserslist": "^4.23.0", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-selectors": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz", - "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.4.tgz", + "integrity": "sha512-L8dZSwNLgK7pjTto9PzWRoMbnLq5vsZSTu8+j1P/2GB8qdtGQfn+K1uSvFgYvgh83cbyxT5m43ZZhUMTJDSClQ==", "dependencies": { - "postcss-selector-parser": "^6.0.5" + "postcss-selector-parser": "^6.0.16" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-modules-extract-imports": { @@ -11417,192 +11389,191 @@ } }, "node_modules/postcss-normalize-charset": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", - "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.2.tgz", + "integrity": "sha512-a8N9czmdnrjPHa3DeFlwqst5eaL5W8jYu3EBbTTkI5FHkfMhFZh1EGbku6jhHhIzTA6tquI2P42NtZ59M/H/kQ==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-display-values": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", - "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.2.tgz", + "integrity": "sha512-8H04Mxsb82ON/aAkPeq8kcBbAtI5Q2a64X/mnRRfPXBq7XeogoQvReqxEfc0B4WPq1KimjezNC8flUtC3Qz6jg==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-positions": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", - "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.2.tgz", + "integrity": "sha512-/JFzI441OAB9O7VnLA+RtSNZvQ0NCFZDOtp6QPFo1iIyawyXg0YI3CYM9HBy1WvwCRHnPep/BvI1+dGPKoXx/Q==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-repeat-style": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", - "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.2.tgz", + "integrity": "sha512-YdCgsfHkJ2jEXwR4RR3Tm/iOxSfdRt7jplS6XRh9Js9PyCR/aka/FCb6TuHT2U8gQubbm/mPmF6L7FY9d79VwQ==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-string": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", - "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.2.tgz", + "integrity": "sha512-vQZIivlxlfqqMp4L9PZsFE4YUkWniziKjQWUtsxUiVsSSPelQydwS8Wwcuw0+83ZjPWNTl02oxlIvXsmmG+CiQ==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-timing-functions": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", - "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.2.tgz", + "integrity": "sha512-a+YrtMox4TBtId/AEwbA03VcJgtyW4dGBizPl7e88cTFULYsprgHWTbfyjSLyHeBcK/Q9JhXkt2ZXiwaVHoMzA==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-unicode": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz", - "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.1.0.tgz", + "integrity": "sha512-QVC5TQHsVj33otj8/JD869Ndr5Xcc/+fwRh4HAsFsAeygQQXm+0PySrKbr/8tkDKzW+EVT3QkqZMfFrGiossDg==", "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.23.0", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", - "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.2.tgz", + "integrity": "sha512-kVNcWhCeKAzZ8B4pv/DnrU1wNh458zBNp8dh4y5hhxih5RZQ12QWMuQrDgPRw3LRl8mN9vOVfHl7uhvHYMoXsQ==", "dependencies": { - "normalize-url": "^6.0.1", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-whitespace": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz", - "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.2.tgz", + "integrity": "sha512-sXZ2Nj1icbJOKmdjXVT9pnyHQKiSAyuNQHSgRCUgThn2388Y9cGVDR+E9J9iAYbSbLHI+UUwLVl1Wzco/zgv0Q==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-ordered-values": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", - "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.2.tgz", + "integrity": "sha512-VRZSOB+JU32RsEAQrO94QPkClGPKJEL/Z9PCBImXMhIeK5KAYo6slP/hBYlLgrCjFxyqvn5VC81tycFEDBLG1Q==", "dependencies": { - "cssnano-utils": "^3.1.0", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-reduce-idents": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-5.2.0.tgz", - "integrity": "sha512-BTrLjICoSB6gxbc58D5mdBK8OhXRDqud/zodYfdSi52qvDHdMwk+9kB9xsM8yJThH/sZU5A6QVSmMmaN001gIg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-6.0.3.tgz", + "integrity": "sha512-G3yCqZDpsNPoQgbDUy3T0E6hqOQ5xigUtBQyrmq3tn2GxlyiL0yyl7H+T8ulQR6kOcHJ9t7/9H4/R2tv8tJbMA==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-reduce-initial": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", - "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.1.0.tgz", + "integrity": "sha512-RarLgBK/CrL1qZags04oKbVbrrVK2wcxhvta3GCxrZO4zveibqbRPmm2VI8sSgCXwoUHEliRSbOfpR0b/VIoiw==", "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.23.0", "caniuse-api": "^3.0.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-reduce-transforms": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", - "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.2.tgz", + "integrity": "sha512-sB+Ya++3Xj1WaT9+5LOOdirAxP7dJZms3GRcYheSPi1PiTMigsxHAdkrbItHxwYHr4kt1zL7mmcHstgMYT+aiA==", "dependencies": { "postcss-value-parser": "^4.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", + "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -11612,46 +11583,46 @@ } }, "node_modules/postcss-sort-media-queries": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.4.1.tgz", - "integrity": "sha512-QDESFzDDGKgpiIh4GYXsSy6sek2yAwQx1JASl5AxBtU1Lq2JfKBljIPNdil989NcSKRQX1ToiaKphImtBuhXWw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-5.2.0.tgz", + "integrity": "sha512-AZ5fDMLD8SldlAYlvi8NIqo0+Z8xnXU2ia0jxmuhxAU+Lqt9K+AlmLNJ/zWEnE9x+Zx3qL3+1K20ATgNOr3fAA==", "dependencies": { - "sort-css-media-queries": "2.1.0" + "sort-css-media-queries": "2.2.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "postcss": "^8.4.16" + "postcss": "^8.4.23" } }, "node_modules/postcss-svgo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz", - "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.3.tgz", + "integrity": "sha512-dlrahRmxP22bX6iKEjOM+c8/1p+81asjKT+V5lrgOH944ryx/OHpclnIbGsKVd3uWOXFLYJwCVf0eEkJGvO96g==", "dependencies": { "postcss-value-parser": "^4.2.0", - "svgo": "^2.7.0" + "svgo": "^3.2.0" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >= 18" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-unique-selectors": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz", - "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.4.tgz", + "integrity": "sha512-K38OCaIrO8+PzpArzkLKB42dSARtC2tmG6PvD4b1o1Q2E9Os8jzfWFfSy/rixsHwohtsDdFtAWGjFVFUdwYaMg==", "dependencies": { - "postcss-selector-parser": "^6.0.5" + "postcss-selector-parser": "^6.0.16" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-value-parser": { @@ -11660,14 +11631,14 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/postcss-zindex": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.1.0.tgz", - "integrity": "sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-6.0.2.tgz", + "integrity": "sha512-5BxW9l1evPB/4ZIc+2GobEBoKC+h8gPGCMi+jxsYvd2x0mjq7wazk6DrP71pStqxE9Foxh5TVnonbWpFZzXaYg==", "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/pretty-error": { @@ -12072,9 +12043,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-json-view-lite": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-1.3.0.tgz", - "integrity": "sha512-aN1biKC5v4DQkmQBlZjuMFR09MKZGMPtIg+cut8zEeg2HXd6gl2gRy0n4HMacHf0dznQgo0SVXN7eT8zV3hEuQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-1.4.0.tgz", + "integrity": "sha512-wh6F6uJyYAmQ4fK0e8dSQMEWuvTs2Wr3el3sLD9bambX1+pSWUVXIz1RFaoy3TI1mZ0FqdpKq9YgbgTTgyrmXA==", "engines": { "node": ">=14" }, @@ -12084,12 +12055,11 @@ }, "node_modules/react-loadable": { "name": "@docusaurus/react-loadable", - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz", - "integrity": "sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", + "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", "dependencies": { - "@types/react": "*", - "prop-types": "^15.6.2" + "@types/react": "*" }, "peerDependencies": { "react": "*" @@ -12751,9 +12721,9 @@ } }, "node_modules/search-insights": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.13.0.tgz", - "integrity": "sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.14.0.tgz", + "integrity": "sha512-OLN6MsPMCghDOqlCtsIsYgtsC0pnwVTyT9Mu6A3ewOj1DxvzZF6COrn2g86E/c05xbktB0XN04m/t1Z+n+fTGw==", "peer": true }, "node_modules/section-matter": { @@ -13106,9 +13076,9 @@ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, "node_modules/sitemap": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz", - "integrity": "sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.2.tgz", + "integrity": "sha512-ARCqzHJ0p4gWt+j7NlU5eDlIO9+Rkr/JhPFZKKQ1l5GCus7rJH4UdrlVAh0xC/gDS/Qir2UMxqYNHtsKr2rpCw==", "dependencies": { "@types/node": "^17.0.5", "@types/sax": "^1.2.1", @@ -13147,6 +13117,15 @@ "node": ">=8" } }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -13158,9 +13137,9 @@ } }, "node_modules/sort-css-media-queries": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sort-css-media-queries/-/sort-css-media-queries-2.1.0.tgz", - "integrity": "sha512-IeWvo8NkNiY2vVYdPa27MCQiR0MN0M80johAYFVxWWXQ44KU84WNxjslwBHmc/7ZL2ccwkM7/e6S5aiKZXm7jA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/sort-css-media-queries/-/sort-css-media-queries-2.2.0.tgz", + "integrity": "sha512-0xtkGhWCC9MGt/EzgnvbbbKhqWjl1+/rncmhTh5qCpbYguXh6S/qwePfv/JQ8jePXXmqingylxoC49pCkSPIbA==", "engines": { "node": ">= 6.3.0" } @@ -13174,9 +13153,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "engines": { "node": ">=0.10.0" } @@ -13251,12 +13230,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility" - }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -13392,18 +13365,18 @@ } }, "node_modules/stylehacks": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", - "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.1.1.tgz", + "integrity": "sha512-gSTTEQ670cJNoaeIp9KX6lZmm8LJ3jPB5yJmX8Zq/wQxOsAFXV3qjWzHas3YYk1qesuVIyYWWUpZ0vSE/dTSGg==", "dependencies": { - "browserslist": "^4.21.4", - "postcss-selector-parser": "^6.0.4" + "browserslist": "^4.23.0", + "postcss-selector-parser": "^6.0.16" }, "engines": { - "node": "^10 || ^12 || >=14.0" + "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/supports-color": { @@ -13434,23 +13407,27 @@ "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, "node_modules/svgo": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", - "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", + "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", - "css-select": "^4.1.3", - "css-tree": "^1.1.3", - "csso": "^4.2.0", - "picocolors": "^1.0.0", - "stable": "^0.1.8" + "css-select": "^5.1.0", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", + "csso": "^5.0.5", + "picocolors": "^1.0.0" }, "bin": { "svgo": "bin/svgo" }, "engines": { - "node": ">=10.13.0" + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/svgo" } }, "node_modules/svgo/node_modules/commander": { @@ -13461,69 +13438,6 @@ "node": ">= 10" } }, - "node_modules/svgo/node_modules/css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/svgo/node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/svgo/node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/svgo/node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/svgo/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", diff --git a/docs/package.json b/docs/package.json index c23deeea9..a3ae7a2d3 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,9 +15,9 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "^3.2.1", - "@docusaurus/plugin-client-redirects": "^3.2.1", - "@docusaurus/preset-classic": "^3.2.1", + "@docusaurus/core": "^3.4.0", + "@docusaurus/plugin-client-redirects": "^3.4.0", + "@docusaurus/preset-classic": "^3.4.0", "@mdx-js/react": "^3.0.0", "clsx": "^2.1.0", "docusaurus-json-schema-plugin": "^1.11.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 701eaf3bb..4f1d7b967 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.163", + "version": "0.9.165", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.163", + "version": "0.9.165", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index a1b72944f..4c8e46a09 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.163", + "version": "0.9.165", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" diff --git a/scripts/install-dependencies.ps1 b/scripts/install-dependencies.ps1 index 956489aa5..710ac3724 100644 --- a/scripts/install-dependencies.ps1 +++ b/scripts/install-dependencies.ps1 @@ -82,4 +82,7 @@ npm run build Pop-Location +Write-Output "`nInstalling docs dependencies..." -ForegroundColor White +Push-Location docs +npm install diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 0da8b69d2..6fe6e1fce 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -4,10 +4,12 @@ # - Run Task -> Install Dependencies # - Debug -> Extension set -e + echo "Installing Core extension dependencies..." pushd core npm install npm link + popd echo "Installing GUI extension dependencies..." @@ -15,11 +17,12 @@ pushd gui npm install npm link @continuedev/core npm run build + popd + # VSCode Extension (will also package GUI) echo "Installing VSCode extension dependencies..." pushd extensions/vscode - # This does way too many things inline but is the common denominator between many of the scripts npm install npm link @continuedev/core @@ -31,4 +34,10 @@ popd echo "Installing binary dependencies..." pushd binary npm install -npm run build \ No newline at end of file +npm run build + +popd + +echo "Installing docs dependencies..." +pushd docs +npm install From 6fdad553b6ac7f64c1bb23617dbe313e16174a56 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 20 Jun 2024 18:35:18 -0500 Subject: [PATCH 10/29] fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum --- docs/static/schemas/config.json | 101 ++++++++------- .../src/main/resources/config_schema.json | 101 ++++++++------- extensions/vscode/config_schema.json | 108 ++++++++-------- extensions/vscode/continue_rc_schema.json | 115 ++++++++++-------- 4 files changed, 230 insertions(+), 195 deletions(-) diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index ba9304c8e..6428abfed 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1318,7 +1318,8 @@ "code", "system", "currentFile", - "url" + "url", + "database" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1341,7 +1342,8 @@ "Reference specific functions and classes from throughout your codebase", "Reference your operating system and cpu", "Reference the contents of the currently active file", - "Reference the contents of a page at a URL" + "Reference the contents of a page at a URL", + "Reference table schemas" ], "type": "string" }, @@ -1457,56 +1459,63 @@ } }, "then": { - "connections": { - "type": "array", - "description": "A list of database connections", - "items": { - "type": "object", + "properties": { + "params": { "properties": { - "name": { - "type": "string", - "description": "A unique name for this database connection" - }, - "connection_type": { - "type": "string", - "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": ["postgres", "mysql", "sqlite"] - }, - "connection": { - "type": "object", - "properties": { - "user": { - "type": "string", - "description": "The database user name" + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } }, - "host": { - "type": "string", - "description": "The host address of the database server" - }, - "database": { - "type": "string", - "description": "The name of the database to connect to" - }, - "password": { - "type": "string", - "description": "The password for the database user" - }, - "port": { - "type": "integer", - "description": "The port number to connect to at the host" - }, - "filename": { - "type": "string", - "description": "File location for simple file DB's" - } - }, - "required": [] + "required": ["name", "connection_type", "connection"] + } } }, - "required": ["name", "type", "connection"] + "required": ["connections"] } }, - "required": ["connections"] + "required": ["params"] } }, { diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index ba9304c8e..6428abfed 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1318,7 +1318,8 @@ "code", "system", "currentFile", - "url" + "url", + "database" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1341,7 +1342,8 @@ "Reference specific functions and classes from throughout your codebase", "Reference your operating system and cpu", "Reference the contents of the currently active file", - "Reference the contents of a page at a URL" + "Reference the contents of a page at a URL", + "Reference table schemas" ], "type": "string" }, @@ -1457,56 +1459,63 @@ } }, "then": { - "connections": { - "type": "array", - "description": "A list of database connections", - "items": { - "type": "object", + "properties": { + "params": { "properties": { - "name": { - "type": "string", - "description": "A unique name for this database connection" - }, - "connection_type": { - "type": "string", - "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": ["postgres", "mysql", "sqlite"] - }, - "connection": { - "type": "object", - "properties": { - "user": { - "type": "string", - "description": "The database user name" + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } }, - "host": { - "type": "string", - "description": "The host address of the database server" - }, - "database": { - "type": "string", - "description": "The name of the database to connect to" - }, - "password": { - "type": "string", - "description": "The password for the database user" - }, - "port": { - "type": "integer", - "description": "The port number to connect to at the host" - }, - "filename": { - "type": "string", - "description": "File location for simple file DB's" - } - }, - "required": [] + "required": ["name", "connection_type", "connection"] + } } }, - "required": ["name", "type", "connection"] + "required": ["connections"] } }, - "required": ["connections"] + "required": ["params"] } }, { diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index ba9304c8e..dbb658fa1 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1316,13 +1316,14 @@ "outline", "postgres", "code", - "system", "currentFile", - "url" + "url", + "database" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", "Reference the contents of the terminal", + "Reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread", "Reference the contents of all open or pinned files.", "Enter a search phrase and include the Google search results as context", "Reference the results of a ripgrep search in your codebase", @@ -1332,16 +1333,14 @@ "Include important files from a folder in the prompt, as determined by similarity search", "Reference GitHub issues from a repository", "Retrieve important pages from a documentation website, as determined by similarity search", - "Index and retrieve the contents of any documentation site, using embeddings to find important snippets", "Display a file tree of the current workspace", + "Include important highlighted sections from your code", "Include a repo map showing important code objects", - "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files", "References Postgres table schema and sample rows", "Reference specific functions and classes from throughout your codebase", - "Reference your operating system and cpu", "Reference the contents of the currently active file", - "Reference the contents of a page at a URL" + "Reference the contents of a page at a URL", + "Reference table schemas" ], "type": "string" }, @@ -1457,56 +1456,63 @@ } }, "then": { - "connections": { - "type": "array", - "description": "A list of database connections", - "items": { - "type": "object", + "properties": { + "params": { "properties": { - "name": { - "type": "string", - "description": "A unique name for this database connection" - }, - "connection_type": { - "type": "string", - "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": ["postgres", "mysql", "sqlite"] - }, - "connection": { - "type": "object", - "properties": { - "user": { - "type": "string", - "description": "The database user name" + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } }, - "host": { - "type": "string", - "description": "The host address of the database server" - }, - "database": { - "type": "string", - "description": "The name of the database to connect to" - }, - "password": { - "type": "string", - "description": "The password for the database user" - }, - "port": { - "type": "integer", - "description": "The port number to connect to at the host" - }, - "filename": { - "type": "string", - "description": "File location for simple file DB's" - } - }, - "required": [] + "required": ["name", "connection_type", "connection"] + } } }, - "required": ["name", "type", "connection"] + "required": ["connections"] } }, - "required": ["connections"] + "required": ["params"] } }, { diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 9b0f6fc9f..23ed8e9c6 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1461,7 +1461,8 @@ "code", "system", "currentFile", - "url" + "url", + "database" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1484,7 +1485,8 @@ "Reference specific functions and classes from throughout your codebase", "Reference your operating system and cpu", "Reference the contents of the currently active file", - "Reference the contents of a page at a URL" + "Reference the contents of a page at a URL", + "Reference table schemas" ], "type": "string" }, @@ -1623,65 +1625,74 @@ } }, "then": { - "connections": { - "type": "array", - "description": "A list of database connections", - "items": { - "type": "object", + "properties": { + "params": { "properties": { - "name": { - "type": "string", - "description": "A unique name for this database connection" - }, - "connection_type": { - "type": "string", - "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": [ - "postgres", - "mysql", - "sqlite" - ] - }, - "connection": { - "type": "object", - "properties": { - "user": { - "type": "string", - "description": "The database user name" + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": [ + "postgres", + "mysql", + "sqlite" + ] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } }, - "host": { - "type": "string", - "description": "The host address of the database server" - }, - "database": { - "type": "string", - "description": "The name of the database to connect to" - }, - "password": { - "type": "string", - "description": "The password for the database user" - }, - "port": { - "type": "integer", - "description": "The port number to connect to at the host" - }, - "filename": { - "type": "string", - "description": "File location for simple file DB's" - } - }, - "required": [] + "required": [ + "name", + "connection_type", + "connection" + ] + } } }, "required": [ - "name", - "type", - "connection" + "connections" ] } }, "required": [ - "connections" + "params" ] } }, From b402b91e7588ae5ce2d9712a786922355474ba6b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 20 Jun 2024 17:27:06 -0700 Subject: [PATCH 11/29] prettierignore --- .prettierignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..b497624cc --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +extensions/vscode/continue_rc_schema.json \ No newline at end of file From 2ed4ff67c97c2acb027c891f598074926a98e207 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 20 Jun 2024 19:28:10 -0500 Subject: [PATCH 12/29] docs: add docs and schema for "OS" provider (#1536) --- core/context/providers/OSContextProvider.ts | 13 +- docs/docs/customization/context-providers.md | 8 + extensions/vscode/config_schema.json | 6 +- extensions/vscode/continue_rc_schema.json | 508 +++++-------------- 4 files changed, 139 insertions(+), 396 deletions(-) diff --git a/core/context/providers/OSContextProvider.ts b/core/context/providers/OSContextProvider.ts index 316b6c24d..5f06e5f3d 100644 --- a/core/context/providers/OSContextProvider.ts +++ b/core/context/providers/OSContextProvider.ts @@ -1,6 +1,3 @@ -//os.platform() -//os.arch() - import os from "os"; import { ContextItem, @@ -11,9 +8,9 @@ import { BaseContextProvider } from "../index.js"; class OSContextProvider extends BaseContextProvider { static description: ContextProviderDescription = { - title: "OS", - displayTitle: "OS", - description: "OS and CPU Information.", + title: "os", + displayTitle: "Operating System", + description: "Operating system and CPU Information.", type: "normal", }; @@ -25,9 +22,9 @@ class OSContextProvider extends BaseContextProvider { const platform = os.platform(); return [ { - description: "Your OS and CPU", + description: "Your operating system and CPU", content: `I am running ${platform} on ${cpu}.`, - name: "OS", + name: "os", }, ]; } diff --git a/docs/docs/customization/context-providers.md b/docs/docs/customization/context-providers.md index fcb61b6d1..fae39432f 100644 --- a/docs/docs/customization/context-providers.md +++ b/docs/docs/customization/context-providers.md @@ -288,6 +288,14 @@ Type `@locals` to reference the contents of the local variables with top n level } ``` +### Operating System + +Type `@os` to reference the architecture and platform of your current operating system. + +```json +{ "name": "os" } +``` + ### Requesting Context Providers Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new ContextProvider. diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index dbb658fa1..66fdf453e 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1318,7 +1318,8 @@ "code", "currentFile", "url", - "database" + "database", + "os" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1340,7 +1341,8 @@ "Reference specific functions and classes from throughout your codebase", "Reference the contents of the currently active file", "Reference the contents of a page at a URL", - "Reference table schemas" + "Reference table schemas", + "Operating system and CPU Information" ], "type": "string" }, diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 23ed8e9c6..04c1a41aa 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -279,10 +279,7 @@ "apiType": { "title": "Api Type", "markdownDescription": "OpenAI API type, either `openai` or `azure`", - "enum": [ - "openai", - "azure" - ] + "enum": ["openai", "azure"] }, "apiVersion": { "title": "Api Version", @@ -295,11 +292,7 @@ "type": "string" } }, - "required": [ - "title", - "provider", - "model" - ], + "required": ["title", "provider", "model"], "allOf": [ { "if": { @@ -309,9 +302,7 @@ } }, "not": { - "required": [ - "provider" - ] + "required": ["provider"] } }, "then": { @@ -338,48 +329,33 @@ ] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { - "required": [ - "apiKey" - ] + "required": ["apiKey"] } }, { "if": { "properties": { "provider": { - "enum": [ - "huggingface-tgi", - "huggingface-inference-api" - ] + "enum": ["huggingface-tgi", "huggingface-inference-api"] } } }, "then": { - "required": [ - "apiBase" - ] + "required": ["apiBase"] }, - "required": [ - "provider" - ] + "required": ["provider"] }, { "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -399,14 +375,10 @@ "if": { "properties": { "provider": { - "enum": [ - "cloudflare" - ] + "enum": ["cloudflare"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -464,14 +436,10 @@ "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -502,14 +470,10 @@ "if": { "properties": { "provider": { - "enum": [ - "replicate" - ] + "enum": ["replicate"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -539,14 +503,10 @@ "if": { "properties": { "provider": { - "enum": [ - "free-trial" - ] + "enum": ["free-trial"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -571,9 +531,7 @@ "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] }, "apiType": { "not": { @@ -581,9 +539,7 @@ } } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -641,14 +597,10 @@ "if": { "properties": { "provider": { - "enum": [ - "anthropic" - ] + "enum": ["anthropic"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -676,22 +628,15 @@ "if": { "properties": { "provider": { - "enum": [ - "cohere" - ] + "enum": ["cohere"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { "model": { - "enum": [ - "command-r", - "command-r-plus" - ] + "enum": ["command-r", "command-r-plus"] } } } @@ -700,14 +645,10 @@ "if": { "properties": { "provider": { - "enum": [ - "bedrock" - ] + "enum": ["bedrock"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -732,14 +673,10 @@ "if": { "properties": { "provider": { - "enum": [ - "gemini" - ] + "enum": ["gemini"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -760,14 +697,10 @@ "if": { "properties": { "provider": { - "enum": [ - "together" - ] + "enum": ["together"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -801,14 +734,10 @@ "if": { "properties": { "provider": { - "enum": [ - "deepinfra" - ] + "enum": ["deepinfra"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -831,9 +760,7 @@ ] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -879,14 +806,10 @@ "if": { "properties": { "provider": { - "enum": [ - "ollama" - ] + "enum": ["ollama"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -934,14 +857,10 @@ "if": { "properties": { "provider": { - "enum": [ - "mistral" - ] + "enum": ["mistral"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -962,22 +881,15 @@ "if": { "properties": { "provider": { - "enum": [ - "deepseek" - ] + "enum": ["deepseek"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { "model": { - "enum": [ - "deepseek-chat", - "deepseek-coder" - ] + "enum": ["deepseek-chat", "deepseek-coder"] } } } @@ -986,14 +898,10 @@ "if": { "properties": { "provider": { - "enum": [ - "groq" - ] + "enum": ["groq"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -1014,21 +922,15 @@ "if": { "properties": { "provider": { - "enum": [ - "fireworks" - ] + "enum": ["fireworks"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { "model": { - "enum": [ - "starcoder-7b" - ] + "enum": ["starcoder-7b"] } } } @@ -1040,30 +942,20 @@ "const": "azure" } }, - "required": [ - "apiType" - ] + "required": ["apiType"] }, "then": { - "required": [ - "engine", - "apiVersion", - "apiBase" - ] + "required": ["engine", "apiVersion", "apiBase"] } }, { "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -1080,9 +972,7 @@ "const": "llamafile" } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -1096,14 +986,10 @@ "if": { "properties": { "provider": { - "enum": [ - "text-gen-webui" - ] + "enum": ["text-gen-webui"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -1117,14 +1003,10 @@ "if": { "properties": { "provider": { - "enum": [ - "flowise" - ] + "enum": ["flowise"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -1151,10 +1033,7 @@ "type": "string" } }, - "required": [ - "key", - "value" - ] + "required": ["key", "value"] } }, "additionalFlowiseConfiguration": { @@ -1173,10 +1052,7 @@ "description": "Configuration Property value" } }, - "required": [ - "key", - "value" - ] + "required": ["key", "value"] } }, "model": { @@ -1268,9 +1144,7 @@ "type": "string" } }, - "required": [ - "default" - ] + "required": ["default"] }, "SlashCommand": { "title": "SlashCommand", @@ -1329,9 +1203,7 @@ "if": { "properties": { "name": { - "enum": [ - "issue" - ] + "enum": ["issue"] } } }, @@ -1344,23 +1216,17 @@ "description": "Enter the URL of the GitHub repository for which you want to generate the issue." } }, - "required": [ - "repositoryUrl" - ] + "required": ["repositoryUrl"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "edit" - ] + "enum": ["edit"] } } }, @@ -1385,9 +1251,7 @@ "if": { "properties": { "name": { - "enum": [ - "share" - ] + "enum": ["share"] } } }, @@ -1405,10 +1269,7 @@ } } ], - "required": [ - "name", - "description" - ] + "required": ["name", "description"] }, "CustomCommand": { "title": "CustomCommand", @@ -1427,11 +1288,7 @@ "type": "string" } }, - "required": [ - "name", - "prompt", - "description" - ] + "required": ["name", "prompt", "description"] }, "ContextProviderWithParams": { "title": "ContextProviderWithParams", @@ -1459,14 +1316,15 @@ "outline", "postgres", "code", - "system", "currentFile", "url", - "database" + "database", + "os" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", "Reference the contents of the terminal", + "Reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread", "Reference the contents of all open or pinned files.", "Enter a search phrase and include the Google search results as context", "Reference the results of a ripgrep search in your codebase", @@ -1476,17 +1334,15 @@ "Include important files from a folder in the prompt, as determined by similarity search", "Reference GitHub issues from a repository", "Retrieve important pages from a documentation website, as determined by similarity search", - "Index and retrieve the contents of any documentation site, using embeddings to find important snippets", "Display a file tree of the current workspace", + "Include important highlighted sections from your code", "Include a repo map showing important code objects", - "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files", "References Postgres table schema and sample rows", "Reference specific functions and classes from throughout your codebase", - "Reference your operating system and cpu", "Reference the contents of the currently active file", "Reference the contents of a page at a URL", - "Reference table schemas" + "Reference table schemas", + "Operating system and CPU Information" ], "type": "string" }, @@ -1506,9 +1362,7 @@ "if": { "properties": { "name": { - "enum": [ - "google" - ] + "enum": ["google"] } } }, @@ -1521,23 +1375,17 @@ "description": "Your API key for https://serper.dev in order to get Google search results" } }, - "required": [ - "serperApiKey" - ] + "required": ["serperApiKey"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "open" - ] + "enum": ["open"] } } }, @@ -1559,9 +1407,7 @@ "if": { "properties": { "name": { - "enum": [ - "issue" - ] + "enum": ["issue"] } } }, @@ -1590,37 +1436,24 @@ "type": { "type": "string", "description": "The type of issues to search for", - "enum": [ - "open", - "closed", - "all" - ] + "enum": ["open", "closed", "all"] } }, - "required": [ - "owner", - "repo" - ] + "required": ["owner", "repo"] } } }, - "required": [ - "repos" - ] + "required": ["repos"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "database" - ] + "enum": ["database"] } } }, @@ -1641,11 +1474,7 @@ "connection_type": { "type": "string", "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": [ - "postgres", - "mysql", - "sqlite" - ] + "enum": ["postgres", "mysql", "sqlite"] }, "connection": { "type": "object", @@ -1678,31 +1507,21 @@ "required": [] } }, - "required": [ - "name", - "connection_type", - "connection" - ] + "required": ["name", "connection_type", "connection"] } } }, - "required": [ - "connections" - ] + "required": ["connections"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "gitlab-mr" - ] + "enum": ["gitlab-mr"] } } }, @@ -1723,23 +1542,17 @@ "description": "If you have code selected, filters out comments that aren't related to the selection." } }, - "required": [ - "token" - ] + "required": ["token"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "jira" - ] + "enum": ["jira"] } } }, @@ -1785,24 +1598,17 @@ ] } }, - "required": [ - "domain", - "token" - ] + "required": ["domain", "token"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "http" - ] + "enum": ["http"] } } }, @@ -1815,24 +1621,17 @@ "description": "The HTTP endpoint of your context provider server." } }, - "required": [ - "url" - ] + "required": ["url"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "codebase", - "folder" - ] + "enum": ["codebase", "folder"] } } }, @@ -1867,9 +1666,7 @@ "if": { "properties": { "name": { - "enum": [ - "postgres" - ] + "enum": ["postgres"] } } }, @@ -1921,19 +1718,11 @@ } } }, - "required": [ - "host", - "port", - "user", - "password", - "database" - ] + "required": ["host", "port", "user", "password", "database"] } } ], - "required": [ - "name" - ] + "required": ["name"] }, "SerializedContinueConfig": { "title": "config.json", @@ -2085,46 +1874,32 @@ "$ref": "#/definitions/RequestOptions" } }, - "required": [ - "provider" - ], + "required": ["provider"], "allOf": [ { "if": { "properties": { "provider": { - "enum": [ - "cohere" - ] + "enum": ["cohere"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { - "required": [ - "apiKey" - ] + "required": ["apiKey"] } }, { "if": { "properties": { "provider": { - "enum": [ - "gemini" - ] + "enum": ["gemini"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { - "required": [ - "apiKey" - ] + "required": ["apiKey"] } } ] @@ -2135,33 +1910,22 @@ "type": "object", "properties": { "name": { - "enum": [ - "cohere", - "voyage", - "llm", - "free-trial" - ] + "enum": ["cohere", "voyage", "llm", "free-trial"] }, "params": { "type": "object" } }, - "required": [ - "name" - ], + "required": ["name"], "allOf": [ { "if": { "properties": { "name": { - "enum": [ - "cohere" - ] + "enum": ["cohere"] } }, - "required": [ - "name" - ] + "required": ["name"] }, "then": { "properties": { @@ -2183,9 +1947,7 @@ "type": "string" } }, - "required": [ - "apiKey" - ] + "required": ["apiKey"] } } } @@ -2194,14 +1956,10 @@ "if": { "properties": { "name": { - "enum": [ - "llm" - ] + "enum": ["llm"] } }, - "required": [ - "name" - ] + "required": ["name"] }, "then": { "properties": { @@ -2212,9 +1970,7 @@ "type": "string" } }, - "required": [ - "modelTitle" - ] + "required": ["modelTitle"] } } } @@ -2223,14 +1979,10 @@ "if": { "properties": { "name": { - "enum": [ - "voyage" - ] + "enum": ["voyage"] } }, - "required": [ - "name" - ] + "required": ["name"] }, "then": { "properties": { @@ -2241,14 +1993,10 @@ "type": "string" }, "model": { - "enum": [ - "rerank-lite-1" - ] + "enum": ["rerank-lite-1"] } }, - "required": [ - "apiKey" - ] + "required": ["apiKey"] } } } @@ -2314,11 +2062,7 @@ "description": "An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables." }, "multilineCompletions": { - "enum": [ - "always", - "never", - "auto" - ], + "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." }, "useCache": { @@ -2347,10 +2091,7 @@ "type": "object", "properties": { "codeBlockToolbarPosition": { - "enum": [ - "top", - "bottom" - ], + "enum": ["top", "bottom"], "default": "top", "description": "Whether to show the copy and apply code buttons at the top or bottom of code blocks in the sidebar." }, @@ -2367,9 +2108,7 @@ "defaultContext": { "type": "array", "items": { - "enum": [ - "activeFile" - ] + "enum": ["activeFile"] } }, "modelRoles": { @@ -2412,10 +2151,7 @@ }, "mergeBehavior": { "type": "string", - "enum": [ - "merge", - "overwrite" - ], + "enum": ["merge", "overwrite"], "default": "merge", "title": "Merge behavior", "markdownDescription": "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json." @@ -2423,4 +2159,4 @@ } } } -} \ No newline at end of file +} From 20bf1bd670389de83ecb7186b8f15e20f746981a Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:08:25 -0700 Subject: [PATCH 13/29] tests (#1501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main --- .github/workflows/jetbrains-build.yaml | 448 +++ .github/workflows/jetbrains-release.yaml | 142 + .github/workflows/preview.yaml | 6 + .github/workflows/ts-check.yaml | 89 + .prompts/test.prompt | 19 + .vscode/launch.json | 3 +- binary/jest.config.js | 23 + binary/package-lock.json | 3494 ++++++++++++++++- binary/package.json | 5 +- binary/src/IpcMessenger.ts | 233 +- binary/src/TcpMessenger.ts | 5 + binary/src/index.ts | 1 + binary/test/binary.test.ts | 136 + binary/tsconfig.json | 5 +- core/autocomplete/lineStream.ts | 2 + core/autocomplete/templates.ts | 11 +- core/config/handler.ts | 5 +- core/config/load.ts | 3 +- core/core.ts | 1 + core/index.d.ts | 7 + core/jest.config.js | 23 +- core/llm/index.ts | 23 +- core/llm/llms/Ollama.ts | 21 +- core/llm/llms/index.ts | 2 +- core/package-lock.json | 2 +- core/package.json | 4 +- core/protocol/core.ts | 2 +- core/protocol/ide.ts | 2 +- core/protocol/ideWebview.ts | 6 - core/test/diff.test.ts | 2 +- core/test/llm.test.ts | 13 +- .../util/dedentAndGetCommonWhitespace.test.ts | 76 + core/test/util/getLastNPathParts.test.ts | 51 + core/test/util/lcs.test.ts | 40 + core/test/util/merge.test.ts | 100 + .../test/util/ranges/getRangeInString.test.ts | 105 + core/test/util/ranges/intersection.test.ts | 123 + core/test/util/ranges/maxMinPosition.test.ts | 70 + core/test/util/ranges/union.test.ts | 92 + core/util/devdataSqlite.ts | 4 +- core/util/fetchWithOptions.ts | 4 +- core/util/filesystem.ts | 22 +- core/util/index.ts | 26 +- core/util/messageIde.ts | 4 + core/util/paths.ts | 6 +- core/util/reverseMessageIde.ts | 191 + extensions/intellij/build.gradle.kts | 2 +- extensions/intellij/gradle.properties | 2 +- .../AutocompleteEditorListener.kt | 2 +- .../AutocompleteLookupListener.kt | 48 + .../autocomplete/AutocompleteService.kt | 18 + .../src/main/resources/META-INF/plugin.xml | 3 + extensions/vscode/package-lock.json | 2 +- extensions/vscode/package.json | 6 - extensions/vscode/src/commands.ts | 3 - .../vscode/src/extension/vscodeExtension.ts | 2 +- extensions/vscode/src/ideProtocol.ts | 8 +- gui/package-lock.json | 2 +- 58 files changed, 5568 insertions(+), 182 deletions(-) create mode 100644 .github/workflows/jetbrains-build.yaml create mode 100644 .github/workflows/jetbrains-release.yaml create mode 100644 .github/workflows/ts-check.yaml create mode 100644 .prompts/test.prompt create mode 100644 binary/jest.config.js create mode 100644 binary/test/binary.test.ts create mode 100644 core/test/util/dedentAndGetCommonWhitespace.test.ts create mode 100644 core/test/util/getLastNPathParts.test.ts create mode 100644 core/test/util/lcs.test.ts create mode 100644 core/test/util/merge.test.ts create mode 100644 core/test/util/ranges/getRangeInString.test.ts create mode 100644 core/test/util/ranges/intersection.test.ts create mode 100644 core/test/util/ranges/maxMinPosition.test.ts create mode 100644 core/test/util/ranges/union.test.ts create mode 100644 core/util/reverseMessageIde.ts create mode 100644 extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteLookupListener.kt diff --git a/.github/workflows/jetbrains-build.yaml b/.github/workflows/jetbrains-build.yaml new file mode 100644 index 000000000..570196005 --- /dev/null +++ b/.github/workflows/jetbrains-build.yaml @@ -0,0 +1,448 @@ +# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps: +# - Validate Gradle Wrapper. +# - Run 'test' and 'verifyPlugin' tasks. +# - Run Qodana inspections. +# - Run the 'buildPlugin' task and prepare artifact for further tests. +# - Run the 'runPluginVerifier' task. +# - Create a draft release. +# +# The workflow is triggered on push and pull_request events. +# +# GitHub Actions reference: https://help.github.com/en/actions +# +## JBIJPPTPL + +name: Build +on: + # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests) + push: + branches: [preview, main] + # Trigger the workflow on any pull request + # pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +defaults: + run: + working-directory: ./extensions/intellij + +jobs: + # Prepare environment and build the plugin + build: + name: Build + runs-on: ubuntu-latest + outputs: + version: ${{ steps.properties.outputs.version }} + changelog: ${{ steps.properties.outputs.changelog }} + pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} + steps: + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + + # Validate wrapper + - name: Gradle Wrapper Validation + uses: gradle/actions/wrapper-validation@v3 + + # Set up Java environment for the next steps + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: 17 + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-home-cache-cleanup: true + + # Set environment variables + - name: Export Properties + id: properties + shell: bash + run: | + PROPERTIES="$(./gradlew properties --console=plain -q)" + VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" + # CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" + CHANGELOG="" + + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT + + echo "changelog<> $GITHUB_OUTPUT + echo "$CHANGELOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier + + # Setup Node.js + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + # Cache node_modules + - name: Cache core node_modules + uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} + + - name: Cache binary node_modules + uses: actions/cache@v3 + with: + path: binary/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} + + # npm install core + - name: Install core node_modules + run: | + cd ../../core + npm ci + + # npm install binary + - name: Install core node_modules + run: | + cd ../../binary + npm ci + + # Build binaries + - name: Install core node_modules + run: | + cd ../../binary + npm run build + + # Build plugin + - name: Build plugin + run: ./gradlew buildPlugin + + # Prepare plugin archive content for creating artifact + - name: Prepare Plugin Artifact + id: artifact + shell: bash + run: | + cd ${{ github.workspace }}/extensions/intellij/build/distributions + FILENAME=`ls *.zip` + unzip "$FILENAME" -d content + + echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT + + # Store already-built plugin as an artifact for downloading + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.artifact.outputs.filename }} + path: ./extensions/intellij/build/distributions/content/*/* + + # Upload binaries as artifacts + - name: Upload artifact (darwin-arm64) + uses: actions/upload-artifact@v4 + with: + name: continue-binary-darwin-arm64 + path: ./binary/bin/darwin-arm64/ + + - name: Upload artifact (darwin-x64) + uses: actions/upload-artifact@v4 + with: + name: continue-binary-darwin-x64 + path: ./binary/bin/darwin-x64/ + + - name: Upload artifact (win32-x64) + uses: actions/upload-artifact@v4 + with: + name: continue-binary-win32-x64 + path: ./binary/bin/win32-x64/ + + - name: Upload artifact (linux-arm64) + uses: actions/upload-artifact@v4 + with: + name: continue-binary-linux-arm64 + path: ./binary/bin/linux-arm64/ + + - name: Upload artifact (linux-x64) + uses: actions/upload-artifact@v4 + with: + name: continue-binary-linux-x64 + path: ./binary/bin/linux-x64/ + + test-binaries: + needs: build + strategy: + matrix: + include: + - os: windows-latest + platform: win32 + arch: x64 + npm_config_arch: x64 + - os: ubuntu-latest + platform: linux + arch: x64 + npm_config_arch: x64 + # arm64 not actually supported by GitHub + # - os: ubuntu-latest + # platform: linux + # arch: arm64 + # npm_config_arch: arm64 + - os: macos-12 + platform: darwin + arch: x64 + npm_config_arch: x64 + - os: macos-latest + platform: darwin + arch: arm64 + npm_config_arch: arm64 + runs-on: ${{ matrix.os }} + steps: + # 1. Check-out repository + - name: Check-out repository + uses: actions/checkout@v4 + + # 2. Install npm dependencies + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Cache core node_modules + uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} + + - name: Cache binary node_modules + uses: actions/cache@v3 + with: + path: binary/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} + + - name: Install Core Dependencies + run: | + cd ../../core + npm ci + + - name: Install Binary Dependencies + run: | + cd ../../binary + npm ci + + # Download the binary artifact + - name: Download binary artifact + uses: actions/download-artifact@v4 + with: + name: continue-binary-${{ matrix.platform }}-${{ matrix.arch }} + path: ./binary/bin/${{ matrix.platform }}-${{ matrix.arch }}/ + + # Set execute permissions for the binary (non-Windows) + - name: Set execute permissions + run: | + cd ../../binary/bin/${{ matrix.platform }}-${{ matrix.arch }} + chmod +x continue-binary + chmod +x node_sqlite3.node + chmod +x index.node + chmod +x esbuild + if: ${{ matrix.platform }} != 'win32' + + - name: Copy node_sqlite3.node to necessary location + run: | + cd ../../binary + mkdir build + cp ./bin/${{ matrix.platform }}-${{ matrix.arch }}/node_sqlite3.node ./build/node_sqlite3.node + + # Run tests for binary + - name: Run binary tests + run: | + cd ../../binary + npm run test + + - name: Upload logs + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: core-logs-${{ matrix.platform }}-${{ matrix.arch }} + path: binary/.continue/logs/core.log + + # Run tests and upload a code coverage report + test: + name: Test + needs: [build] + runs-on: ubuntu-latest + steps: + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + + # Set up Java environment for the next steps + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: 17 + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-home-cache-cleanup: true + + # Run tests + - name: Run Tests + run: ./gradlew check + + # Collect Tests Result of failed tests + - name: Collect Tests Result + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: tests-result + path: ${{ github.workspace }}/extensions/intellij/build/reports/tests + + # Upload the Kover report to CodeCov + # - name: Upload Code Coverage Report + # uses: codecov/codecov-action@v4 + # with: + # files: ${{ github.workspace }}/build/reports/kover/report.xml + + # Run Qodana inspections and provide report + inspectCode: + if: false + name: Inspect code + needs: [build] + runs-on: ubuntu-latest + permissions: + contents: write + checks: write + pull-requests: write + steps: + # Free GitHub Actions Environment Disk Space + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + large-packages: false + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + + # Set up Java environment for the next steps + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: 17 + + # Run Qodana inspections + - name: Qodana - Code Inspection + uses: JetBrains/qodana-action@v2024.1.5 + with: + cache-default-branch-only: true + + # Run plugin structure verification along with IntelliJ Plugin Verifier + verify: + name: Verify plugin + needs: [build] + runs-on: ubuntu-latest + steps: + # Free GitHub Actions Environment Disk Space + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + large-packages: false + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + + # Set up Java environment for the next steps + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: 17 + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-home-cache-cleanup: true + + # Cache Plugin Verifier IDEs + - name: Setup Plugin Verifier IDEs Cache + uses: actions/cache@v4 + with: + path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides + key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} + + # Run Verify Plugin task and IntelliJ Plugin Verifier tool + - name: Run Plugin Verification tasks + run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }} + + # Collect Plugin Verifier Result + - name: Collect Plugin Verifier Result + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: pluginVerifier-result + path: ${{ github.workspace }}/build/reports/pluginVerifier + + # Prepare a draft release for GitHub Releases page for the manual verification + # If accepted and published, release workflow would be triggered + releaseDraft: + name: Release draft + if: github.event_name != 'pull_request' + needs: [build, test, test-binaries, verify] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + + - name: Set up Git + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + + - name: Tag the repository + id: tag + run: | + # See https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names + TAG=v${{ needs.build.outputs.version }}-jetbrains + echo "$TAG" + echo "tag=$TAG" >> $GITHUB_OUTPUT + git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA} + git push origin $TAG + + # Remove old release drafts by using the curl request for the available releases with a draft flag + - name: Remove Old Release Drafts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api repos/{owner}/{repo}/releases \ + --jq '.[] | select(.draft == true) | .id' \ + | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} + + # Create a new release draft which is not publicly visible and requires manual acceptance + - name: Create Release Draft + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${{ steps.tag.outputs.tag }}" \ + --draft \ + --title "v${{ needs.build.outputs.version }}-jetbrains" \ + --notes "$(cat << 'EOM' + ${{ needs.build.outputs.changelog }} + EOM + )" + + # Download the Gradle build artifact + - name: Download Gradle build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.build.outputs.filename }} + path: ./artifacts diff --git a/.github/workflows/jetbrains-release.yaml b/.github/workflows/jetbrains-release.yaml new file mode 100644 index 000000000..8b4fec404 --- /dev/null +++ b/.github/workflows/jetbrains-release.yaml @@ -0,0 +1,142 @@ +# GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow. +# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN. +# See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information. + +name: Release +on: + release: + types: [prereleased, released] + +defaults: + run: + working-directory: ./extensions/intellij + +jobs: + # Prepare and publish the plugin to JetBrains Marketplace repository + release: + name: Publish Plugin + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + + # Set up Java environment for the next steps + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: 17 + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-home-cache-cleanup: true + + # Set environment variables + - name: Export Properties + id: properties + shell: bash + run: | + CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d' + ${{ github.event.release.body }} + EOM + )" + + echo "changelog<> $GITHUB_OUTPUT + echo "$CHANGELOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + # Setup Node.js + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + # Cache node_modules + - name: Cache core node_modules + uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} + + - name: Cache binary node_modules + uses: actions/cache@v3 + with: + path: binary/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} + + # npm install core + - name: Install core node_modules + run: | + cd ../../core + npm ci + + # npm install binary + - name: Install core node_modules + run: | + cd ../../binary + npm ci + + # Build binaries + - name: Install core node_modules + run: | + cd ../../binary + npm run build + + # Update Unreleased section with the current release note + - name: Patch Changelog + if: ${{ steps.properties.outputs.changelog != '' }} + env: + CHANGELOG: ${{ steps.properties.outputs.changelog }} + run: | + ./gradlew patchChangelog --release-note="$CHANGELOG" + + # Publish the plugin to JetBrains Marketplace + - name: Publish Plugin + env: + PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} + CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} + PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} + PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} + run: ./gradlew publishPlugin + + # Upload artifact as a release asset + - name: Upload Release Asset + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/* + + # Create a pull request + - name: Create Pull Request + if: ${{ steps.properties.outputs.changelog != '' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION="${{ github.event.release.tag_name }}" + BRANCH="changelog-update-$VERSION" + LABEL="release changelog" + + git config user.email "action@github.com" + git config user.name "GitHub Action" + + git checkout -b $BRANCH + git commit -am "Changelog update - $VERSION" + git push --set-upstream origin $BRANCH + + gh label create "$LABEL" \ + --description "Pull requests with release changelog update" \ + --force \ + || true + + gh pr create \ + --title "Changelog update - \`$VERSION\`" \ + --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \ + --label "$LABEL" \ + --head $BRANCH diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index cfbc9b8bf..95e426f6f 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -90,6 +90,12 @@ jobs: cd core npm ci + # 2.25 Run core tests + - name: Run core tests + run: | + cd core + npm run test + # 2.5. Pre package - name: Set var for environment info shell: pwsh diff --git a/.github/workflows/ts-check.yaml b/.github/workflows/ts-check.yaml new file mode 100644 index 000000000..f0baf029d --- /dev/null +++ b/.github/workflows/ts-check.yaml @@ -0,0 +1,89 @@ +name: TypeScript Check + +on: + pull_request: + branches: + - main + - preview + +jobs: + tsc-check: + runs-on: ubuntu-latest + + steps: + # 1. Check-out repository + - name: Check-out repository + uses: actions/checkout@v4 + + # 2. Install npm dependencies + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Cache extension node_modules + uses: actions/cache@v3 + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - name: Cache core node_modules + uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} + + - name: Cache gui node_modules + uses: actions/cache@v3 + with: + path: gui/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} + + - name: Cache binary node_modules + uses: actions/cache@v3 + with: + path: binary/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} + + - name: Install extension Dependencies + run: | + cd extensions/vscode + npm ci + env: + # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + + - name: Install gui Dependencies + run: | + cd gui + npm ci + + - name: Install Core Dependencies + run: | + cd core + npm ci + + - name: Install Binary Dependencies + run: | + cd binary + npm ci + + - name: tsc core + run: | + cd core + npx tsc + + - name: tsc extensions/vscode + run: | + cd extensions/vscode + npx tsc + + - name: tsc binary + run: | + cd binary + npx tsc + + - name: tsc gui + run: | + cd gui + npx tsc diff --git a/.prompts/test.prompt b/.prompts/test.prompt new file mode 100644 index 000000000..e2f5d8662 --- /dev/null +++ b/.prompts/test.prompt @@ -0,0 +1,19 @@ +temperature: 0.5 +maxTokens: 4096 +name: jest +description: Write Jest unit tests +--- + +You are an expert programmer + + +{{{ input }}} + +Write unit tests for the above selected code, following each of these instructions: +- Use `jest` +- Properly set up and tear down +- Include important edge cases +- The tests should be complete and sophisticated +- Give the tests just as chat output, don't edit any file +- Don't explain how to set up `jest` +- Write a single code block, making sure to label with the language being used (e.g. "```typscript") \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index f11b70528..c9085a951 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,7 +18,8 @@ "internalConsoleOptions": "openOnSessionStart", "cwd": "${workspaceFolder}/binary", "env": { - "CONTINUE_DEVELOPMENT": "true" + "CONTINUE_DEVELOPMENT": "true", + "CONTINUE_GLOBAL_DIR": "${workspaceFolder}/binary/.continue" } }, { diff --git a/binary/jest.config.js b/binary/jest.config.js new file mode 100644 index 000000000..e5d833a48 --- /dev/null +++ b/binary/jest.config.js @@ -0,0 +1,23 @@ +module.exports = { + roots: ["/test"], + transform: { + "^.+\\.ts?$": [ + "ts-jest", + { + useESM: true, + }, + ], + "^.+\\.js$": [ + "babel-jest", + { + presets: [["@babel/preset-env", { targets: { node: "current" } }]], + }, + ], + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", ".d.ts"], + extensionsToTreatAsEsm: [".ts", ".d.ts"], + // Remove or comment out the moduleNameMapper configuration + moduleNameMapper: { + "^(.*)\\.js$": "$1", + }, +}; diff --git a/binary/package-lock.json b/binary/package-lock.json index 00a81d0a9..4ed57c259 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -28,11 +28,14 @@ "devDependencies": { "@biomejs/biome": "1.6.4", "@types/follow-redirects": "^1.14.4", + "@types/jest": "^29.5.12", "@types/uuid": "^9.0.8", "@vercel/ncc": "^0.38.1", "esbuild": "0.19.11", + "jest": "^29.7.0", "pkg": "^5.8.1", "rimraf": "^5.0.7", + "ts-jest": "^29.1.4", "typescript": "^5.3.3" } }, @@ -133,6 +136,19 @@ "node": ">=12.17" } }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@apache-arrow/ts": { "version": "14.0.2", "resolved": "https://registry.npmjs.org/@apache-arrow/ts/-/ts-14.0.2.tgz", @@ -151,6 +167,108 @@ "tslib": "^2.5.3" } }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core/node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/core/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/generator": { "version": "7.18.2", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", @@ -165,24 +283,367 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "dev": true, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { "version": "7.18.4", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", @@ -195,6 +656,285 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/types": { "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", @@ -209,6 +949,12 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@biomejs/biome": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.6.4.tgz", @@ -749,6 +1495,394 @@ "node": ">=12" } }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/core/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/core/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@jest/reporters/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -1050,6 +2184,111 @@ "node": ">=14" } }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__core/node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@types/babel__core/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/babel__traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@types/command-line-args": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", @@ -1071,6 +2310,49 @@ "@types/node": "*" } }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, "node_modules/@types/node": { "version": "20.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.0.tgz", @@ -1082,12 +2364,33 @@ "integrity": "sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA==", "peer": true }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, "node_modules/@types/uuid": { "version": "9.0.8", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, "node_modules/@vercel/ncc": { "version": "0.38.1", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz", @@ -1109,6 +2412,21 @@ "node": ">= 6.0.0" } }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -1135,6 +2453,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/apache-arrow": { "version": "14.0.2", "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-14.0.2.tgz", @@ -1156,6 +2487,15 @@ "arrow2csv": "bin/arrow2csv.js" } }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/array-back": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", @@ -1198,6 +2538,122 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1284,6 +2740,59 @@ "node": ">=8" } }, + "node_modules/browserslist": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -1308,6 +2817,50 @@ "ieee754": "^1.1.13" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001634", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001634.tgz", + "integrity": "sha512-fbBYXQ9q3+yp1q1gBk86tOFs4pyn/yxFm5ZNP18OXJDfA3txImOY9PhfxVggZ4vRHDqoU8NrKU81eN0OtzOgRA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1338,12 +2891,42 @@ "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", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1413,6 +2996,22 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1496,6 +3095,18 @@ "node": ">=18" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/core": { "resolved": "../core", "link": true @@ -1506,6 +3117,27 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1560,6 +3192,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -1569,6 +3215,15 @@ "node": ">=4.0.0" } }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1591,6 +3246,24 @@ "node": ">=8" } }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1609,6 +3282,24 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, + "node_modules/electron-to-chromium": { + "version": "1.4.803", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.803.tgz", + "integrity": "sha512-61H9mLzGOCLLVsnLiRzCbc63uldP0AniRYPV3hbGVtONA1pI7qSGILdbofR7A8TMbOypDocEAjH/e+9k1QIe3g==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -1624,6 +3315,15 @@ "once": "^1.4.0" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/esbuild": { "version": "0.19.11", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", @@ -1671,6 +3371,66 @@ "node": ">=6" } }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/expand-template": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", @@ -1680,6 +3440,22 @@ "node": ">=6" } }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -1696,6 +3472,12 @@ "node": ">=8.6.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -1705,6 +3487,15 @@ "reusify": "^1.0.4" } }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, "node_modules/fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -1757,6 +3548,19 @@ "node": ">=4.0.0" } }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/flatbuffers": { "version": "23.5.26", "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-23.5.26.tgz", @@ -1853,6 +3657,26 @@ "node": ">=10" } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -1862,6 +3686,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1871,6 +3704,27 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -1911,6 +3765,15 @@ "node": ">= 6" } }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -1966,6 +3829,12 @@ "node": ">= 0.4" } }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -1979,6 +3848,15 @@ "node": ">= 6" } }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -2008,6 +3886,45 @@ "node": ">= 4" } }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -2036,6 +3953,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, "node_modules/is-core-module": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", @@ -2071,6 +3994,15 @@ "node": ">=8" } }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2092,6 +4024,18 @@ "node": ">=0.12.0" } }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2104,6 +4048,99 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": 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", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jackspeak": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", @@ -2122,6 +4159,777 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-cli/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/jest-cli/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "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.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "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 + } + } + }, + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-config/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-config/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2143,6 +4951,24 @@ "node": ">=0.8" } }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -2155,6 +4981,42 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/lodash.assignwith": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", @@ -2167,6 +5029,12 @@ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "peer": true }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lru-cache": { "version": "10.2.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", @@ -2209,6 +5077,27 @@ "node": ">=4" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2250,6 +5139,15 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", @@ -2351,6 +5249,12 @@ "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", @@ -2420,6 +5324,39 @@ "node": ">= 6.13.0" } }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2428,6 +5365,21 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-is-promise": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", @@ -2437,6 +5389,57 @@ "node": ">=8" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/pad-left": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", @@ -2449,6 +5452,42 @@ "node": ">=0.10.0" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -2489,6 +5528,12 @@ "node": ">=8" } }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -2509,6 +5554,15 @@ "node": ">=4" } }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/pkg": { "version": "5.8.1", "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz", @@ -2542,6 +5596,18 @@ } } }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/pkg-fetch": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.4.2.tgz", @@ -2619,6 +5685,32 @@ "node": ">=10" } }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -2634,6 +5726,19 @@ "node": ">=0.4.0" } }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -2649,6 +5754,22 @@ "once": "^1.3.1" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2684,6 +5805,12 @@ "rc": "cli.js" } }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -2734,6 +5861,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/resolve/node_modules/is-core-module": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", @@ -2898,6 +6055,12 @@ "simple-concat": "^1.0.0" } }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -2907,6 +6070,25 @@ "node": ">=8" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -2918,6 +6100,24 @@ "node": "*" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/stream-meter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", @@ -2945,6 +6145,40 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -3041,6 +6275,24 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -3163,11 +6415,74 @@ "node": ">= 6" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -3195,6 +6510,62 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "node_modules/ts-jest": { + "version": "29.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz", + "integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -3213,6 +6584,27 @@ "node": "*" } }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", @@ -3249,6 +6641,36 @@ "node": ">= 10.0.0" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3267,6 +6689,20 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/vectordb": { "version": "0.4.20", "resolved": "https://registry.npmjs.org/vectordb/-/vectordb-0.4.20.tgz", @@ -3296,6 +6732,15 @@ "apache-arrow": "^14.0.2" } }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, "node_modules/web-streams-polyfill": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", @@ -3470,6 +6915,25 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -3479,6 +6943,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -3546,6 +7016,18 @@ "engines": { "node": ">=8" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/binary/package.json b/binary/package.json index 3f1a24308..774993a9f 100644 --- a/binary/package.json +++ b/binary/package.json @@ -20,7 +20,7 @@ "outputPath": "bin" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "jest", "build": "node build.js", "build:old": "ncc build src/index.ts -o out && pkg .", "build:dev": "tsc", @@ -31,11 +31,14 @@ "devDependencies": { "@biomejs/biome": "1.6.4", "@types/follow-redirects": "^1.14.4", + "@types/jest": "^29.5.12", "@types/uuid": "^9.0.8", "@vercel/ncc": "^0.38.1", "esbuild": "0.19.11", + "jest": "^29.7.0", "pkg": "^5.8.1", "rimraf": "^5.0.7", + "ts-jest": "^29.1.4", "typescript": "^5.3.3" }, "dependencies": { diff --git a/binary/src/IpcMessenger.ts b/binary/src/IpcMessenger.ts index 9c06fcb1b..c8640f513 100644 --- a/binary/src/IpcMessenger.ts +++ b/binary/src/IpcMessenger.ts @@ -1,43 +1,22 @@ -import { IProtocol } from "core/protocol"; +import { IProtocol } from "core/protocol/index.js"; import { IMessenger, type Message } from "core/util/messenger"; +import { ChildProcessWithoutNullStreams } from "node:child_process"; import * as fs from "node:fs"; +import net from "node:net"; import { v4 as uuidv4 } from "uuid"; -export class IpcMessenger< +class IPCMessengerBase< ToProtocol extends IProtocol, FromProtocol extends IProtocol, > implements IMessenger { + _sendMsg(message: Message) { + throw new Error("Not implemented"); + } + typeListeners = new Map any)[]>(); idListeners = new Map any>(); - constructor() { - process.stdin.on("data", (data) => { - this._handleData(data); - }); - process.stdout.on("close", () => { - fs.writeFileSync("./error.log", `${new Date().toISOString()}\n`); - console.log("[info] Exiting Continue core..."); - process.exit(1); - }); - process.stdin.on("close", () => { - fs.writeFileSync("./error.log", `${new Date().toISOString()}\n`); - console.log("[info] Exiting Continue core..."); - process.exit(1); - }); - } - - private _onErrorHandlers: ((error: Error) => void)[] = []; - - onError(handler: (error: Error) => void) { - this._onErrorHandlers.push(handler); - } - - mock(data: any) { - const d = JSON.stringify(data); - this._handleData(Buffer.from(d)); - } - private _handleLine(line: string) { try { const msg: Message = JSON.parse(line); @@ -83,7 +62,7 @@ export class IpcMessenger< } private _unfinishedLine: string | undefined = undefined; - private _handleData(data: Buffer) { + protected _handleData(data: Buffer) { const d = data.toString(); const lines = d.split(/\r\n/).filter((line) => line.trim() !== ""); if (lines.length === 0) { @@ -100,41 +79,10 @@ export class IpcMessenger< lines.forEach((line) => this._handleLine(line)); } - send( - messageType: T, - data: FromProtocol[T][0], - messageId?: string, - ): string { - messageId = messageId ?? uuidv4(); - const msg: Message = { - messageType: messageType as string, - data, - messageId, - }; - // process.send?.(data); - process.stdout?.write(JSON.stringify(msg) + "\r\n"); - return messageId; - } + private _onErrorHandlers: ((error: Error) => void)[] = []; - on( - messageType: T, - handler: (message: Message) => ToProtocol[T][1], - ): void { - if (!this.typeListeners.has(messageType)) { - this.typeListeners.set(messageType, []); - } - this.typeListeners.get(messageType)?.push(handler); - } - - invoke( - messageType: T, - data: ToProtocol[T][0], - ): ToProtocol[T][1] { - return this.typeListeners.get(messageType)?.[0]?.({ - messageId: uuidv4(), - messageType: messageType as string, - data, - }); + onError(handler: (error: Error) => void) { + this._onErrorHandlers.push(handler); } request( @@ -151,4 +99,161 @@ export class IpcMessenger< this.send(messageType, data, messageId); }); } + + mock(data: any) { + const d = JSON.stringify(data); + this._handleData(Buffer.from(d)); + } + + send( + messageType: T, + data: FromProtocol[T][0], + messageId?: string, + ): string { + messageId = messageId ?? uuidv4(); + const msg: Message = { + messageType: messageType as string, + data, + messageId, + }; + this._sendMsg(msg); + return messageId; + } + + invoke( + messageType: T, + data: ToProtocol[T][0], + ): ToProtocol[T][1] { + return this.typeListeners.get(messageType)?.[0]?.({ + messageId: uuidv4(), + messageType: messageType as string, + data, + }); + } + + on( + messageType: T, + handler: ( + message: Message, + ) => Promise | ToProtocol[T][1], + ): void { + if (!this.typeListeners.has(messageType)) { + this.typeListeners.set(messageType, []); + } + this.typeListeners.get(messageType)?.push(handler); + } +} + +export class IpcMessenger< + ToProtocol extends IProtocol, + FromProtocol extends IProtocol, + > + extends IPCMessengerBase + implements IMessenger +{ + constructor() { + super(); + console.log("Setup"); + process.stdin.on("data", (data) => { + // console.log("[info] Received data: ", data.toString()); + this._handleData(data); + }); + process.stdout.on("close", () => { + fs.writeFileSync("./error.log", `${new Date().toISOString()}\n`); + console.log("[info] Exiting Continue core..."); + process.exit(1); + }); + process.stdin.on("close", () => { + fs.writeFileSync("./error.log", `${new Date().toISOString()}\n`); + console.log("[info] Exiting Continue core..."); + process.exit(1); + }); + } + _sendMsg(msg: Message) { + // console.log("[info] Sending message: ", msg); + const d = JSON.stringify(msg); + process.stdout?.write(d + "\r\n"); + } +} + +export class CoreBinaryMessenger< + ToProtocol extends IProtocol, + FromProtocol extends IProtocol, + > + extends IPCMessengerBase + implements IMessenger +{ + private errorHandler: (error: Error) => void = () => {}; + private messageHandlers: Map< + keyof ToProtocol, + (message: Message) => Promise | any + > = new Map(); + + constructor(private readonly subprocess: ChildProcessWithoutNullStreams) { + super(); + console.log("Setup"); + this.subprocess.stdout.on("data", (data) => { + console.log("[info] Received data from core:", data.toString() + "\n"); + this._handleData(data); + }); + this.subprocess.stdout.on("close", () => { + console.log("[info] Continue core exited"); + }); + this.subprocess.stdin.on("close", () => { + console.log("[info] Continue core exited"); + }); + } + + _sendMsg(msg: Message) { + console.log("[info] Sending message to core:", msg); + const d = JSON.stringify(msg); + this.subprocess.stdin.write(d + "\r\n"); + } +} + +export class CoreBinaryTcpMessenger< + ToProtocol extends IProtocol, + FromProtocol extends IProtocol, + > + extends IPCMessengerBase + implements IMessenger +{ + private port: number = 3000; + private socket: net.Socket | null = null; + + typeListeners = new Map any)[]>(); + idListeners = new Map any>(); + + constructor() { + super(); + const socket = net.createConnection(this.port, "localhost"); + + this.socket = socket; + socket.on("data", (data: Buffer) => { + // console.log("[info] Received data from core:", data.toString() + "\n"); + this._handleData(data); + }); + + socket.on("end", () => { + console.log("Disconnected from server"); + }); + + socket.on("error", (err: any) => { + console.error("Client error:", err); + }); + } + + close() { + this.socket?.end(); + } + + _sendMsg(msg: Message) { + if (this.socket) { + // console.log("[info] Sending message to core:", msg); + const d = JSON.stringify(msg); + this.socket.write(d + "\r\n"); + } else { + console.error("Socket is not connected"); + } + } } diff --git a/binary/src/TcpMessenger.ts b/binary/src/TcpMessenger.ts index 544a24128..c306af44b 100644 --- a/binary/src/TcpMessenger.ts +++ b/binary/src/TcpMessenger.ts @@ -17,6 +17,11 @@ export class TcpMessenger< constructor() { const server = net.createServer((socket) => { this.socket = socket; + + socket.on("connect", () => { + console.log("Connected to server"); + }); + socket.on("data", (data: Buffer) => { this._handleData(data); }); diff --git a/binary/src/index.ts b/binary/src/index.ts index a4496e64d..04be5de5a 100644 --- a/binary/src/index.ts +++ b/binary/src/index.ts @@ -35,6 +35,7 @@ program.action(async () => { const core = new Core(messenger, ide, async (text) => { fs.appendFileSync(promptLogsPath, text + "\n\n"); }); + console.log("Core started"); } catch (e) { fs.writeFileSync("./error.log", `${new Date().toISOString()} ${e}\n`); console.log("Error: ", e); diff --git a/binary/test/binary.test.ts b/binary/test/binary.test.ts new file mode 100644 index 000000000..87549e155 --- /dev/null +++ b/binary/test/binary.test.ts @@ -0,0 +1,136 @@ +import { FromIdeProtocol, ToIdeProtocol } from "core/protocol/index.js"; +import FileSystemIde from "core/util/filesystem"; +import { IMessenger } from "core/util/messenger"; +import { ReverseMessageIde } from "core/util/reverseMessageIde"; +import fs from "fs"; +import { ChildProcessWithoutNullStreams, spawn } from "node:child_process"; +import path from "path"; +import { + CoreBinaryMessenger, + CoreBinaryTcpMessenger, +} from "../src/IpcMessenger"; + +// jest.setTimeout(100_000); + +const USE_TCP = false; + +function autodetectPlatformAndArch() { + const platform = { + aix: "linux", + darwin: "darwin", + freebsd: "linux", + linux: "linux", + openbsd: "linux", + sunos: "linux", + win32: "win32", + android: "linux", + cygwin: "win32", + netbsd: "linux", + haiku: "linux", + }[process.platform]; + const arch = { + arm: "arm64", + arm64: "arm64", + ia32: "x64", + loong64: "arm64", + mips: "arm64", + mipsel: "arm64", + ppc: "x64", + ppc64: "x64", + riscv64: "arm64", + s390: "x64", + s390x: "x64", + x64: "x64", + }[process.arch]; + return [platform, arch]; +} + +const CONTINUE_GLOBAL_DIR = path.join(__dirname, "..", ".continue"); + +describe("Test Suite", () => { + let messenger: IMessenger; + let subprocess: ChildProcessWithoutNullStreams; + + beforeAll(async () => { + const [platform, arch] = autodetectPlatformAndArch(); + const binaryPath = path.join( + __dirname, + "..", + "bin", + `${platform}-${arch}`, + `continue-binary${platform === "win32" ? ".exe" : ""}`, + ); + expect(fs.existsSync(binaryPath)).toBe(true); + + if (USE_TCP) { + messenger = new CoreBinaryTcpMessenger(); + } else { + subprocess = spawn(binaryPath, { + env: { ...process.env, CONTINUE_GLOBAL_DIR }, + }); + messenger = new CoreBinaryMessenger( + subprocess, + ); + } + + const ide = new FileSystemIde(); + const reverseIde = new ReverseMessageIde(messenger.on.bind(messenger), ide); + + // Wait for core to set itself up + await new Promise((resolve) => setTimeout(resolve, 1000)); + }); + + afterAll(async () => { + // Wait for the subprocess to exit + if (USE_TCP) { + ( + messenger as CoreBinaryTcpMessenger + ).close(); + } else { + subprocess.kill(); + await new Promise((resolve) => subprocess.on("close", resolve)); + await new Promise((resolve) => setTimeout(resolve, 1000)); + } + }); + + it("should respond to ping with pong", async () => { + const resp = await messenger.request("ping", "ping"); + expect(resp).toBe("pong"); + }); + + it("should create .continue directory at the specified location with expected files", async () => { + expect(fs.existsSync(CONTINUE_GLOBAL_DIR)).toBe(true); + + // Many of the files are only created when trying to load the config + const config = await messenger.request( + "config/getBrowserSerialized", + undefined, + ); + + const expectedFiles = [ + "config.json", + "config.ts", + "package.json", + "logs/core.log", + "index/autocompleteCache.sqlite", + "out/config.js", + "types/core/index.d.ts", + ]; + + for (const file of expectedFiles) { + const filePath = path.join(CONTINUE_GLOBAL_DIR, file); + expect(fs.existsSync(filePath)).toBe(true); + } + }); + + it("should properly edit config", async () => { + const config = await messenger.request( + "config/getBrowserSerialized", + undefined, + ); + expect(config).toHaveProperty("models"); + expect(config).toHaveProperty("embeddingsProvider"); + expect(config).toHaveProperty("contextProviders"); + expect(config).toHaveProperty("slashCommands"); + }); +}); diff --git a/binary/tsconfig.json b/binary/tsconfig.json index 94fbda91f..351115f59 100644 --- a/binary/tsconfig.json +++ b/binary/tsconfig.json @@ -13,7 +13,8 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - "resolveJsonModule": true /* Enable importing .json files */ + "resolveJsonModule": true /* Enable importing .json files */, + "types": ["jest"] }, - "include": ["src/**/*"] + "include": ["src/**/*", "test/**/*"] } diff --git a/core/autocomplete/lineStream.ts b/core/autocomplete/lineStream.ts index 14d4c4ab7..674f0d46e 100644 --- a/core/autocomplete/lineStream.ts +++ b/core/autocomplete/lineStream.ts @@ -218,6 +218,8 @@ function isEnglishFirstLine(line: string) { line.startsWith("sure thing") || line.startsWith("sure!") || line.startsWith("to fill") || + line.startsWith("certainly") || + line.startsWith("of course") || line.startsWith("the code should") ) { return true; diff --git a/core/autocomplete/templates.ts b/core/autocomplete/templates.ts index 7ce321b45..46c60ca6b 100644 --- a/core/autocomplete/templates.ts +++ b/core/autocomplete/templates.ts @@ -28,7 +28,13 @@ interface AutocompleteTemplate { const stableCodeFimTemplate: AutocompleteTemplate = { template: "{{{prefix}}}{{{suffix}}}", completionOptions: { - stop: ["", "", "", "<|endoftext|>"], + stop: [ + "", + "", + "", + "<|endoftext|>", + "", + ], }, }; @@ -277,7 +283,8 @@ export function getTemplateForModel(model: string): AutocompleteTemplate { lowerCaseModel.includes("starchat") || lowerCaseModel.includes("octocoder") || lowerCaseModel.includes("stable") || - lowerCaseModel.includes("codeqwen") + lowerCaseModel.includes("codeqwen") || + lowerCaseModel.includes("qwen") ) { return stableCodeFimTemplate; } diff --git a/core/config/handler.ts b/core/config/handler.ts index 0cc12a765..0fd2c0503 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -4,9 +4,9 @@ import { ContinueRcJson, IContextProvider, IDE, + IdeSettings, ILLM, } from "../index.js"; -import { IdeSettings } from "../protocol/ideWebview.js"; import { Telemetry } from "../util/posthog.js"; import { finalToBrowserConfig, loadFullConfigNode } from "./load.js"; @@ -72,11 +72,12 @@ export class ConfigHandler { const ideInfo = await this.ide.getIdeInfo(); const uniqueId = await this.ide.getUniqueId(); + const ideSettings = await this.ideSettingsPromise; const newConfig = await loadFullConfigNode( this.ide, workspaceConfigs, - await this.ideSettingsPromise, + ideSettings, ideInfo.ideType, uniqueId, this.writeLog, diff --git a/core/config/load.ts b/core/config/load.ts index 0745614d7..1a6c2929a 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -21,6 +21,7 @@ import { EmbeddingsProviderDescription, IContextProvider, IDE, + IdeSettings, IdeType, ModelDescription, Reranker, @@ -34,7 +35,7 @@ import { BaseLLM } from "../llm/index.js"; import CustomLLMClass from "../llm/llms/CustomLLM.js"; import FreeTrial from "../llm/llms/FreeTrial.js"; import { llmFromDescription } from "../llm/llms/index.js"; -import { IdeSettings } from "../protocol/ideWebview.js"; + import { fetchwithRequestOptions } from "../util/fetchWithOptions.js"; import { copyOf } from "../util/index.js"; import mergeJson from "../util/merge.js"; diff --git a/core/core.ts b/core/core.ts index 5bc049255..d78a6fb21 100644 --- a/core/core.ts +++ b/core/core.ts @@ -196,6 +196,7 @@ export class Core { this.ide, (await this.config()).experimental?.promptPath, ); + this.configHandler.reloadConfig(); }); on("config/reload", (msg) => { this.configHandler.reloadConfig(); diff --git a/core/index.d.ts b/core/index.d.ts index 406e82d27..6ad9c10e9 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -402,8 +402,15 @@ export enum FileType { SymbolicLink = 64, } +export interface IdeSettings { + remoteConfigServerUrl: string | undefined; + remoteConfigSyncPeriod: number; + userToken: string; +} + export interface IDE { getIdeInfo(): Promise; + getIdeSettings(): Promise; getDiff(): Promise; isTelemetryEnabled(): Promise; getUniqueId(): Promise; diff --git a/core/jest.config.js b/core/jest.config.js index 9791e7fe6..1dfa0e681 100644 --- a/core/jest.config.js +++ b/core/jest.config.js @@ -1,23 +1,12 @@ export default { - roots: [""], transform: { - "^.+\\.ts?$": [ - "ts-jest", - { - useESM: true, - }, - ], - "^.+\\.js$": [ - "babel-jest", - { - presets: [["@babel/preset-env", { targets: { node: "current" } }]], - }, - ], + "\\.[jt]sx?$": ["ts-jest", { useESM: true }], }, - moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], - extensionsToTreatAsEsm: [".ts"], - // Remove or comment out the moduleNameMapper configuration + moduleNameMapper: { - "^(.*)\\.js$": "$1", + "(.+)\\.js": "$1", }, + extensionsToTreatAsEsm: [".ts"], + preset: "ts-jest/presets/default-esm", + testTimeout: 10000, }; diff --git a/core/llm/index.ts b/core/llm/index.ts index 2a372e887..728bdeef4 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -293,17 +293,20 @@ ${prompt}`; return resp; } catch (e: any) { - console.warn( - `${e.message}\n\nCode: ${e.code}\nError number: ${e.errno}\nSyscall: ${e.erroredSysCall}\nType: ${e.type}\n\n${e.stack}`, - ); - - if ( - e.code === "ECONNREFUSED" && - e.message.includes("http://127.0.0.1:11434") - ) { - throw new Error( - "Failed to connect to local Ollama instance. To start Ollama, first download it at https://ollama.ai.", + // Errors to ignore + if (!e.message.includes("/api/show")) { + console.warn( + `${e.message}\n\nCode: ${e.code}\nError number: ${e.errno}\nSyscall: ${e.erroredSysCall}\nType: ${e.type}\n\n${e.stack}`, ); + + if ( + e.code === "ECONNREFUSED" && + e.message.includes("http://127.0.0.1:11434") + ) { + throw new Error( + "Failed to connect to local Ollama instance. To start Ollama, first download it at https://ollama.ai.", + ); + } } throw new Error(e.message); } diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 8789e80d4..c6d6acdb6 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -21,14 +21,15 @@ class Ollama extends BaseLLM { if (options.model === "AUTODETECT") { return; } - try { - this.fetch(this.getEndpoint("api/show"), { - method: "POST", - headers: { - Authorization: `Bearer ${this.apiKey}`, - }, - body: JSON.stringify({ name: this._getModel() }), - }).then(async (response) => { + + this.fetch(this.getEndpoint("api/show"), { + method: "POST", + headers: { + Authorization: `Bearer ${this.apiKey}`, + }, + body: JSON.stringify({ name: this._getModel() }), + }) + .then(async (response) => { if (response.status !== 200) { // console.warn( // "Error calling Ollama /api/show endpoint: ", @@ -67,8 +68,10 @@ class Ollama extends BaseLLM { } } } + }) + .catch((e) => { + // console.warn("Error calling the Ollama /api/show endpoint: ", e); }); - } catch (e) {} } private _getModel() { diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 4fbf29d8b..ea871bd12 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -2,11 +2,11 @@ import Handlebars from "handlebars"; import { v4 as uuidv4 } from "uuid"; import { BaseCompletionOptions, + IdeSettings, ILLM, LLMOptions, ModelDescription, } from "../../index.js"; -import { IdeSettings } from "../../protocol/ideWebview.js"; import { DEFAULT_MAX_TOKENS } from "../constants.js"; import { BaseLLM } from "../index.js"; import Anthropic from "./Anthropic.js"; diff --git a/core/package-lock.json b/core/package-lock.json index 49a52ecb4..e4587f56b 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -26,7 +26,7 @@ "commander": "^12.0.0", "comment-json": "^4.2.3", "dbinfoz": "^0.1.4", - "dotenv": "^16.3.1", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", diff --git a/core/package.json b/core/package.json index f93a00116..fd34477ef 100644 --- a/core/package.json +++ b/core/package.json @@ -3,7 +3,7 @@ "version": "1.0.13", "description": "The Continue Core contains functionality that can be shared across web, VS Code, or Node.js server. It is written in TypeScript and contains much of the functionality that was previously inside of the legacy Continue Python Server.", "scripts": { - "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest ./test", + "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest", "build:npm": "tsc -p ./tsconfig.npm.json", "lint": "eslint . --ext ts", "lint:fix": "eslint . --ext ts --fix" @@ -46,7 +46,7 @@ "commander": "^12.0.0", "comment-json": "^4.2.3", "dbinfoz": "^0.1.4", - "dotenv": "^16.3.1", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 995c6a961..be0f80d55 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -4,6 +4,7 @@ import type { ContextItemWithId, ContextSubmenuItem, DiffLine, + IdeSettings, LLMFullCompletionOptions, MessageContent, ModelDescription, @@ -14,7 +15,6 @@ import type { SiteIndexingConfig, } from ".."; import type { AutocompleteInput } from "../autocomplete/completionProvider"; -import type { IdeSettings } from "./ideWebview"; export type ProtocolGeneratorType = AsyncGenerator<{ done?: boolean; diff --git a/core/protocol/ide.ts b/core/protocol/ide.ts index db44053c4..ab32f52aa 100644 --- a/core/protocol/ide.ts +++ b/core/protocol/ide.ts @@ -3,12 +3,12 @@ import type { DiffLine, FileType, IdeInfo, + IdeSettings, IndexTag, Problem, Range, Thread, } from ".."; -import type { IdeSettings } from "./ideWebview"; export type ToIdeFromWebviewOrCoreProtocol = { // Methods from IDE type diff --git a/core/protocol/ideWebview.ts b/core/protocol/ideWebview.ts index 3683d9ec0..4aac41735 100644 --- a/core/protocol/ideWebview.ts +++ b/core/protocol/ideWebview.ts @@ -3,12 +3,6 @@ import type { RangeInFileWithContents } from "../commands/util"; import { ToIdeFromWebviewOrCoreProtocol } from "./ide.js"; import { ToWebviewFromIdeOrCoreProtocol } from "./webview.js"; -export interface IdeSettings { - remoteConfigServerUrl: string | undefined; - remoteConfigSyncPeriod: number; - userToken: string; -} - export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & { onLoad: [ undefined, diff --git a/core/test/diff.test.ts b/core/test/diff.test.ts index 93a46842f..8bbd2cd25 100644 --- a/core/test/diff.test.ts +++ b/core/test/diff.test.ts @@ -102,7 +102,7 @@ async function* generateLines(lines: string[]): AsyncGenerator { } } -describe("streamDiff", () => { +describe.skip("streamDiff", () => { for (let i = 0; i < oldCode.length; i++) { test(`outputs valid diff #${i}`, async () => { const oldLines = oldCode[i].split("\n"); diff --git a/core/test/llm.test.ts b/core/test/llm.test.ts index 6e5303873..2583acddd 100644 --- a/core/test/llm.test.ts +++ b/core/test/llm.test.ts @@ -2,8 +2,9 @@ import * as dotenv from "dotenv"; import { CompletionOptions } from "../index.js"; import { BaseLLM } from "../llm/index.js"; +import OpenAI from "../llm/llms/OpenAI.js"; -jest.setTimeout(100_000); +// jest.setTimeout(100_000); dotenv.config(); @@ -61,17 +62,17 @@ describe("LLM", () => { // testLLM( // new FreeTrial({ // model: "gpt-3.5-turbo", - // }) + // }), // ); // testLLM( // new Anthropic({ // model: "claude-2", // apiKey: process.env.ANTHROPIC_API_KEY, - // }) - // ); - // testLLM( - // new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "gpt-3.5-turbo" }) + // }), // ); + testLLM( + new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "gpt-3.5-turbo" }), + ); // TODO: Fix Replicate // testLLM( // new Replicate({ diff --git a/core/test/util/dedentAndGetCommonWhitespace.test.ts b/core/test/util/dedentAndGetCommonWhitespace.test.ts new file mode 100644 index 000000000..5f3c6a4be --- /dev/null +++ b/core/test/util/dedentAndGetCommonWhitespace.test.ts @@ -0,0 +1,76 @@ +// File generated by Continue +import { dedentAndGetCommonWhitespace } from "../../util"; + +describe("dedentAndGetCommonWhitespace", () => { + let originalString: string; + + beforeEach(() => { + // Setup any global variables or states if needed + originalString = " line1\n line2\n line3"; + }); + + afterEach(() => { + // Tear down any changes to global variables or states if needed + originalString = ""; + }); + + test("should dedent and return common whitespace for a simple case", () => { + const input = " line1\n line2\n line3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["line1\nline2\nline3", " "]); + }); + + test("should handle empty string", () => { + const input = ""; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["", ""]); + }); + + test("should handle string with only whitespace", () => { + const input = " "; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["", ""]); + }); + + test("should handle string with mixed whitespace and content", () => { + const input = " line1\n line2\n line3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual([" line1\nline2\n line3", " "]); + }); + + test("should handle string with no common leading whitespace", () => { + const input = "line1\n line2\n line3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual([input, ""]); + }); + + test("should handle string with empty lines", () => { + const input = " line1\n\n line3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["line1\n\nline3", " "]); + }); + + test("should handle string with only empty lines", () => { + const input = "\n\n"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["\n\n", ""]); + }); + + test("should handle string with tabs as whitespace", () => { + const input = "\tline1\n\tline2\n\tline3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["line1\nline2\nline3", "\t"]); + }); + + test("should handle string with mixed tabs and spaces", () => { + const input = "\t line1\n\t line2\n\t line3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual(["line1\nline2\nline3", "\t "]); + }); + + test("should handle string with different leading whitespace lengths", () => { + const input = " line1\n line2\n line3"; + const output = dedentAndGetCommonWhitespace(input); + expect(output).toEqual([" line1\nline2\n line3", " "]); + }); +}); diff --git a/core/test/util/getLastNPathParts.test.ts b/core/test/util/getLastNPathParts.test.ts new file mode 100644 index 000000000..ba72b4520 --- /dev/null +++ b/core/test/util/getLastNPathParts.test.ts @@ -0,0 +1,51 @@ +// File generated by Continue +import { getLastNPathParts } from "../../util"; + +describe("getLastNPathParts", () => { + const SEP_REGEX = /[\\/]+/; + + beforeAll(() => { + // Setup code if needed + }); + + afterAll(() => { + // Teardown code if needed + }); + + test("returns the last N parts of a filepath with forward slashes", () => { + const filepath = "home/user/documents/project/file.txt"; + expect(getLastNPathParts(filepath, 2)).toBe("project/file.txt"); + }); + + test("returns the last N parts of a filepath with backward slashes", () => { + const filepath = "C:\\home\\user\\documents\\project\\file.txt"; + expect(getLastNPathParts(filepath, 3)).toBe("documents/project/file.txt"); + }); + + test("returns the last part if N is 1", () => { + const filepath = "/home/user/documents/project/file.txt"; + expect(getLastNPathParts(filepath, 1)).toBe("file.txt"); + }); + + test("returns the entire path if N is greater than the number of parts", () => { + const filepath = "home/user/documents/project/file.txt"; + expect(getLastNPathParts(filepath, 10)).toBe( + "home/user/documents/project/file.txt", + ); + }); + + test("returns an empty string if N is 0", () => { + const filepath = "home/user/documents/project/file.txt"; + expect(getLastNPathParts(filepath, 0)).toBe(""); + }); + + test("handles paths with mixed forward and backward slashes", () => { + const filepath = "home\\user/documents\\project/file.txt"; + expect(getLastNPathParts(filepath, 3)).toBe("documents/project/file.txt"); + }); + + test("handles edge case with empty filepath", () => { + const filepath = ""; + expect(getLastNPathParts(filepath, 2)).toBe(""); + }); +}); diff --git a/core/test/util/lcs.test.ts b/core/test/util/lcs.test.ts new file mode 100644 index 000000000..da10cdf90 --- /dev/null +++ b/core/test/util/lcs.test.ts @@ -0,0 +1,40 @@ +// This file is generated by Continue +import { longestCommonSubsequence } from "../../util/lcs"; + +describe("longestCommonSubsequence", () => { + beforeAll(() => { + // Setup if needed + }); + + afterAll(() => { + // Teardown if needed + }); + + test("should return the longest common subsequence for non-empty strings", () => { + expect(longestCommonSubsequence("abcde", "ace")).toBe("ace"); + expect(longestCommonSubsequence("abc", "abc")).toBe("abc"); + expect(longestCommonSubsequence("abc", "def")).toBe(""); + }); + + test("should handle cases where one or both strings are empty", () => { + expect(longestCommonSubsequence("", "abc")).toBe(""); + expect(longestCommonSubsequence("abc", "")).toBe(""); + expect(longestCommonSubsequence("", "")).toBe(""); + }); + + test("should handle cases with no common subsequence", () => { + expect(longestCommonSubsequence("abc", "def")).toBe(""); + expect(longestCommonSubsequence("xyz", "abc")).toBe(""); + }); + + test("should handle cases with special characters", () => { + expect(longestCommonSubsequence("a!@#b$c", "!@#$")).toBe("!@#$"); + expect(longestCommonSubsequence("a!@#b$c", "xyz")).toBe(""); + }); + + test("should handle long strings efficiently", () => { + const str1 = "a".repeat(1000) + "b".repeat(1000); + const str2 = "a".repeat(1000) + "c".repeat(1000); + expect(longestCommonSubsequence(str1, str2)).toBe("a".repeat(1000)); + }); +}); diff --git a/core/test/util/merge.test.ts b/core/test/util/merge.test.ts new file mode 100644 index 000000000..a39a5bc30 --- /dev/null +++ b/core/test/util/merge.test.ts @@ -0,0 +1,100 @@ +// File generated by Continue +import { mergeJson } from "../../util/merge"; + +describe("mergeJson", () => { + it("should merge two simple JSON objects", () => { + const first = { a: 1, b: 2 }; + const second = { b: 3, c: 4 }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: 1, b: 3, c: 4 }); + }); + + it('should overwrite values when mergeBehavior is "overwrite"', () => { + const first = { a: 1, b: 2 }; + const second = { b: 3, c: 4 }; + const result = mergeJson(first, second, "overwrite"); + expect(result).toEqual({ a: 1, b: 3, c: 4 }); + }); + + it("should merge nested objects", () => { + const first = { a: { b: 1 } }; + const second = { a: { c: 2 } }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: { b: 1, c: 2 } }); + }); + + it("should merge arrays without mergeKeys", () => { + const first = { a: [1, 2] }; + const second = { a: [3, 4] }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: [1, 2, 3, 4] }); + }); + + it("should merge arrays with mergeKeys", () => { + const first = { + a: [ + { id: 1, value: "first" }, + { id: 2, value: "second" }, + ], + }; + const second = { + a: [ + { id: 2, value: "updated" }, + { id: 3, value: "third" }, + ], + }; + const mergeKeys = { + a: (item1: any, item2: any) => item1.id === item2.id, + }; + const result = mergeJson(first, second, undefined, mergeKeys); + expect(result).toEqual({ + a: [ + { id: 1, value: "first" }, + { id: 2, value: "updated" }, + { id: 3, value: "third" }, + ], + }); + }); + + it("should handle non-object values correctly", () => { + const first = { a: 1, b: "string", c: true }; + const second = { a: 2, b: "new string", c: false }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: 2, b: "new string", c: false }); + }); + + it("should handle null and undefined values correctly", () => { + const first = { a: 1, b: null }; + const second = { b: 2, c: undefined }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: 1, b: 2, c: undefined }); + }); + + it("should handle empty objects", () => { + const first = {}; + const second = { a: 1 }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: 1 }); + }); + + it("should handle empty second object", () => { + const first = { a: 1 }; + const second = {}; + const result = mergeJson(first, second); + expect(result).toEqual({ a: 1 }); + }); + + it("should handle errors gracefully", () => { + const first = { a: 1 }; + const second = { b: () => {} }; // Functions are not serializable in JSON + const result = mergeJson(first, second); + expect(result).toEqual({ a: 1, b: expect.any(Function) }); + }); + + it("should merge deeply nested objects", () => { + const first = { a: { b: { c: 1 } } }; + const second = { a: { b: { d: 2 } } }; + const result = mergeJson(first, second); + expect(result).toEqual({ a: { b: { c: 1, d: 2 } } }); + }); +}); diff --git a/core/test/util/ranges/getRangeInString.test.ts b/core/test/util/ranges/getRangeInString.test.ts new file mode 100644 index 000000000..e0a4df67a --- /dev/null +++ b/core/test/util/ranges/getRangeInString.test.ts @@ -0,0 +1,105 @@ +// This file is generated by Continue + +import { getRangeInString } from "../../../util/ranges"; + +describe.skip("getRangeInString", () => { + let content: string; + + beforeEach(() => { + content = `Line 1 +Line 2 +Line 3 +Line 4 +Line 5`; + }); + + afterEach(() => { + content = ""; + }); + + test("should return substring within the same line", () => { + const range = { + start: { line: 1, character: 0 }, + end: { line: 1, character: 4 }, + }; + expect(getRangeInString(content, range)).toBe("Line"); + }); + + test("should return substring spanning multiple lines", () => { + const range = { + start: { line: 1, character: 2 }, + end: { line: 3, character: 3 }, + }; + const expected = `ne 2 +Line 3 +Line 4`; + expect(getRangeInString(content, range)).toBe(expected); + }); + + test("should handle range that starts and ends at the same character", () => { + const range = { + start: { line: 2, character: 0 }, + end: { line: 2, character: 0 }, + }; + expect(getRangeInString(content, range)).toBe("L"); + }); + + test("should handle range that spans entire content", () => { + const range = { + start: { line: 0, character: 0 }, + end: { line: 4, character: 5 }, + }; + expect(getRangeInString(content, range)).toBe(content); + }); + + test("should handle range that spans to the end of the last line", () => { + const range = { + start: { line: 3, character: 2 }, + end: { line: 4, character: 5 }, + }; + const expected = `ne 4 +Line 5`; + expect(getRangeInString(content, range)).toBe(expected); + }); + + test("should handle empty content", () => { + content = ""; + const range = { + start: { line: 0, character: 0 }, + end: { line: 0, character: 0 }, + }; + expect(getRangeInString(content, range)).toBe(""); + }); + + test("should handle invalid range (start line > end line)", () => { + const range = { + start: { line: 3, character: 0 }, + end: { line: 2, character: 0 }, + }; + expect(getRangeInString(content, range)).toBe(""); + }); + + test("should handle invalid range (start character > end character on same line)", () => { + const range = { + start: { line: 1, character: 5 }, + end: { line: 1, character: 2 }, + }; + expect(getRangeInString(content, range)).toBe(""); + }); + + test("should handle range that starts and ends at the same line but different characters", () => { + const range = { + start: { line: 1, character: 2 }, + end: { line: 1, character: 6 }, + }; + expect(getRangeInString(content, range)).toBe("ne 2"); + }); + + test("should handle range that starts and ends at the same line and same characters", () => { + const range = { + start: { line: 1, character: 2 }, + end: { line: 1, character: 2 }, + }; + expect(getRangeInString(content, range)).toBe("n"); + }); +}); diff --git a/core/test/util/ranges/intersection.test.ts b/core/test/util/ranges/intersection.test.ts new file mode 100644 index 000000000..397dbc1a8 --- /dev/null +++ b/core/test/util/ranges/intersection.test.ts @@ -0,0 +1,123 @@ +// This file is generated by Continue + +import { intersection } from "../../../util/ranges"; + +interface Position { + line: number; + character: number; +} + +interface Range { + start: Position; + end: Position; +} + +describe("intersection", () => { + let rangeA: Range; + let rangeB: Range; + + beforeEach(() => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 3, character: 5 }, + }; + + rangeB = { + start: { line: 2, character: 2 }, + end: { line: 4, character: 0 }, + }; + }); + + test("returns correct intersection for overlapping ranges", () => { + const result = intersection(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 2, character: 2 }, + end: { line: 3, character: 5 }, + }); + }); + + test("returns null for non-overlapping ranges", () => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 2, character: 0 }, + }; + + rangeB = { + start: { line: 3, character: 0 }, + end: { line: 4, character: 0 }, + }; + + const result = intersection(rangeA, rangeB); + expect(result).toBeNull(); + }); + + // TODO + test.skip("returns correct intersection for single line overlap", () => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 1, character: 5 }, + }; + + rangeB = { + start: { line: 1, character: 3 }, + end: { line: 2, character: 0 }, + }; + + const result = intersection(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 1, character: 3 }, + end: { line: 1, character: 5 }, + }); + }); + + test("returns null for single line non-overlapping ranges", () => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 1, character: 2 }, + }; + + rangeB = { + start: { line: 1, character: 3 }, + end: { line: 1, character: 5 }, + }; + + const result = intersection(rangeA, rangeB); + expect(result).toBeNull(); + }); + + test("returns correct intersection when one range is fully within another", () => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 4, character: 5 }, + }; + + rangeB = { + start: { line: 2, character: 2 }, + end: { line: 3, character: 3 }, + }; + + const result = intersection(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 2, character: 2 }, + end: { line: 3, character: 3 }, + }); + }); + + test("returns correct intersection when ranges touch at the edge", () => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 2, character: 0 }, + }; + + rangeB = { + start: { line: 2, character: 0 }, + end: { line: 3, character: 0 }, + }; + + const result = intersection(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 2, character: 0 }, + end: { line: 2, character: 0 }, + }); + }); +}); diff --git a/core/test/util/ranges/maxMinPosition.test.ts b/core/test/util/ranges/maxMinPosition.test.ts new file mode 100644 index 000000000..0468df1cd --- /dev/null +++ b/core/test/util/ranges/maxMinPosition.test.ts @@ -0,0 +1,70 @@ +import { maxPosition, minPosition } from "../../../util/ranges"; + +// This file is generated by Continue +interface Position { + line: number; + character: number; +} + +describe("Position comparison functions", () => { + let pos1: Position; + let pos2: Position; + let pos3: Position; + let pos4: Position; + + beforeAll(() => { + // Setup: Initializing positions + pos1 = { line: 1, character: 5 }; + pos2 = { line: 2, character: 3 }; + pos3 = { line: 1, character: 7 }; + pos4 = { line: 2, character: 3 }; // Same as pos2 to test equality + }); + + describe("maxPosition", () => { + it("should return the position with the greater line number", () => { + expect(maxPosition(pos1, pos2)).toEqual(pos2); + }); + + it("should return the position with the greater character number when lines are equal", () => { + expect(maxPosition(pos1, pos3)).toEqual(pos3); + }); + + it("should return the first position when both positions are equal", () => { + expect(maxPosition(pos2, pos4)).toEqual(pos2); + }); + + it("should handle positions with negative line numbers", () => { + const posNegative = { line: -1, character: 0 }; + expect(maxPosition(posNegative, pos1)).toEqual(pos1); + }); + + it("should handle positions with negative character numbers", () => { + const posNegativeChar = { line: 1, character: -1 }; + expect(maxPosition(posNegativeChar, pos1)).toEqual(pos1); + }); + }); + + describe("minPosition", () => { + it("should return the position with the lesser line number", () => { + expect(minPosition(pos1, pos2)).toEqual(pos1); + }); + + it("should return the position with the lesser character number when lines are equal", () => { + expect(minPosition(pos1, pos3)).toEqual(pos1); + }); + + it("should return the first position when both positions are equal", () => { + expect(minPosition(pos2, pos4)).toEqual(pos2); + }); + + it("should handle positions with negative line numbers", () => { + const posNegative = { line: -1, character: 0 }; + expect(minPosition(posNegative, pos1)).toEqual(posNegative); + }); + + it("should handle positions with negative character numbers", () => { + const posNegativeChar = { line: 1, character: -1 }; + expect(minPosition(posNegativeChar, pos1)).toEqual(posNegativeChar); + }); + }); +}); diff --git a/core/test/util/ranges/union.test.ts b/core/test/util/ranges/union.test.ts new file mode 100644 index 000000000..9d06a97b4 --- /dev/null +++ b/core/test/util/ranges/union.test.ts @@ -0,0 +1,92 @@ +import { union } from "../../../util/ranges"; + +// This file is generated by Continue +interface Position { + line: number; + character: number; +} + +interface Range { + start: Position; + end: Position; +} + +describe("union", () => { + let rangeA: Range; + let rangeB: Range; + + beforeEach(() => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 3, character: 5 }, + }; + + rangeB = { + start: { line: 2, character: 3 }, + end: { line: 4, character: 2 }, + }; + }); + + test("should return the union of two overlapping ranges", () => { + const result = union(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 1, character: 0 }, + end: { line: 4, character: 2 }, + }); + }); + + test("should return the union when ranges are identical", () => { + const result = union(rangeA, rangeA); + expect(result).toEqual(rangeA); + }); + + test("should return the union when ranges do not overlap but are adjacent", () => { + rangeB = { + start: { line: 3, character: 5 }, + end: { line: 4, character: 2 }, + }; + const result = union(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 1, character: 0 }, + end: { line: 4, character: 2 }, + }); + }); + + test("should return the union when one range is completely within the other", () => { + rangeB = { + start: { line: 2, character: 1 }, + end: { line: 2, character: 4 }, + }; + const result = union(rangeA, rangeB); + expect(result).toEqual(rangeA); + }); + + test("should return the union when ranges do not overlap and are not adjacent", () => { + rangeB = { + start: { line: 4, character: 3 }, + end: { line: 5, character: 1 }, + }; + const result = union(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 1, character: 0 }, + end: { line: 5, character: 1 }, + }); + }); + + // TODO + test.skip("should handle edge case where start and end lines are the same", () => { + rangeA = { + start: { line: 1, character: 0 }, + end: { line: 1, character: 5 }, + }; + rangeB = { + start: { line: 1, character: 3 }, + end: { line: 1, character: 7 }, + }; + const result = union(rangeA, rangeB); + expect(result).toEqual({ + start: { line: 1, character: 0 }, + end: { line: 1, character: 7 }, + }); + }); +}); diff --git a/core/util/devdataSqlite.ts b/core/util/devdataSqlite.ts index 017169434..9724e9f21 100644 --- a/core/util/devdataSqlite.ts +++ b/core/util/devdataSqlite.ts @@ -1,4 +1,6 @@ import fs from "fs"; +import { open } from "sqlite"; +import sqlite3 from "sqlite3"; import { DatabaseConnection } from "../indexing/refreshIndex.js"; import { getDevDataSqlitePath } from "./paths.js"; @@ -72,8 +74,6 @@ export class DevDataSqliteDb { return DevDataSqliteDb.db; } - const { open } = require("sqlite"); - const sqlite3 = require("sqlite3"); DevDataSqliteDb.db = await open({ filename: devDataSqlitePath, driver: sqlite3.Database, diff --git a/core/util/fetchWithOptions.ts b/core/util/fetchWithOptions.ts index aa581b9d0..a2efe48af 100644 --- a/core/util/fetchWithOptions.ts +++ b/core/util/fetchWithOptions.ts @@ -1,4 +1,4 @@ -import { http, https } from "follow-redirects"; +import * as followRedirects from "follow-redirects"; import { HttpProxyAgent } from "http-proxy-agent"; import { globalAgent } from "https"; import { HttpsProxyAgent } from "https-proxy-agent"; @@ -7,6 +7,8 @@ import * as fs from "node:fs"; import tls from "node:tls"; import { RequestOptions } from "../index.js"; +const { http, https } = (followRedirects as any).default; + export function fetchwithRequestOptions( url_: URL | string, init?: RequestInit, diff --git a/core/util/filesystem.ts b/core/util/filesystem.ts index 25bdd3d70..20373eebd 100644 --- a/core/util/filesystem.ts +++ b/core/util/filesystem.ts @@ -4,15 +4,29 @@ import { FileType, IDE, IdeInfo, + IdeSettings, IndexTag, Problem, Range, Thread, -} from "../index.js"; +} from "../index.d.js"; import { getContinueGlobalPath } from "./paths.js"; class FileSystemIde implements IDE { + static workspaceDir = "/tmp/continue"; + + constructor() { + fs.mkdirSync(FileSystemIde.workspaceDir, { recursive: true }); + } + + async getIdeSettings(): Promise { + return { + remoteConfigServerUrl: undefined, + remoteConfigSyncPeriod: 60, + userToken: "", + }; + } async getGitHubAuthToken(): Promise { return undefined; } @@ -68,7 +82,7 @@ class FileSystemIde implements IDE { } isTelemetryEnabled(): Promise { - return Promise.resolve(false); + return Promise.resolve(true); } getUniqueId(): Promise { @@ -115,7 +129,7 @@ class FileSystemIde implements IDE { useGitIgnore?: boolean, ): Promise { return new Promise((resolve, reject) => { - fs.readdir("/tmp/continue", (err, files) => { + fs.readdir(FileSystemIde.workspaceDir, (err, files) => { if (err) { reject(err); } @@ -126,7 +140,7 @@ class FileSystemIde implements IDE { getWorkspaceDirs(): Promise { return new Promise((resolve, reject) => { - fs.mkdtemp("/tmp/continue", (err, folder) => { + fs.mkdtemp(FileSystemIde.workspaceDir, (err, folder) => { if (err) { reject(err); } diff --git a/core/util/index.ts b/core/util/index.ts index bcc7eda22..b1461ba74 100644 --- a/core/util/index.ts +++ b/core/util/index.ts @@ -27,29 +27,6 @@ export function removeQuotesAndEscapes(output: string): string { return output; } -export function proxyFetch(url: string, init?: RequestInit): Promise { - if (!(window as any)._fetch) { - throw new Error("Proxy fetch not initialized"); - } - - if (!(url.startsWith("http://") || url.startsWith("https://"))) { - // Relative URL - const fullUrl = `${window.vscMediaUrl}/${url}`; - return (window as any)._fetch(fullUrl, init); - } - - const proxyServerUrl = - (window as any).proxyServerUrl || "http://localhost:65433"; - - const headers = new Headers(init?.headers); - headers.append("x-continue-url", url); - - return (window as any)._fetch(proxyServerUrl, { - ...init, - headers, - }); -} - export function dedentAndGetCommonWhitespace(s: string): [string, string] { const lines = s.split("\n"); if (lines.length === 0 || (lines[0].trim() === "" && lines.length === 1)) { @@ -96,6 +73,9 @@ export function getBasename(filepath: string): string { } export function getLastNPathParts(filepath: string, n: number): string { + if (n <= 0) { + return ""; + } return filepath.split(SEP_REGEX).slice(-n).join("/"); } diff --git a/core/util/messageIde.ts b/core/util/messageIde.ts index b81045096..4523babba 100644 --- a/core/util/messageIde.ts +++ b/core/util/messageIde.ts @@ -3,6 +3,7 @@ import type { FileType, IDE, IdeInfo, + IdeSettings, IndexTag, Problem, Range, @@ -17,6 +18,9 @@ export class MessageIde implements IDE { data: ToIdeFromWebviewOrCoreProtocol[T][0], ) => Promise, ) {} + getIdeSettings(): Promise { + return this.request("getIdeSettings", undefined); + } getGitHubAuthToken(): Promise { return this.request("getGitHubAuthToken", undefined); } diff --git a/core/util/paths.ts b/core/util/paths.ts index 0c6cb6948..1cb76c47a 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -7,9 +7,13 @@ import { defaultConfig, defaultConfigJetBrains } from "../config/default.js"; import Types from "../config/types.js"; import { IdeType, SerializedContinueConfig } from "../index.js"; +dotenv.config(); +const CONTINUE_GLOBAL_DIR = + process.env.CONTINUE_GLOBAL_DIR ?? path.join(os.homedir(), ".continue"); + export function getContinueGlobalPath(): string { // This is ~/.continue on mac/linux - const continuePath = path.join(os.homedir(), ".continue"); + const continuePath = CONTINUE_GLOBAL_DIR; if (!fs.existsSync(continuePath)) { fs.mkdirSync(continuePath); } diff --git a/core/util/reverseMessageIde.ts b/core/util/reverseMessageIde.ts new file mode 100644 index 000000000..0ea2ce357 --- /dev/null +++ b/core/util/reverseMessageIde.ts @@ -0,0 +1,191 @@ +import { IDE } from ".."; +import { ToIdeFromWebviewOrCoreProtocol } from "../protocol/ide"; +import { Message } from "./messenger"; + +export class ReverseMessageIde { + private on( + messageType: T, + handler: ( + data: ToIdeFromWebviewOrCoreProtocol[T][0], + ) => + | Promise + | ToIdeFromWebviewOrCoreProtocol[T][1], + ): void { + this._on(messageType, (msg) => { + const data = msg.data; + const result = handler(data); + return result; + }); + } + + constructor( + private readonly _on: ( + messageType: T, + handler: ( + message: Message, + ) => + | Promise + | ToIdeFromWebviewOrCoreProtocol[T][1], + ) => void, + private readonly ide: IDE, + ) { + this.initializeListeners(); + } + + private initializeListeners() { + this.on("getGitHubAuthToken", () => { + return this.ide.getGitHubAuthToken(); + }); + + this.on("getLastModified", (data) => { + return this.ide.getLastModified(data.files); + }); + + this.on("getGitRootPath", (data) => { + return this.ide.getGitRootPath(data.dir); + }); + + this.on("listDir", (data) => { + return this.ide.listDir(data.dir); + }); + + this.on("infoPopup", (data) => { + return this.ide.infoPopup(data.message); + }); + + this.on("errorPopup", (data) => { + return this.ide.errorPopup(data.message); + }); + + this.on("getRepoName", (data) => { + return this.ide.getRepoName(data.dir); + }); + + this.on("getDebugLocals", (data) => { + return this.ide.getDebugLocals(data.threadIndex); + }); + + this.on("getTopLevelCallStackSources", (data) => { + return this.ide.getTopLevelCallStackSources( + data.threadIndex, + data.stackDepth, + ); + }); + + this.on("getAvailableThreads", () => { + return this.ide.getAvailableThreads(); + }); + + this.on("getTags", (data) => { + return this.ide.getTags(data); + }); + + this.on("getIdeInfo", () => { + return this.ide.getIdeInfo(); + }); + + this.on("readRangeInFile", (data) => { + return this.ide.readRangeInFile(data.filepath, data.range); + }); + + this.on("isTelemetryEnabled", () => { + return this.ide.isTelemetryEnabled(); + }); + + this.on("getUniqueId", () => { + return this.ide.getUniqueId(); + }); + + this.on("getWorkspaceConfigs", () => { + return this.ide.getWorkspaceConfigs(); + }); + + this.on("getIdeSettings", () => { + return this.ide.getIdeSettings(); + }); + + this.on("getDiff", () => { + return this.ide.getDiff(); + }); + + this.on("getTerminalContents", () => { + return this.ide.getTerminalContents(); + }); + + this.on("listWorkspaceContents", (data) => { + return this.ide.listWorkspaceContents(data.directory, data.useGitIgnore); + }); + + this.on("getWorkspaceDirs", () => { + return this.ide.getWorkspaceDirs(); + }); + + this.on("showLines", (data) => { + return this.ide.showLines(data.filepath, data.startLine, data.endLine); + }); + + this.on("listFolders", () => { + return this.ide.listFolders(); + }); + + this.on("getContinueDir", () => { + return this.ide.getContinueDir(); + }); + + this.on("writeFile", (data) => { + return this.ide.writeFile(data.path, data.contents); + }); + + this.on("showVirtualFile", (data) => { + return this.ide.showVirtualFile(data.name, data.content); + }); + + this.on("openFile", (data) => { + return this.ide.openFile(data.path); + }); + + this.on("runCommand", (data) => { + return this.ide.runCommand(data.command); + }); + + this.on("saveFile", (data) => { + return this.ide.saveFile(data.filepath); + }); + + this.on("readFile", (data) => { + return this.ide.readFile(data.filepath); + }); + + this.on("showDiff", (data) => { + return this.ide.showDiff(data.filepath, data.newContents, data.stepIndex); + }); + + this.on("getOpenFiles", () => { + return this.ide.getOpenFiles(); + }); + + this.on("getCurrentFile", () => { + return this.ide.getCurrentFile(); + }); + + this.on("getPinnedFiles", () => { + return this.ide.getPinnedFiles(); + }); + + this.on("getSearchResults", (data) => { + return this.ide.getSearchResults(data.query); + }); + + this.on("getProblems", (data) => { + return this.ide.getProblems(data.filepath); + }); + + this.on("subprocess", (data) => { + return this.ide.subprocess(data.command); + }); + + this.on("getBranch", (data) => { + return this.ide.getBranch(data.dir); + }); + } +} diff --git a/extensions/intellij/build.gradle.kts b/extensions/intellij/build.gradle.kts index d801ee4b4..e3eba0461 100644 --- a/extensions/intellij/build.gradle.kts +++ b/extensions/intellij/build.gradle.kts @@ -137,7 +137,7 @@ tasks { } publishPlugin { - dependsOn("patchChangelog") +// dependsOn("patchChangelog") token = environment("PUBLISH_TOKEN") // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 1ad2540f8..73defa15f 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.51 +pluginVersion = 0.0.52 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt index f0d37ea25..9320705f8 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt @@ -42,7 +42,7 @@ class AutocompleteEditorListener: EditorFactoryListener { override fun editorCreated(event: EditorFactoryEvent) { val editor = event.editor val project = editor.project ?: return - val editorManager = project.let { FileEditorManager.getInstance(it) } + val editorManager = project.let { FileEditorManager.getInstance(it) } ?: return val completionProvider = project.service() // Listen to changes to mouse position diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteLookupListener.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteLookupListener.kt new file mode 100644 index 000000000..a59169ea2 --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteLookupListener.kt @@ -0,0 +1,48 @@ +package com.github.continuedev.continueintellijextension.autocomplete + +import com.intellij.codeInsight.lookup.impl.LookupImpl +import com.intellij.codeInsight.lookup.Lookup +import com.intellij.codeInsight.lookup.LookupEvent +import com.intellij.codeInsight.lookup.LookupListener +import com.intellij.codeInsight.lookup.LookupManagerListener +import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.components.Service +import com.intellij.openapi.components.service +import com.intellij.openapi.project.Project +import java.util.concurrent.atomic.AtomicBoolean + +@Service(Service.Level.PROJECT) +class AutocompleteLookupListener(project: Project) : LookupManagerListener { + private val isLookupShown = AtomicBoolean(true) + + fun isLookupEmpty(): Boolean { + return isLookupShown.get() + } + + init { + project.messageBus.connect().subscribe(LookupManagerListener.TOPIC, this) + } + + override fun activeLookupChanged(oldLookup: Lookup?, newLookup: Lookup?) { + val newEditor = newLookup?.editor ?: return + if (newLookup is LookupImpl) { + newLookup.addLookupListener( + object : LookupListener { + override fun lookupShown(event: LookupEvent) { + super.lookupShown(event) + ApplicationManager.getApplication().invokeLater { + isLookupShown.set(false) + event.lookup.editor.project?.service()?.hideCompletions(newEditor) + } + } + + override fun lookupCanceled(event: LookupEvent) { + super.lookupCanceled(event) + ApplicationManager.getApplication().invokeLater { + isLookupShown.set(true) + } + } + }) + } + } +} \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteService.kt index 5c76ec3c7..6d3691ad6 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteService.kt @@ -25,6 +25,7 @@ data class PendingCompletion ( @Service(Service.Level.PROJECT) class AutocompleteService(private val project: Project) { var pendingCompletion: PendingCompletion? = null; + private val autocompleteLookupListener = project.service() fun triggerCompletion(editor: Editor) { val settings = @@ -79,6 +80,10 @@ class AutocompleteService(private val project: Project) { } private fun renderCompletion(editor: Editor, offset: Int, text: String) { + // Don't render completions when code completion dropdown is visible + if (!autocompleteLookupListener.isLookupEmpty()) { + return + } ApplicationManager.getApplication().invokeLater { WriteAction.run { val properties = InlayProperties() @@ -136,4 +141,17 @@ class AutocompleteService(private val project: Project) { } } } + + fun hideCompletions(editor: Editor) { + editor.inlayModel.getInlineElementsInRange(0, editor.document.textLength).forEach { + if (it.renderer is ContinueCustomElementRenderer) { + it.dispose() + } + } + editor.inlayModel.getBlockElementsInRange(0, editor.document.textLength).forEach { + if (it.renderer is ContinueMultilineCustomElementRenderer) { + it.dispose() + } + } + } } diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index dc1d5a03f..73f88efb9 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -19,6 +19,9 @@ + messages.MyBundle diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 4f1d7b967..6d0e21452 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -110,7 +110,7 @@ "commander": "^12.0.0", "comment-json": "^4.2.3", "dbinfoz": "^0.1.4", - "dotenv": "^16.3.1", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 4c8e46a09..17b9f38fa 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -172,12 +172,6 @@ "title": "Toggle Autocomplete Enabled", "group": "Continue" }, - { - "command": "continue.shareSession", - "category": "Continue", - "title": "Share Session", - "group": "Continue" - }, { "command": "continue.selectFilesAsContext", "category": "Continue", diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index b2bf277f8..5c3ae6fcf 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -403,9 +403,6 @@ const commandsMap: ( input: text, }); }, - "continue.shareSession": () => { - sidebar.sendMainUserInput("/share"); - }, "continue.selectRange": (startLine: number, endLine: number) => { if (!vscode.window.activeTextEditor) { return; diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index c5b390b45..739a047cb 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -47,7 +47,7 @@ export class VsCodeExtension { this.extensionContext = context; this.windowId = uuidv4(); - const ideSettings = this.ide.getIdeSettings(); + const ideSettings = this.ide.getIdeSettingsSync(); const { remoteConfigServerUrl } = ideSettings; // Dependencies of core diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index 80f3e5e8a..d584d0615 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -7,13 +7,13 @@ import type { FileType, IDE, IdeInfo, + IdeSettings, IndexTag, Problem, Thread, } from "core"; import { Range } from "core"; import { defaultIgnoreFile } from "core/indexing/ignore"; -import { IdeSettings } from "core/protocol/ideWebview"; import { editConfigJson, getConfigJsonPath, @@ -510,7 +510,7 @@ class VsCodeIde implements IDE { .map(([name, type]) => [path.join(dir, name), type]) as any; } - getIdeSettings(): IdeSettings { + getIdeSettingsSync(): IdeSettings { const settings = vscode.workspace.getConfiguration("continue"); const remoteConfigServerUrl = settings.get( "remoteConfigServerUrl", @@ -526,6 +526,10 @@ class VsCodeIde implements IDE { }; return ideSettings; } + + async getIdeSettings(): Promise { + return this.getIdeSettingsSync(); + } } export { VsCodeIde }; diff --git a/gui/package-lock.json b/gui/package-lock.json index dc9cee0f1..d652bc561 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -103,7 +103,7 @@ "commander": "^12.0.0", "comment-json": "^4.2.3", "dbinfoz": "^0.1.4", - "dotenv": "^16.3.1", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", From 027d15f44637e762ab017d25130c50b65f814711 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 21 Jun 2024 07:58:56 -0700 Subject: [PATCH 14/29] check ts in dev --- .github/workflows/ts-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ts-check.yaml b/.github/workflows/ts-check.yaml index f0baf029d..1b069db35 100644 --- a/.github/workflows/ts-check.yaml +++ b/.github/workflows/ts-check.yaml @@ -5,6 +5,7 @@ on: branches: - main - preview + - dev jobs: tsc-check: From 8d7b7604cc155c974ab4459c8fd0d1306eff06eb Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 21 Jun 2024 10:33:26 -0700 Subject: [PATCH 15/29] ignore .env --- .github/workflows/preview.yaml | 1 + core/indexing/ignore.ts | 1 + docs/static/schemas/config.json | 13 +- .../src/main/resources/config_schema.json | 13 +- extensions/vscode/continue_rc_schema.json | 495 ++++++++++++++---- 5 files changed, 393 insertions(+), 130 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 95e426f6f..c038ea7fb 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -216,6 +216,7 @@ jobs: # 3. Publish the extension to Open VSX Registry - name: Publish (Open VSX Registry) + continue-on-error: true run: | cd extensions/vscode npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../alpine-x64/*.vsix ../../darwin-arm64/*.vsix ../../darwin-x64/*.vsix ../../linux-arm64/*.vsix ../../linux-armhf/*.vsix ../../linux-x64/*.vsix ../../win32-x64/*.vsix ../../win32-arm64/*.vsix diff --git a/core/indexing/ignore.ts b/core/indexing/ignore.ts index 6d7e00e84..2fe5e2ca2 100644 --- a/core/indexing/ignore.ts +++ b/core/indexing/ignore.ts @@ -59,6 +59,7 @@ const DEFAULT_IGNORE_FILETYPES = [ "*.gcda", "*.gcno", "go.sum", + ".env", ]; export const defaultIgnoreFile = ignore().add(DEFAULT_IGNORE_FILETYPES); export const DEFAULT_IGNORE_DIRS = [ diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 6428abfed..66fdf453e 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1316,14 +1316,15 @@ "outline", "postgres", "code", - "system", "currentFile", "url", - "database" + "database", + "os" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", "Reference the contents of the terminal", + "Reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread", "Reference the contents of all open or pinned files.", "Enter a search phrase and include the Google search results as context", "Reference the results of a ripgrep search in your codebase", @@ -1333,17 +1334,15 @@ "Include important files from a folder in the prompt, as determined by similarity search", "Reference GitHub issues from a repository", "Retrieve important pages from a documentation website, as determined by similarity search", - "Index and retrieve the contents of any documentation site, using embeddings to find important snippets", "Display a file tree of the current workspace", + "Include important highlighted sections from your code", "Include a repo map showing important code objects", - "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files", "References Postgres table schema and sample rows", "Reference specific functions and classes from throughout your codebase", - "Reference your operating system and cpu", "Reference the contents of the currently active file", "Reference the contents of a page at a URL", - "Reference table schemas" + "Reference table schemas", + "Operating system and CPU Information" ], "type": "string" }, diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 6428abfed..66fdf453e 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1316,14 +1316,15 @@ "outline", "postgres", "code", - "system", "currentFile", "url", - "database" + "database", + "os" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", "Reference the contents of the terminal", + "Reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread", "Reference the contents of all open or pinned files.", "Enter a search phrase and include the Google search results as context", "Reference the results of a ripgrep search in your codebase", @@ -1333,17 +1334,15 @@ "Include important files from a folder in the prompt, as determined by similarity search", "Reference GitHub issues from a repository", "Retrieve important pages from a documentation website, as determined by similarity search", - "Index and retrieve the contents of any documentation site, using embeddings to find important snippets", "Display a file tree of the current workspace", + "Include important highlighted sections from your code", "Include a repo map showing important code objects", - "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files", "References Postgres table schema and sample rows", "Reference specific functions and classes from throughout your codebase", - "Reference your operating system and cpu", "Reference the contents of the currently active file", "Reference the contents of a page at a URL", - "Reference table schemas" + "Reference table schemas", + "Operating system and CPU Information" ], "type": "string" }, diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 04c1a41aa..e4ac18216 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -279,7 +279,10 @@ "apiType": { "title": "Api Type", "markdownDescription": "OpenAI API type, either `openai` or `azure`", - "enum": ["openai", "azure"] + "enum": [ + "openai", + "azure" + ] }, "apiVersion": { "title": "Api Version", @@ -292,7 +295,11 @@ "type": "string" } }, - "required": ["title", "provider", "model"], + "required": [ + "title", + "provider", + "model" + ], "allOf": [ { "if": { @@ -302,7 +309,9 @@ } }, "not": { - "required": ["provider"] + "required": [ + "provider" + ] } }, "then": { @@ -329,33 +338,48 @@ ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { - "required": ["apiKey"] + "required": [ + "apiKey" + ] } }, { "if": { "properties": { "provider": { - "enum": ["huggingface-tgi", "huggingface-inference-api"] + "enum": [ + "huggingface-tgi", + "huggingface-inference-api" + ] } } }, "then": { - "required": ["apiBase"] + "required": [ + "apiBase" + ] }, - "required": ["provider"] + "required": [ + "provider" + ] }, { "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -375,10 +399,14 @@ "if": { "properties": { "provider": { - "enum": ["cloudflare"] + "enum": [ + "cloudflare" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -436,10 +464,14 @@ "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -470,10 +502,14 @@ "if": { "properties": { "provider": { - "enum": ["replicate"] + "enum": [ + "replicate" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -503,10 +539,14 @@ "if": { "properties": { "provider": { - "enum": ["free-trial"] + "enum": [ + "free-trial" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -531,7 +571,9 @@ "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] }, "apiType": { "not": { @@ -539,7 +581,9 @@ } } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -597,10 +641,14 @@ "if": { "properties": { "provider": { - "enum": ["anthropic"] + "enum": [ + "anthropic" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -628,15 +676,22 @@ "if": { "properties": { "provider": { - "enum": ["cohere"] + "enum": [ + "cohere" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { "model": { - "enum": ["command-r", "command-r-plus"] + "enum": [ + "command-r", + "command-r-plus" + ] } } } @@ -645,10 +700,14 @@ "if": { "properties": { "provider": { - "enum": ["bedrock"] + "enum": [ + "bedrock" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -673,10 +732,14 @@ "if": { "properties": { "provider": { - "enum": ["gemini"] + "enum": [ + "gemini" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -697,10 +760,14 @@ "if": { "properties": { "provider": { - "enum": ["together"] + "enum": [ + "together" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -734,10 +801,14 @@ "if": { "properties": { "provider": { - "enum": ["deepinfra"] + "enum": [ + "deepinfra" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -760,7 +831,9 @@ ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -806,10 +879,14 @@ "if": { "properties": { "provider": { - "enum": ["ollama"] + "enum": [ + "ollama" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -857,10 +934,14 @@ "if": { "properties": { "provider": { - "enum": ["mistral"] + "enum": [ + "mistral" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -881,15 +962,22 @@ "if": { "properties": { "provider": { - "enum": ["deepseek"] + "enum": [ + "deepseek" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { "model": { - "enum": ["deepseek-chat", "deepseek-coder"] + "enum": [ + "deepseek-chat", + "deepseek-coder" + ] } } } @@ -898,10 +986,14 @@ "if": { "properties": { "provider": { - "enum": ["groq"] + "enum": [ + "groq" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -922,15 +1014,21 @@ "if": { "properties": { "provider": { - "enum": ["fireworks"] + "enum": [ + "fireworks" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { "model": { - "enum": ["starcoder-7b"] + "enum": [ + "starcoder-7b" + ] } } } @@ -942,20 +1040,30 @@ "const": "azure" } }, - "required": ["apiType"] + "required": [ + "apiType" + ] }, "then": { - "required": ["engine", "apiVersion", "apiBase"] + "required": [ + "engine", + "apiVersion", + "apiBase" + ] } }, { "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -972,7 +1080,9 @@ "const": "llamafile" } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -986,10 +1096,14 @@ "if": { "properties": { "provider": { - "enum": ["text-gen-webui"] + "enum": [ + "text-gen-webui" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -1003,10 +1117,14 @@ "if": { "properties": { "provider": { - "enum": ["flowise"] + "enum": [ + "flowise" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -1033,7 +1151,10 @@ "type": "string" } }, - "required": ["key", "value"] + "required": [ + "key", + "value" + ] } }, "additionalFlowiseConfiguration": { @@ -1052,7 +1173,10 @@ "description": "Configuration Property value" } }, - "required": ["key", "value"] + "required": [ + "key", + "value" + ] } }, "model": { @@ -1144,7 +1268,9 @@ "type": "string" } }, - "required": ["default"] + "required": [ + "default" + ] }, "SlashCommand": { "title": "SlashCommand", @@ -1203,7 +1329,9 @@ "if": { "properties": { "name": { - "enum": ["issue"] + "enum": [ + "issue" + ] } } }, @@ -1216,17 +1344,23 @@ "description": "Enter the URL of the GitHub repository for which you want to generate the issue." } }, - "required": ["repositoryUrl"] + "required": [ + "repositoryUrl" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["edit"] + "enum": [ + "edit" + ] } } }, @@ -1251,7 +1385,9 @@ "if": { "properties": { "name": { - "enum": ["share"] + "enum": [ + "share" + ] } } }, @@ -1269,7 +1405,10 @@ } } ], - "required": ["name", "description"] + "required": [ + "name", + "description" + ] }, "CustomCommand": { "title": "CustomCommand", @@ -1288,7 +1427,11 @@ "type": "string" } }, - "required": ["name", "prompt", "description"] + "required": [ + "name", + "prompt", + "description" + ] }, "ContextProviderWithParams": { "title": "ContextProviderWithParams", @@ -1362,7 +1505,9 @@ "if": { "properties": { "name": { - "enum": ["google"] + "enum": [ + "google" + ] } } }, @@ -1375,17 +1520,23 @@ "description": "Your API key for https://serper.dev in order to get Google search results" } }, - "required": ["serperApiKey"] + "required": [ + "serperApiKey" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["open"] + "enum": [ + "open" + ] } } }, @@ -1407,7 +1558,9 @@ "if": { "properties": { "name": { - "enum": ["issue"] + "enum": [ + "issue" + ] } } }, @@ -1436,24 +1589,37 @@ "type": { "type": "string", "description": "The type of issues to search for", - "enum": ["open", "closed", "all"] + "enum": [ + "open", + "closed", + "all" + ] } }, - "required": ["owner", "repo"] + "required": [ + "owner", + "repo" + ] } } }, - "required": ["repos"] + "required": [ + "repos" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["database"] + "enum": [ + "database" + ] } } }, @@ -1474,7 +1640,11 @@ "connection_type": { "type": "string", "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": ["postgres", "mysql", "sqlite"] + "enum": [ + "postgres", + "mysql", + "sqlite" + ] }, "connection": { "type": "object", @@ -1507,21 +1677,31 @@ "required": [] } }, - "required": ["name", "connection_type", "connection"] + "required": [ + "name", + "connection_type", + "connection" + ] } } }, - "required": ["connections"] + "required": [ + "connections" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["gitlab-mr"] + "enum": [ + "gitlab-mr" + ] } } }, @@ -1542,17 +1722,23 @@ "description": "If you have code selected, filters out comments that aren't related to the selection." } }, - "required": ["token"] + "required": [ + "token" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["jira"] + "enum": [ + "jira" + ] } } }, @@ -1598,17 +1784,24 @@ ] } }, - "required": ["domain", "token"] + "required": [ + "domain", + "token" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["http"] + "enum": [ + "http" + ] } } }, @@ -1621,17 +1814,24 @@ "description": "The HTTP endpoint of your context provider server." } }, - "required": ["url"] + "required": [ + "url" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["codebase", "folder"] + "enum": [ + "codebase", + "folder" + ] } } }, @@ -1666,7 +1866,9 @@ "if": { "properties": { "name": { - "enum": ["postgres"] + "enum": [ + "postgres" + ] } } }, @@ -1718,11 +1920,19 @@ } } }, - "required": ["host", "port", "user", "password", "database"] + "required": [ + "host", + "port", + "user", + "password", + "database" + ] } } ], - "required": ["name"] + "required": [ + "name" + ] }, "SerializedContinueConfig": { "title": "config.json", @@ -1874,32 +2084,46 @@ "$ref": "#/definitions/RequestOptions" } }, - "required": ["provider"], + "required": [ + "provider" + ], "allOf": [ { "if": { "properties": { "provider": { - "enum": ["cohere"] + "enum": [ + "cohere" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { - "required": ["apiKey"] + "required": [ + "apiKey" + ] } }, { "if": { "properties": { "provider": { - "enum": ["gemini"] + "enum": [ + "gemini" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { - "required": ["apiKey"] + "required": [ + "apiKey" + ] } } ] @@ -1910,22 +2134,33 @@ "type": "object", "properties": { "name": { - "enum": ["cohere", "voyage", "llm", "free-trial"] + "enum": [ + "cohere", + "voyage", + "llm", + "free-trial" + ] }, "params": { "type": "object" } }, - "required": ["name"], + "required": [ + "name" + ], "allOf": [ { "if": { "properties": { "name": { - "enum": ["cohere"] + "enum": [ + "cohere" + ] } }, - "required": ["name"] + "required": [ + "name" + ] }, "then": { "properties": { @@ -1947,7 +2182,9 @@ "type": "string" } }, - "required": ["apiKey"] + "required": [ + "apiKey" + ] } } } @@ -1956,10 +2193,14 @@ "if": { "properties": { "name": { - "enum": ["llm"] + "enum": [ + "llm" + ] } }, - "required": ["name"] + "required": [ + "name" + ] }, "then": { "properties": { @@ -1970,7 +2211,9 @@ "type": "string" } }, - "required": ["modelTitle"] + "required": [ + "modelTitle" + ] } } } @@ -1979,10 +2222,14 @@ "if": { "properties": { "name": { - "enum": ["voyage"] + "enum": [ + "voyage" + ] } }, - "required": ["name"] + "required": [ + "name" + ] }, "then": { "properties": { @@ -1993,10 +2240,14 @@ "type": "string" }, "model": { - "enum": ["rerank-lite-1"] + "enum": [ + "rerank-lite-1" + ] } }, - "required": ["apiKey"] + "required": [ + "apiKey" + ] } } } @@ -2062,7 +2313,11 @@ "description": "An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables." }, "multilineCompletions": { - "enum": ["always", "never", "auto"], + "enum": [ + "always", + "never", + "auto" + ], "description": "If set to true, Continue will only complete a single line at a time." }, "useCache": { @@ -2091,7 +2346,10 @@ "type": "object", "properties": { "codeBlockToolbarPosition": { - "enum": ["top", "bottom"], + "enum": [ + "top", + "bottom" + ], "default": "top", "description": "Whether to show the copy and apply code buttons at the top or bottom of code blocks in the sidebar." }, @@ -2108,7 +2366,9 @@ "defaultContext": { "type": "array", "items": { - "enum": ["activeFile"] + "enum": [ + "activeFile" + ] } }, "modelRoles": { @@ -2151,7 +2411,10 @@ }, "mergeBehavior": { "type": "string", - "enum": ["merge", "overwrite"], + "enum": [ + "merge", + "overwrite" + ], "default": "merge", "title": "Merge behavior", "markdownDescription": "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json." @@ -2159,4 +2422,4 @@ } } } -} +} \ No newline at end of file From 24d02e8404bcd9158dee3737cfedc585d3152a19 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 21 Jun 2024 11:04:44 -0700 Subject: [PATCH 16/29] =?UTF-8?q?=F0=9F=9A=91=20fix=20constant=20warnings?= =?UTF-8?q?=20when=20onboarding=20with=20Ollama?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/core.ts b/core/core.ts index d78a6fb21..87af833f5 100644 --- a/core/core.ts +++ b/core/core.ts @@ -368,7 +368,13 @@ export class Core { return model.listModels(); } else { if (msg.data.title === "Ollama") { - return new Ollama({ model: "" }).listModels(); + try { + const models = await new Ollama({ model: "" }).listModels(); + return models; + } catch (e) { + console.warn(`Error listing Ollama models: ${e}`); + return undefined; + } } else { return undefined; } From 8a92f4312693549a1590e99c70152b843d59b119 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 21 Jun 2024 15:58:04 -0500 Subject: [PATCH 17/29] fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) --- extensions/vscode/CONTRIBUTING.md | 4 ++-- gui/src/components/mainInput/resolveInput.ts | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/CONTRIBUTING.md b/extensions/vscode/CONTRIBUTING.md index ddeca6bcb..5cfbf3cb1 100644 --- a/extensions/vscode/CONTRIBUTING.md +++ b/extensions/vscode/CONTRIBUTING.md @@ -7,11 +7,11 @@ This is the Continue VS Code Extension. Its primary jobs are # How to run the extension -See [Environment Setup](../CONTRIBUTING.md#environment-setup) +See [Environment Setup](../../CONTRIBUTING.md#environment-setup) # How to run and debug tests -After following the setup in [Environment Setup](../CONTRIBUTING.md#environment-setup) you can run the `Extension (VSCode)` launch configuration in VS Code. +After following the setup in [Environment Setup](../../CONTRIBUTING.md#environment-setup) you can run the `Extension (VSCode)` launch configuration in VS Code. ## Notes diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index bb628f4ce..cabe66bd3 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -42,6 +42,9 @@ async function resolveEditorContent( if (foundSlashCommand && typeof slashCommand === "undefined") { slashCommand = foundSlashCommand; } + + contextItemAttrs.push(...ctxItems); + if (text === "") { continue; } @@ -51,11 +54,14 @@ async function resolveEditorContent( } else { parts.push({ type: "text", text }); } - contextItemAttrs.push(...ctxItems); } else if (p.type === "codeBlock") { if (!p.attrs.item.editing) { const text = - "```" + p.attrs.item.description + "\n" + p.attrs.item.content + "\n```"; + "```" + + p.attrs.item.description + + "\n" + + p.attrs.item.content + + "\n```"; if (parts[parts.length - 1]?.type === "text") { parts[parts.length - 1].text += "\n" + text; } else { @@ -96,7 +102,10 @@ async function resolveEditorContent( if (item.itemType === "file") { // This is a quick way to resolve @file references const basename = getBasename(item.id); - const relativeFilePath = getRelativePath(item.id, await ideMessenger.ide.getWorkspaceDirs()); + const relativeFilePath = getRelativePath( + item.id, + await ideMessenger.ide.getWorkspaceDirs(), + ); const rawContent = await ideMessenger.ide.readFile(item.id); const content = `\`\`\`${relativeFilePath}\n${rawContent}\n\`\`\`\n`; contextItemsText += content; From 851e825af63e8605894aa16a1a717fb052e6b82b Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:02:29 -0700 Subject: [PATCH 18/29] =?UTF-8?q?=E2=9C=A8=20use=20and=20cache=20imports?= =?UTF-8?q?=20for=20autocomplete=20(#1456)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ use and cache imports for autocomplete * fix tsc --- binary/src/IpcIde.ts | 2 +- core/autocomplete/ImportDefinitionsService.ts | 81 +++ core/autocomplete/NearbyDefinitionsService.ts | 45 ++ core/autocomplete/completionProvider.ts | 688 +++++++++--------- core/autocomplete/constructPrompt.ts | 26 + core/index.d.ts | 12 + core/indexing/CodeSnippetsIndex.ts | 27 +- core/protocol/ide.ts | 4 + core/protocol/index.ts | 5 +- core/util/LruCache.ts | 30 + core/util/filesystem.ts | 9 + core/util/messageIde.ts | 14 + core/util/parameters.ts | 1 + core/util/treeSitter.ts | 34 +- extensions/vscode/scripts/prepackage.js | 2 +- extensions/vscode/src/autocomplete/lsp.ts | 4 +- extensions/vscode/src/ideProtocol.ts | 22 + .../{tree-sitter-c-tags.scm => c.scm} | 0 ...ee-sitter-c_sharp-tags.scm => c_sharp.scm} | 0 .../{tree-sitter-cpp-tags.scm => cpp.scm} | 0 .../{tree-sitter-elisp-tags.scm => elisp.scm} | 0 ...tree-sitter-elixir-tags.scm => elixir.scm} | 0 .../{tree-sitter-go-tags.scm => go.scm} | 0 .../{tree-sitter-java-tags.scm => java.scm} | 0 ...ter-javascript-tags.scm => javascript.scm} | 0 .../{tree-sitter-ocaml-tags.scm => ocaml.scm} | 0 .../{tree-sitter-php-tags.scm => php.scm} | 0 ...tree-sitter-python-tags.scm => python.scm} | 0 .../{tree-sitter-ql-tags.scm => ql.scm} | 0 .../{tree-sitter-ruby-tags.scm => ruby.scm} | 0 .../{tree-sitter-rust-tags.scm => rust.scm} | 0 ...ter-typescript-tags.scm => typescript.scm} | 0 .../tree-sitter/import-queries/typescript.scm | 9 + gui/src/context/IdeMessenger.ts | 2 +- 34 files changed, 639 insertions(+), 378 deletions(-) create mode 100644 core/autocomplete/ImportDefinitionsService.ts create mode 100644 core/autocomplete/NearbyDefinitionsService.ts create mode 100644 core/util/LruCache.ts rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-c-tags.scm => c.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-c_sharp-tags.scm => c_sharp.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-cpp-tags.scm => cpp.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-elisp-tags.scm => elisp.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-elixir-tags.scm => elixir.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-go-tags.scm => go.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-java-tags.scm => java.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-javascript-tags.scm => javascript.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-ocaml-tags.scm => ocaml.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-php-tags.scm => php.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-python-tags.scm => python.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-ql-tags.scm => ql.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-ruby-tags.scm => ruby.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-rust-tags.scm => rust.scm} (100%) rename extensions/vscode/tree-sitter/code-snippet-queries/{tree-sitter-typescript-tags.scm => typescript.scm} (100%) create mode 100644 extensions/vscode/tree-sitter/import-queries/typescript.scm diff --git a/binary/src/IpcIde.ts b/binary/src/IpcIde.ts index 2be3bd354..ee2649c36 100644 --- a/binary/src/IpcIde.ts +++ b/binary/src/IpcIde.ts @@ -3,6 +3,6 @@ import { MessageIde } from "core/util/messageIde"; export class IpcIde extends MessageIde { constructor(messenger: TODO) { - super(messenger.request.bind(messenger)); + super(messenger.request.bind(messenger), messenger.on.bind(messenger)); } } diff --git a/core/autocomplete/ImportDefinitionsService.ts b/core/autocomplete/ImportDefinitionsService.ts new file mode 100644 index 000000000..19287bf81 --- /dev/null +++ b/core/autocomplete/ImportDefinitionsService.ts @@ -0,0 +1,81 @@ +import { IDE } from ".."; +import { RangeInFileWithContents } from "../commands/util"; +import { PrecalculatedLruCache } from "../util/LruCache"; +import { + TSQueryType, + getParserForFile, + getQueryForFile, +} from "../util/treeSitter"; + +interface FileInfo { + imports: { [key: string]: RangeInFileWithContents[] }; +} + +export class ImportDefinitionsService { + static N = 10; + + private cache: PrecalculatedLruCache = + new PrecalculatedLruCache( + this._getFileInfo.bind(this), + ImportDefinitionsService.N, + ); + + constructor(private readonly ide: IDE) { + ide.onDidChangeActiveTextEditor((filepath) => { + this.cache.initKey(filepath); + }); + } + + get(filepath: string): FileInfo | undefined { + return this.cache.get(filepath); + } + + private async _getFileInfo(filepath: string): Promise { + const parser = await getParserForFile(filepath); + if (!parser) { + return { + imports: {}, + }; + } + const ast = parser.parse(await this.ide.readFile(filepath), undefined, { + includedRanges: [ + { + startIndex: 0, + endIndex: 10_000, + startPosition: { row: 0, column: 0 }, + endPosition: { row: 100, column: 0 }, + }, + ], + }); + const query = await getQueryForFile(filepath, TSQueryType.Imports); + if (!query) { + return { + imports: {}, + }; + } + + const matches = query?.matches(ast.rootNode); + + const fileInfo: FileInfo = { + imports: {}, + }; + for (const match of matches) { + const startPosition = match.captures[0].node.startPosition; + const defs = await this.ide.gotoDefinition({ + filepath, + position: { + line: startPosition.row, + character: startPosition.column, + }, + }); + fileInfo.imports[match.captures[0].node.text] = await Promise.all( + defs.map(async (def) => ({ + ...def, + contents: await this.ide.readRangeInFile(def.filepath, def.range), + })), + ); + } + + return fileInfo; + } +} diff --git a/core/autocomplete/NearbyDefinitionsService.ts b/core/autocomplete/NearbyDefinitionsService.ts new file mode 100644 index 000000000..79cd0af0a --- /dev/null +++ b/core/autocomplete/NearbyDefinitionsService.ts @@ -0,0 +1,45 @@ +import { IDE, Location } from ".."; +import { LANGUAGES } from "./languages"; +import { getSymbolsForSnippet } from "./ranking"; + +interface FileInfo { + filepath: string; +} + +export class NearbyDefinitionsService { + static N = 10; + + constructor(private readonly ide: IDE) {} + + async getDefinitionsForLine(filepath: string, line: number) { + const lineContent = await this.ide.readRangeInFile(filepath, { + start: { + line, + character: 0, + }, + end: { + line: line + 1, + character: 0, + }, + }); + + // Remove keywords + const lang = LANGUAGES[filepath.split(".").slice(-1)[0]]; + const symbols = Array.from(getSymbolsForSnippet(lineContent)) + .filter((s) => s.length > 0) + .filter((s) => !(lang && lang?.stopWords?.includes(s))); + + return Promise.all( + symbols.map((s) => { + const character = lineContent.indexOf(s); + const pos: Location = { + filepath, + position: { + line, + character, + }, + }; + }), + ); + } +} diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 873515bf5..f1cdfb165 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -1,5 +1,5 @@ -import Handlebars from "handlebars"; import ignore from "ignore"; +import OpenAI from "openai"; import path from "path"; import { v4 as uuidv4 } from "uuid"; import { RangeInFileWithContents } from "../commands/util.js"; @@ -14,7 +14,6 @@ import { Range, TabAutocompleteOptions, } from "../index.js"; -import OpenAI from "../llm/llms/OpenAI.js"; import { logDevData } from "../util/devdata.js"; import { getBasename, getLastNPathParts } from "../util/index.js"; import { @@ -23,6 +22,7 @@ import { } from "../util/parameters.js"; import { Telemetry } from "../util/posthog.js"; import { getRangeInString } from "../util/ranges.js"; +import { ImportDefinitionsService } from "./ImportDefinitionsService.js"; import { BracketMatchingService } from "./brackets.js"; import AutocompleteLruCache from "./cache.js"; import { @@ -138,342 +138,6 @@ export type GetLspDefinitionsFunction = ( lang: AutocompleteLanguageInfo, ) => Promise; -export async function getTabCompletion( - token: AbortSignal, - options: TabAutocompleteOptions, - llm: ILLM, - ide: IDE, - generatorReuseManager: GeneratorReuseManager, - input: AutocompleteInput, - getDefinitionsFromLsp: GetLspDefinitionsFunction, - bracketMatchingService: BracketMatchingService, -): Promise { - const startTime = Date.now(); - - const { - filepath, - pos, - recentlyEditedFiles, - recentlyEditedRanges, - clipboardText, - manuallyPassFileContents, - manuallyPassPrefix, - } = input; - const fileContents = - manuallyPassFileContents ?? (await ide.readFile(filepath)); - const fileLines = fileContents.split("\n"); - - // Filter - const lang = languageForFilepath(filepath); - const line = fileLines[pos.line] ?? ""; - for (const endOfLine of lang.endOfLine) { - if (line.endsWith(endOfLine) && pos.character >= line.length) { - return undefined; - } - } - - // Model - if (!llm) { - return; - } - if (llm instanceof OpenAI) { - llm.useLegacyCompletionsEndpoint = true; - } else if ( - llm.providerName === "free-trial" && - llm.model !== TRIAL_FIM_MODEL - ) { - llm.model = TRIAL_FIM_MODEL; - } - - if ( - !shownGptClaudeWarning && - nonAutocompleteModels.some((model) => llm.model.includes(model)) && - !llm.model.includes("deepseek") - ) { - shownGptClaudeWarning = true; - throw new Error( - `Warning: ${llm.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/walkthroughs/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`, - ); - } - - // Prompt - let fullPrefix = - getRangeInString(fileContents, { - start: { line: 0, character: 0 }, - end: input.selectedCompletionInfo?.range.start ?? pos, - }) + (input.selectedCompletionInfo?.text ?? ""); - - if (input.injectDetails) { - const lines = fullPrefix.split("\n"); - fullPrefix = `${lines.slice(0, -1).join("\n")}\n${ - lang.singleLineComment - } ${input.injectDetails.split("\n").join(`\n${lang.singleLineComment} `)}\n${ - lines[lines.length - 1] - }`; - } - - const fullSuffix = getRangeInString(fileContents, { - start: pos, - end: { line: fileLines.length - 1, character: Number.MAX_SAFE_INTEGER }, - }); - - // First non-whitespace line below the cursor - let lineBelowCursor = ""; - let i = 1; - while ( - lineBelowCursor.trim() === "" && - pos.line + i <= fileLines.length - 1 - ) { - lineBelowCursor = fileLines[Math.min(pos.line + i, fileLines.length - 1)]; - i++; - } - - let extrasSnippets = options.useOtherFiles - ? ((await Promise.race([ - getDefinitionsFromLsp( - filepath, - fullPrefix + fullSuffix, - fullPrefix.length, - ide, - lang, - ), - new Promise((resolve) => { - setTimeout(() => resolve([]), 100); - }), - ])) as AutocompleteSnippet[]) - : []; - - const workspaceDirs = await ide.getWorkspaceDirs(); - if (options.onlyMyCode) { - extrasSnippets = extrasSnippets.filter((snippet) => { - return workspaceDirs.some((dir) => snippet.filepath.startsWith(dir)); - }); - } - - let { prefix, suffix, completeMultiline, snippets } = - await constructAutocompletePrompt( - filepath, - pos.line, - fullPrefix, - fullSuffix, - clipboardText, - lang, - options, - recentlyEditedRanges, - recentlyEditedFiles, - llm.model, - extrasSnippets, - ); - - // If prefix is manually passed - if (manuallyPassPrefix) { - prefix = manuallyPassPrefix; - suffix = ""; - } - - // Template prompt - const { - template, - completionOptions, - compilePrefixSuffix = undefined, - } = options.template - ? { template: options.template, completionOptions: {} } - : getTemplateForModel(llm.model); - - let prompt: string; - const filename = getBasename(filepath); - const reponame = getBasename(workspaceDirs[0] ?? "myproject"); - - // Some models have prompts that need two passes. This lets us pass the compiled prefix/suffix - // into either the 2nd template to generate a raw string, or to pass prefix, suffix to a FIM endpoint - if (compilePrefixSuffix) { - [prefix, suffix] = compilePrefixSuffix( - prefix, - suffix, - filepath, - reponame, - snippets, - ); - } - - if (typeof template === "string") { - const compiledTemplate = Handlebars.compile(template); - - // Format snippets as comments and prepend to prefix - const formattedSnippets = snippets - .map((snippet) => - formatExternalSnippet(snippet.filepath, snippet.contents, lang), - ) - .join("\n"); - if (formattedSnippets.length > 0) { - prefix = `${formattedSnippets}\n\n${prefix}`; - } else if (prefix.trim().length === 0 && suffix.trim().length === 0) { - // If it's an empty file, include the file name as a comment - prefix = `${lang.singleLineComment} ${getLastNPathParts(filepath, 2)}\n${prefix}`; - } - - prompt = compiledTemplate({ - prefix, - suffix, - filename, - reponame, - }); - } else { - // Let the template function format snippets - prompt = template(prefix, suffix, filepath, reponame, snippets); - } - - // Completion - let completion = ""; - - const cache = await autocompleteCache; - const cachedCompletion = options.useCache - ? await cache.get(prefix) - : undefined; - let cacheHit = false; - if (cachedCompletion) { - // Cache - cacheHit = true; - completion = cachedCompletion; - } else { - const stop = [ - ...(completionOptions?.stop || []), - ...multilineStops, - ...commonStops, - ...(llm.model.toLowerCase().includes("starcoder2") - ? STARCODER2_T_ARTIFACTS - : []), - ...(lang.stopWords ?? []), - ...lang.topLevelKeywords.map((word) => `\n${word}`), - ]; - - let langMultilineDecision = lang.useMultiline?.({ prefix, suffix }); - let multiline: boolean = false; - if (langMultilineDecision) { - multiline = langMultilineDecision; - } else { - multiline = - !input.selectedCompletionInfo && // Only ever single-line if using intellisense selected value - options.multilineCompletions !== "never" && - (options.multilineCompletions === "always" || completeMultiline); - } - - // Try to reuse pending requests if what the user typed matches start of completion - const generator = generatorReuseManager.getGenerator( - prefix, - () => - llm.supportsFim() - ? llm.streamFim(prefix, suffix, { - ...completionOptions, - stop, - }) - : llm.streamComplete(prompt, { - ...completionOptions, - raw: true, - stop, - }), - multiline, - ); - - // Full stop means to stop the LLM's generation, instead of just truncating the displayed completion - const fullStop = () => generatorReuseManager.currentGenerator?.cancel(); - - // LLM - let cancelled = false; - const generatorWithCancellation = async function* () { - for await (const update of generator) { - if (token.aborted) { - cancelled = true; - return; - } - yield update; - } - }; - let charGenerator = generatorWithCancellation(); - charGenerator = noFirstCharNewline(charGenerator); - charGenerator = onlyWhitespaceAfterEndOfLine( - charGenerator, - lang.endOfLine, - fullStop, - ); - charGenerator = bracketMatchingService.stopOnUnmatchedClosingBracket( - charGenerator, - prefix, - suffix, - filepath, - multiline, - ); - - let lineGenerator = streamLines(charGenerator); - lineGenerator = stopAtLines(lineGenerator, fullStop); - lineGenerator = stopAtRepeatingLines(lineGenerator, fullStop); - lineGenerator = avoidPathLine(lineGenerator, lang.singleLineComment); - lineGenerator = skipPrefixes(lineGenerator); - lineGenerator = noTopLevelKeywordsMidline( - lineGenerator, - lang.topLevelKeywords, - fullStop, - ); - - for (const lineFilter of lang.lineFilters ?? []) { - lineGenerator = lineFilter({ lines: lineGenerator, fullStop }); - } - - lineGenerator = streamWithNewLines(lineGenerator); - - const finalGenerator = stopAtSimilarLine( - lineGenerator, - lineBelowCursor, - fullStop, - ); - - try { - for await (const update of finalGenerator) { - completion += update; - } - } catch (e: any) { - if (ERRORS_TO_IGNORE.some((err) => e.includes(err))) { - return undefined; - } - throw e; - } - - if (cancelled) { - return undefined; - } - - const processedCompletion = postprocessCompletion({ - completion, - prefix, - suffix, - llm, - }); - - if (!processedCompletion) { - return undefined; - } - completion = processedCompletion; - } - - const time = Date.now() - startTime; - return { - time, - completion, - prefix, - suffix, - prompt, - modelProvider: llm.providerName, - modelName: llm.model, - completionOptions, - cacheHit, - filepath: input.filepath, - completionId: input.completionId, - gitRepo: await ide.getRepoName(input.filepath), - uniqueId: await ide.getUniqueId(), - ...options, - }; -} - export class CompletionProvider { private static debounceTimeout: NodeJS.Timeout | undefined = undefined; private static debouncing = false; @@ -489,12 +153,15 @@ export class CompletionProvider { this.generatorReuseManager = new GeneratorReuseManager( this.onError.bind(this), ); + this.importDefinitionsService = new ImportDefinitionsService(this.ide); } + private importDefinitionsService: ImportDefinitionsService; private generatorReuseManager: GeneratorReuseManager; private autocompleteCache = AutocompleteLruCache.get(); public errorsShown: Set = new Set(); private bracketMatchingService = new BracketMatchingService(); + // private nearbyDefinitionsService = new NearbyDefinitionsService(); private onError(e: any) { console.warn("Error generating autocompletion: ", e); @@ -654,16 +321,7 @@ export class CompletionProvider { options.maxPromptTokens = 500; } - const outcome = await getTabCompletion( - token, - options, - llm, - this.ide, - this.generatorReuseManager, - input, - this.getDefinitionsFromLsp, - this.bracketMatchingService, - ); + const outcome = await this.getTabCompletion(token, options, llm, input); if (!outcome?.completion) { return undefined; @@ -735,4 +393,338 @@ export class CompletionProvider { displayedAt: now, }; } + + async getTabCompletion( + token: AbortSignal, + options: TabAutocompleteOptions, + llm: ILLM, + input: AutocompleteInput, + ): Promise { + const startTime = Date.now(); + + const { + filepath, + pos, + recentlyEditedFiles, + recentlyEditedRanges, + clipboardText, + manuallyPassFileContents, + manuallyPassPrefix, + } = input; + const fileContents = + manuallyPassFileContents ?? (await this.ide.readFile(filepath)); + const fileLines = fileContents.split("\n"); + + // Filter + const lang = languageForFilepath(filepath); + const line = fileLines[pos.line] ?? ""; + for (const endOfLine of lang.endOfLine) { + if (line.endsWith(endOfLine) && pos.character >= line.length) { + return undefined; + } + } + + // Model + if (!llm) { + return; + } + if (llm instanceof OpenAI) { + llm.useLegacyCompletionsEndpoint = true; + } else if ( + llm.providerName === "free-trial" && + llm.model !== TRIAL_FIM_MODEL + ) { + llm.model = TRIAL_FIM_MODEL; + } + + if ( + !shownGptClaudeWarning && + nonAutocompleteModels.some((model) => llm.model.includes(model)) && + !llm.model.includes("deepseek") + ) { + shownGptClaudeWarning = true; + throw new Error( + `Warning: ${llm.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/walkthroughs/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`, + ); + } + + // Prompt + let fullPrefix = + getRangeInString(fileContents, { + start: { line: 0, character: 0 }, + end: input.selectedCompletionInfo?.range.start ?? pos, + }) + (input.selectedCompletionInfo?.text ?? ""); + + if (input.injectDetails) { + const lines = fullPrefix.split("\n"); + fullPrefix = `${lines.slice(0, -1).join("\n")}\n${ + lang.singleLineComment + } ${input.injectDetails.split("\n").join(`\n${lang.singleLineComment} `)}\n${ + lines[lines.length - 1] + }`; + } + + const fullSuffix = getRangeInString(fileContents, { + start: pos, + end: { line: fileLines.length - 1, character: Number.MAX_SAFE_INTEGER }, + }); + + // First non-whitespace line below the cursor + let lineBelowCursor = ""; + let i = 1; + while ( + lineBelowCursor.trim() === "" && + pos.line + i <= fileLines.length - 1 + ) { + lineBelowCursor = fileLines[Math.min(pos.line + i, fileLines.length - 1)]; + i++; + } + + let extrasSnippets = options.useOtherFiles + ? ((await Promise.race([ + this.getDefinitionsFromLsp( + filepath, + fullPrefix + fullSuffix, + fullPrefix.length, + this.ide, + lang, + ), + new Promise((resolve) => { + setTimeout(() => resolve([]), 100); + }), + ])) as AutocompleteSnippet[]) + : []; + + const workspaceDirs = await this.ide.getWorkspaceDirs(); + if (options.onlyMyCode) { + extrasSnippets = extrasSnippets.filter((snippet) => { + return workspaceDirs.some((dir) => snippet.filepath.startsWith(dir)); + }); + } + + let { prefix, suffix, completeMultiline, snippets } = + await constructAutocompletePrompt( + filepath, + pos.line, + fullPrefix, + fullSuffix, + clipboardText, + lang, + options, + recentlyEditedRanges, + recentlyEditedFiles, + llm.model, + extrasSnippets, + this.importDefinitionsService, + ); + + // If prefix is manually passed + if (manuallyPassPrefix) { + prefix = manuallyPassPrefix; + suffix = ""; + } + + // Template prompt + const { + template, + completionOptions, + compilePrefixSuffix = undefined, + } = options.template + ? { template: options.template, completionOptions: {} } + : getTemplateForModel(llm.model); + + let prompt: string; + const filename = getBasename(filepath); + const reponame = getBasename(workspaceDirs[0] ?? "myproject"); + + // Some models have prompts that need two passes. This lets us pass the compiled prefix/suffix + // into either the 2nd template to generate a raw string, or to pass prefix, suffix to a FIM endpoint + if (compilePrefixSuffix) { + [prefix, suffix] = compilePrefixSuffix( + prefix, + suffix, + filepath, + reponame, + snippets, + ); + } + + if (typeof template === "string") { + const compiledTemplate = Handlebars.compile(template); + + // Format snippets as comments and prepend to prefix + const formattedSnippets = snippets + .map((snippet) => + formatExternalSnippet(snippet.filepath, snippet.contents, lang), + ) + .join("\n"); + if (formattedSnippets.length > 0) { + prefix = `${formattedSnippets}\n\n${prefix}`; + } else if (prefix.trim().length === 0 && suffix.trim().length === 0) { + // If it's an empty file, include the file name as a comment + prefix = `${lang.singleLineComment} ${getLastNPathParts(filepath, 2)}\n${prefix}`; + } + + prompt = compiledTemplate({ + prefix, + suffix, + filename, + reponame, + }); + } else { + // Let the template function format snippets + prompt = template(prefix, suffix, filepath, reponame, snippets); + } + + // Completion + let completion = ""; + + const cache = await autocompleteCache; + const cachedCompletion = options.useCache + ? await cache.get(prefix) + : undefined; + let cacheHit = false; + if (cachedCompletion) { + // Cache + cacheHit = true; + completion = cachedCompletion; + } else { + const stop = [ + ...(completionOptions?.stop || []), + ...multilineStops, + ...commonStops, + ...(llm.model.toLowerCase().includes("starcoder2") + ? STARCODER2_T_ARTIFACTS + : []), + ...(lang.stopWords ?? []), + ...lang.topLevelKeywords.map((word) => `\n${word}`), + ]; + + let langMultilineDecision = lang.useMultiline?.({ prefix, suffix }); + let multiline: boolean = false; + if (langMultilineDecision) { + multiline = langMultilineDecision; + } else { + multiline = + !input.selectedCompletionInfo && // Only ever single-line if using intellisense selected value + options.multilineCompletions !== "never" && + (options.multilineCompletions === "always" || completeMultiline); + } + + // Try to reuse pending requests if what the user typed matches start of completion + const generator = this.generatorReuseManager.getGenerator( + prefix, + () => + llm.supportsFim() + ? llm.streamFim(prefix, suffix, { + ...completionOptions, + stop, + }) + : llm.streamComplete(prompt, { + ...completionOptions, + raw: true, + stop, + }), + multiline, + ); + + // Full stop means to stop the LLM's generation, instead of just truncating the displayed completion + const fullStop = () => + this.generatorReuseManager.currentGenerator?.cancel(); + + // LLM + let cancelled = false; + const generatorWithCancellation = async function* () { + for await (const update of generator) { + if (token.aborted) { + cancelled = true; + return; + } + yield update; + } + }; + let charGenerator = generatorWithCancellation(); + charGenerator = noFirstCharNewline(charGenerator); + charGenerator = onlyWhitespaceAfterEndOfLine( + charGenerator, + lang.endOfLine, + fullStop, + ); + charGenerator = this.bracketMatchingService.stopOnUnmatchedClosingBracket( + charGenerator, + prefix, + suffix, + filepath, + multiline, + ); + + let lineGenerator = streamLines(charGenerator); + lineGenerator = stopAtLines(lineGenerator, fullStop); + lineGenerator = stopAtRepeatingLines(lineGenerator, fullStop); + lineGenerator = avoidPathLine(lineGenerator, lang.singleLineComment); + lineGenerator = skipPrefixes(lineGenerator); + lineGenerator = noTopLevelKeywordsMidline( + lineGenerator, + lang.topLevelKeywords, + fullStop, + ); + + for (const lineFilter of lang.lineFilters ?? []) { + lineGenerator = lineFilter({ lines: lineGenerator, fullStop }); + } + + lineGenerator = streamWithNewLines(lineGenerator); + + const finalGenerator = stopAtSimilarLine( + lineGenerator, + lineBelowCursor, + fullStop, + ); + + try { + for await (const update of finalGenerator) { + completion += update; + } + } catch (e: any) { + if (ERRORS_TO_IGNORE.some((err) => e.includes(err))) { + return undefined; + } + throw e; + } + + if (cancelled) { + return undefined; + } + + const processedCompletion = postprocessCompletion({ + completion, + prefix, + suffix, + llm, + }); + + if (!processedCompletion) { + return undefined; + } + completion = processedCompletion; + } + + const time = Date.now() - startTime; + return { + time, + completion, + prefix, + suffix, + prompt, + modelProvider: llm.providerName, + modelName: llm.model, + completionOptions, + cacheHit, + filepath: input.filepath, + completionId: input.completionId, + gitRepo: await this.ide.getRepoName(input.filepath), + uniqueId: await this.ide.getUniqueId(), + ...options, + }; + } } diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 6f97e75ac..78770a0d5 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -7,6 +7,7 @@ import { pruneLinesFromBottom, pruneLinesFromTop, } from "../llm/countTokens.js"; +import { ImportDefinitionsService } from "./ImportDefinitionsService.js"; import { getAst, getTreePathAtCursor } from "./ast.js"; import { AutocompleteLanguageInfo, @@ -15,6 +16,7 @@ import { } from "./languages.js"; import { fillPromptWithSnippets, + getSymbolsForSnippet, rankSnippets, removeRangeFromSnippets, type AutocompleteSnippet, @@ -124,6 +126,7 @@ export async function constructAutocompletePrompt( recentlyEditedFiles: RangeInFileWithContents[], modelName: string, extraSnippets: AutocompleteSnippet[], + importDefinitionsService: ImportDefinitionsService, ): Promise<{ prefix: string; suffix: string; @@ -189,6 +192,29 @@ export async function constructAutocompletePrompt( } } + // Use imports + if (options.useImports) { + const importSnippets = []; + const fileInfo = importDefinitionsService.get(filepath); + if (fileInfo) { + const { imports } = fileInfo; + // Look for imports of any symbols around the current range + const textAroundCursor = + fullPrefix.split("\n").slice(-5).join("\n") + + fullSuffix.split("\n").slice(0, 3).join("\n"); + const symbols = Array.from( + getSymbolsForSnippet(textAroundCursor), + ).filter((symbol) => !language.topLevelKeywords.includes(symbol)); + for (const symbol of symbols) { + const rifs = imports[symbol]; + if (rifs) { + importSnippets.push(...rifs); + } + } + } + snippets.push(...importSnippets); + } + // Filter out empty snippets and ones that are already in the prefix/suffix snippets = snippets .map((snippet) => ({ ...snippet })) diff --git a/core/index.d.ts b/core/index.d.ts index b5f40c322..658f5c980 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -201,6 +201,11 @@ export interface RangeInFile { range: Range; } +export interface Location { + filepath: string; + position: Position; +} + export interface FileWithContents { filepath: string; contents: string; @@ -462,6 +467,12 @@ export interface IDE { listDir(dir: string): Promise<[string, FileType][]>; getLastModified(files: string[]): Promise<{ [path: string]: number }>; getGitHubAuthToken(): Promise; + + // LSP + gotoDefinition(location: Location): Promise; + + // Callbacks + onDidChangeActiveTextEditor(callback: (filepath: string) => void): void; } // Slash Commands @@ -756,6 +767,7 @@ export interface TabAutocompleteOptions { useRecentlyEdited: boolean; recentLinePrefixMatchMinLength: number; disableInFiles?: string[]; + useImports?: boolean; } export interface ContinueUIConfig { diff --git a/core/indexing/CodeSnippetsIndex.ts b/core/indexing/CodeSnippetsIndex.ts index 11a6a01bb..23dd5f535 100644 --- a/core/indexing/CodeSnippetsIndex.ts +++ b/core/indexing/CodeSnippetsIndex.ts @@ -1,5 +1,3 @@ -import fs from "node:fs"; -import path from "node:path"; import type { ChunkWithoutID, ContextItem, @@ -10,9 +8,9 @@ import type { } from "../index.js"; import { getBasename, getLastNPathParts } from "../util/index.js"; import { - getLanguageForFile, + TSQueryType, getParserForFile, - supportedLanguages, + getQueryForFile, } from "../util/treeSitter.js"; import { DatabaseConnection, SqliteDb, tagToString } from "./refreshIndex.js"; import { @@ -46,35 +44,16 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex { )`); } - private getQuerySource(filepath: string) { - const fullLangName = supportedLanguages[filepath.split(".").pop() ?? ""]; - const sourcePath = path.join( - __dirname, - "..", - "tree-sitter", - "code-snippet-queries", - `tree-sitter-${fullLangName}-tags.scm`, - ); - if (!fs.existsSync(sourcePath)) { - return ""; - } - return fs.readFileSync(sourcePath).toString(); - } - async getSnippetsInFile( filepath: string, contents: string, ): Promise<(ChunkWithoutID & { title: string })[]> { - const lang = await getLanguageForFile(filepath); - if (!lang) { - return []; - } const parser = await getParserForFile(filepath); if (!parser) { return []; } const ast = parser.parse(contents); - const query = lang?.query(this.getQuerySource(filepath)); + const query = await getQueryForFile(filepath, TSQueryType.CodeSnippets); const matches = query?.matches(ast.rootNode); return ( diff --git a/core/protocol/ide.ts b/core/protocol/ide.ts index ab32f52aa..31308ad4d 100644 --- a/core/protocol/ide.ts +++ b/core/protocol/ide.ts @@ -5,8 +5,10 @@ import type { IdeInfo, IdeSettings, IndexTag, + Location, Problem, Range, + RangeInFile, Thread, } from ".."; @@ -73,5 +75,7 @@ export type ToIdeFromWebviewOrCoreProtocol = { listDir: [{ dir: string }, [string, FileType][]]; getLastModified: [{ files: string[] }, { [path: string]: number }]; + gotoDefinition: [{ location: Location }, RangeInFile[]]; + getGitHubAuthToken: [undefined, string | undefined]; }; diff --git a/core/protocol/index.ts b/core/protocol/index.ts index 36c73e0b0..ac89c3b42 100644 --- a/core/protocol/index.ts +++ b/core/protocol/index.ts @@ -12,7 +12,10 @@ export type IProtocol = Record; // IDE export type ToIdeProtocol = ToIdeFromWebviewProtocol & ToIdeFromCoreProtocol; -export type FromIdeProtocol = ToWebviewFromIdeProtocol & ToCoreFromIdeProtocol; +export type FromIdeProtocol = ToWebviewFromIdeProtocol & + ToCoreFromIdeProtocol & { + didChangeActiveTextEditor: [{ filepath: string }, void]; + }; // Webview export type ToWebviewProtocol = ToWebviewFromIdeProtocol & diff --git a/core/util/LruCache.ts b/core/util/LruCache.ts new file mode 100644 index 000000000..f6d923fed --- /dev/null +++ b/core/util/LruCache.ts @@ -0,0 +1,30 @@ +export class PrecalculatedLruCache { + private items: [string, V][] = []; + constructor( + private readonly calculateValue: (key: string) => Promise, + private readonly N: number, + ) {} + + async initKey(key: string) { + // Maintain LRU + const index = this.items.findIndex((item) => item[0] === key); + + if (index < 0) { + // Calculate info for new file + const value: V = await this.calculateValue(key); + + this.items.push([key, value]); + if (this.items.length > this.N) { + this.items.shift(); + } + } else { + // Move to end of array, since it was recently used + const [item] = this.items.splice(index, 1); + this.items.push(item); + } + } + + get(key: string): V | undefined { + return this.items.find((item) => item[0] === key)?.[1]; + } +} diff --git a/core/util/filesystem.ts b/core/util/filesystem.ts index 20373eebd..9745d1628 100644 --- a/core/util/filesystem.ts +++ b/core/util/filesystem.ts @@ -6,8 +6,10 @@ import { IdeInfo, IdeSettings, IndexTag, + Location, Problem, Range, + RangeInFile, Thread, } from "../index.d.js"; @@ -20,6 +22,13 @@ class FileSystemIde implements IDE { fs.mkdirSync(FileSystemIde.workspaceDir, { recursive: true }); } + gotoDefinition(location: Location): Promise { + throw new Error("Method not implemented."); + } + onDidChangeActiveTextEditor(callback: (filepath: string) => void): void { + throw new Error("Method not implemented."); + } + async getIdeSettings(): Promise { return { remoteConfigServerUrl: undefined, diff --git a/core/util/messageIde.ts b/core/util/messageIde.ts index 4523babba..d74a0ebe4 100644 --- a/core/util/messageIde.ts +++ b/core/util/messageIde.ts @@ -5,11 +5,14 @@ import type { IdeInfo, IdeSettings, IndexTag, + Location, Problem, Range, + RangeInFile, Thread, } from "../index.js"; import { ToIdeFromWebviewOrCoreProtocol } from "../protocol/ide.js"; +import { FromIdeProtocol } from "../protocol/index.js"; export class MessageIde implements IDE { constructor( @@ -17,7 +20,18 @@ export class MessageIde implements IDE { messageType: T, data: ToIdeFromWebviewOrCoreProtocol[T][0], ) => Promise, + private readonly on: ( + messageType: T, + callback: (data: FromIdeProtocol[T][0]) => FromIdeProtocol[T][1], + ) => void, ) {} + async gotoDefinition(location: Location): Promise { + return this.request("gotoDefinition", { location }); + } + onDidChangeActiveTextEditor(callback: (filepath: string) => void): void { + this.on("didChangeActiveTextEditor", (data) => callback(data.filepath)); + } + getIdeSettings(): Promise { return this.request("getIdeSettings", undefined); } diff --git a/core/util/parameters.ts b/core/util/parameters.ts index 83b77046d..8909af6f4 100644 --- a/core/util/parameters.ts +++ b/core/util/parameters.ts @@ -19,6 +19,7 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { useRecentlyEdited: true, recentLinePrefixMatchMinLength: 7, disableInFiles: undefined, + useImports: true, }; export const COUNT_COMPLETION_REJECTED_AFTER = 10_000; diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index 967f5d979..95a7a10ce 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -1,4 +1,5 @@ -import * as path from "path"; +import fs from "node:fs"; +import path from "node:path"; import Parser, { Language } from "web-tree-sitter"; export const supportedLanguages: { [key: string]: string } = { @@ -115,3 +116,34 @@ export async function getLanguageForFile( return undefined; } } + +export enum TSQueryType { + CodeSnippets = "code-snippet-queries", + Imports = "import-queries", +} + +export async function getQueryForFile( + filepath: string, + queryType: TSQueryType, +): Promise { + const language = await getLanguageForFile(filepath); + if (!language) { + return undefined; + } + + const fullLangName = supportedLanguages[filepath.split(".").pop() ?? ""]; + const sourcePath = path.join( + __dirname, + "..", + "tree-sitter", + queryType, + `${fullLangName}.scm`, + ); + if (!fs.existsSync(sourcePath)) { + return undefined; + } + const querySource = fs.readFileSync(sourcePath).toString(); + + const query = language.query(querySource); + return query; +} diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index d5a8b0c0d..71ff48e4e 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -470,7 +470,7 @@ const exe = os === "win32" ? ".exe" : ""; // Validate the all of the necessary files are present validateFilesPresent([ // Queries used to create the index for @code context provider - "tree-sitter/code-snippet-queries/tree-sitter-c_sharp-tags.scm", + "tree-sitter/code-snippet-queries/c_sharp.scm", // Queries used for @outline and @highlights context providers "tag-qry/tree-sitter-c_sharp-tags.scm", diff --git a/extensions/vscode/src/autocomplete/lsp.ts b/extensions/vscode/src/autocomplete/lsp.ts index 02441e965..8ac365826 100644 --- a/extensions/vscode/src/autocomplete/lsp.ts +++ b/extensions/vscode/src/autocomplete/lsp.ts @@ -32,7 +32,9 @@ function gotoInputKey(input: GotoInput) { const MAX_CACHE_SIZE = 50; const gotoCache = new Map(); -async function executeGotoProvider(input: GotoInput): Promise { +export async function executeGotoProvider( + input: GotoInput, +): Promise { const cacheKey = gotoInputKey(input); const cached = gotoCache.get(cacheKey); if (cached) { diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index d584d0615..a608b1757 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -9,7 +9,9 @@ import type { IdeInfo, IdeSettings, IndexTag, + Location, Problem, + RangeInFile, Thread, } from "core"; import { Range } from "core"; @@ -20,6 +22,7 @@ import { getContinueGlobalPath, } from "core/util/paths"; import * as vscode from "vscode"; +import { executeGotoProvider } from "./autocomplete/lsp"; import { DiffManager } from "./diff/horizontal"; import { Repository } from "./otherExtensions/git"; import { VsCodeIdeUtils } from "./util/ideUtils"; @@ -41,6 +44,25 @@ class VsCodeIde implements IDE { this.ideUtils = new VsCodeIdeUtils(); } + async gotoDefinition(location: Location): Promise { + const result = await executeGotoProvider({ + uri: location.filepath, + line: location.position.line, + character: location.position.character, + name: "vscode.executeDefinitionProvider", + }); + + return result; + } + + onDidChangeActiveTextEditor(callback: (filepath: string) => void): void { + vscode.window.onDidChangeActiveTextEditor((editor) => { + if (editor) { + callback(editor.document.uri.fsPath); + } + }); + } + private authToken: string | undefined; private askedForAuth = false; diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-c-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/c.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-c-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/c.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-c_sharp-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/c_sharp.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-c_sharp-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/c_sharp.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-cpp-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/cpp.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-cpp-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/cpp.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-elisp-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/elisp.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-elisp-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/elisp.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-elixir-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/elixir.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-elixir-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/elixir.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-go-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/go.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-go-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/go.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-java-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/java.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-java-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/java.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-javascript-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/javascript.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-javascript-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/javascript.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-ocaml-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/ocaml.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-ocaml-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/ocaml.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-php-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/php.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-php-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/php.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-python-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/python.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-python-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/python.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-ql-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/ql.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-ql-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/ql.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-ruby-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/ruby.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-ruby-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/ruby.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-rust-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/rust.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-rust-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/rust.scm diff --git a/extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-typescript-tags.scm b/extensions/vscode/tree-sitter/code-snippet-queries/typescript.scm similarity index 100% rename from extensions/vscode/tree-sitter/code-snippet-queries/tree-sitter-typescript-tags.scm rename to extensions/vscode/tree-sitter/code-snippet-queries/typescript.scm diff --git a/extensions/vscode/tree-sitter/import-queries/typescript.scm b/extensions/vscode/tree-sitter/import-queries/typescript.scm new file mode 100644 index 000000000..19a4d024a --- /dev/null +++ b/extensions/vscode/tree-sitter/import-queries/typescript.scm @@ -0,0 +1,9 @@ +(import_statement + (import_clause + (named_imports + (import_specifier + (identifier) @import)))) + +(import_statement + (import_clause + (identifier) @import )) \ No newline at end of file diff --git a/gui/src/context/IdeMessenger.ts b/gui/src/context/IdeMessenger.ts index 81d2201f9..7534d59b6 100644 --- a/gui/src/context/IdeMessenger.ts +++ b/gui/src/context/IdeMessenger.ts @@ -54,7 +54,7 @@ export class IdeMessenger implements IIdeMessenger { ide: IDE; constructor() { - this.ide = new MessageIde(this.request.bind(this)); + this.ide = new MessageIde(this.request.bind(this), () => {}); } private _postToIde(messageType: string, data: any, messageId?: string) { From 18c935eb852c958615c9db1c8281d4bb3eb5afd6 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 21 Jun 2024 15:55:14 -0700 Subject: [PATCH 19/29] =?UTF-8?q?=F0=9F=90=9B=20fix=20regression=20in=20/e?= =?UTF-8?q?dit=20slash=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/commands/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/commands/util.ts b/core/commands/util.ts index e0a6eca33..207b6c5ec 100644 --- a/core/commands/util.ts +++ b/core/commands/util.ts @@ -15,7 +15,7 @@ export function contextItemToRangeInFileWithContents( const lines = item.name.split("(")[1].split(")")[0].split("-"); const rif: RangeInFileWithContents = { - filepath: item.description.split(" (")[0], + filepath: item.id.itemId, range: { start: { line: Number.parseInt(lines[0]), From 37355ec1db07e7fca51b65944289f0b91a6ffffd Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 21 Jun 2024 21:59:38 -0700 Subject: [PATCH 20/29] organize autocomplete folder --- .../services/BracketMatchingService.ts | 134 +++++++ .../services/ImportDefinitionsService.ts | 81 ++++ .../services/NearbyDefinitionsService.ts | 45 +++ .../streamTransforms/charStream.ts | 41 ++ .../streamTransforms/lineStream.ts | 349 ++++++++++++++++++ 5 files changed, 650 insertions(+) create mode 100644 core/autocomplete/services/BracketMatchingService.ts create mode 100644 core/autocomplete/services/ImportDefinitionsService.ts create mode 100644 core/autocomplete/services/NearbyDefinitionsService.ts create mode 100644 core/autocomplete/streamTransforms/charStream.ts create mode 100644 core/autocomplete/streamTransforms/lineStream.ts diff --git a/core/autocomplete/services/BracketMatchingService.ts b/core/autocomplete/services/BracketMatchingService.ts new file mode 100644 index 000000000..63afdfd10 --- /dev/null +++ b/core/autocomplete/services/BracketMatchingService.ts @@ -0,0 +1,134 @@ +/** + * We follow the policy of only completing bracket pairs that we started + * But sometimes we started the pair in a previous autocomplete suggestion + */ +export class BracketMatchingService { + private openingBracketsFromLastCompletion: string[] = []; + private lastCompletionFile: string | undefined = undefined; + + static BRACKETS: { [key: string]: string } = { "(": ")", "{": "}", "[": "]" }; + static BRACKETS_REVERSE: { [key: string]: string } = { + ")": "(", + "}": "{", + "]": "[", + }; + + handleAcceptedCompletion(completion: string, filepath: string) { + this.openingBracketsFromLastCompletion = []; + const stack: string[] = []; + + for (let i = 0; i < completion.length; i++) { + const char = completion[i]; + if (Object.keys(BracketMatchingService.BRACKETS).includes(char)) { + // It's an opening bracket + stack.push(char); + } else if ( + Object.values(BracketMatchingService.BRACKETS).includes(char) + ) { + // It's a closing bracket + if ( + stack.length === 0 || + BracketMatchingService.BRACKETS[stack.pop()!] !== char + ) { + break; + } + } + } + + // Any remaining opening brackets in the stack are uncompleted + this.openingBracketsFromLastCompletion = stack; + this.lastCompletionFile = filepath; + } + + async *stopOnUnmatchedClosingBracket( + stream: AsyncGenerator, + prefix: string, + suffix: string, + filepath: string, + multiline: boolean, // Whether this is a multiline completion or not + ): AsyncGenerator { + let stack: string[] = []; + if (multiline) { + // Add opening brackets from the previous response + if (this.lastCompletionFile === filepath) { + stack = [...this.openingBracketsFromLastCompletion]; + } else { + this.lastCompletionFile = undefined; + } + } else { + // If single line completion, then allow completing bracket pairs that are + // started on the current line but not finished on the current line + if (!multiline) { + const currentLine = + (prefix.split("\n").pop() ?? "") + (suffix.split("\n")[0] ?? ""); + for (let i = 0; i < currentLine.length; i++) { + const char = currentLine[i]; + if (Object.keys(BracketMatchingService.BRACKETS).includes(char)) { + // It's an opening bracket + stack.push(char); + } else if ( + Object.values(BracketMatchingService.BRACKETS).includes(char) + ) { + // It's a closing bracket + if ( + stack.length === 0 || + BracketMatchingService.BRACKETS[stack.pop()!] !== char + ) { + break; + } + } + } + } + } + + // Add corresponding open brackets from suffix to stack + // because we overwrite them and the diff is displayed, and this allows something to be edited after that + for (let i = 0; i < suffix.length; i++) { + if (suffix[i] === " ") continue; + const openBracket = BracketMatchingService.BRACKETS_REVERSE[suffix[i]]; + if (!openBracket) break; + stack.unshift(openBracket); + } + + let all = ""; + let seenNonWhitespaceOrClosingBracket = false; + for await (let chunk of stream) { + // Allow closing brackets before any non-whitespace characters + if (!seenNonWhitespaceOrClosingBracket) { + const firstNonWhitespaceOrClosingBracketIndex = + chunk.search(/[^\s\)\}\]]/); + if (firstNonWhitespaceOrClosingBracketIndex !== -1) { + yield chunk.slice(0, firstNonWhitespaceOrClosingBracketIndex); + chunk = chunk.slice(firstNonWhitespaceOrClosingBracketIndex); + seenNonWhitespaceOrClosingBracket = true; + } else { + yield chunk; + continue; + } + } + + all += chunk; + const allLines = all.split("\n"); + for (let i = 0; i < chunk.length; i++) { + const char = chunk[i]; + if (Object.values(BracketMatchingService.BRACKETS).includes(char)) { + // It's a closing bracket + if ( + stack.length === 0 || + BracketMatchingService.BRACKETS[stack.pop()!] !== char + ) { + // If the stack is empty or the top of the stack doesn't match the current closing bracket + yield chunk.slice(0, i); + return; // Stop the generator if the closing bracket doesn't have a matching opening bracket in the stream + } + } else if ( + Object.keys(BracketMatchingService.BRACKETS).includes(char) + ) { + // It's an opening bracket + stack.push(char); + } + } + yield chunk; + } + } +} diff --git a/core/autocomplete/services/ImportDefinitionsService.ts b/core/autocomplete/services/ImportDefinitionsService.ts new file mode 100644 index 000000000..19287bf81 --- /dev/null +++ b/core/autocomplete/services/ImportDefinitionsService.ts @@ -0,0 +1,81 @@ +import { IDE } from ".."; +import { RangeInFileWithContents } from "../commands/util"; +import { PrecalculatedLruCache } from "../util/LruCache"; +import { + TSQueryType, + getParserForFile, + getQueryForFile, +} from "../util/treeSitter"; + +interface FileInfo { + imports: { [key: string]: RangeInFileWithContents[] }; +} + +export class ImportDefinitionsService { + static N = 10; + + private cache: PrecalculatedLruCache = + new PrecalculatedLruCache( + this._getFileInfo.bind(this), + ImportDefinitionsService.N, + ); + + constructor(private readonly ide: IDE) { + ide.onDidChangeActiveTextEditor((filepath) => { + this.cache.initKey(filepath); + }); + } + + get(filepath: string): FileInfo | undefined { + return this.cache.get(filepath); + } + + private async _getFileInfo(filepath: string): Promise { + const parser = await getParserForFile(filepath); + if (!parser) { + return { + imports: {}, + }; + } + const ast = parser.parse(await this.ide.readFile(filepath), undefined, { + includedRanges: [ + { + startIndex: 0, + endIndex: 10_000, + startPosition: { row: 0, column: 0 }, + endPosition: { row: 100, column: 0 }, + }, + ], + }); + const query = await getQueryForFile(filepath, TSQueryType.Imports); + if (!query) { + return { + imports: {}, + }; + } + + const matches = query?.matches(ast.rootNode); + + const fileInfo: FileInfo = { + imports: {}, + }; + for (const match of matches) { + const startPosition = match.captures[0].node.startPosition; + const defs = await this.ide.gotoDefinition({ + filepath, + position: { + line: startPosition.row, + character: startPosition.column, + }, + }); + fileInfo.imports[match.captures[0].node.text] = await Promise.all( + defs.map(async (def) => ({ + ...def, + contents: await this.ide.readRangeInFile(def.filepath, def.range), + })), + ); + } + + return fileInfo; + } +} diff --git a/core/autocomplete/services/NearbyDefinitionsService.ts b/core/autocomplete/services/NearbyDefinitionsService.ts new file mode 100644 index 000000000..12d6f7947 --- /dev/null +++ b/core/autocomplete/services/NearbyDefinitionsService.ts @@ -0,0 +1,45 @@ +import { IDE, Location } from "../.."; +import { LANGUAGES } from "../languages"; +import { getSymbolsForSnippet } from "../ranking"; + +interface FileInfo { + filepath: string; +} + +export class NearbyDefinitionsService { + static N = 10; + + constructor(private readonly ide: IDE) {} + + async getDefinitionsForLine(filepath: string, line: number) { + const lineContent = await this.ide.readRangeInFile(filepath, { + start: { + line, + character: 0, + }, + end: { + line: line + 1, + character: 0, + }, + }); + + // Remove keywords + const lang = LANGUAGES[filepath.split(".").slice(-1)[0]]; + const symbols = Array.from(getSymbolsForSnippet(lineContent)) + .filter((s) => s.length > 0) + .filter((s) => !(lang && lang?.stopWords?.includes(s))); + + return Promise.all( + symbols.map((s) => { + const character = lineContent.indexOf(s); + const pos: Location = { + filepath, + position: { + line, + character, + }, + }; + }), + ); + } +} diff --git a/core/autocomplete/streamTransforms/charStream.ts b/core/autocomplete/streamTransforms/charStream.ts new file mode 100644 index 000000000..39a1c6729 --- /dev/null +++ b/core/autocomplete/streamTransforms/charStream.ts @@ -0,0 +1,41 @@ +export async function* onlyWhitespaceAfterEndOfLine( + stream: AsyncGenerator, + endOfLine: string[], + fullStop: () => void, +): AsyncGenerator { + let pending = ""; + for await (let chunk of stream) { + chunk = pending + chunk; + pending = ""; + for (let i = 0; i < chunk.length - 1; i++) { + if ( + endOfLine.includes(chunk[i]) && + chunk[i + 1].trim() === chunk[i + 1] + ) { + yield chunk.slice(0, i + 1); + fullStop(); + return; + } + } + if (endOfLine.includes(chunk[chunk.length - 1])) { + pending = chunk[chunk.length - 1]; + yield chunk.slice(0, chunk.length - 1); + } else { + yield chunk; + } + } + yield pending; +} + +export async function* noFirstCharNewline(stream: AsyncGenerator) { + let first = true; + for await (const char of stream) { + if (first) { + first = false; + if (char.startsWith("\n") || char.startsWith("\r")) { + return; + } + } + yield char; + } +} diff --git a/core/autocomplete/streamTransforms/lineStream.ts b/core/autocomplete/streamTransforms/lineStream.ts new file mode 100644 index 000000000..268801994 --- /dev/null +++ b/core/autocomplete/streamTransforms/lineStream.ts @@ -0,0 +1,349 @@ +import { distance } from "fastest-levenshtein"; +import { LineStream } from "../../diff/util.js"; +import { DiffLine } from "../../index.js"; + +export type LineFilter = (args: { + lines: LineStream; + fullStop: () => void; +}) => LineStream; + +export async function* noTopLevelKeywordsMidline( + lines: LineStream, + topLevelKeywords: string[], + fullStop: () => void, +): LineStream { + for await (const line of lines) { + for (const keyword of topLevelKeywords) { + const indexOf = line.indexOf(`${keyword} `); + if (indexOf >= 0 && line.slice(indexOf - 1, indexOf).trim() !== "") { + yield line.slice(0, indexOf); + fullStop(); + break; + } + } + yield line; + } +} + +export async function* avoidPathLine( + stream: LineStream, + comment: string, +): LineStream { + // Snippets are inserted as comments with a line at the start '// Path: '. + // Sometimes the model with copy this pattern, which is unwanted + for await (const line of stream) { + // Also filter lines that are empty comments + if (line.startsWith(`${comment} Path: `) || line.trim() === comment) { + continue; + } + yield line; + } +} + +export async function* streamWithNewLines(stream: LineStream): LineStream { + let firstLine = true; + for await (const nextLine of stream) { + if (!firstLine) { + yield "\n"; + } + firstLine = false; + yield nextLine; + } +} + +const bracketEnding = [")", "]", "}", ";"]; +function isBracketEnding(line: string): boolean { + return line + .trim() + .split("") + .some((char) => bracketEnding.includes(char)); +} + +function commonPrefixLength(a: string, b: string): number { + let i = 0; + while (i < a.length && i < b.length && a[i] === b[i]) { + i++; + } + return i; +} + +export function lineIsRepeated(a: string, b: string): boolean { + if (a.length <= 4 || b.length <= 4) { + return false; + } + + const aTrim = a.trim(); + const bTrim = b.trim(); + return ( + commonPrefixLength(aTrim, bTrim) > 12 || + distance(aTrim, bTrim) / bTrim.length < 0.1 + ); +} + +export async function* stopAtSimilarLine( + stream: LineStream, + line: string, + fullStop: () => void, +): AsyncGenerator { + const trimmedLine = line.trim(); + const lineIsBracketEnding = isBracketEnding(trimmedLine); + for await (const nextLine of stream) { + if (nextLine === line) { + fullStop(); + break; + } + + if (lineIsBracketEnding && trimmedLine.trim() === nextLine.trim()) { + yield nextLine; + continue; + } + + if (lineIsRepeated(nextLine, trimmedLine)) { + fullStop(); + break; + } + yield nextLine; + } +} + +const LINES_TO_STOP_AT = ["# End of file.", " void, +): LineStream { + for await (const line of stream) { + if (LINES_TO_STOP_AT.some((stopAt) => line.trim().includes(stopAt))) { + fullStop(); + break; + } + yield line; + } +} + +const PREFIXES_TO_SKIP = [""]; +export async function* skipPrefixes(lines: LineStream): LineStream { + let isFirstLine = true; + for await (const line of lines) { + if (isFirstLine) { + const match = PREFIXES_TO_SKIP.find((prefix) => line.startsWith(prefix)); + if (match) { + yield line.slice(match.length); + continue; + } + isFirstLine = false; + } + yield line; + } +} + +const LINES_TO_SKIP = [""]; + +export async function* skipLines(stream: LineStream): LineStream { + for await (const line of stream) { + if (!LINES_TO_SKIP.some((skipAt) => line.startsWith(skipAt))) { + yield line; + } + } +} + +const LINES_TO_REMOVE_BEFORE_START = [ + "", + "[CODE]", + "", +]; + +function shouldRemoveLineBeforeStart(line: string): boolean { + return ( + line.trimStart().startsWith("```") || + LINES_TO_REMOVE_BEFORE_START.some((l) => line.trim() === l) + ); +} + +function shouldChangeLineAndStop(line: string): string | undefined { + if (line.trimStart() === "```") { + return line; + } + + if (line.includes("[/CODE]")) { + return line.split("[/CODE]")[0].trimEnd(); + } + + return undefined; +} + +export async function* filterCodeBlockLines(rawLines: LineStream): LineStream { + let seenValidLine = false; + + let waitingToSeeIfLineIsLast = undefined; + + for await (const line of rawLines) { + // Filter out starting ``` + if (!seenValidLine) { + if (shouldRemoveLineBeforeStart(line)) { + continue; + } + seenValidLine = true; + } + + // Filter out ending ``` + if (typeof waitingToSeeIfLineIsLast !== "undefined") { + yield waitingToSeeIfLineIsLast; + waitingToSeeIfLineIsLast = undefined; + } + + const changedEndLine = shouldChangeLineAndStop(line); + if (typeof changedEndLine === "string") { + yield changedEndLine; + return; + } + + if (line.startsWith("```")) { + waitingToSeeIfLineIsLast = line; + } else { + yield line; + } + } +} + +function isEnglishFirstLine(line: string) { + line = line.trim().toLowerCase(); + if (line.endsWith(":") && !line.trimStart().startsWith("def")) { + return true; + } + if ( + line.startsWith("here is") || + line.startsWith("here's") || + line.startsWith("sure, here") || + line.startsWith("sure thing") || + line.startsWith("sure!") || + line.startsWith("to fill") || + line.startsWith("certainly") || + line.startsWith("of course") || + line.startsWith("the code should") + ) { + return true; + } + + return false; +} + +export async function* filterEnglishLinesAtStart(lines: LineStream) { + let i = 0; + let wasEnglishFirstLine = false; + for await (const line of lines) { + if (i === 0 && line.trim() === "") { + continue; + } + if (i === 0) { + if (isEnglishFirstLine(line)) { + wasEnglishFirstLine = true; + i++; + continue; + } + } else if (i === 1 && wasEnglishFirstLine && line.trim() === "") { + i++; + continue; + } + i++; + yield line; + } +} + +function isEnglishPostExplanation(line: string): boolean { + const lower = line.toLowerCase(); + return ( + lower.startsWith("explanation:") || + lower.startsWith("here is") || + lower.startsWith("here's how") || + lower.startsWith("the above") + ); +} + +export async function* filterEnglishLinesAtEnd(lines: LineStream) { + let finishedCodeBlock = false; + for await (const line of lines) { + if (line.trim() === "```") { + finishedCodeBlock = true; + } + if (finishedCodeBlock && isEnglishPostExplanation(line)) { + break; + } + yield line; + } +} + +export async function* fixCodeLlamaFirstLineIndentation(lines: LineStream) { + let isFirstLine = true; + for await (const line of lines) { + if (isFirstLine && line.startsWith(" ")) { + yield line.slice(2); + isFirstLine = false; + } else { + yield line; + } + } +} + +function isUselessLine(line: string): boolean { + const trimmed = line.trim().toLowerCase(); + return trimmed === "" || trimmed === "```" || trimmed.startsWith("// end"); +} + +export async function* filterLeadingAndTrailingNewLineInsertion( + diffLines: AsyncGenerator, +): AsyncGenerator { + let isFirst = true; + let buffer: DiffLine[] = []; + for await (const diffLine of diffLines) { + const isBlankLineInsertion = + diffLine.type === "new" && isUselessLine(diffLine.line); + if (isFirst && isBlankLineInsertion) { + isFirst = false; + continue; + } + isFirst = false; + + if (isBlankLineInsertion) { + buffer.push(diffLine); + } else { + if (diffLine.type === "old") { + buffer = []; + } else { + while (buffer.length > 0) { + yield buffer.shift()!; + } + } + yield diffLine; + } + } +} + +export async function* stopAtRepeatingLines( + lines: LineStream, + fullStop: () => void, +): LineStream { + const repeatedLines: string[] = []; + for await (const line of lines) { + if (repeatedLines.length === 0) { + repeatedLines.push(line); + } else if (repeatedLines.length < 3) { + if (repeatedLines[repeatedLines.length - 1] === line) { + repeatedLines.push(line); + } else { + while (repeatedLines.length > 0) { + yield repeatedLines.shift()!; + } + yield line; + } + } else { + yield repeatedLines[0]; + fullStop(); + return; + } + } + + while (repeatedLines.length > 0) { + yield repeatedLines.shift()!; + } +} From cf362627384e7f7ea6dcb48a4fe461f17daace52 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 21 Jun 2024 21:59:46 -0700 Subject: [PATCH 21/29] organize autocomplete folder --- core/autocomplete/ImportDefinitionsService.ts | 81 ---- core/autocomplete/NearbyDefinitionsService.ts | 45 --- core/autocomplete/brackets.ts | 134 ------- core/autocomplete/charStream.ts | 41 -- core/autocomplete/completionProvider.ts | 20 +- core/autocomplete/constructPrompt.ts | 2 +- core/autocomplete/languages.ts | 2 +- core/autocomplete/lineStream.ts | 349 ------------------ core/autocomplete/postprocessing.ts | 2 +- core/commands/slash/edit.ts | 4 +- core/util/verticalEdit.ts | 2 +- 11 files changed, 16 insertions(+), 666 deletions(-) delete mode 100644 core/autocomplete/ImportDefinitionsService.ts delete mode 100644 core/autocomplete/NearbyDefinitionsService.ts delete mode 100644 core/autocomplete/brackets.ts delete mode 100644 core/autocomplete/charStream.ts delete mode 100644 core/autocomplete/lineStream.ts diff --git a/core/autocomplete/ImportDefinitionsService.ts b/core/autocomplete/ImportDefinitionsService.ts deleted file mode 100644 index 19287bf81..000000000 --- a/core/autocomplete/ImportDefinitionsService.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { IDE } from ".."; -import { RangeInFileWithContents } from "../commands/util"; -import { PrecalculatedLruCache } from "../util/LruCache"; -import { - TSQueryType, - getParserForFile, - getQueryForFile, -} from "../util/treeSitter"; - -interface FileInfo { - imports: { [key: string]: RangeInFileWithContents[] }; -} - -export class ImportDefinitionsService { - static N = 10; - - private cache: PrecalculatedLruCache = - new PrecalculatedLruCache( - this._getFileInfo.bind(this), - ImportDefinitionsService.N, - ); - - constructor(private readonly ide: IDE) { - ide.onDidChangeActiveTextEditor((filepath) => { - this.cache.initKey(filepath); - }); - } - - get(filepath: string): FileInfo | undefined { - return this.cache.get(filepath); - } - - private async _getFileInfo(filepath: string): Promise { - const parser = await getParserForFile(filepath); - if (!parser) { - return { - imports: {}, - }; - } - const ast = parser.parse(await this.ide.readFile(filepath), undefined, { - includedRanges: [ - { - startIndex: 0, - endIndex: 10_000, - startPosition: { row: 0, column: 0 }, - endPosition: { row: 100, column: 0 }, - }, - ], - }); - const query = await getQueryForFile(filepath, TSQueryType.Imports); - if (!query) { - return { - imports: {}, - }; - } - - const matches = query?.matches(ast.rootNode); - - const fileInfo: FileInfo = { - imports: {}, - }; - for (const match of matches) { - const startPosition = match.captures[0].node.startPosition; - const defs = await this.ide.gotoDefinition({ - filepath, - position: { - line: startPosition.row, - character: startPosition.column, - }, - }); - fileInfo.imports[match.captures[0].node.text] = await Promise.all( - defs.map(async (def) => ({ - ...def, - contents: await this.ide.readRangeInFile(def.filepath, def.range), - })), - ); - } - - return fileInfo; - } -} diff --git a/core/autocomplete/NearbyDefinitionsService.ts b/core/autocomplete/NearbyDefinitionsService.ts deleted file mode 100644 index 79cd0af0a..000000000 --- a/core/autocomplete/NearbyDefinitionsService.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { IDE, Location } from ".."; -import { LANGUAGES } from "./languages"; -import { getSymbolsForSnippet } from "./ranking"; - -interface FileInfo { - filepath: string; -} - -export class NearbyDefinitionsService { - static N = 10; - - constructor(private readonly ide: IDE) {} - - async getDefinitionsForLine(filepath: string, line: number) { - const lineContent = await this.ide.readRangeInFile(filepath, { - start: { - line, - character: 0, - }, - end: { - line: line + 1, - character: 0, - }, - }); - - // Remove keywords - const lang = LANGUAGES[filepath.split(".").slice(-1)[0]]; - const symbols = Array.from(getSymbolsForSnippet(lineContent)) - .filter((s) => s.length > 0) - .filter((s) => !(lang && lang?.stopWords?.includes(s))); - - return Promise.all( - symbols.map((s) => { - const character = lineContent.indexOf(s); - const pos: Location = { - filepath, - position: { - line, - character, - }, - }; - }), - ); - } -} diff --git a/core/autocomplete/brackets.ts b/core/autocomplete/brackets.ts deleted file mode 100644 index 63afdfd10..000000000 --- a/core/autocomplete/brackets.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * We follow the policy of only completing bracket pairs that we started - * But sometimes we started the pair in a previous autocomplete suggestion - */ -export class BracketMatchingService { - private openingBracketsFromLastCompletion: string[] = []; - private lastCompletionFile: string | undefined = undefined; - - static BRACKETS: { [key: string]: string } = { "(": ")", "{": "}", "[": "]" }; - static BRACKETS_REVERSE: { [key: string]: string } = { - ")": "(", - "}": "{", - "]": "[", - }; - - handleAcceptedCompletion(completion: string, filepath: string) { - this.openingBracketsFromLastCompletion = []; - const stack: string[] = []; - - for (let i = 0; i < completion.length; i++) { - const char = completion[i]; - if (Object.keys(BracketMatchingService.BRACKETS).includes(char)) { - // It's an opening bracket - stack.push(char); - } else if ( - Object.values(BracketMatchingService.BRACKETS).includes(char) - ) { - // It's a closing bracket - if ( - stack.length === 0 || - BracketMatchingService.BRACKETS[stack.pop()!] !== char - ) { - break; - } - } - } - - // Any remaining opening brackets in the stack are uncompleted - this.openingBracketsFromLastCompletion = stack; - this.lastCompletionFile = filepath; - } - - async *stopOnUnmatchedClosingBracket( - stream: AsyncGenerator, - prefix: string, - suffix: string, - filepath: string, - multiline: boolean, // Whether this is a multiline completion or not - ): AsyncGenerator { - let stack: string[] = []; - if (multiline) { - // Add opening brackets from the previous response - if (this.lastCompletionFile === filepath) { - stack = [...this.openingBracketsFromLastCompletion]; - } else { - this.lastCompletionFile = undefined; - } - } else { - // If single line completion, then allow completing bracket pairs that are - // started on the current line but not finished on the current line - if (!multiline) { - const currentLine = - (prefix.split("\n").pop() ?? "") + (suffix.split("\n")[0] ?? ""); - for (let i = 0; i < currentLine.length; i++) { - const char = currentLine[i]; - if (Object.keys(BracketMatchingService.BRACKETS).includes(char)) { - // It's an opening bracket - stack.push(char); - } else if ( - Object.values(BracketMatchingService.BRACKETS).includes(char) - ) { - // It's a closing bracket - if ( - stack.length === 0 || - BracketMatchingService.BRACKETS[stack.pop()!] !== char - ) { - break; - } - } - } - } - } - - // Add corresponding open brackets from suffix to stack - // because we overwrite them and the diff is displayed, and this allows something to be edited after that - for (let i = 0; i < suffix.length; i++) { - if (suffix[i] === " ") continue; - const openBracket = BracketMatchingService.BRACKETS_REVERSE[suffix[i]]; - if (!openBracket) break; - stack.unshift(openBracket); - } - - let all = ""; - let seenNonWhitespaceOrClosingBracket = false; - for await (let chunk of stream) { - // Allow closing brackets before any non-whitespace characters - if (!seenNonWhitespaceOrClosingBracket) { - const firstNonWhitespaceOrClosingBracketIndex = - chunk.search(/[^\s\)\}\]]/); - if (firstNonWhitespaceOrClosingBracketIndex !== -1) { - yield chunk.slice(0, firstNonWhitespaceOrClosingBracketIndex); - chunk = chunk.slice(firstNonWhitespaceOrClosingBracketIndex); - seenNonWhitespaceOrClosingBracket = true; - } else { - yield chunk; - continue; - } - } - - all += chunk; - const allLines = all.split("\n"); - for (let i = 0; i < chunk.length; i++) { - const char = chunk[i]; - if (Object.values(BracketMatchingService.BRACKETS).includes(char)) { - // It's a closing bracket - if ( - stack.length === 0 || - BracketMatchingService.BRACKETS[stack.pop()!] !== char - ) { - // If the stack is empty or the top of the stack doesn't match the current closing bracket - yield chunk.slice(0, i); - return; // Stop the generator if the closing bracket doesn't have a matching opening bracket in the stream - } - } else if ( - Object.keys(BracketMatchingService.BRACKETS).includes(char) - ) { - // It's an opening bracket - stack.push(char); - } - } - yield chunk; - } - } -} diff --git a/core/autocomplete/charStream.ts b/core/autocomplete/charStream.ts deleted file mode 100644 index 39a1c6729..000000000 --- a/core/autocomplete/charStream.ts +++ /dev/null @@ -1,41 +0,0 @@ -export async function* onlyWhitespaceAfterEndOfLine( - stream: AsyncGenerator, - endOfLine: string[], - fullStop: () => void, -): AsyncGenerator { - let pending = ""; - for await (let chunk of stream) { - chunk = pending + chunk; - pending = ""; - for (let i = 0; i < chunk.length - 1; i++) { - if ( - endOfLine.includes(chunk[i]) && - chunk[i + 1].trim() === chunk[i + 1] - ) { - yield chunk.slice(0, i + 1); - fullStop(); - return; - } - } - if (endOfLine.includes(chunk[chunk.length - 1])) { - pending = chunk[chunk.length - 1]; - yield chunk.slice(0, chunk.length - 1); - } else { - yield chunk; - } - } - yield pending; -} - -export async function* noFirstCharNewline(stream: AsyncGenerator) { - let first = true; - for await (const char of stream) { - if (first) { - first = false; - if (char.startsWith("\n") || char.startsWith("\r")) { - return; - } - } - yield char; - } -} diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index f1cdfb165..260535d4b 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -22,19 +22,22 @@ import { } from "../util/parameters.js"; import { Telemetry } from "../util/posthog.js"; import { getRangeInString } from "../util/ranges.js"; -import { ImportDefinitionsService } from "./ImportDefinitionsService.js"; -import { BracketMatchingService } from "./brackets.js"; import AutocompleteLruCache from "./cache.js"; -import { - noFirstCharNewline, - onlyWhitespaceAfterEndOfLine, -} from "./charStream.js"; import { constructAutocompletePrompt, languageForFilepath, } from "./constructPrompt.js"; import { isOnlyPunctuationAndWhitespace } from "./filter.js"; import { AutocompleteLanguageInfo } from "./languages.js"; +import { postprocessCompletion } from "./postprocessing.js"; +import { AutocompleteSnippet } from "./ranking.js"; +import { RecentlyEditedRange } from "./recentlyEdited.js"; +import { BracketMatchingService } from "./services/BracketMatchingService.js"; +import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; +import { + noFirstCharNewline, + onlyWhitespaceAfterEndOfLine, +} from "./streamTransforms/charStream.js"; import { avoidPathLine, noTopLevelKeywordsMidline, @@ -43,10 +46,7 @@ import { stopAtRepeatingLines, stopAtSimilarLine, streamWithNewLines, -} from "./lineStream.js"; -import { postprocessCompletion } from "./postprocessing.js"; -import { AutocompleteSnippet } from "./ranking.js"; -import { RecentlyEditedRange } from "./recentlyEdited.js"; +} from "./streamTransforms/lineStream.js"; import { getTemplateForModel } from "./templates.js"; import { GeneratorReuseManager } from "./util.js"; diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 78770a0d5..7e63375bb 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -7,7 +7,6 @@ import { pruneLinesFromBottom, pruneLinesFromTop, } from "../llm/countTokens.js"; -import { ImportDefinitionsService } from "./ImportDefinitionsService.js"; import { getAst, getTreePathAtCursor } from "./ast.js"; import { AutocompleteLanguageInfo, @@ -22,6 +21,7 @@ import { type AutocompleteSnippet, } from "./ranking.js"; import { RecentlyEditedRange, findMatchingRange } from "./recentlyEdited.js"; +import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; export function languageForFilepath( filepath: string, diff --git a/core/autocomplete/languages.ts b/core/autocomplete/languages.ts index 3360c3a9b..0ab63e716 100644 --- a/core/autocomplete/languages.ts +++ b/core/autocomplete/languages.ts @@ -1,4 +1,4 @@ -import type { LineFilter } from "./lineStream"; +import type { LineFilter } from "./streamTransforms/lineStream"; export interface AutocompleteLanguageInfo { topLevelKeywords: string[]; diff --git a/core/autocomplete/lineStream.ts b/core/autocomplete/lineStream.ts deleted file mode 100644 index 674f0d46e..000000000 --- a/core/autocomplete/lineStream.ts +++ /dev/null @@ -1,349 +0,0 @@ -import { distance } from "fastest-levenshtein"; -import { LineStream } from "../diff/util.js"; -import { DiffLine } from "../index.js"; - -export type LineFilter = (args: { - lines: LineStream; - fullStop: () => void; -}) => LineStream; - -export async function* noTopLevelKeywordsMidline( - lines: LineStream, - topLevelKeywords: string[], - fullStop: () => void, -): LineStream { - for await (const line of lines) { - for (const keyword of topLevelKeywords) { - const indexOf = line.indexOf(`${keyword} `); - if (indexOf >= 0 && line.slice(indexOf - 1, indexOf).trim() !== "") { - yield line.slice(0, indexOf); - fullStop(); - break; - } - } - yield line; - } -} - -export async function* avoidPathLine( - stream: LineStream, - comment: string, -): LineStream { - // Snippets are inserted as comments with a line at the start '// Path: '. - // Sometimes the model with copy this pattern, which is unwanted - for await (const line of stream) { - // Also filter lines that are empty comments - if (line.startsWith(`${comment} Path: `) || line.trim() === comment) { - continue; - } - yield line; - } -} - -export async function* streamWithNewLines(stream: LineStream): LineStream { - let firstLine = true; - for await (const nextLine of stream) { - if (!firstLine) { - yield "\n"; - } - firstLine = false; - yield nextLine; - } -} - -const bracketEnding = [")", "]", "}", ";"]; -function isBracketEnding(line: string): boolean { - return line - .trim() - .split("") - .some((char) => bracketEnding.includes(char)); -} - -function commonPrefixLength(a: string, b: string): number { - let i = 0; - while (i < a.length && i < b.length && a[i] === b[i]) { - i++; - } - return i; -} - -export function lineIsRepeated(a: string, b: string): boolean { - if (a.length <= 4 || b.length <= 4) { - return false; - } - - const aTrim = a.trim(); - const bTrim = b.trim(); - return ( - commonPrefixLength(aTrim, bTrim) > 12 || - distance(aTrim, bTrim) / bTrim.length < 0.1 - ); -} - -export async function* stopAtSimilarLine( - stream: LineStream, - line: string, - fullStop: () => void, -): AsyncGenerator { - const trimmedLine = line.trim(); - const lineIsBracketEnding = isBracketEnding(trimmedLine); - for await (const nextLine of stream) { - if (nextLine === line) { - fullStop(); - break; - } - - if (lineIsBracketEnding && trimmedLine.trim() === nextLine.trim()) { - yield nextLine; - continue; - } - - if (lineIsRepeated(nextLine, trimmedLine)) { - fullStop(); - break; - } - yield nextLine; - } -} - -const LINES_TO_STOP_AT = ["# End of file.", " void, -): LineStream { - for await (const line of stream) { - if (LINES_TO_STOP_AT.some((stopAt) => line.trim().includes(stopAt))) { - fullStop(); - break; - } - yield line; - } -} - -const PREFIXES_TO_SKIP = [""]; -export async function* skipPrefixes(lines: LineStream): LineStream { - let isFirstLine = true; - for await (const line of lines) { - if (isFirstLine) { - const match = PREFIXES_TO_SKIP.find((prefix) => line.startsWith(prefix)); - if (match) { - yield line.slice(match.length); - continue; - } - isFirstLine = false; - } - yield line; - } -} - -const LINES_TO_SKIP = [""]; - -export async function* skipLines(stream: LineStream): LineStream { - for await (const line of stream) { - if (!LINES_TO_SKIP.some((skipAt) => line.startsWith(skipAt))) { - yield line; - } - } -} - -const LINES_TO_REMOVE_BEFORE_START = [ - "", - "[CODE]", - "", -]; - -function shouldRemoveLineBeforeStart(line: string): boolean { - return ( - line.trimStart().startsWith("```") || - LINES_TO_REMOVE_BEFORE_START.some((l) => line.trim() === l) - ); -} - -function shouldChangeLineAndStop(line: string): string | undefined { - if (line.trimStart() === "```") { - return line; - } - - if (line.includes("[/CODE]")) { - return line.split("[/CODE]")[0].trimEnd(); - } - - return undefined; -} - -export async function* filterCodeBlockLines(rawLines: LineStream): LineStream { - let seenValidLine = false; - - let waitingToSeeIfLineIsLast = undefined; - - for await (const line of rawLines) { - // Filter out starting ``` - if (!seenValidLine) { - if (shouldRemoveLineBeforeStart(line)) { - continue; - } - seenValidLine = true; - } - - // Filter out ending ``` - if (typeof waitingToSeeIfLineIsLast !== "undefined") { - yield waitingToSeeIfLineIsLast; - waitingToSeeIfLineIsLast = undefined; - } - - const changedEndLine = shouldChangeLineAndStop(line); - if (typeof changedEndLine === "string") { - yield changedEndLine; - return; - } - - if (line.startsWith("```")) { - waitingToSeeIfLineIsLast = line; - } else { - yield line; - } - } -} - -function isEnglishFirstLine(line: string) { - line = line.trim().toLowerCase(); - if (line.endsWith(":") && !line.trimStart().startsWith("def")) { - return true; - } - if ( - line.startsWith("here is") || - line.startsWith("here's") || - line.startsWith("sure, here") || - line.startsWith("sure thing") || - line.startsWith("sure!") || - line.startsWith("to fill") || - line.startsWith("certainly") || - line.startsWith("of course") || - line.startsWith("the code should") - ) { - return true; - } - - return false; -} - -export async function* filterEnglishLinesAtStart(lines: LineStream) { - let i = 0; - let wasEnglishFirstLine = false; - for await (const line of lines) { - if (i === 0 && line.trim() === "") { - continue; - } - if (i === 0) { - if (isEnglishFirstLine(line)) { - wasEnglishFirstLine = true; - i++; - continue; - } - } else if (i === 1 && wasEnglishFirstLine && line.trim() === "") { - i++; - continue; - } - i++; - yield line; - } -} - -function isEnglishPostExplanation(line: string): boolean { - const lower = line.toLowerCase(); - return ( - lower.startsWith("explanation:") || - lower.startsWith("here is") || - lower.startsWith("here's how") || - lower.startsWith("the above") - ); -} - -export async function* filterEnglishLinesAtEnd(lines: LineStream) { - let finishedCodeBlock = false; - for await (const line of lines) { - if (line.trim() === "```") { - finishedCodeBlock = true; - } - if (finishedCodeBlock && isEnglishPostExplanation(line)) { - break; - } - yield line; - } -} - -export async function* fixCodeLlamaFirstLineIndentation(lines: LineStream) { - let isFirstLine = true; - for await (const line of lines) { - if (isFirstLine && line.startsWith(" ")) { - yield line.slice(2); - isFirstLine = false; - } else { - yield line; - } - } -} - -function isUselessLine(line: string): boolean { - const trimmed = line.trim().toLowerCase(); - return trimmed === "" || trimmed === "```" || trimmed.startsWith("// end"); -} - -export async function* filterLeadingAndTrailingNewLineInsertion( - diffLines: AsyncGenerator, -): AsyncGenerator { - let isFirst = true; - let buffer: DiffLine[] = []; - for await (const diffLine of diffLines) { - const isBlankLineInsertion = - diffLine.type === "new" && isUselessLine(diffLine.line); - if (isFirst && isBlankLineInsertion) { - isFirst = false; - continue; - } - isFirst = false; - - if (isBlankLineInsertion) { - buffer.push(diffLine); - } else { - if (diffLine.type === "old") { - buffer = []; - } else { - while (buffer.length > 0) { - yield buffer.shift()!; - } - } - yield diffLine; - } - } -} - -export async function* stopAtRepeatingLines( - lines: LineStream, - fullStop: () => void, -): LineStream { - const repeatedLines: string[] = []; - for await (const line of lines) { - if (repeatedLines.length === 0) { - repeatedLines.push(line); - } else if (repeatedLines.length < 3) { - if (repeatedLines[repeatedLines.length - 1] === line) { - repeatedLines.push(line); - } else { - while (repeatedLines.length > 0) { - yield repeatedLines.shift()!; - } - yield line; - } - } else { - yield repeatedLines[0]; - fullStop(); - return; - } - } - - while (repeatedLines.length > 0) { - yield repeatedLines.shift()!; - } -} diff --git a/core/autocomplete/postprocessing.ts b/core/autocomplete/postprocessing.ts index 724c826f2..b6841aebc 100644 --- a/core/autocomplete/postprocessing.ts +++ b/core/autocomplete/postprocessing.ts @@ -1,6 +1,6 @@ import type { ILLM } from ".."; import { longestCommonSubsequence } from "../util/lcs"; -import { lineIsRepeated } from "./lineStream"; +import { lineIsRepeated } from "./streamTransforms/lineStream"; function rewritesLineAbove(completion: string, prefix: string): boolean { const lineAbove = prefix diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index af64b0933..a87ebea6e 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -5,7 +5,7 @@ import { fixCodeLlamaFirstLineIndentation, stopAtLines, streamWithNewLines, -} from "../../autocomplete/lineStream.js"; +} from "../../autocomplete/streamTransforms/lineStream.js"; import { streamLines } from "../../diff/util.js"; import { ContextItemWithId, ILLM, SlashCommand } from "../../index.js"; import { stripImages } from "../../llm/countTokens.js"; @@ -252,7 +252,7 @@ const EditSlashCommand: SlashCommand = { ); // if the above replace fails to find a match, the code will still be present // in the userInput. Replace it with input if available. - if (userInput.includes("\`\`\`") && (input !== "" || !input)) { + if (userInput.includes("```") && (input !== "" || !input)) { userInput = input; } diff --git a/core/util/verticalEdit.ts b/core/util/verticalEdit.ts index e018d1be4..913c38ddc 100644 --- a/core/util/verticalEdit.ts +++ b/core/util/verticalEdit.ts @@ -5,7 +5,7 @@ import { filterLeadingAndTrailingNewLineInsertion, skipLines, stopAtLines, -} from "../autocomplete/lineStream.js"; +} from "../autocomplete/streamTransforms/lineStream.js"; import { streamDiff } from "../diff/streamDiff.js"; import { streamLines } from "../diff/util.js"; import { From faffaf08c4081dca4653c3efbe8910bd4b5c6654 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 23 Jun 2024 10:08:50 -0700 Subject: [PATCH 22/29] working implementation with single ts query --- core/autocomplete/ast.ts | 4 +- core/autocomplete/completionProvider.ts | 7 ++ core/autocomplete/constructPrompt.ts | 42 ++++--- .../services/HierarchicalContextService.ts | 116 ++++++++++++++++++ .../services/ImportDefinitionsService.ts | 8 +- core/index.d.ts | 1 + core/package-lock.json | 21 +++- core/package.json | 1 + core/util/parameters.ts | 1 + core/util/treeSitter.ts | 2 + extensions/vscode/package-lock.json | 1 + extensions/vscode/src/activation/api.ts | 4 +- extensions/vscode/src/diff/horizontal.ts | 2 +- .../function_declaration/typescript.scm | 9 ++ gui/package-lock.json | 1 + 15 files changed, 189 insertions(+), 31 deletions(-) create mode 100644 core/autocomplete/services/HierarchicalContextService.ts create mode 100644 extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm diff --git a/core/autocomplete/ast.ts b/core/autocomplete/ast.ts index 933ae76c0..139b22dbf 100644 --- a/core/autocomplete/ast.ts +++ b/core/autocomplete/ast.ts @@ -2,6 +2,8 @@ import Parser from "web-tree-sitter"; import { RangeInFileWithContents } from "../commands/util.js"; import { getParserForFile } from "../util/treeSitter.js"; +export type AstPath = Parser.SyntaxNode[]; + export async function getAst( filepath: string, fileContents: string, @@ -23,7 +25,7 @@ export async function getAst( export async function getTreePathAtCursor( ast: Parser.Tree, cursorIndex: number, -): Promise { +): Promise { const path = [ast.rootNode]; while (path[path.length - 1].childCount > 0) { let foundChild = false; diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 260535d4b..6a2c994a1 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -33,6 +33,7 @@ import { postprocessCompletion } from "./postprocessing.js"; import { AutocompleteSnippet } from "./ranking.js"; import { RecentlyEditedRange } from "./recentlyEdited.js"; import { BracketMatchingService } from "./services/BracketMatchingService.js"; +import { HierarchicalContextService } from "./services/HierarchicalContextService.js"; import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; import { noFirstCharNewline, @@ -154,9 +155,14 @@ export class CompletionProvider { this.onError.bind(this), ); this.importDefinitionsService = new ImportDefinitionsService(this.ide); + this.hierarchicalContextService = new HierarchicalContextService( + this.importDefinitionsService, + this.ide, + ); } private importDefinitionsService: ImportDefinitionsService; + private hierarchicalContextService: HierarchicalContextService; private generatorReuseManager: GeneratorReuseManager; private autocompleteCache = AutocompleteLruCache.get(); public errorsShown: Set = new Set(); @@ -516,6 +522,7 @@ export class CompletionProvider { llm.model, extrasSnippets, this.importDefinitionsService, + this.hierarchicalContextService, ); // If prefix is manually passed diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 7e63375bb..3c633218d 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -1,4 +1,3 @@ -import Parser from "web-tree-sitter"; import { RangeInFileWithContents } from "../commands/util.js"; import { TabAutocompleteOptions } from "../index.js"; @@ -7,7 +6,7 @@ import { pruneLinesFromBottom, pruneLinesFromTop, } from "../llm/countTokens.js"; -import { getAst, getTreePathAtCursor } from "./ast.js"; +import { AstPath, getAst, getTreePathAtCursor } from "./ast.js"; import { AutocompleteLanguageInfo, LANGUAGES, @@ -21,6 +20,7 @@ import { type AutocompleteSnippet, } from "./ranking.js"; import { RecentlyEditedRange, findMatchingRange } from "./recentlyEdited.js"; +import { HierarchicalContextService } from "./services/HierarchicalContextService.js"; import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; export function languageForFilepath( @@ -32,7 +32,7 @@ export function languageForFilepath( const BLOCK_TYPES = ["body", "statement_block"]; function shouldCompleteMultilineAst( - treePath: Parser.SyntaxNode[], + treePath: AstPath, cursorLine: number, ): boolean { // If at the base of the file, do multiline @@ -63,7 +63,7 @@ function isMidlineCompletion(prefix: string, suffix: string): boolean { } async function shouldCompleteMultiline( - filepath: string, + treePath: AstPath | undefined, fullPrefix: string, fullSuffix: string, language: AutocompleteLanguageInfo, @@ -94,18 +94,6 @@ async function shouldCompleteMultiline( } // Use AST to determine whether to complete multiline - let treePath: Parser.SyntaxNode[] | undefined; - try { - const ast = await getAst(filepath, fullPrefix + fullSuffix); - if (!ast) { - return true; - } - - treePath = await getTreePathAtCursor(ast, fullPrefix.length); - } catch (e) { - console.error("Failed to parse AST", e); - } - let completeMultiline = false; if (treePath) { const cursorLine = fullPrefix.split("\n").length - 1; @@ -127,6 +115,7 @@ export async function constructAutocompletePrompt( modelName: string, extraSnippets: AutocompleteSnippet[], importDefinitionsService: ImportDefinitionsService, + hierarchicalContextService: HierarchicalContextService, ): Promise<{ prefix: string; suffix: string; @@ -145,6 +134,17 @@ export async function constructAutocompletePrompt( ); const suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens, modelName); + // Calculate AST Path + let treePath: AstPath | undefined; + try { + const ast = await getAst(filepath, fullPrefix + fullSuffix); + if (ast) { + treePath = await getTreePathAtCursor(ast, fullPrefix.length); + } + } catch (e) { + console.error("Failed to parse AST", e); + } + // Find external snippets let snippets: AutocompleteSnippet[] = []; @@ -215,6 +215,14 @@ export async function constructAutocompletePrompt( snippets.push(...importSnippets); } + if (options.useHierarchicalContext && treePath) { + const ctx = await hierarchicalContextService.getContextForPath( + filepath, + treePath, + ); + snippets.push(...ctx); + } + // Filter out empty snippets and ones that are already in the prefix/suffix snippets = snippets .map((snippet) => ({ ...snippet })) @@ -269,7 +277,7 @@ export async function constructAutocompletePrompt( suffix, useFim: true, completeMultiline: await shouldCompleteMultiline( - filepath, + treePath, fullPrefix, fullSuffix, language, diff --git a/core/autocomplete/services/HierarchicalContextService.ts b/core/autocomplete/services/HierarchicalContextService.ts new file mode 100644 index 000000000..5424d1b25 --- /dev/null +++ b/core/autocomplete/services/HierarchicalContextService.ts @@ -0,0 +1,116 @@ +import { createHash } from "crypto"; +import { LRUCache } from "lru-cache"; +import Parser from "web-tree-sitter"; +import { IDE } from "../.."; +import { getQueryForFile, TSQueryType } from "../../util/treeSitter"; +import { AstPath } from "../ast"; +import { AutocompleteSnippet } from "../ranking"; +import { ImportDefinitionsService } from "./ImportDefinitionsService"; + +export class HierarchicalContextService { + private cache = new LRUCache({ + max: 100, + }); + + constructor( + private readonly importDefinitionsService: ImportDefinitionsService, + private readonly ide: IDE, + ) {} + + private static getNodeId(node: Parser.SyntaxNode): string { + return `${node.startIndex}`; + } + + private static TYPES_TO_USE = new Set(["program", "function_declaration"]); + + /** + * Key comes from hash of parent key and node type and node id. + */ + private static keyFromNode( + parentKey: string, + astNode: Parser.SyntaxNode, + ): string { + return createHash("sha256") + .update(parentKey) + .update(astNode.type) + .update(HierarchicalContextService.getNodeId(astNode)) + .digest("hex"); + } + + private async getSnippetsForNode( + filepath: string, + node: Parser.SyntaxNode, + ): Promise { + const snippets: AutocompleteSnippet[] = []; + + let query: Parser.Query | undefined; + switch (node.type) { + case "program": + this.importDefinitionsService.get(filepath); + break; + case "function_declaration": + query = await getQueryForFile( + filepath, + TSQueryType.FunctionDeclaration, + ); + break; + default: + break; + } + + if (!query) { + return snippets; + } + + await Promise.all( + query.matches(node).map(async (match) => { + const startPosition = match.captures[0].node.startPosition; + const endPosition = match.captures[0].node.endPosition; + const definitions = await this.ide.gotoDefinition({ + filepath, + position: { + line: endPosition.row, + character: endPosition.column, + }, + }); + const newSnippets = await Promise.all( + definitions.map(async (def) => ({ + ...def, + contents: await this.ide.readRangeInFile(def.filepath, def.range), + })), + ); + snippets.push(...newSnippets); + }), + ); + + return snippets; + } + + async getContextForPath( + filepath: string, + astPath: AstPath, + // cursorIndex: number, + ): Promise { + const snippets: AutocompleteSnippet[] = []; + + let parentKey = filepath; + for (const astNode of astPath.filter((node) => + HierarchicalContextService.TYPES_TO_USE.has(node.type), + )) { + const key = HierarchicalContextService.keyFromNode(parentKey, astNode); + + const foundInCache = this.cache.get(key); + const newSnippets = + foundInCache ?? (await this.getSnippetsForNode(filepath, astNode)); + snippets.push(...newSnippets); + + if (!foundInCache) { + this.cache.set(key, newSnippets); + } + + parentKey = key; + } + + return snippets; + } +} diff --git a/core/autocomplete/services/ImportDefinitionsService.ts b/core/autocomplete/services/ImportDefinitionsService.ts index 19287bf81..0df08f096 100644 --- a/core/autocomplete/services/ImportDefinitionsService.ts +++ b/core/autocomplete/services/ImportDefinitionsService.ts @@ -1,11 +1,11 @@ -import { IDE } from ".."; -import { RangeInFileWithContents } from "../commands/util"; -import { PrecalculatedLruCache } from "../util/LruCache"; +import { IDE } from "../.."; +import { RangeInFileWithContents } from "../../commands/util"; +import { PrecalculatedLruCache } from "../../util/LruCache"; import { TSQueryType, getParserForFile, getQueryForFile, -} from "../util/treeSitter"; +} from "../../util/treeSitter"; interface FileInfo { imports: { [key: string]: RangeInFileWithContents[] }; diff --git a/core/index.d.ts b/core/index.d.ts index 658f5c980..ef12570d5 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -768,6 +768,7 @@ export interface TabAutocompleteOptions { recentLinePrefixMatchMinLength: number; disableInFiles?: string[]; useImports?: boolean; + useHierarchicalContext?: boolean; } export interface ContinueUIConfig { diff --git a/core/package-lock.json b/core/package-lock.json index e4587f56b..5b9ca2b15 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -37,6 +37,7 @@ "jsdom": "^24.0.0", "launchdarkly-node-client-sdk": "^3.2.0", "llm-code-highlighter": "^0.0.14", + "lru-cache": "^10.2.2", "mac-ca": "^3.1.0", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", @@ -2027,6 +2028,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -10826,12 +10836,11 @@ "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "engines": { + "node": "14 || >=16.14" } }, "node_modules/mac-ca": { diff --git a/core/package.json b/core/package.json index fd34477ef..b52c8818d 100644 --- a/core/package.json +++ b/core/package.json @@ -57,6 +57,7 @@ "jsdom": "^24.0.0", "launchdarkly-node-client-sdk": "^3.2.0", "llm-code-highlighter": "^0.0.14", + "lru-cache": "^10.2.2", "mac-ca": "^3.1.0", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", diff --git a/core/util/parameters.ts b/core/util/parameters.ts index 8909af6f4..f64750255 100644 --- a/core/util/parameters.ts +++ b/core/util/parameters.ts @@ -20,6 +20,7 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { recentLinePrefixMatchMinLength: 7, disableInFiles: undefined, useImports: true, + useHierarchicalContext: true, }; export const COUNT_COMPLETION_REJECTED_AFTER = 10_000; diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index 95a7a10ce..904f87e39 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -120,6 +120,8 @@ export async function getLanguageForFile( export enum TSQueryType { CodeSnippets = "code-snippet-queries", Imports = "import-queries", + // Used in HierarchicalContextService.ts + FunctionDeclaration = "hierarchical-context-queries/function_declaration", } export async function getQueryForFile( diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 6d0e21452..65b5fd37b 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -121,6 +121,7 @@ "jsdom": "^24.0.0", "launchdarkly-node-client-sdk": "^3.2.0", "llm-code-highlighter": "^0.0.14", + "lru-cache": "^10.2.2", "mac-ca": "^3.1.0", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", diff --git a/extensions/vscode/src/activation/api.ts b/extensions/vscode/src/activation/api.ts index 03a814ae9..bc5f261e0 100644 --- a/extensions/vscode/src/activation/api.ts +++ b/extensions/vscode/src/activation/api.ts @@ -1,5 +1,5 @@ -import { VsCodeExtension } from "../extension/vscodeExtension"; import { IContextProvider } from "core"; +import { VsCodeExtension } from "../extension/vscodeExtension"; export class VsCodeContinueApi { constructor(private readonly vscodeExtension: VsCodeExtension) {} @@ -7,4 +7,4 @@ export class VsCodeContinueApi { registerCustomContextProvider(contextProvider: IContextProvider) { this.vscodeExtension.registerCustomContextProvider(contextProvider); } -} \ No newline at end of file +} diff --git a/extensions/vscode/src/diff/horizontal.ts b/extensions/vscode/src/diff/horizontal.ts index 870022457..da922cd50 100644 --- a/extensions/vscode/src/diff/horizontal.ts +++ b/extensions/vscode/src/diff/horizontal.ts @@ -1,7 +1,7 @@ +import { devDataPath } from "core/util/paths"; import * as fs from "node:fs"; import * as os from "node:os"; import * as path from "node:path"; -import { devDataPath } from "core/util/paths"; import * as vscode from "vscode"; import { getMetaKeyLabel, getPlatform } from "../util/util"; import { uriFromFilePath } from "../util/vscode"; diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm new file mode 100644 index 000000000..75cac3c55 --- /dev/null +++ b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm @@ -0,0 +1,9 @@ +( + (function_declaration + (formal_parameters + (_ + (type_annotation) @a + ) + ) + ) +) \ No newline at end of file diff --git a/gui/package-lock.json b/gui/package-lock.json index d652bc561..e9952da27 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -114,6 +114,7 @@ "jsdom": "^24.0.0", "launchdarkly-node-client-sdk": "^3.2.0", "llm-code-highlighter": "^0.0.14", + "lru-cache": "^10.2.2", "mac-ca": "^3.1.0", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", From 196992c6bd50bab1ee2f0e38b2a6888f64a04041 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 23 Jun 2024 10:22:04 -0700 Subject: [PATCH 23/29] method_definition --- core/autocomplete/services/HierarchicalContextService.ts | 9 ++++++++- core/util/treeSitter.ts | 1 + .../function_declaration/typescript.scm | 2 +- .../method_definition/typescript.scm | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 extensions/vscode/tree-sitter/hierarchical-context-queries/method_definition/typescript.scm diff --git a/core/autocomplete/services/HierarchicalContextService.ts b/core/autocomplete/services/HierarchicalContextService.ts index 5424d1b25..c14ec9aca 100644 --- a/core/autocomplete/services/HierarchicalContextService.ts +++ b/core/autocomplete/services/HierarchicalContextService.ts @@ -21,7 +21,11 @@ export class HierarchicalContextService { return `${node.startIndex}`; } - private static TYPES_TO_USE = new Set(["program", "function_declaration"]); + private static TYPES_TO_USE = new Set([ + "program", + "function_declaration", + "method_definition", + ]); /** * Key comes from hash of parent key and node type and node id. @@ -54,6 +58,9 @@ export class HierarchicalContextService { TSQueryType.FunctionDeclaration, ); break; + case "method_definition": + query = await getQueryForFile(filepath, TSQueryType.MethodDefinition); + break; default: break; } diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index 904f87e39..8b87a3713 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -122,6 +122,7 @@ export enum TSQueryType { Imports = "import-queries", // Used in HierarchicalContextService.ts FunctionDeclaration = "hierarchical-context-queries/function_declaration", + MethodDefinition = "hierarchical-context-queries/method_definition", } export async function getQueryForFile( diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm index 75cac3c55..c0d936f5e 100644 --- a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm +++ b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm @@ -2,7 +2,7 @@ (function_declaration (formal_parameters (_ - (type_annotation) @a + (type_annotation) @type ) ) ) diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/method_definition/typescript.scm b/extensions/vscode/tree-sitter/hierarchical-context-queries/method_definition/typescript.scm new file mode 100644 index 000000000..10ee28346 --- /dev/null +++ b/extensions/vscode/tree-sitter/hierarchical-context-queries/method_definition/typescript.scm @@ -0,0 +1,9 @@ +( + (method_definition + (formal_parameters + (_ + (type_annotation) @type + ) + ) + ) +) \ No newline at end of file From 0d70cd742095cd1a7bc184870c6418b1da7db089 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 29 Jun 2024 20:40:01 -0700 Subject: [PATCH 24/29] hierarchical context support for more languages --- .../services/HierarchicalContextService.ts | 6 ++++++ core/util/treeSitter.ts | 2 ++ .../nested-folder/helloNested.py | 12 +++++++++++- .../function_definition/cpp.scm | 13 +++++++++++++ .../function_definition/python.scm | 17 +++++++++++++++++ .../method_declaration/java.scm | 13 +++++++++++++ .../vscode/tree-sitter/import-queries/cpp.scm | 9 +++++++++ .../vscode/tree-sitter/import-queries/java.scm | 3 +++ .../tree-sitter/import-queries/python.scm | 8 ++++++++ 9 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/cpp.scm create mode 100644 extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/python.scm create mode 100644 extensions/vscode/tree-sitter/hierarchical-context-queries/method_declaration/java.scm create mode 100644 extensions/vscode/tree-sitter/import-queries/cpp.scm create mode 100644 extensions/vscode/tree-sitter/import-queries/java.scm create mode 100644 extensions/vscode/tree-sitter/import-queries/python.scm diff --git a/core/autocomplete/services/HierarchicalContextService.ts b/core/autocomplete/services/HierarchicalContextService.ts index c14ec9aca..53f0ba4be 100644 --- a/core/autocomplete/services/HierarchicalContextService.ts +++ b/core/autocomplete/services/HierarchicalContextService.ts @@ -61,6 +61,12 @@ export class HierarchicalContextService { case "method_definition": query = await getQueryForFile(filepath, TSQueryType.MethodDefinition); break; + case "function_definition": + query = await getQueryForFile(filepath, TSQueryType.FunctionDefinition); + break; + case "method_declaration": + query = await getQueryForFile(filepath, TSQueryType.MethodDeclaration); + break; default: break; } diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index 8b87a3713..df699b208 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -123,6 +123,8 @@ export enum TSQueryType { // Used in HierarchicalContextService.ts FunctionDeclaration = "hierarchical-context-queries/function_declaration", MethodDefinition = "hierarchical-context-queries/method_definition", + FunctionDefinition = "hierarchical-context-queries/function_definition", + MethodDeclaration = "hierarchical-context-queries/method_declaration", } export async function getQueryForFile( diff --git a/extensions/vscode/manual-testing-sandbox/nested-folder/helloNested.py b/extensions/vscode/manual-testing-sandbox/nested-folder/helloNested.py index 1912b9ffd..b43d5d8d6 100644 --- a/extensions/vscode/manual-testing-sandbox/nested-folder/helloNested.py +++ b/extensions/vscode/manual-testing-sandbox/nested-folder/helloNested.py @@ -1,5 +1,15 @@ -def main(): +from typing import List + +Vector = List[float] + + +def main(a: Vector): print("Hello Nested!") +class MyClass: + def test(a: Vector) -> Vector: + return a + + raise Exception("This is an error") diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/cpp.scm b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/cpp.scm new file mode 100644 index 000000000..2610f5393 --- /dev/null +++ b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/cpp.scm @@ -0,0 +1,13 @@ +(function_definition + (function_declarator + (parameter_list + (parameter_declaration + (type_identifier) @a + ) + ) + ) +) + +(function_definition + (type_identifier) @b +) \ No newline at end of file diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/python.scm b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/python.scm new file mode 100644 index 000000000..864666a4a --- /dev/null +++ b/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/python.scm @@ -0,0 +1,17 @@ +( + (function_definition + (parameters + (_ + (type) @a + (#not-match? @a "^(str|int|float|bool|list|dict|tuple)$") + ) + ) + ) +) + +( + (function_definition + (type) @b + (#not-match? @b "^(str|int|float|bool|list|dict|tuple)$") + ) +) \ No newline at end of file diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/method_declaration/java.scm b/extensions/vscode/tree-sitter/hierarchical-context-queries/method_declaration/java.scm new file mode 100644 index 000000000..ff77555c7 --- /dev/null +++ b/extensions/vscode/tree-sitter/hierarchical-context-queries/method_declaration/java.scm @@ -0,0 +1,13 @@ +; Method parameters +(method_declaration + (formal_parameters + (formal_parameter + (type_identifier) @a + ) + ) +) + +; Return type +(method_declaration + (type_identifier) @b +) \ No newline at end of file diff --git a/extensions/vscode/tree-sitter/import-queries/cpp.scm b/extensions/vscode/tree-sitter/import-queries/cpp.scm new file mode 100644 index 000000000..c740cf762 --- /dev/null +++ b/extensions/vscode/tree-sitter/import-queries/cpp.scm @@ -0,0 +1,9 @@ +(using_declaration + (qualified_identifier + (identifier) @a)) + +(namespace_alias_definition + (nested_namespace_specifier) @b) + +(preproc_include + (system_lib_string) @c) \ No newline at end of file diff --git a/extensions/vscode/tree-sitter/import-queries/java.scm b/extensions/vscode/tree-sitter/import-queries/java.scm new file mode 100644 index 000000000..51920eda7 --- /dev/null +++ b/extensions/vscode/tree-sitter/import-queries/java.scm @@ -0,0 +1,3 @@ +(import_declaration + (scoped_identifier + (identifier) @import)) \ No newline at end of file diff --git a/extensions/vscode/tree-sitter/import-queries/python.scm b/extensions/vscode/tree-sitter/import-queries/python.scm new file mode 100644 index 000000000..dedaf23aa --- /dev/null +++ b/extensions/vscode/tree-sitter/import-queries/python.scm @@ -0,0 +1,8 @@ +(import_from_statement + (dotted_name) ; skip the first (this is the module) + (dotted_name + (identifier) @importa)) + +(import_statement + (dotted_name + (identifier) @importb )) \ No newline at end of file From a70c8aea35c6f8b05373bfc2d1acba2a951dadce Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 29 Sep 2024 10:12:07 -0700 Subject: [PATCH 25/29] ignore .prompts --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a092b3caa..6824363bd 100644 --- a/.gitignore +++ b/.gitignore @@ -166,4 +166,6 @@ Icon? .continue # Sandbox env default file -extensions/vscode/manual-testing-sandbox/example.ts \ No newline at end of file +extensions/vscode/manual-testing-sandbox/example.ts + +.prompts \ No newline at end of file From effb7b73b21816920b447e21178f5870e3542b79 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 29 Sep 2024 11:06:59 -0700 Subject: [PATCH 26/29] updates --- .github/workflows/jetbrains-build.yaml | 448 ------------------------- .github/workflows/preview.yaml | 6 - 2 files changed, 454 deletions(-) delete mode 100644 .github/workflows/jetbrains-build.yaml diff --git a/.github/workflows/jetbrains-build.yaml b/.github/workflows/jetbrains-build.yaml deleted file mode 100644 index 570196005..000000000 --- a/.github/workflows/jetbrains-build.yaml +++ /dev/null @@ -1,448 +0,0 @@ -# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps: -# - Validate Gradle Wrapper. -# - Run 'test' and 'verifyPlugin' tasks. -# - Run Qodana inspections. -# - Run the 'buildPlugin' task and prepare artifact for further tests. -# - Run the 'runPluginVerifier' task. -# - Create a draft release. -# -# The workflow is triggered on push and pull_request events. -# -# GitHub Actions reference: https://help.github.com/en/actions -# -## JBIJPPTPL - -name: Build -on: - # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests) - push: - branches: [preview, main] - # Trigger the workflow on any pull request - # pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -defaults: - run: - working-directory: ./extensions/intellij - -jobs: - # Prepare environment and build the plugin - build: - name: Build - runs-on: ubuntu-latest - outputs: - version: ${{ steps.properties.outputs.version }} - changelog: ${{ steps.properties.outputs.changelog }} - pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} - steps: - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v4 - - # Validate wrapper - - name: Gradle Wrapper Validation - uses: gradle/actions/wrapper-validation@v3 - - # Set up Java environment for the next steps - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: zulu - java-version: 17 - - # Setup Gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-home-cache-cleanup: true - - # Set environment variables - - name: Export Properties - id: properties - shell: bash - run: | - PROPERTIES="$(./gradlew properties --console=plain -q)" - VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" - # CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" - CHANGELOG="" - - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT - - echo "changelog<> $GITHUB_OUTPUT - echo "$CHANGELOG" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier - - # Setup Node.js - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - # Cache node_modules - - name: Cache core node_modules - uses: actions/cache@v3 - with: - path: core/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} - - - name: Cache binary node_modules - uses: actions/cache@v3 - with: - path: binary/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} - - # npm install core - - name: Install core node_modules - run: | - cd ../../core - npm ci - - # npm install binary - - name: Install core node_modules - run: | - cd ../../binary - npm ci - - # Build binaries - - name: Install core node_modules - run: | - cd ../../binary - npm run build - - # Build plugin - - name: Build plugin - run: ./gradlew buildPlugin - - # Prepare plugin archive content for creating artifact - - name: Prepare Plugin Artifact - id: artifact - shell: bash - run: | - cd ${{ github.workspace }}/extensions/intellij/build/distributions - FILENAME=`ls *.zip` - unzip "$FILENAME" -d content - - echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT - - # Store already-built plugin as an artifact for downloading - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ steps.artifact.outputs.filename }} - path: ./extensions/intellij/build/distributions/content/*/* - - # Upload binaries as artifacts - - name: Upload artifact (darwin-arm64) - uses: actions/upload-artifact@v4 - with: - name: continue-binary-darwin-arm64 - path: ./binary/bin/darwin-arm64/ - - - name: Upload artifact (darwin-x64) - uses: actions/upload-artifact@v4 - with: - name: continue-binary-darwin-x64 - path: ./binary/bin/darwin-x64/ - - - name: Upload artifact (win32-x64) - uses: actions/upload-artifact@v4 - with: - name: continue-binary-win32-x64 - path: ./binary/bin/win32-x64/ - - - name: Upload artifact (linux-arm64) - uses: actions/upload-artifact@v4 - with: - name: continue-binary-linux-arm64 - path: ./binary/bin/linux-arm64/ - - - name: Upload artifact (linux-x64) - uses: actions/upload-artifact@v4 - with: - name: continue-binary-linux-x64 - path: ./binary/bin/linux-x64/ - - test-binaries: - needs: build - strategy: - matrix: - include: - - os: windows-latest - platform: win32 - arch: x64 - npm_config_arch: x64 - - os: ubuntu-latest - platform: linux - arch: x64 - npm_config_arch: x64 - # arm64 not actually supported by GitHub - # - os: ubuntu-latest - # platform: linux - # arch: arm64 - # npm_config_arch: arm64 - - os: macos-12 - platform: darwin - arch: x64 - npm_config_arch: x64 - - os: macos-latest - platform: darwin - arch: arm64 - npm_config_arch: arm64 - runs-on: ${{ matrix.os }} - steps: - # 1. Check-out repository - - name: Check-out repository - uses: actions/checkout@v4 - - # 2. Install npm dependencies - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - - name: Cache core node_modules - uses: actions/cache@v3 - with: - path: core/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} - - - name: Cache binary node_modules - uses: actions/cache@v3 - with: - path: binary/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} - - - name: Install Core Dependencies - run: | - cd ../../core - npm ci - - - name: Install Binary Dependencies - run: | - cd ../../binary - npm ci - - # Download the binary artifact - - name: Download binary artifact - uses: actions/download-artifact@v4 - with: - name: continue-binary-${{ matrix.platform }}-${{ matrix.arch }} - path: ./binary/bin/${{ matrix.platform }}-${{ matrix.arch }}/ - - # Set execute permissions for the binary (non-Windows) - - name: Set execute permissions - run: | - cd ../../binary/bin/${{ matrix.platform }}-${{ matrix.arch }} - chmod +x continue-binary - chmod +x node_sqlite3.node - chmod +x index.node - chmod +x esbuild - if: ${{ matrix.platform }} != 'win32' - - - name: Copy node_sqlite3.node to necessary location - run: | - cd ../../binary - mkdir build - cp ./bin/${{ matrix.platform }}-${{ matrix.arch }}/node_sqlite3.node ./build/node_sqlite3.node - - # Run tests for binary - - name: Run binary tests - run: | - cd ../../binary - npm run test - - - name: Upload logs - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: core-logs-${{ matrix.platform }}-${{ matrix.arch }} - path: binary/.continue/logs/core.log - - # Run tests and upload a code coverage report - test: - name: Test - needs: [build] - runs-on: ubuntu-latest - steps: - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v4 - - # Set up Java environment for the next steps - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: zulu - java-version: 17 - - # Setup Gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-home-cache-cleanup: true - - # Run tests - - name: Run Tests - run: ./gradlew check - - # Collect Tests Result of failed tests - - name: Collect Tests Result - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: tests-result - path: ${{ github.workspace }}/extensions/intellij/build/reports/tests - - # Upload the Kover report to CodeCov - # - name: Upload Code Coverage Report - # uses: codecov/codecov-action@v4 - # with: - # files: ${{ github.workspace }}/build/reports/kover/report.xml - - # Run Qodana inspections and provide report - inspectCode: - if: false - name: Inspect code - needs: [build] - runs-on: ubuntu-latest - permissions: - contents: write - checks: write - pull-requests: write - steps: - # Free GitHub Actions Environment Disk Space - - name: Maximize Build Space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - large-packages: false - - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v4 - - # Set up Java environment for the next steps - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: zulu - java-version: 17 - - # Run Qodana inspections - - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2024.1.5 - with: - cache-default-branch-only: true - - # Run plugin structure verification along with IntelliJ Plugin Verifier - verify: - name: Verify plugin - needs: [build] - runs-on: ubuntu-latest - steps: - # Free GitHub Actions Environment Disk Space - - name: Maximize Build Space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - large-packages: false - - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v4 - - # Set up Java environment for the next steps - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: zulu - java-version: 17 - - # Setup Gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-home-cache-cleanup: true - - # Cache Plugin Verifier IDEs - - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v4 - with: - path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides - key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} - - # Run Verify Plugin task and IntelliJ Plugin Verifier tool - - name: Run Plugin Verification tasks - run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }} - - # Collect Plugin Verifier Result - - name: Collect Plugin Verifier Result - if: ${{ always() }} - uses: actions/upload-artifact@v4 - with: - name: pluginVerifier-result - path: ${{ github.workspace }}/build/reports/pluginVerifier - - # Prepare a draft release for GitHub Releases page for the manual verification - # If accepted and published, release workflow would be triggered - releaseDraft: - name: Release draft - if: github.event_name != 'pull_request' - needs: [build, test, test-binaries, verify] - runs-on: ubuntu-latest - permissions: - contents: write - steps: - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v4 - - - name: Set up Git - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - - - name: Tag the repository - id: tag - run: | - # See https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names - TAG=v${{ needs.build.outputs.version }}-jetbrains - echo "$TAG" - echo "tag=$TAG" >> $GITHUB_OUTPUT - git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA} - git push origin $TAG - - # Remove old release drafts by using the curl request for the available releases with a draft flag - - name: Remove Old Release Drafts - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh api repos/{owner}/{repo}/releases \ - --jq '.[] | select(.draft == true) | .id' \ - | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} - - # Create a new release draft which is not publicly visible and requires manual acceptance - - name: Create Release Draft - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release create "${{ steps.tag.outputs.tag }}" \ - --draft \ - --title "v${{ needs.build.outputs.version }}-jetbrains" \ - --notes "$(cat << 'EOM' - ${{ needs.build.outputs.changelog }} - EOM - )" - - # Download the Gradle build artifact - - name: Download Gradle build artifact - uses: actions/download-artifact@v4 - with: - name: ${{ needs.build.outputs.filename }} - path: ./artifacts diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 9ace607f5..fbc69b64f 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -119,12 +119,6 @@ jobs: # env: # OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - # 2.25 Run core tests - - name: Run core tests - run: | - cd core - npm run test - # 2.5. Pre package - name: Set var for environment info shell: pwsh From d8281238620f5b3b2dac25945e908c606d256b34 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 29 Sep 2024 11:37:47 -0700 Subject: [PATCH 27/29] fix tsc errors --- core/autocomplete/ImportDefinitionsService.ts | 81 ------------------- core/autocomplete/charStream.test.ts | 2 +- core/autocomplete/completionProvider.ts | 15 ++-- core/autocomplete/constructPrompt.ts | 2 +- core/autocomplete/languages.ts | 2 +- core/autocomplete/lineStream.test.ts | 2 +- core/autocomplete/postprocessing.ts | 2 +- .../streamTransforms/lineStream.ts | 4 +- core/commands/slash/edit.ts | 2 +- core/edit/lazy/replace.ts | 2 +- core/edit/lazy/streamLazyApply.ts | 2 +- 11 files changed, 18 insertions(+), 98 deletions(-) delete mode 100644 core/autocomplete/ImportDefinitionsService.ts diff --git a/core/autocomplete/ImportDefinitionsService.ts b/core/autocomplete/ImportDefinitionsService.ts deleted file mode 100644 index a17e3a0c9..000000000 --- a/core/autocomplete/ImportDefinitionsService.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { IDE } from "../index.js"; -import { RangeInFileWithContents } from "../commands/util.js"; -import { PrecalculatedLruCache } from "../util/LruCache.js"; -import { - TSQueryType, - getParserForFile, - getQueryForFile, -} from "../util/treeSitter.js"; - -interface FileInfo { - imports: { [key: string]: RangeInFileWithContents[] }; -} - -export class ImportDefinitionsService { - static N = 10; - - private cache: PrecalculatedLruCache = - new PrecalculatedLruCache( - this._getFileInfo.bind(this), - ImportDefinitionsService.N, - ); - - constructor(private readonly ide: IDE) { - ide.onDidChangeActiveTextEditor((filepath) => { - this.cache.initKey(filepath); - }); - } - - get(filepath: string): FileInfo | undefined { - return this.cache.get(filepath); - } - - private async _getFileInfo(filepath: string): Promise { - const parser = await getParserForFile(filepath); - if (!parser) { - return { - imports: {}, - }; - } - const ast = parser.parse(await this.ide.readFile(filepath), undefined, { - includedRanges: [ - { - startIndex: 0, - endIndex: 10_000, - startPosition: { row: 0, column: 0 }, - endPosition: { row: 100, column: 0 }, - }, - ], - }); - const query = await getQueryForFile(filepath, TSQueryType.Imports); - if (!query) { - return { - imports: {}, - }; - } - - const matches = query?.matches(ast.rootNode); - - const fileInfo: FileInfo = { - imports: {}, - }; - for (const match of matches) { - const startPosition = match.captures[0].node.startPosition; - const defs = await this.ide.gotoDefinition({ - filepath, - position: { - line: startPosition.row, - character: startPosition.column, - }, - }); - fileInfo.imports[match.captures[0].node.text] = await Promise.all( - defs.map(async (def) => ({ - ...def, - contents: await this.ide.readRangeInFile(def.filepath, def.range), - })), - ); - } - - return fileInfo; - } -} diff --git a/core/autocomplete/charStream.test.ts b/core/autocomplete/charStream.test.ts index 7ab8923fc..b5504ad63 100644 --- a/core/autocomplete/charStream.test.ts +++ b/core/autocomplete/charStream.test.ts @@ -1,4 +1,4 @@ -import { stopAtStopTokens } from "./charStream"; +import { stopAtStopTokens } from "./streamTransforms/charStream"; describe("stopAtStopTokens", () => { async function* createMockStream(chunks: string[]): AsyncGenerator { diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 0d02954b6..649dfac86 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -22,14 +22,8 @@ import { } from "../util/parameters.js"; import { Telemetry } from "../util/posthog.js"; import { getRangeInString } from "../util/ranges.js"; -import { ImportDefinitionsService } from "./ImportDefinitionsService.js"; -import { BracketMatchingService } from "./brackets.js"; + import AutocompleteLruCache from "./cache.js"; -import { - noFirstCharNewline, - onlyWhitespaceAfterEndOfLine, - stopAtStopTokens, -} from "./charStream.js"; import { constructAutocompletePrompt, languageForFilepath, @@ -54,6 +48,13 @@ import { GeneratorReuseManager } from "./util.js"; // @prettier-ignore import Handlebars from "handlebars"; import { getConfigJsonPath } from "../util/paths.js"; +import { BracketMatchingService } from "./services/BracketMatchingService.js"; +import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; +import { + noFirstCharNewline, + onlyWhitespaceAfterEndOfLine, + stopAtStopTokens, +} from "./streamTransforms/charStream.js"; export interface AutocompleteInput { completionId: string; diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index f6e8a3701..549df7235 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -6,7 +6,6 @@ import { pruneLinesFromBottom, pruneLinesFromTop, } from "../llm/countTokens.js"; -import { ImportDefinitionsService } from "./ImportDefinitionsService.js"; import { AstPath, getAst, getTreePathAtCursor } from "./ast.js"; import { AutocompleteLanguageInfo, @@ -22,6 +21,7 @@ import { } from "./ranking.js"; import { RecentlyEditedRange, findMatchingRange } from "./recentlyEdited.js"; import { HierarchicalContextService } from "./services/HierarchicalContextService.js"; +import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; export function languageForFilepath( filepath: string, diff --git a/core/autocomplete/languages.ts b/core/autocomplete/languages.ts index 19ab65f71..be414098a 100644 --- a/core/autocomplete/languages.ts +++ b/core/autocomplete/languages.ts @@ -1,4 +1,4 @@ -import type { LineFilter } from "./lineStream.js"; +import { LineFilter } from "./streamTransforms/lineStream"; export interface AutocompleteLanguageInfo { name: string; diff --git a/core/autocomplete/lineStream.test.ts b/core/autocomplete/lineStream.test.ts index df8cd1263..ace94eaa4 100644 --- a/core/autocomplete/lineStream.test.ts +++ b/core/autocomplete/lineStream.test.ts @@ -1,5 +1,5 @@ import { jest } from "@jest/globals"; -import * as lineStream from "./lineStream"; +import * as lineStream from "./streamTransforms/lineStream"; describe("lineStream", () => { let mockFullStop: jest.Mock; diff --git a/core/autocomplete/postprocessing.ts b/core/autocomplete/postprocessing.ts index bc1961e69..cb3ada459 100644 --- a/core/autocomplete/postprocessing.ts +++ b/core/autocomplete/postprocessing.ts @@ -1,6 +1,6 @@ import type { ILLM } from "../index.js"; import { longestCommonSubsequence } from "../util/lcs.js"; -import { lineIsRepeated } from "./lineStream.js"; +import { lineIsRepeated } from "./streamTransforms/lineStream.js"; function rewritesLineAbove(completion: string, prefix: string): boolean { const lineAbove = prefix diff --git a/core/autocomplete/streamTransforms/lineStream.ts b/core/autocomplete/streamTransforms/lineStream.ts index 4ba14e687..5990bbf3c 100644 --- a/core/autocomplete/streamTransforms/lineStream.ts +++ b/core/autocomplete/streamTransforms/lineStream.ts @@ -1,6 +1,6 @@ import { distance } from "fastest-levenshtein"; -import { DiffLine } from "../"; -import { LineStream } from "../diff/util"; +import { DiffLine } from "../.."; +import { LineStream } from "../../diff/util"; export type LineFilter = (args: { lines: LineStream; diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index d3cbebfa2..5d26b0408 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -6,7 +6,7 @@ import { fixCodeLlamaFirstLineIndentation, stopAtLines, streamWithNewLines, -} from "../../autocomplete/lineStream"; +} from "../../autocomplete/streamTransforms/lineStream"; import { streamLines } from "../../diff/util"; import { stripImages } from "../../llm/images"; import { diff --git a/core/edit/lazy/replace.ts b/core/edit/lazy/replace.ts index ff6701251..b4b6164cc 100644 --- a/core/edit/lazy/replace.ts +++ b/core/edit/lazy/replace.ts @@ -2,7 +2,7 @@ import { ILLM } from "../.."; import { filterLeadingNewline, stopAtLines, -} from "../../autocomplete/lineStream"; +} from "../../autocomplete/streamTransforms/lineStream"; import { streamLines } from "../../diff/util"; import { dedent } from "../../util"; diff --git a/core/edit/lazy/streamLazyApply.ts b/core/edit/lazy/streamLazyApply.ts index 24a369945..6dd9cef6d 100644 --- a/core/edit/lazy/streamLazyApply.ts +++ b/core/edit/lazy/streamLazyApply.ts @@ -2,7 +2,7 @@ import { filterLeadingAndTrailingNewLineInsertion, filterLeadingNewline, stopAtLines, -} from "../../autocomplete/lineStream.js"; +} from "../../autocomplete/streamTransforms/lineStream"; import { streamDiff } from "../../diff/streamDiff.js"; import { LineStream, streamLines } from "../../diff/util.js"; import { DiffLine, ILLM } from "../../index.js"; From 592278949b596461dae0afeaa489b9ed3a44e0fe Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 29 Sep 2024 11:38:40 -0700 Subject: [PATCH 28/29] fix err --- gui/src/components/markdown/CodeSnippetPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/markdown/CodeSnippetPreview.tsx b/gui/src/components/markdown/CodeSnippetPreview.tsx index e6644d3d8..2a7b6d970 100644 --- a/gui/src/components/markdown/CodeSnippetPreview.tsx +++ b/gui/src/components/markdown/CodeSnippetPreview.tsx @@ -126,7 +126,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) { )} { e.stopPropagation(); props.onDelete?.(); From 60bb84140ca1d8349901122d3f7830f1aa0a649c Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 29 Sep 2024 11:43:14 -0700 Subject: [PATCH 29/29] rename hierarchical context to root path context --- core/autocomplete/completionProvider.ts | 8 ++++---- core/autocomplete/constructPrompt.ts | 6 +++--- ...rchicalContextService.ts => RootPathContextService.ts} | 8 ++++---- core/util/treeSitter.ts | 8 ++++---- .../function_declaration/typescript.scm | 0 .../function_definition/cpp.scm | 0 .../function_definition/python.scm | 0 .../method_declaration/java.scm | 0 .../method_definition/typescript.scm | 0 9 files changed, 15 insertions(+), 15 deletions(-) rename core/autocomplete/services/{HierarchicalContextService.ts => RootPathContextService.ts} (93%) rename extensions/vscode/tree-sitter/{hierarchical-context-queries => root-path-context-queries}/function_declaration/typescript.scm (100%) rename extensions/vscode/tree-sitter/{hierarchical-context-queries => root-path-context-queries}/function_definition/cpp.scm (100%) rename extensions/vscode/tree-sitter/{hierarchical-context-queries => root-path-context-queries}/function_definition/python.scm (100%) rename extensions/vscode/tree-sitter/{hierarchical-context-queries => root-path-context-queries}/method_declaration/java.scm (100%) rename extensions/vscode/tree-sitter/{hierarchical-context-queries => root-path-context-queries}/method_definition/typescript.scm (100%) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 649dfac86..d954c3f31 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -33,7 +33,7 @@ import { AutocompleteLanguageInfo } from "./languages.js"; import { postprocessCompletion } from "./postprocessing.js"; import { AutocompleteSnippet } from "./ranking.js"; import { RecentlyEditedRange } from "./recentlyEdited.js"; -import { HierarchicalContextService } from "./services/HierarchicalContextService.js"; +import { RootPathContextService } from "./services/RootPathContextService.js"; import { avoidPathLineAndEmptyComments, noTopLevelKeywordsMidline, @@ -160,14 +160,14 @@ export class CompletionProvider { this.onError.bind(this), ); this.importDefinitionsService = new ImportDefinitionsService(this.ide); - this.hierarchicalContextService = new HierarchicalContextService( + this.rootPathContextService = new RootPathContextService( this.importDefinitionsService, this.ide, ); } private importDefinitionsService: ImportDefinitionsService; - private hierarchicalContextService: HierarchicalContextService; + private rootPathContextService: RootPathContextService; private generatorReuseManager: GeneratorReuseManager; private autocompleteCache = AutocompleteLruCache.get(); public errorsShown: Set = new Set(); @@ -549,7 +549,7 @@ export class CompletionProvider { llm.model, extrasSnippets, this.importDefinitionsService, - this.hierarchicalContextService, + this.rootPathContextService, ); // If prefix is manually passed diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 549df7235..43324ea8c 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -20,8 +20,8 @@ import { type AutocompleteSnippet, } from "./ranking.js"; import { RecentlyEditedRange, findMatchingRange } from "./recentlyEdited.js"; -import { HierarchicalContextService } from "./services/HierarchicalContextService.js"; import { ImportDefinitionsService } from "./services/ImportDefinitionsService.js"; +import { RootPathContextService } from "./services/RootPathContextService.js"; export function languageForFilepath( filepath: string, @@ -115,7 +115,7 @@ export async function constructAutocompletePrompt( modelName: string, extraSnippets: AutocompleteSnippet[], importDefinitionsService: ImportDefinitionsService, - hierarchicalContextService: HierarchicalContextService, + rootPathContextService: RootPathContextService, ): Promise<{ prefix: string; suffix: string; @@ -216,7 +216,7 @@ export async function constructAutocompletePrompt( } if (options.useHierarchicalContext && treePath) { - const ctx = await hierarchicalContextService.getContextForPath( + const ctx = await rootPathContextService.getContextForPath( filepath, treePath, ); diff --git a/core/autocomplete/services/HierarchicalContextService.ts b/core/autocomplete/services/RootPathContextService.ts similarity index 93% rename from core/autocomplete/services/HierarchicalContextService.ts rename to core/autocomplete/services/RootPathContextService.ts index 53f0ba4be..69426aab8 100644 --- a/core/autocomplete/services/HierarchicalContextService.ts +++ b/core/autocomplete/services/RootPathContextService.ts @@ -7,7 +7,7 @@ import { AstPath } from "../ast"; import { AutocompleteSnippet } from "../ranking"; import { ImportDefinitionsService } from "./ImportDefinitionsService"; -export class HierarchicalContextService { +export class RootPathContextService { private cache = new LRUCache({ max: 100, }); @@ -37,7 +37,7 @@ export class HierarchicalContextService { return createHash("sha256") .update(parentKey) .update(astNode.type) - .update(HierarchicalContextService.getNodeId(astNode)) + .update(RootPathContextService.getNodeId(astNode)) .digest("hex"); } @@ -108,9 +108,9 @@ export class HierarchicalContextService { let parentKey = filepath; for (const astNode of astPath.filter((node) => - HierarchicalContextService.TYPES_TO_USE.has(node.type), + RootPathContextService.TYPES_TO_USE.has(node.type), )) { - const key = HierarchicalContextService.keyFromNode(parentKey, astNode); + const key = RootPathContextService.keyFromNode(parentKey, astNode); const foundInCache = this.cache.get(key); const newSnippets = diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index 6fb0629e9..043906547 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -130,10 +130,10 @@ export enum TSQueryType { CodeSnippets = "code-snippet-queries", Imports = "import-queries", // Used in HierarchicalContextService.ts - FunctionDeclaration = "hierarchical-context-queries/function_declaration", - MethodDefinition = "hierarchical-context-queries/method_definition", - FunctionDefinition = "hierarchical-context-queries/function_definition", - MethodDeclaration = "hierarchical-context-queries/method_declaration", + FunctionDeclaration = "root-path-context-queries/function_declaration", + MethodDefinition = "root-path-context-queries/method_definition", + FunctionDefinition = "root-path-context-queries/function_definition", + MethodDeclaration = "root-path-context-queries/method_declaration", } export async function getQueryForFile( diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm b/extensions/vscode/tree-sitter/root-path-context-queries/function_declaration/typescript.scm similarity index 100% rename from extensions/vscode/tree-sitter/hierarchical-context-queries/function_declaration/typescript.scm rename to extensions/vscode/tree-sitter/root-path-context-queries/function_declaration/typescript.scm diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/cpp.scm b/extensions/vscode/tree-sitter/root-path-context-queries/function_definition/cpp.scm similarity index 100% rename from extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/cpp.scm rename to extensions/vscode/tree-sitter/root-path-context-queries/function_definition/cpp.scm diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/python.scm b/extensions/vscode/tree-sitter/root-path-context-queries/function_definition/python.scm similarity index 100% rename from extensions/vscode/tree-sitter/hierarchical-context-queries/function_definition/python.scm rename to extensions/vscode/tree-sitter/root-path-context-queries/function_definition/python.scm diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/method_declaration/java.scm b/extensions/vscode/tree-sitter/root-path-context-queries/method_declaration/java.scm similarity index 100% rename from extensions/vscode/tree-sitter/hierarchical-context-queries/method_declaration/java.scm rename to extensions/vscode/tree-sitter/root-path-context-queries/method_declaration/java.scm diff --git a/extensions/vscode/tree-sitter/hierarchical-context-queries/method_definition/typescript.scm b/extensions/vscode/tree-sitter/root-path-context-queries/method_definition/typescript.scm similarity index 100% rename from extensions/vscode/tree-sitter/hierarchical-context-queries/method_definition/typescript.scm rename to extensions/vscode/tree-sitter/root-path-context-queries/method_definition/typescript.scm