From ee96802f0c9ec249384ae0bc45a2414935671a7d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 27 Sep 2024 15:28:10 +0000 Subject: [PATCH] Update dependencies, adjust HTML conversion to async, and revise licenses and documentation --- THIRD_PARTY_LICENSES.md | 141 ++++++++++++- docs/genaisrc/genaiscript.d.ts | 8 +- docs/src/content/docs/index.mdx | 2 +- .../content/docs/reference/scripts/browser.md | 6 +- .../content/docs/reference/scripts/html.md | 2 +- docs/yarn.lock | 18 +- genaisrc/genaiscript.d.ts | 8 +- packages/auto/genaiscript.d.ts | 8 +- packages/cli/package.json | 190 +++++++++--------- packages/core/src/genaisrc/genaiscript.d.ts | 8 +- packages/core/src/html.test.ts | 12 +- packages/core/src/html.ts | 15 +- packages/core/src/types/prompt_template.d.ts | 8 +- .../sample/genaisrc/blog/genaiscript.d.ts | 8 +- .../sample/genaisrc/browse-text.genai.mts | 2 +- packages/sample/genaisrc/genaiscript.d.ts | 8 +- packages/sample/genaisrc/html.genai.mjs | 6 +- .../sample/genaisrc/node/genaiscript.d.ts | 8 +- .../sample/genaisrc/python/genaiscript.d.ts | 8 +- .../sample/genaisrc/style/genaiscript.d.ts | 8 +- packages/sample/src/aici/genaiscript.d.ts | 8 +- packages/sample/src/errors/genaiscript.d.ts | 8 +- packages/sample/src/genaiscript.d.ts | 8 +- packages/sample/src/makecode/genaiscript.d.ts | 8 +- packages/sample/src/tla/genaiscript.d.ts | 8 +- packages/sample/src/vision/genaiscript.d.ts | 8 +- packages/vscode/genaisrc/genaiscript.d.ts | 8 +- slides/genaisrc/genaiscript.d.ts | 8 +- slides/yarn.lock | 124 ++++++------ yarn.lock | 22 +- 30 files changed, 408 insertions(+), 276 deletions(-) diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index 20f07ffed5..222dc7df20 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -1099,7 +1099,7 @@ MIT License The following npm package may be included in this product: - - genaiscript-vscode@1.56.3 + - genaiscript-vscode@1.57.0 This package contains the following license and notice below: @@ -3034,11 +3034,12 @@ IN THE SOFTWARE. ----------- -The following npm package may be included in this product: +The following npm packages may be included in this product: + - htmlparser2@8.0.2 - htmlparser2@9.1.0 -This package contains the following license and notice below: +These packages each contain the following license and notice below: Copyright 2010, 2011, Chris Winberry . All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -4188,9 +4189,9 @@ The following npm packages may be included in this product: - @tokenizer/token@0.3.0 - agent-base@6.0.2 - canvas@2.11.2 - - genaiscript-core-internal@1.56.3 - - genaiscript-sample@1.56.3 - - genaiscript@1.56.3 + - genaiscript-core-internal@1.57.0 + - genaiscript-sample@1.57.0 + - genaiscript@1.57.0 - https-proxy-agent@5.0.1 - isarray@1.0.0 - javascript-natural-sort@0.7.1 @@ -5333,6 +5334,74 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - html-to-text@9.0.5 + +This package contains the following license and notice below: + +MIT License + +Portions Copyright (c) 2012-2019 werk85 +Portions Copyright (c) 2020-2022 KillyMXI + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +----------- + +The following npm packages may be included in this product: + + - @selderee/plugin-htmlparser2@0.11.0 + - leac@0.6.0 + - parseley@0.12.1 + - peberminta@0.9.0 + - selderee@0.11.0 + +These packages each contain the following license and notice below: + +MIT License + +Copyright (c) 2021-2022 KillyMXI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - vectra@0.9.0 @@ -6259,6 +6328,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------- +The following npm package may be included in this product: + + - deepmerge@4.3.1 + +This package contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2012 James Halliday, Josh Duff, and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----------- + The following npm package may be included in this product: - xmlbuilder@10.1.1 @@ -6472,6 +6571,36 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - tabletojson@4.1.4 + +This package contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2015 Iain Collins + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - any-base@1.1.0 diff --git a/docs/genaisrc/genaiscript.d.ts b/docs/genaisrc/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/docs/genaisrc/genaiscript.d.ts +++ b/docs/genaisrc/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 1048aa65c3..75ad333bb1 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -221,7 +221,7 @@ Browse and scrape the web with [Playwright](/genaiscript/reference/scripts/brows ```js const page = await host.browse("https://...") const table = await page.locator("table[...]").innerHTML() -def("TABLE", HTML.convertToMarkdown(table)) +def("TABLE", await HTML.convertToMarkdown(table)) ``` diff --git a/docs/src/content/docs/reference/scripts/browser.md b/docs/src/content/docs/reference/scripts/browser.md index e619d51b91..0bf03c38b7 100644 --- a/docs/src/content/docs/reference/scripts/browser.md +++ b/docs/src/content/docs/reference/scripts/browser.md @@ -86,9 +86,9 @@ const value = page.getByRole("input").value() You can use the parsers in [HTML](/genaiscript/reference/scripts/html) to convert the HTML to Markdown. ```js -const md = HTML.convertToMarkdown(html) -const text = HTML.convertToText(html) -const tables = HTML.convertTablesToJSON(html) +const md = await HTML.convertToMarkdown(html) +const text = await HTML.convertToText(html) +const tables = await HTML.convertTablesToJSON(html) ``` ## Screenshot diff --git a/docs/src/content/docs/reference/scripts/html.md b/docs/src/content/docs/reference/scripts/html.md index 24b929be86..1c169c1ba7 100644 --- a/docs/src/content/docs/reference/scripts/html.md +++ b/docs/src/content/docs/reference/scripts/html.md @@ -37,7 +37,7 @@ const markdown = HTML.HTMLToMarkdown(htmlContent) This function specializes in extracting tables from HTML content and converting them into JSON format. It is useful for data extraction tasks from web pages. ```js -const tables = HTML.convertTablesToJSON(htmlContent) +const tables = await HTML.convertTablesToJSON(htmlContent) const table = tables[0] defData("DATA", table) diff --git a/docs/yarn.lock b/docs/yarn.lock index 1cfe75aa85..aef38e2d66 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -3408,9 +3408,9 @@ rehype-format@^5.0.0: hast-util-format "^1.0.0" rehype-parse@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-9.0.0.tgz#3949faeec6f466ec57774215661e0d75469195d9" - integrity sha512-WG7nfvmWWkCR++KEkZevZb/uw41E8TsH4DsY9UxsTbIXCVGbAs4S+r8FrQ+OtH5EEQAs+5UxKC42VinkmpA1Yw== + version "9.0.1" + resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-9.0.1.tgz#9993bda129acc64c417a9d3654a7be38b2a94c20" + integrity sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag== dependencies: "@types/hast" "^3.0.0" hast-util-from-html "^2.0.0" @@ -3426,18 +3426,18 @@ rehype-raw@^7.0.0: vfile "^6.0.0" rehype-stringify@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/rehype-stringify/-/rehype-stringify-10.0.0.tgz#2031cf6fdd0355393706f0474ec794c75e5492f2" - integrity sha512-1TX1i048LooI9QoecrXy7nGFFbFSufxVRAfc6Y9YMRAi56l+oB0zP51mLSV312uRuvVLPV1opSlJmslozR1XHQ== + version "10.0.1" + resolved "https://registry.yarnpkg.com/rehype-stringify/-/rehype-stringify-10.0.1.tgz#2ec1ebc56c6aba07905d3b4470bdf0f684f30b75" + integrity sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA== dependencies: "@types/hast" "^3.0.0" hast-util-to-html "^9.0.0" unified "^11.0.0" rehype@^13.0.1: - version "13.0.1" - resolved "https://registry.yarnpkg.com/rehype/-/rehype-13.0.1.tgz#56384ba83955e2f3aa7eca1975b406c67d9dbd5e" - integrity sha512-AcSLS2mItY+0fYu9xKxOu1LhUZeBZZBx8//5HKzF+0XP+eP8+6a5MXn2+DW2kfXR6Dtp1FEXMVrjyKAcvcU8vg== + version "13.0.2" + resolved "https://registry.yarnpkg.com/rehype/-/rehype-13.0.2.tgz#ab0b3ac26573d7b265a0099feffad450e4cf1952" + integrity sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A== dependencies: "@types/hast" "^3.0.0" rehype-parse "^9.0.0" diff --git a/genaisrc/genaiscript.d.ts b/genaisrc/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/genaisrc/genaiscript.d.ts +++ b/genaisrc/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/auto/genaiscript.d.ts b/packages/auto/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/auto/genaiscript.d.ts +++ b/packages/auto/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/cli/package.json b/packages/cli/package.json index 6e0e30b402..a924b880df 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,96 +1,98 @@ { - "name": "genaiscript", - "version": "1.57.0", - "main": "built/genaiscript.cjs", - "type": "commonjs", - "bin": { - "genaiscript": "built/genaiscript.cjs" - }, - "files": [ - "built/genaiscript.cjs" - ], - "publisher": "Microsoft", - "repository": { - "type": "git", - "url": "git+https://github.com/microsoft/genaiscript.git" - }, - "homepage": "https://microsoft.github.io/genaiscript", - "keywords": [ - "genai", - "ai", - "agentic", - "cli", - "prompt", - "llm", - "generative ai", - "gpt4", - "chatgpt", - "ollama", - "llamacpp", - "chatgpt" - ], - "description": "A CLI for GenAIScript, a generative AI scripting framework.", - "license": "MIT", - "dependencies": { - "@azure/identity": "^4.4.1", - "@inquirer/prompts": "^6.0.1", - "@lvce-editor/ripgrep": "^1.2.0", - "dockerode": "^4.0.2", - "gpt-tokenizer": "^2.4.0", - "jimp": "^1.6.0", - "mammoth": "^1.8.0", - "mathjs": "^13.1.1", - "pdfjs-dist": "4.6.82", - "playwright": "^1.47.2", - "tree-sitter-wasms": "^0.1.11", - "tsx": "^4.19.1", - "turndown": "^7.2.0", - "typescript": "5.6.2", - "vectra": "^0.9.0", - "web-tree-sitter": "^0.22.2", - "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz" - }, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "promptfoo": "0.89.3" - }, - "devDependencies": { - "@types/diff": "^5.2.2", - "@types/dockerode": "^3.3.31", - "@types/fs-extra": "^11.0.4", - "@types/memorystream": "^0.3.4", - "@types/node": "^20.14.12", - "@types/papaparse": "^5.3.14", - "@types/prompts": "^2.4.9", - "@types/replace-ext": "^2.0.2", - "@types/ws": "^8.5.12", - "commander": "^12.1.0", - "diff": "^7.0.0", - "dotenv": "^16.4.5", - "esbuild": "^0.24.0", - "execa": "^9.4.0", - "fs-extra": "^11.2.0", - "glob": "^11.0.0", - "memorystream": "^0.3.1", - "node-sarif-builder": "^3.2.0", - "octokit": "^4.0.2", - "openai": "^4.65.0", - "pretty-bytes": "^6.1.1", - "replace-ext": "^2.0.0", - "ws": "^8.18.0", - "zx": "^8.1.8" - }, - "scripts": { - "compile": "esbuild src/main.ts --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:vectra && node ../../scripts/patch-cli.mjs", - "compile-debug": "esbuild src/main.ts --sourcemap --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:vectra", - "postcompile": "node built/genaiscript.cjs info help > ../../docs/src/content/docs/reference/cli/commands.md", - "vis:treemap": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.treemap.html", - "vis:network": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.network.html --template network", - "go": "yarn compile && node built/genaiscript.cjs", - "test": "node --import tsx --test src/**.test.ts", - "typecheck": "tsc -p src", - "lint": "npx --yes publint" - } + "name": "genaiscript", + "version": "1.57.0", + "main": "built/genaiscript.cjs", + "type": "commonjs", + "bin": { + "genaiscript": "built/genaiscript.cjs" + }, + "files": [ + "built/genaiscript.cjs" + ], + "publisher": "Microsoft", + "repository": { + "type": "git", + "url": "git+https://github.com/microsoft/genaiscript.git" + }, + "homepage": "https://microsoft.github.io/genaiscript", + "keywords": [ + "genai", + "ai", + "agentic", + "cli", + "prompt", + "llm", + "generative ai", + "gpt4", + "chatgpt", + "ollama", + "llamacpp", + "chatgpt" + ], + "description": "A CLI for GenAIScript, a generative AI scripting framework.", + "license": "MIT", + "dependencies": { + "@azure/identity": "^4.4.1", + "@inquirer/prompts": "^6.0.1", + "@lvce-editor/ripgrep": "^1.2.0", + "dockerode": "^4.0.2", + "gpt-tokenizer": "^2.4.0", + "html-to-text": "^9.0.5", + "jimp": "^1.6.0", + "mammoth": "^1.8.0", + "mathjs": "^13.1.1", + "pdfjs-dist": "4.6.82", + "playwright": "^1.47.2", + "tabletojson": "^4.1.4", + "tree-sitter-wasms": "^0.1.11", + "tsx": "^4.19.1", + "turndown": "^7.2.0", + "typescript": "5.6.2", + "vectra": "^0.9.0", + "web-tree-sitter": "^0.22.2", + "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "promptfoo": "0.89.3" + }, + "devDependencies": { + "@types/diff": "^5.2.2", + "@types/dockerode": "^3.3.31", + "@types/fs-extra": "^11.0.4", + "@types/memorystream": "^0.3.4", + "@types/node": "^20.14.12", + "@types/papaparse": "^5.3.14", + "@types/prompts": "^2.4.9", + "@types/replace-ext": "^2.0.2", + "@types/ws": "^8.5.12", + "commander": "^12.1.0", + "diff": "^7.0.0", + "dotenv": "^16.4.5", + "esbuild": "^0.24.0", + "execa": "^9.4.0", + "fs-extra": "^11.2.0", + "glob": "^11.0.0", + "memorystream": "^0.3.1", + "node-sarif-builder": "^3.2.0", + "octokit": "^4.0.2", + "openai": "^4.65.0", + "pretty-bytes": "^6.1.1", + "replace-ext": "^2.0.0", + "ws": "^8.18.0", + "zx": "^8.1.8" + }, + "scripts": { + "compile": "esbuild src/main.ts --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:vectra --external:tabletojson --external:html-to-text && node ../../scripts/patch-cli.mjs", + "compile-debug": "esbuild src/main.ts --sourcemap --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:vectra --external:tabletojson --external:html-to-text", + "postcompile": "node built/genaiscript.cjs info help > ../../docs/src/content/docs/reference/cli/commands.md", + "vis:treemap": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.treemap.html", + "vis:network": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.network.html --template network", + "go": "yarn compile && node built/genaiscript.cjs", + "test": "node --import tsx --test src/**.test.ts", + "typecheck": "tsc -p src", + "lint": "npx --yes publint" + } } diff --git a/packages/core/src/genaisrc/genaiscript.d.ts b/packages/core/src/genaisrc/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/core/src/genaisrc/genaiscript.d.ts +++ b/packages/core/src/genaisrc/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/core/src/html.test.ts b/packages/core/src/html.test.ts index aaf33d9552..83117e67a2 100644 --- a/packages/core/src/html.test.ts +++ b/packages/core/src/html.test.ts @@ -3,7 +3,7 @@ import { HTMLTablesToJSON, HTMLToMarkdown, HTMLToText } from "./html" import assert from "node:assert/strict" describe("html", () => { - test("convert HTML table to JSON", () => { + test("convert HTML table to JSON", async () => { const html = ` @@ -17,22 +17,22 @@ describe("html", () => {
` const expected = [{ "Header 1": "Value 1", "Header 2": "Value 2" }] - const result = HTMLTablesToJSON(html)[0] + const result = (await HTMLTablesToJSON(html))[0] console.log(JSON.stringify(result, null, 2)) assert.deepStrictEqual(result, expected) }) - test("converts HTML to text", () => { + test("converts HTML to text", async () => { const html = "

Hello, world!

" const expected = "Hello, world!" - const result = HTMLToText(html) + const result = await HTMLToText(html) assert(result === expected) }) - describe("HTMLToMarkdown", () => { + describe("HTMLToMarkdown", async () => { test("converts simple HTML to Markdown", async () => { const html = "

Title

" const expected = "Title\n=====" - const result = HTMLToMarkdown(html) + const result = await HTMLToMarkdown(html) assert.strictEqual(result, expected) }) }) diff --git a/packages/core/src/html.ts b/packages/core/src/html.ts index 251b116aba..6519c31ae2 100644 --- a/packages/core/src/html.ts +++ b/packages/core/src/html.ts @@ -1,12 +1,8 @@ // This module provides functions to convert HTML content into different formats such as JSON, plain text, and Markdown. // It imports necessary libraries for HTML conversion and logging purposes. -import { convert as convertToText } from "html-to-text" // Import the convert function from html-to-text library - import { TraceOptions } from "./trace" // Import TraceOptions for optional logging features -import { tabletojson } from "tabletojson" // Import tabletojson for converting HTML tables to JSON - /** * Converts HTML tables to JSON objects. * @@ -14,7 +10,11 @@ import { tabletojson } from "tabletojson" // Import tabletojson for converting H * @param options - Optional parameters for conversion. * @returns A 2D array of objects representing the table data. */ -export function HTMLTablesToJSON(html: string, options?: {}): object[][] { +export async function HTMLTablesToJSON( + html: string, + options?: {} +): Promise { + const { tabletojson } = await import("tabletojson") // Import tabletojson for converting HTML tables to JSON const res = tabletojson.convert(html, options) // Convert HTML tables to JSON using tabletojson library return res } @@ -26,15 +26,16 @@ export function HTMLTablesToJSON(html: string, options?: {}): object[][] { * @param options - Optional parameters including tracing options. * @returns The plain text representation of the HTML. */ -export function HTMLToText( +export async function HTMLToText( html: string, options?: HTMLToTextOptions & TraceOptions -): string { +): Promise { if (!html) return "" // Return empty string if no HTML content is provided const { trace } = options || {} // Extract trace for logging if available try { + const { convert: convertToText } = await import("html-to-text") // Import the convert function from html-to-text library const text = convertToText(html, options) // Perform conversion to plain text return text } catch (e) { diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index f2ff6aef4e..bbd4612d74 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -1085,7 +1085,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1246,17 +1246,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/genaisrc/blog/genaiscript.d.ts b/packages/sample/genaisrc/blog/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/genaisrc/blog/genaiscript.d.ts +++ b/packages/sample/genaisrc/blog/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/genaisrc/browse-text.genai.mts b/packages/sample/genaisrc/browse-text.genai.mts index 09b69b3319..2f61b319c1 100644 --- a/packages/sample/genaisrc/browse-text.genai.mts +++ b/packages/sample/genaisrc/browse-text.genai.mts @@ -16,7 +16,7 @@ const page = await host.browse( ) const table = page.locator('table[data-testid="csv-table"]') const html = await table.innerHTML() -const csv = HTML.convertTablesToJSON("" + html + "
")[0] +const csv = await HTML.convertTablesToJSON("" + html + "
")[0] csv.forEach((row) => delete row[Object.keys(row)[0]]) // remove the first column defData("DATA", csv) $`Analyze DATA and provide a statistical summary.` diff --git a/packages/sample/genaisrc/genaiscript.d.ts b/packages/sample/genaisrc/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/genaisrc/genaiscript.d.ts +++ b/packages/sample/genaisrc/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/genaisrc/html.genai.mjs b/packages/sample/genaisrc/html.genai.mjs index 8365593d20..e427dbe2bd 100644 --- a/packages/sample/genaisrc/html.genai.mjs +++ b/packages/sample/genaisrc/html.genai.mjs @@ -7,13 +7,13 @@ script({ const { text: html } = await fetchText( "https://microsoft.github.io/genaiscript/getting-started/" ) -const text = HTML.convertToText(html) +const text = await HTML.convertToText(html) def("TEXT", text) -const md = HTML.convertToMarkdown(html) +const md = await HTML.convertToMarkdown(html) const v = def("MARKDOWN", md) -const tables = HTML.convertTablesToJSON(html) +const tables = await HTML.convertTablesToJSON(html) defData("TABLES", tables) $`Compare TEXT and MARKDOWN. diff --git a/packages/sample/genaisrc/node/genaiscript.d.ts b/packages/sample/genaisrc/node/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/genaisrc/node/genaiscript.d.ts +++ b/packages/sample/genaisrc/node/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/genaisrc/python/genaiscript.d.ts b/packages/sample/genaisrc/python/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/genaisrc/python/genaiscript.d.ts +++ b/packages/sample/genaisrc/python/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/genaisrc/style/genaiscript.d.ts b/packages/sample/genaisrc/style/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/genaisrc/style/genaiscript.d.ts +++ b/packages/sample/genaisrc/style/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/src/aici/genaiscript.d.ts b/packages/sample/src/aici/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/src/aici/genaiscript.d.ts +++ b/packages/sample/src/aici/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/src/errors/genaiscript.d.ts b/packages/sample/src/errors/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/src/errors/genaiscript.d.ts +++ b/packages/sample/src/errors/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/src/genaiscript.d.ts b/packages/sample/src/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/src/genaiscript.d.ts +++ b/packages/sample/src/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/src/makecode/genaiscript.d.ts b/packages/sample/src/makecode/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/src/makecode/genaiscript.d.ts +++ b/packages/sample/src/makecode/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/src/tla/genaiscript.d.ts b/packages/sample/src/tla/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/src/tla/genaiscript.d.ts +++ b/packages/sample/src/tla/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/sample/src/vision/genaiscript.d.ts b/packages/sample/src/vision/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/sample/src/vision/genaiscript.d.ts +++ b/packages/sample/src/vision/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/packages/vscode/genaisrc/genaiscript.d.ts b/packages/vscode/genaisrc/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/packages/vscode/genaisrc/genaiscript.d.ts +++ b/packages/vscode/genaisrc/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/slides/genaisrc/genaiscript.d.ts b/slides/genaisrc/genaiscript.d.ts index 99866eae6e..04197a895e 100644 --- a/slides/genaisrc/genaiscript.d.ts +++ b/slides/genaisrc/genaiscript.d.ts @@ -1118,7 +1118,7 @@ interface Parsers { * @param content html string or file * @param options */ - HTMLToMarkdown(content: string | WorkspaceFile): string + HTMLToMarkdown(content: string | WorkspaceFile): Promise /** * Extracts the contents of a zip archive file @@ -1279,17 +1279,17 @@ interface HTML { convertTablesToJSON( html: string, options?: HTMLTableToJSONOptions - ): object[][] + ): Promise /** * Converts HTML markup to plain text * @param html */ - convertToText(html: string): string + convertToText(html: string): Promise /** * Converts HTML markup to markdown * @param html */ - convertToMarkdown(html: string): string + convertToMarkdown(html: string): Promise } interface GitHubOptions { diff --git a/slides/yarn.lock b/slides/yarn.lock index 9a9d9a4c1b..1ef12988ef 100644 --- a/slides/yarn.lock +++ b/slides/yarn.lock @@ -1524,47 +1524,47 @@ "@babel/parser" "^7.25.6" "@vue/compiler-sfc" "^3.5.3" -"@vue/compiler-core@3.5.9": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.9.tgz#d51fbfe6c18479b27fe6b1723344ba0832e4aacb" - integrity sha512-KE1sCdwqSKq0CQ/ltg3XnlMTKeinjegIkuFsuq9DKvNPmqLGdmI51ChZdGBBRXIvEYTLm8X/JxOuBQ1HqF/+PA== +"@vue/compiler-core@3.5.10": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.10.tgz#dc382e4173c5ad6d309887f5cb02983dfd88cfee" + integrity sha512-iXWlk+Cg/ag7gLvY0SfVucU8Kh2CjysYZjhhP70w9qI4MvSox4frrP+vDGvtQuzIcgD8+sxM6lZvCtdxGunTAA== dependencies: "@babel/parser" "^7.25.3" - "@vue/shared" "3.5.9" + "@vue/shared" "3.5.10" entities "^4.5.0" estree-walker "^2.0.2" source-map-js "^1.2.0" -"@vue/compiler-dom@3.5.9", "@vue/compiler-dom@^3.4.0": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.9.tgz#6fa2b7e536ae4c416fc2d60b7e9e33b3410eac7a" - integrity sha512-gEAURwPo902AsJF50vl59VaWR+Cx6cX9SoqLYHu1jq9hDbmQlXvpZyYNIIbxa2JTJ+FD/oBQweVUwuTQv79KTg== +"@vue/compiler-dom@3.5.10", "@vue/compiler-dom@^3.4.0": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.10.tgz#233c660289ce289a48e8fe759b07b95f607cd98e" + integrity sha512-DyxHC6qPcktwYGKOIy3XqnHRrrXyWR2u91AjP+nLkADko380srsC2DC3s7Y1Rk6YfOlxOlvEQKa9XXmLI+W4ZA== dependencies: - "@vue/compiler-core" "3.5.9" - "@vue/shared" "3.5.9" + "@vue/compiler-core" "3.5.10" + "@vue/shared" "3.5.10" -"@vue/compiler-sfc@3.5.9", "@vue/compiler-sfc@^3.5.3": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.9.tgz#020b7654f1fde7c606a49ec4e4d2838e8e1a43c5" - integrity sha512-kp9qawcTXakYm0TN6YAwH24IurSywoXh4fWhRbLu0at4UVyo994bhEzJlQn82eiyqtut4GjkQodSfn8drFbpZQ== +"@vue/compiler-sfc@3.5.10", "@vue/compiler-sfc@^3.5.3": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.10.tgz#95e262a5ed836521a5aeee9492cc265ad3f1c787" + integrity sha512-to8E1BgpakV7224ZCm8gz1ZRSyjNCAWEplwFMWKlzCdP9DkMKhRRwt0WkCjY7jkzi/Vz3xgbpeig5Pnbly4Tow== dependencies: "@babel/parser" "^7.25.3" - "@vue/compiler-core" "3.5.9" - "@vue/compiler-dom" "3.5.9" - "@vue/compiler-ssr" "3.5.9" - "@vue/shared" "3.5.9" + "@vue/compiler-core" "3.5.10" + "@vue/compiler-dom" "3.5.10" + "@vue/compiler-ssr" "3.5.10" + "@vue/shared" "3.5.10" estree-walker "^2.0.2" magic-string "^0.30.11" postcss "^8.4.47" source-map-js "^1.2.0" -"@vue/compiler-ssr@3.5.9": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.5.9.tgz#e30f8e866589392421abcbfc0e0241470f3ca9a6" - integrity sha512-fb1g2mQv32QzIei76rlXRTz08Grw+ZzBXSQfHo4StGFutm/flyebw3dGJkexKwcU3GjX9s5fIGjEv/cjO8j8Yw== +"@vue/compiler-ssr@3.5.10": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.5.10.tgz#195f83ae7c52174be37fd7a4a0217132c1c0ed11" + integrity sha512-hxP4Y3KImqdtyUKXDRSxKSRkSm1H9fCvhojEYrnaoWhE4w/y8vwWhnosJoPPe2AXm5sU7CSbYYAgkt2ZPhDz+A== dependencies: - "@vue/compiler-dom" "3.5.9" - "@vue/shared" "3.5.9" + "@vue/compiler-dom" "3.5.10" + "@vue/shared" "3.5.10" "@vue/compiler-vue2@^2.7.16": version "2.7.16" @@ -1593,43 +1593,43 @@ muggle-string "^0.4.1" path-browserify "^1.0.1" -"@vue/reactivity@3.5.9": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.5.9.tgz#8864a55e4c495666f3c679beb8f734489eeb042e" - integrity sha512-88ApgNZ6yPYpyYkTfXzcbWk6O8+LrPRIpa/U4AdeTzpfRUO+EUt5jemnTBVSlAUNmlYY96xa5feUNEq+BouLog== +"@vue/reactivity@3.5.10": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.5.10.tgz#81140ef0b05096973356d3c8fc32f48c79940b9c" + integrity sha512-kW08v06F6xPSHhid9DJ9YjOGmwNDOsJJQk0ax21wKaUYzzuJGEuoKNU2Ujux8FLMrP7CFJJKsHhXN9l2WOVi2g== dependencies: - "@vue/shared" "3.5.9" + "@vue/shared" "3.5.10" -"@vue/runtime-core@3.5.9": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.5.9.tgz#e47f890734039f77dac86328cc059cf8188c5729" - integrity sha512-YAeP0zNkjSl5mEc1NxOg9qoAhLNbREElHAhfYbMXT57oF0ixehEEJWBhg2uvVxslCGh23JhpEAyMvJrJHW9WGg== +"@vue/runtime-core@3.5.10": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.5.10.tgz#e902eb2640fa6ab4cc4589af263818a898812668" + integrity sha512-9Q86I5Qq3swSkFfzrZ+iqEy7Vla325M7S7xc1NwKnRm/qoi1Dauz0rT6mTMmscqx4qz0EDJ1wjB+A36k7rl8mA== dependencies: - "@vue/reactivity" "3.5.9" - "@vue/shared" "3.5.9" + "@vue/reactivity" "3.5.10" + "@vue/shared" "3.5.10" -"@vue/runtime-dom@3.5.9": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.5.9.tgz#088746207f74963d09b31ce7b79add0bf96aa337" - integrity sha512-5Oq/5oenpB9lw94moKvOHqBDEaMSyDmcu2HS8AtAT6/pwdo/t9fR9aVtLh6FzYGGqZR9yRfoHAN6P7goblq1aA== +"@vue/runtime-dom@3.5.10": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.5.10.tgz#dca26d7761147373c6929f1370cf2733aa19f3de" + integrity sha512-t3x7ht5qF8ZRi1H4fZqFzyY2j+GTMTDxRheT+i8M9Ph0oepUxoadmbwlFwMoW7RYCpNQLpP2Yx3feKs+fyBdpA== dependencies: - "@vue/reactivity" "3.5.9" - "@vue/runtime-core" "3.5.9" - "@vue/shared" "3.5.9" + "@vue/reactivity" "3.5.10" + "@vue/runtime-core" "3.5.10" + "@vue/shared" "3.5.10" csstype "^3.1.3" -"@vue/server-renderer@3.5.9": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.5.9.tgz#3bf0736001623960d120ef01dee5045fad6efadb" - integrity sha512-tbuUsZfMWGazR9LXLNiiDSTwkO8K9sLyR70diY+FbQmKmh7236PPz4jkTxymelV8D89IJUGtbfe4VdmpHkmuxg== +"@vue/server-renderer@3.5.10": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.5.10.tgz#90462492c30c8cae499b9149d1b90af2ebfe7599" + integrity sha512-IVE97tt2kGKwHNq9yVO0xdh1IvYfZCShvDSy46JIh5OQxP1/EXSpoDqetVmyIzL7CYOWnnmMkVqd7YK2QSWkdw== dependencies: - "@vue/compiler-ssr" "3.5.9" - "@vue/shared" "3.5.9" + "@vue/compiler-ssr" "3.5.10" + "@vue/shared" "3.5.10" -"@vue/shared@3.5.9", "@vue/shared@^3.4.0": - version "3.5.9" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.9.tgz#713257216ea2cbf4e200cb9ae395c34ae2349385" - integrity sha512-8wiT/m0mnsLhTME0mPgc57jv+4TipRBSAAmheUdYgiOaO6AobZPNOmm87ub4np65VVDgLcWxc+Edc++5Wyz1uA== +"@vue/shared@3.5.10", "@vue/shared@^3.4.0": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.10.tgz#066f7dde31e09d700123e92e63eaa126cda21a17" + integrity sha512-VkkBhU97Ki+XJ0xvl4C9YJsIZ2uIlQ7HqPpZOS3m9VCvmROPaChZU6DexdMJqvz9tbgG+4EtFVrSuailUq5KGQ== "@vueuse/core@^10.10.0": version "10.11.1" @@ -5055,15 +5055,15 @@ vue-router@^4.4.3: "@vue/devtools-api" "^6.6.4" vue@^3.4.38, vue@^3.5.9: - version "3.5.9" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.5.9.tgz#a065952d7a7c0e2cbfec8e016582b055ab984357" - integrity sha512-nHzQhZ5cjFKynAY2beAm7XtJ5C13VKAFTLTgRYXy+Id1KEKBeiK6hO2RcW1hUjdbHMadz1YzxyHgQigOC54wug== - dependencies: - "@vue/compiler-dom" "3.5.9" - "@vue/compiler-sfc" "3.5.9" - "@vue/runtime-dom" "3.5.9" - "@vue/server-renderer" "3.5.9" - "@vue/shared" "3.5.9" + version "3.5.10" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.5.10.tgz#14be9d4655e07be8d5e8295d017815ed14337f96" + integrity sha512-Vy2kmJwHPlouC/tSnIgXVg03SG+9wSqT1xu1Vehc+ChsXsRd7jLkKgMltVEFOzUdBr3uFwBCG+41LJtfAcBRng== + dependencies: + "@vue/compiler-dom" "3.5.10" + "@vue/compiler-sfc" "3.5.10" + "@vue/runtime-dom" "3.5.10" + "@vue/server-renderer" "3.5.10" + "@vue/shared" "3.5.10" webpack-virtual-modules@^0.6.2: version "0.6.2" diff --git a/yarn.lock b/yarn.lock index 4eccd16ea7..e9d5779784 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2763,9 +2763,9 @@ escape-string-regexp@^4.0.0: integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-scope@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" - integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== + version "8.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.1.0.tgz#70214a174d4cbffbc3e8a26911d8bf51b9ae9d30" + integrity sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -2775,10 +2775,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-visitor-keys@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" - integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== +eslint-visitor-keys@^4.0.0, eslint-visitor-keys@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz#1f785cc5e81eb7534523d85922248232077d2f8c" + integrity sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg== eslint@^9.11.1: version "9.11.1" @@ -2834,13 +2834,13 @@ esniff@^2.0.1: type "^2.7.2" espree@^10.0.1, espree@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" - integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== + version "10.2.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.2.0.tgz#f4bcead9e05b0615c968e85f83816bc386a45df6" + integrity sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g== dependencies: acorn "^8.12.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^4.0.0" + eslint-visitor-keys "^4.1.0" esprima@^4.0.0: version "4.0.1"