diff --git a/.env b/.env index 316d368..43b6982 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -LIBZIM_VERSION=9.3.0 +LIBZIM_VERSION=9.4.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c16eca..8332b98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-22.04-arm, ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14, macos-15] + os: [ubuntu-22.04, ubuntu-22.04-arm, ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-15, macos-15-intel] node: [20, 22, 24] runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 46e687a..c623702 100644 --- a/README.md +++ b/README.md @@ -96,8 +96,44 @@ import { Archive, SuggestionSearcher, Searcher } from "@openzim/libzim"; delete archive; })(); +## Local Development + +### Important Files +`.env` - Set environment variables for local development. Only LIBZIM_VERSION for now +`bindings.gyp` - Node-gyp build configuration file +`src/` - Source code for the Node.js bindings +`test/` - Test cases + +### Setup + +```bash +git clone git@github.com:openzim/node-libzim.git +cd node-libzim + +# Will install dependencies, download libzim binary and build the bindings +npm run install + +# Required in order for local binding and tests to work. +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/download/lib/x86_64-linux-gnu +``` + +### Iterating during development + +Make your changes in `src/` and then run: +```bash +node-gyp rebuild --debug -v && npx jest ./test/zim.test.ts ``` +### Updating libzim version +To update the libzim version used, change the `LIBZIM_VERSION` variable in +`.env` file to the desired version and run: +```bash +npm run install +``` + +If you are upgrading libzim from a major version you will need to edit the `bundle-libzim.js` file +and change the `libzim.so*` file names to match the new version. + ## License [GPLv3](https://www.gnu.org/licenses/gpl-3.0) or later, see diff --git a/binding.gyp b/binding.gyp index 0137f84..92472d2 100644 --- a/binding.gyp +++ b/binding.gyp @@ -34,8 +34,8 @@ ], "libraries": [ "-Wl,-rpath,'$$ORIGIN'", - "-L<(libzim_dir)/lib/aarch64-linux-gnu", - "<(libzim_dir)/lib/aarch64-linux-gnu/libzim.so.9", + "-L<(libzim_dir)/lib/aarch64-rpi3-linux-gnu", + "<(libzim_dir)/lib/aarch64-rpi3-linux-gnu/libzim.so.9", ], }], ["libzim_local!='true' and OS=='linux' and target_arch=='arm'", { diff --git a/bundle-libzim.js b/bundle-libzim.js index f1bdce3..dd747c8 100644 --- a/bundle-libzim.js +++ b/bundle-libzim.js @@ -19,7 +19,7 @@ if (isLinux) { const rawArch = os.arch(); let libDir; if (rawArch === "arm64") { - libDir = "aarch64-linux-gnu"; + libDir = "aarch64-rpi3-linux-gnu"; } else if (rawArch === "arm") { libDir = "arm-linux-gnueabihf"; } else { diff --git a/download-libzim.js b/download-libzim.js index 4e222b4..0098200 100644 --- a/download-libzim.js +++ b/download-libzim.js @@ -5,7 +5,6 @@ import { mkdirp } from "mkdirp"; import exec from "exec-then"; import os from "os"; import fs from "fs"; -import urlParser from "url"; mkdirp.sync("./download"); @@ -46,7 +45,7 @@ const urls = [ for (let url of urls) { console.info(`Downloading Libzim from: `, url); - const filename = urlParser.parse(url).pathname.split("/").slice(-1)[0]; + const filename = new URL(url).pathname.split("/").slice(-1)[0]; const dlFile = `./download/${filename}`; try { diff --git a/package-lock.json b/package-lock.json index ba67b6d..0af4ad4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,40 +1,40 @@ { "name": "@openzim/libzim", - "version": "3.5.1-dev0", + "version": "4.0.0-dev0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@openzim/libzim", - "version": "3.5.1-dev0", + "version": "4.0.0-dev0", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { - "@types/bindings": "^1.5.1", - "@types/jest": "^29.5.12", - "@types/node": "^18.0.6", - "axios": "^1.6.0", + "@types/bindings": "^1.5.5", + "@types/jest": "^30.0.0", + "@types/node": "^24.9.2", + "axios": "^1.13.1", "bindings": "^1.5.0", - "dotenv": "^16.0.1", + "dotenv": "^17.2.3", "exec-then": "^1.3.1", "mkdirp": "^3.0.1", - "node-addon-api": "^8.0.0", - "node-gyp": "^10.1.0", + "node-addon-api": "^8.5.0", + "node-gyp": "^11.5.0", "tqdm": "^2.0.3", - "ts-node": "^10.9.1", - "tsconfig-paths": "^4.0.0" + "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0" }, "devDependencies": { - "@faker-js/faker": "^8.4.1", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", + "@faker-js/faker": "^10.1.0", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", "eslint": "^8.57.0", - "eslint-config-prettier": "^8.10.0", - "eslint-plugin-prettier": "^5.1.3", - "nyc": "^17.0.0", - "prettier": "^3.3.2", - "ts-jest": "^29.1.5", - "typescript": "^5.1.6" + "eslint-config-prettier": "^8.10.2", + "eslint-plugin-prettier": "^5.5.4", + "nyc": "^17.1.0", + "prettier": "^3.6.2", + "ts-jest": "^29.4.5", + "typescript": "^5.9.3" }, "engines": { "node": ">=20 <25" @@ -54,12 +54,14 @@ } }, "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==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" @@ -79,6 +81,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", "dev": true, + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", @@ -233,7 +236,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", "dev": true, - "peer": true, "engines": { "node": ">=6.9.0" } @@ -264,18 +266,20 @@ } }, "node_modules/@babel/helper-string-parser": { - "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==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -290,101 +294,28 @@ } }, "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==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "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==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" }, "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==", - "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==", - "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==", - "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==" - }, - "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==", - "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==", - "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==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "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==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.5" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -397,7 +328,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -410,7 +340,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -423,7 +352,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -436,7 +364,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -449,7 +376,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -462,7 +388,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -478,7 +403,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -491,7 +415,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -504,7 +427,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -517,7 +439,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -530,7 +451,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -543,7 +463,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -556,7 +475,6 @@ "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, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -572,7 +490,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", "dev": true, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -584,14 +501,15 @@ } }, "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==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -628,14 +546,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -645,8 +563,7 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -725,9 +642,9 @@ } }, "node_modules/@faker-js/faker": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.1.tgz", - "integrity": "sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-10.1.0.tgz", + "integrity": "sha512-C3mrr3b5dRVlKPJdfrAXS8+dq+rq8Qm5SNRazca0JKgw1HQERFmrVb0towvMmw5uu8hHKNiQasMaR/tydf3Zsg==", "dev": true, "funding": [ { @@ -735,9 +652,10 @@ "url": "https://opencollective.com/fakerjs" } ], + "license": "MIT", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0", - "npm": ">=6.14.13" + "node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0", + "npm": ">=10" } }, "node_modules/@humanwhocodes/config-array": { @@ -793,9 +711,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { "node": ">=12" @@ -805,9 +723,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", "engines": { "node": ">=12" @@ -840,9 +758,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -871,6 +789,18 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, "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", @@ -990,7 +920,6 @@ "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -1008,7 +937,6 @@ "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, - "peer": true, "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", @@ -1056,7 +984,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -1082,15 +1009,13 @@ "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, - "peer": true + "dev": true }, "node_modules/@jest/core/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, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -1116,7 +1041,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -1126,7 +1050,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -1142,7 +1065,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -1153,12 +1075,20 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/@jest/diff-sequences": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", + "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "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, - "peer": true, "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", @@ -1174,7 +1104,6 @@ "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, - "peer": true, "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" @@ -1187,6 +1116,7 @@ "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" }, @@ -1199,7 +1129,6 @@ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", @@ -1212,12 +1141,20 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/get-type": { + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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, - "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -1228,12 +1165,24 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/pattern": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", + "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-regex-util": "30.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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, - "peer": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", @@ -1277,7 +1226,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -1303,15 +1251,13 @@ "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, - "peer": true + "dev": true }, "node_modules/@jest/reporters/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, - "peer": true, "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", @@ -1328,7 +1274,6 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -1354,7 +1299,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -1364,7 +1308,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -1380,7 +1323,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -1395,6 +1337,7 @@ "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" }, @@ -1407,7 +1350,6 @@ "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", @@ -1422,7 +1364,6 @@ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, - "peer": true, "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", @@ -1438,7 +1379,6 @@ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, - "peer": true, "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", @@ -1454,7 +1394,6 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -1480,7 +1419,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -1490,7 +1428,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -1506,7 +1443,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -1521,6 +1457,7 @@ "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", @@ -1615,9 +1552,9 @@ } }, "node_modules/@npmcli/agent": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", - "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz", + "integrity": "sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==", "license": "ISC", "dependencies": { "agent-base": "^7.1.0", @@ -1627,28 +1564,25 @@ "socks-proxy-agent": "^8.0.3" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/@npmcli/agent/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" }, "node_modules/@npmcli/fs": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", - "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-4.0.0.tgz", + "integrity": "sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==", "license": "ISC", "dependencies": { "semver": "^7.3.5" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/@pkgjs/parseargs": { @@ -1662,28 +1596,29 @@ } }, "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/pkgr" } }, "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==" + "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, - "peer": true, "dependencies": { "type-detect": "4.0.8" } @@ -1693,7 +1628,6 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, - "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.0" } @@ -1723,7 +1657,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, - "peer": true, "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -1737,7 +1670,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, - "peer": true, "dependencies": { "@babel/types": "^7.0.0" } @@ -1747,7 +1679,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, - "peer": true, "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" @@ -1758,7 +1689,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, - "peer": true, "dependencies": { "@babel/types": "^7.20.7" } @@ -1776,7 +1706,6 @@ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*" } @@ -1803,12 +1732,212 @@ } }, "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==", + "version": "30.0.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-30.0.0.tgz", + "integrity": "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==", + "license": "MIT", + "dependencies": { + "expect": "^30.0.0", + "pretty-format": "^30.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/expect-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.2.0.tgz", + "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/schemas": { + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/types": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", + "license": "MIT", + "dependencies": { + "@jest/pattern": "30.0.1", + "@jest/schemas": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/@sinclair/typebox": { + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", + "license": "MIT" + }, + "node_modules/@types/jest/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==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@types/jest/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/jest/node_modules/expect": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.2.0.tgz", + "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "30.2.0", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-diff": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz", + "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", + "license": "MIT", + "dependencies": { + "@jest/diff-sequences": "30.0.1", + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "pretty-format": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-matcher-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", + "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", + "license": "MIT", "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "jest-diff": "30.2.0", + "pretty-format": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-message-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.2.0", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "micromatch": "^4.0.8", + "pretty-format": "30.2.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-mock": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@types/jest/node_modules/pretty-format": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "license": "MIT", + "dependencies": { + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@types/json-schema": { @@ -1818,11 +1947,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.39", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.39.tgz", - "integrity": "sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==", + "version": "24.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.2.tgz", + "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==", + "license": "MIT", + "peer": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.16.0" } }, "node_modules/@types/semver": { @@ -1837,9 +1968,10 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" }, "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==", + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", + "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -1888,6 +2020,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -2044,18 +2177,19 @@ "dev": true }, "node_modules/abbrev": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", - "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/acorn": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2084,13 +2218,10 @@ } }, "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, "engines": { "node": ">= 14" } @@ -2099,6 +2230,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -2128,7 +2260,6 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "peer": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -2144,7 +2275,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -2179,7 +2309,6 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "peer": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2232,9 +2361,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.0.tgz", - "integrity": "sha512-oXTDccv8PcfjZmPGlWsPSwtOJCZ/b6W5jAMCNcfwJbCzDckwG0jrYJFaWH1yvivfCXjVzV/SPDEhMB3Q+DSurg==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.1.tgz", + "integrity": "sha512-hU4EGxxt+j7TQijx1oYdAjw4xuIp1wRQSsbMFwSthCWeBQur1eF+qJ5iQ5sN3Tw8YRzQNKb8jszgBdMDVqwJcw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -2247,7 +2376,6 @@ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, - "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -2264,7 +2392,6 @@ "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, - "peer": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -2337,6 +2464,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001629", "electron-to-chromium": "^1.4.796", @@ -2367,7 +2495,6 @@ "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "peer": true, "dependencies": { "node-int64": "^0.4.0" } @@ -2376,16 +2503,15 @@ "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, - "peer": true + "dev": true }, "node_modules/cacache": { - "version": "18.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz", - "integrity": "sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz", + "integrity": "sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==", "license": "ISC", "dependencies": { - "@npmcli/fs": "^3.1.0", + "@npmcli/fs": "^4.0.0", "fs-minipass": "^3.0.0", "glob": "^10.2.2", "lru-cache": "^10.0.1", @@ -2393,13 +2519,13 @@ "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/cacache/node_modules/brace-expansion": { @@ -2412,12 +2538,12 @@ } }, "node_modules/cacache/node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -2428,9 +2554,9 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", - "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -2443,26 +2569,20 @@ "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/cacache/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" }, "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -2608,24 +2728,24 @@ "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "peer": true, "engines": { "node": ">=10" } }, "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "license": "ISC", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", "engines": { - "node": ">=10" + "node": ">=18" } }, "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", @@ -2640,13 +2760,13 @@ "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, - "peer": true + "dev": true }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, "engines": { "node": ">=6" } @@ -2656,7 +2776,6 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "peer": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2671,7 +2790,6 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "peer": true, "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -2681,8 +2799,7 @@ "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, - "peer": true + "dev": true }, "node_modules/color-convert": { "version": "2.0.1", @@ -2734,7 +2851,6 @@ "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -2799,7 +2915,6 @@ "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true, - "peer": true, "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, @@ -2820,7 +2935,6 @@ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -2853,7 +2967,6 @@ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -2870,6 +2983,7 @@ "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" } @@ -2899,9 +3013,10 @@ } }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -2940,7 +3055,6 @@ "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "peer": true, "engines": { "node": ">=12" }, @@ -2982,7 +3096,6 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "peer": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -3064,6 +3177,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -3115,10 +3229,12 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.2.tgz", + "integrity": "sha512-/IGJ6+Dka158JnP5n5YFMOszjDWrXggGz1LaK/guZq9vZTmniaKlHcsscvkAhn9y4U+BU3JuUdYvtAMcv30y4A==", "dev": true, + "license": "MIT", + "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -3127,13 +3243,14 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", "dev": true, + "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" + "synckit": "^0.11.7" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -3144,7 +3261,7 @@ "peerDependencies": { "@types/eslint": ">=8.0.0", "eslint": ">=8.0.0", - "eslint-config-prettier": "*", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", "prettier": ">=3.0.0" }, "peerDependenciesMeta": { @@ -3309,7 +3426,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "peer": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -3333,7 +3449,6 @@ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, - "peer": true, "engines": { "node": ">= 0.8.0" } @@ -3342,6 +3457,7 @@ "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", @@ -3424,7 +3540,6 @@ "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, - "peer": true, "dependencies": { "bser": "2.1.1" } @@ -3626,11 +3741,11 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], - "peer": true, "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } @@ -3712,7 +3827,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -3811,6 +3925,28 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3889,9 +4025,9 @@ "dev": true }, "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", "license": "BSD-2-Clause" }, "node_modules/http-proxy-agent": { @@ -3908,12 +4044,12 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -3925,7 +4061,6 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "peer": true, "engines": { "node": ">=10.17.0" } @@ -3973,7 +4108,6 @@ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, - "peer": true, "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -4000,6 +4134,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, "engines": { "node": ">=8" } @@ -4022,14 +4157,10 @@ "dev": true }, "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", "license": "MIT", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, "engines": { "node": ">= 12" } @@ -4038,15 +4169,13 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/is-core-module": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", "dev": true, - "peer": true, "dependencies": { "hasown": "^2.0.2" }, @@ -4079,7 +4208,6 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -4096,12 +4224,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "license": "MIT" - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4177,7 +4299,6 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -4194,7 +4315,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "peer": true, "bin": { "semver": "bin/semver.js" } @@ -4270,16 +4390,13 @@ } }, "node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -4319,7 +4436,6 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, - "peer": true, "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", @@ -4334,7 +4450,6 @@ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -4366,7 +4481,6 @@ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, - "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -4400,7 +4514,6 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", @@ -4446,7 +4559,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -4473,7 +4585,6 @@ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, - "peer": true, "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -4495,7 +4606,6 @@ "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, - "peer": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -4511,7 +4621,6 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, - "peer": true, "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" @@ -4527,15 +4636,13 @@ "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, - "peer": true + "dev": true }, "node_modules/jest-config/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, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -4561,7 +4668,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -4571,7 +4677,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -4587,7 +4692,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -4602,6 +4706,7 @@ "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", @@ -4617,7 +4722,6 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, - "peer": true, "dependencies": { "detect-newline": "^3.0.0" }, @@ -4630,7 +4734,6 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -4647,7 +4750,6 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -4664,6 +4766,7 @@ "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" } @@ -4673,7 +4776,6 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, - "peer": true, "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" @@ -4686,6 +4788,7 @@ "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", @@ -4700,6 +4803,7 @@ "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", @@ -4720,7 +4824,6 @@ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -4735,7 +4838,6 @@ "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "peer": true, "engines": { "node": ">=6" }, @@ -4748,12 +4850,20 @@ } } }, + "node_modules/jest-regex-util": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", + "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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, - "peer": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", @@ -4774,7 +4884,6 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, - "peer": true, "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" @@ -4788,7 +4897,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -4798,7 +4906,6 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -4824,7 +4931,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -4834,7 +4940,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -4850,7 +4955,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -4866,7 +4970,6 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, - "peer": true, "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", @@ -4899,7 +5002,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -4925,15 +5027,13 @@ "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, - "peer": true + "dev": true }, "node_modules/jest-runner/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, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -4959,7 +5059,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -4969,7 +5068,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -4985,7 +5083,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5001,7 +5098,6 @@ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -5035,7 +5131,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -5061,15 +5156,13 @@ "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, - "peer": true + "dev": true }, "node_modules/jest-runtime/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, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -5095,7 +5188,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -5105,7 +5197,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -5121,7 +5212,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5137,7 +5227,6 @@ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", @@ -5169,7 +5258,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -5195,15 +5283,13 @@ "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, - "peer": true + "dev": true }, "node_modules/jest-snapshot/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, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -5229,7 +5315,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -5239,7 +5324,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -5255,7 +5339,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5270,6 +5353,7 @@ "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": "*", @@ -5287,7 +5371,6 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", @@ -5305,7 +5388,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -5318,7 +5400,6 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "peer": true, "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -5336,7 +5417,8 @@ "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==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -5350,12 +5432,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "license": "MIT" - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5378,8 +5454,7 @@ "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, - "peer": true + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -5418,7 +5493,6 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -5428,7 +5502,6 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -5450,8 +5523,7 @@ "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, - "peer": true + "dev": true }, "node_modules/locate-path": { "version": "6.0.0", @@ -5516,35 +5588,25 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" }, "node_modules/make-fetch-happen": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", - "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz", + "integrity": "sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==", "license": "ISC", "dependencies": { - "@npmcli/agent": "^2.0.0", - "cacache": "^18.0.0", + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", "http-cache-semantics": "^4.1.1", - "is-lambda": "^1.0.1", "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", + "minipass-fetch": "^4.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "proc-log": "^4.2.0", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", "promise-retry": "^2.0.1", - "ssri": "^10.0.0" + "ssri": "^12.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/proc-log": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", - "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/makeerror": { @@ -5552,7 +5614,6 @@ "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "peer": true, "dependencies": { "tmpl": "1.0.5" } @@ -5570,8 +5631,7 @@ "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, - "peer": true + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -5618,7 +5678,6 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -5665,17 +5724,17 @@ } }, "node_modules/minipass-fetch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", - "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-4.0.1.tgz", + "integrity": "sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==", "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "minizlib": "^3.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" }, "optionalDependencies": { "encoding": "^0.1.13" @@ -5772,36 +5831,17 @@ "license": "ISC" }, "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", "license": "MIT", "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "minipass": "^7.1.2" }, "engines": { - "node": ">= 8" + "node": ">= 18" } }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -5834,92 +5874,52 @@ "dev": true }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/node-addon-api": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.0.0.tgz", - "integrity": "sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==", - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, - "node_modules/node-gyp": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz", - "integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==", - "license": "MIT", - "dependencies": { - "env-paths": "^2.2.0", - "exponential-backoff": "^3.1.1", - "glob": "^10.3.10", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^13.0.0", - "nopt": "^7.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^4.0.0" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" }, - "node_modules/node-gyp/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "node_modules/node-addon-api": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.5.0.tgz", + "integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==", "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/node-gyp/node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^18 || ^20 || >= 21" } }, - "node_modules/node-gyp/node_modules/glob": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", - "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", - "license": "ISC", + "node_modules/node-gyp": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-11.5.0.tgz", + "integrity": "sha512-ra7Kvlhxn5V9Slyus0ygMa2h+UqExPqUIkfk7Pc8QTLT956JLSy51uWFwHtIYy0vI8cB4BDhc/S03+880My/LQ==", + "license": "MIT", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^14.0.3", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "tar": "^7.4.3", + "tinyglobby": "^0.2.12", + "which": "^5.0.0" }, "bin": { - "glob": "dist/esm/bin.mjs" + "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/node-gyp/node_modules/isexe": { @@ -5931,37 +5931,10 @@ "node": ">=16" } }, - "node_modules/node-gyp/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/node-gyp/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/node-gyp/node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", "license": "ISC", "dependencies": { "isexe": "^3.1.1" @@ -5970,15 +5943,14 @@ "node-which": "bin/which.js" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.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, - "peer": true + "dev": true }, "node_modules/node-preload": { "version": "0.2.1", @@ -5999,18 +5971,18 @@ "dev": true }, "node_modules/nopt": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", - "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", "license": "ISC", "dependencies": { - "abbrev": "^2.0.0" + "abbrev": "^3.0.0" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/normalize-path": { @@ -6018,7 +5990,6 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -6028,7 +5999,6 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "peer": true, "dependencies": { "path-key": "^3.0.0" }, @@ -6037,10 +6007,11 @@ } }, "node_modules/nyc": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-17.0.0.tgz", - "integrity": "sha512-ISp44nqNCaPugLLGGfknzQwSwt10SSS5IMoPR7GLoMAyS18Iw5js8U7ga2VF9lYuMZ42gOHr3UddZw4WZltxKg==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-17.1.0.tgz", + "integrity": "sha512-U42vQ4czpKa0QdI1hu950XuNhYqgoM+ZF1HT+VuUHL9hPfDPVvNQyltmMqdE9bUHMVa+8yNbc3QKTj8zQhlVxQ==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", @@ -6049,7 +6020,7 @@ "decamelize": "^1.2.0", "find-cache-dir": "^3.2.0", "find-up": "^4.1.0", - "foreground-child": "^2.0.0", + "foreground-child": "^3.3.0", "get-package-type": "^0.1.0", "glob": "^7.1.6", "istanbul-lib-coverage": "^3.0.0", @@ -6101,6 +6072,36 @@ "node": ">=8" } }, + "node_modules/nyc/node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/nyc/node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/nyc/node_modules/istanbul-lib-instrument": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", @@ -6282,7 +6283,6 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "peer": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -6341,15 +6341,12 @@ } }, "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", + "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6380,9 +6377,9 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "license": "BlueOak-1.0.0" }, "node_modules/parent-module": { @@ -6402,7 +6399,6 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -6446,8 +6442,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/path-scurry": { "version": "1.11.1", @@ -6466,13 +6461,10 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" }, "node_modules/path-type": { "version": "4.0.0", @@ -6484,9 +6476,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -6504,7 +6497,6 @@ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "peer": true, "engines": { "node": ">= 6" } @@ -6583,10 +6575,12 @@ } }, "node_modules/prettier": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", - "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, + "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -6613,6 +6607,7 @@ "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", @@ -6626,6 +6621,7 @@ "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" }, @@ -6634,12 +6630,12 @@ } }, "node_modules/proc-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", - "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", + "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/process-on-spawn": { @@ -6672,7 +6668,6 @@ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "peer": true, "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -6709,8 +6704,7 @@ "type": "opencollective", "url": "https://opencollective.com/fast-check" } - ], - "peer": true + ] }, "node_modules/q": { "version": "1.5.1", @@ -6779,7 +6773,6 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, - "peer": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -6797,7 +6790,6 @@ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "peer": true, "dependencies": { "resolve-from": "^5.0.0" }, @@ -6810,7 +6802,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -6829,7 +6820,6 @@ "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "peer": true, "engines": { "node": ">=10" } @@ -6900,9 +6890,10 @@ "optional": true }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -6945,8 +6936,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/slash": { "version": "3.0.0", @@ -6967,12 +6957,12 @@ } }, "node_modules/socks": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", "license": "MIT", "dependencies": { - "ip-address": "^9.0.5", + "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -6981,14 +6971,14 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", "license": "MIT", "dependencies": { - "agent-base": "^7.1.1", + "agent-base": "^7.1.2", "debug": "^4.3.4", - "socks": "^2.7.1" + "socks": "^2.8.3" }, "engines": { "node": ">= 14" @@ -7008,7 +6998,6 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "peer": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -7055,22 +7044,16 @@ "semver": "bin/semver.js" } }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "license": "BSD-3-Clause" - }, "node_modules/ssri": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", - "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-12.0.0.tgz", + "integrity": "sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==", "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/stack-utils": { @@ -7097,7 +7080,6 @@ "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "peer": true, "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -7172,7 +7154,6 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -7205,7 +7186,6 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -7214,94 +7194,46 @@ } }, "node_modules/synckit": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", - "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", "dev": true, + "license": "MIT", "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" + "@pkgr/core": "^0.2.9" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/synckit" } }, - "node_modules/synckit/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true - }, "node_modules/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "license": "BlueOak-1.0.0", "dependencies": { - "yallist": "^4.0.0" + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/tar/node_modules/minipass": { + "node_modules/tar/node_modules/yallist": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/tar/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -7322,21 +7254,57 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "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, - "peer": 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", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } + "dev": true }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -7352,22 +7320,25 @@ "node_modules/tqdm": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tqdm/-/tqdm-2.0.3.tgz", - "integrity": "sha512-Ju50G550gspkjd1AiJ/jFBHe2dii9s+KPntEsq0o73BqywqzNWPUM8/FD3zM1rOH7OGLoH7pGSGI90Ct+Yd/5Q==" + "integrity": "sha512-Ju50G550gspkjd1AiJ/jFBHe2dii9s+KPntEsq0o73BqywqzNWPUM8/FD3zM1rOH7OGLoH7pGSGI90Ct+Yd/5Q==", + "license": "ISC" }, "node_modules/ts-jest": { - "version": "29.1.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz", - "integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==", + "version": "29.4.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.5.tgz", + "integrity": "sha512-HO3GyiWn2qvTQA4kTgjDcXiMwYQt68a1Y8+JuLRVpdIzm+UOLSHgl/XqR4c6nzJkq5rOkjc02O2I7P7l/Yof0Q==", "dev": true, + "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.3", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" @@ -7377,10 +7348,11 @@ }, "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", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", "typescript": ">=4.3 <6" }, "peerDependenciesMeta": { @@ -7398,13 +7370,30 @@ }, "esbuild": { "optional": true + }, + "jest-util": { + "optional": true } } }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -7502,7 +7491,6 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "peer": true, "engines": { "node": ">=4" } @@ -7529,9 +7517,11 @@ } }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7540,33 +7530,48 @@ "node": ">=14.17" } }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "license": "MIT" }, "node_modules/unique-filename": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", - "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", + "integrity": "sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==", "license": "ISC", "dependencies": { - "unique-slug": "^4.0.0" + "unique-slug": "^5.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/unique-slug": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", - "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-5.0.0.tgz", + "integrity": "sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==", "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/update-browserslist-db": { @@ -7627,7 +7632,6 @@ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -7641,15 +7645,13 @@ "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, - "peer": true + "dev": true }, "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, - "peer": true, "dependencies": { "makeerror": "1.0.12" } @@ -7683,12 +7685,18 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "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, - "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7730,7 +7738,6 @@ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, - "peer": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" @@ -7744,7 +7751,6 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "peer": true, "engines": { "node": ">=10" } @@ -7760,7 +7766,6 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "peer": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", diff --git a/package.json b/package.json index a67b069..c4f1e06 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@openzim/libzim", "main": "dist/index.js", "types": "dist/index.d.js", - "version": "3.5.1-dev0", + "version": "4.0.0-dev0", "description": "Libzim bindings for NodeJS", "type": "module", "scripts": { @@ -14,8 +14,8 @@ "build": "node-gyp rebuild -v && npm run bundle", "download": "node ./download-libzim.js", "bundle": "node ./bundle-libzim.js", - "test": "jest --testPathIgnorePatterns=test/dist.test.ts", - "test-mem-leak": "node -r ts-node/register test/makeLargeZim.ts", + "test": "jest --testPathIgnorePatterns=test/dist.test.ts --testPathIgnorePatterns=dist/", + "test-mem-leak": "npx tsx test/makeLargeZim.ts", "test:dist": "npm run build && jest", "lint": "npx eslint .", "lint:fix": "npx eslint . --fix" @@ -44,33 +44,33 @@ "homepage": "https://github.com/openzim/node-libzim#readme", "gypfile": true, "dependencies": { - "@types/bindings": "^1.5.1", - "@types/jest": "^29.5.12", - "@types/node": "^18.0.6", - "axios": "^1.6.0", + "@types/bindings": "^1.5.5", + "@types/jest": "^30.0.0", + "@types/node": "^24.9.2", + "axios": "^1.13.1", "bindings": "^1.5.0", - "dotenv": "^16.0.1", + "dotenv": "^17.2.3", "exec-then": "^1.3.1", "mkdirp": "^3.0.1", - "node-addon-api": "^8.0.0", - "node-gyp": "^10.1.0", + "node-addon-api": "^8.5.0", + "node-gyp": "^11.5.0", "tqdm": "^2.0.3", - "ts-node": "^10.9.1", - "tsconfig-paths": "^4.0.0" + "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0" }, "devDependencies": { - "@faker-js/faker": "^8.4.1", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", + "@faker-js/faker": "^10.1.0", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", "eslint": "^8.57.0", - "eslint-config-prettier": "^8.10.0", - "eslint-plugin-prettier": "^5.1.3", - "nyc": "^17.0.0", - "prettier": "^3.3.2", - "ts-jest": "^29.1.5", - "typescript": "^5.1.6" + "eslint-config-prettier": "^8.10.2", + "eslint-plugin-prettier": "^5.5.4", + "nyc": "^17.1.0", + "prettier": "^3.6.2", + "ts-jest": "^29.4.5", + "typescript": "^5.9.3" }, "jest": { "preset": "ts-jest/presets/js-with-ts" } -} \ No newline at end of file +} diff --git a/src/archive.h b/src/archive.h index d59bfd4..0bd92ff 100644 --- a/src/archive.h +++ b/src/archive.h @@ -3,27 +3,52 @@ #include #include #include +#include +#include #include -#include #include #include "entry.h" +#include "illustration.h" #include "item.h" +#include "openconfig.h" class Archive : public Napi::ObjectWrap { public: explicit Archive(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), archive_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); if (info.Length() < 1) { - throw Napi::Error::New(info.Env(), "Archive requires arguments filepath"); + throw Napi::Error::New(env, "Archive requires arguments filepath"); + } + + if (!info[0].IsString()) { + throw Napi::TypeError::New(env, + "First argument must be a string filepath."); + } + + // Archive(filename: string) + // Archive(filepath: string, config: OpenConfig) + std::string filepath = info[0].As(); + zim::OpenConfig config{}; + if (info[1].IsObject()) { + // @note: no bounds checking on info because it returns Undefined when out + // of bounds + auto obj = info[1].As(); + // Check that the object is an instance of OpenConfig + // TODO(kelvinhammond): Update use of Unwrap everywhere to use + // InstanceOf and GetConstructor pattern + if (OpenConfig::InstanceOf(env, obj)) { + config = OpenConfig::Unwrap(obj)->getInternalConfig(); + } else { + throw Napi::TypeError::New( + env, "Second argument must be an instance of OpenConfig."); + } } try { - std::string filepath = info[0].ToString(); - archive_ = std::make_shared(filepath); + archive_ = std::make_shared(filepath, config); } catch (const std::exception &e) { throw Napi::Error::New(env, e.what()); } @@ -79,13 +104,8 @@ class Archive : public Napi::ObjectWrap { Napi::Value getUuid(const Napi::CallbackInfo &info) { try { - // TODO(kelvinhammond): convert this to - // static_cast(archive_->getUuid()) This didn't work when - // building because of the below error undefined symbol: - // _ZNK3zim4UuidcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv - std::ostringstream out; - out << archive_->getUuid(); - return Napi::Value::From(info.Env(), out.str()); + return Napi::Value::From(info.Env(), + static_cast(archive_->getUuid())); } catch (const std::exception &err) { throw Napi::Error::New(info.Env(), err.what()); } @@ -112,7 +132,6 @@ class Archive : public Napi::ObjectWrap { Napi::Value getMetadataKeys(const Napi::CallbackInfo &info) { try { auto env = info.Env(); - Napi::HandleScope scope(env); auto res = Napi::Array::New(env); size_t idx = 0; for (const auto &key : archive_->getMetadataKeys()) { @@ -125,22 +144,51 @@ class Archive : public Napi::ObjectWrap { } Napi::Value getIllustrationItem(const Napi::CallbackInfo &info) { + auto env = info.Env(); try { - if (info.Length() > 0) { + // getIllustrationItem() + if (info.Length() < 1) { + return Item::New(env, archive_->getIllustrationItem()); + } + + // getIllustrationItem(size: number) + if (info[0].IsNumber()) { auto size = static_cast(info[0].ToNumber().Uint32Value()); - return Item::New(info.Env(), archive_->getIllustrationItem(size)); + return Item::New(env, archive_->getIllustrationItem(size)); } - return Item::New(info.Env(), archive_->getIllustrationItem()); + + /// getIllustration(illusInfo: object) + if (info[0].IsObject()) { + auto obj = info[0].As(); + + // getIllustrationItem(illusInfo: IllustrationInfo) + if (IllustrationInfo::InstanceOf(env, obj)) { + auto illusInfo = + IllustrationInfo::Unwrap(obj)->getInternalIllustrationInfo(); + return Item::New(env, archive_->getIllustrationItem(illusInfo)); + } + + // getIllustrationItem(illusInfo: object) + auto illusInfo = IllustrationInfo::infoFrom(obj); + return Item::New(env, archive_->getIllustrationItem(illusInfo)); + } + + throw Napi::TypeError::New( + env, + "getIllustrationItem expects no arguments, a number size, or an " + "IllustrationInfo object."); } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); + throw Napi::Error::New(env, err.what()); } } Napi::Value getIllustrationSizes(const Napi::CallbackInfo &info) { + // Warn: Deprecated, use illustrationSizes property instead. + std::cerr << "Warning: getIllustrationSizes() is deprecated, use " + "illustrationSizes property instead." + << std::endl; + auto env = info.Env(); try { - auto env = info.Env(); - Napi::HandleScope scope(env); - // returns a native Set object auto SetConstructor = env.Global().Get("Set").As(); auto result = SetConstructor.New({}); @@ -150,24 +198,52 @@ class Archive : public Napi::ObjectWrap { } return result; } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); + throw Napi::Error::New(env, err.what()); } } + Napi::Value getIllustrationInfos(const Napi::CallbackInfo &info) { + auto env = info.Env(); + + // getIllustrationInfos(w: number, h: number, minScale: number) + if (info.Length() >= 3) { + auto w = info[0].ToNumber().Uint32Value(); + auto h = info[1].ToNumber().Uint32Value(); + auto minScale = info[2].ToNumber().FloatValue(); + + auto infos = archive_->getIllustrationInfos(w, h, minScale); + auto array = Napi::Array::New(env, infos.size()); + for (size_t i = 0; i < infos.size(); i++) { + array.Set(i, IllustrationInfo::New(env, infos[i])); + } + return array; + } + + // getIllustrationInfos() + auto infos = archive_->getIllustrationInfos(); + auto array = Napi::Array::New(env, infos.size()); + for (size_t i = 0; i < infos.size(); i++) { + array.Set(i, IllustrationInfo::New(env, infos[i])); + } + + return array; + } + Napi::Value getEntryByPath(const Napi::CallbackInfo &info) { + auto env = info.Env(); try { if (info[0].IsNumber()) { auto &&idx = info[0].ToNumber(); - return Entry::New(info.Env(), archive_->getEntryByPath(idx)); + return Entry::New(env, archive_->getEntryByPath(idx)); } else if (info[0].IsString()) { auto &&path = info[0].ToString(); - return Entry::New(info.Env(), archive_->getEntryByPath(path)); + return Entry::New(env, archive_->getEntryByPath(path)); } throw Napi::Error::New( - info.Env(), "Entry index must be a string (path) or number (index)."); + env, "Entry index must be a string (path) or number (index)."); } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); + throw Napi::Error::New(env, err.what()); } } @@ -386,12 +462,12 @@ class Archive : public Napi::ObjectWrap { } Napi::Value checkIntegrity(const Napi::CallbackInfo &info) { + auto env = info.Env(); try { - auto env = info.Env(); const auto &&checkType = IntegrityCheck::symbolToEnum(env, info[0]); return Napi::Value::From(env, archive_->checkIntegrity(checkType)); } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); + throw Napi::Error::New(env, err.what()); } } @@ -411,35 +487,6 @@ class Archive : public Napi::ObjectWrap { } } - Napi::Value getClusterCacheMaxSize(const Napi::CallbackInfo &info) { - try { - return Napi::Value::From(info.Env(), archive_->getClusterCacheMaxSize()); - } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); - } - } - - Napi::Value getClusterCacheCurrentSize(const Napi::CallbackInfo &info) { - try { - return Napi::Value::From(info.Env(), - archive_->getClusterCacheCurrentSize()); - } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); - } - } - - void setClusterCacheMaxSize(const Napi::CallbackInfo &info) { - try { - if (!info[0].IsNumber()) { - throw Napi::Error::New(info.Env(), "Expected a number"); - } - auto nbClusters = info[0].As().Uint32Value(); - archive_->setClusterCacheMaxSize(nbClusters); - } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); - } - } - Napi::Value getDirentCacheMaxSize(const Napi::CallbackInfo &info) { try { return Napi::Value::From(info.Env(), archive_->getDirentCacheMaxSize()); @@ -459,8 +506,9 @@ class Archive : public Napi::ObjectWrap { void setDirentCacheMaxSize(const Napi::CallbackInfo &info) { try { - if (!info[0].IsNumber()) { - throw Napi::Error::New(info.Env(), "Expected a number"); + if (info.Length() < 1 || !info[0].IsNumber()) { + throw Napi::TypeError::New(info.Env(), + "setDirentCacheMaxSize expects a number"); } auto nbDirents = info[0].As().Uint32Value(); archive_->setDirentCacheMaxSize(nbDirents); @@ -469,30 +517,8 @@ class Archive : public Napi::ObjectWrap { } } - Napi::Value getDirentLookupCacheMaxSize(const Napi::CallbackInfo &info) { - try { - return Napi::Value::From(info.Env(), - archive_->getDirentLookupCacheMaxSize()); - } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); - } - } - - void setDirentLookupCacheMaxSize(const Napi::CallbackInfo &info) { - try { - if (!info[0].IsNumber()) { - throw Napi::Error::New(info.Env(), "Expected a number"); - } - auto nbRanges = info[0].As().Uint32Value(); - archive_->setDirentLookupCacheMaxSize(nbRanges); - } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); - } - } - static Napi::Value validate(const Napi::CallbackInfo &info) { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); try { if (info.Length() < 2) { throw Napi::Error::New( @@ -524,7 +550,6 @@ class Archive : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "Archive", { @@ -542,6 +567,10 @@ class Archive : public Napi::ObjectWrap { "getIllustrationItem"), InstanceAccessor<&Archive::getIllustrationSizes>( "illustrationSizes"), + InstanceMethod<&Archive::getIllustrationInfos>( + "getIllustrationInfos"), + InstanceAccessor<&Archive::getIllustrationInfos>( + "illustrationInfos"), InstanceMethod<&Archive::getEntryByPath>("getEntryByPath"), InstanceMethod<&Archive::getEntryByTitle>("getEntryByTitle"), InstanceMethod<&Archive::getEntryByClusterOrder>( @@ -564,22 +593,12 @@ class Archive : public Napi::ObjectWrap { InstanceAccessor<&Archive::getChecksum>("checksum"), InstanceMethod<&Archive::check>("check"), InstanceMethod<&Archive::checkIntegrity>("checkIntegrity"), - InstanceMethod<&Archive::getClusterCacheMaxSize>( - "getClusterCacheMaxSize"), - InstanceMethod<&Archive::getClusterCacheCurrentSize>( - "getClusterCacheCurrentSize"), - InstanceMethod<&Archive::setClusterCacheMaxSize>( - "setClusterCacheMaxSize"), InstanceMethod<&Archive::getDirentCacheMaxSize>( "getDirentCacheMaxSize"), InstanceMethod<&Archive::getDirentCacheCurrentSize>( "getDirentCacheCurrentSize"), InstanceMethod<&Archive::setDirentCacheMaxSize>( "setDirentCacheMaxSize"), - InstanceMethod<&Archive::getDirentLookupCacheMaxSize>( - "getDirentLookupCacheMaxSize"), - InstanceMethod<&Archive::setDirentLookupCacheMaxSize>( - "setDirentLookupCacheMaxSize"), InstanceAccessor<&Archive::isMultiPart>("isMultiPart"), InstanceAccessor<&Archive::hasNewNamespaceScheme>( "hasNewNamespaceScheme"), diff --git a/src/blob.h b/src/blob.h index eeeffec..f2d62f3 100644 --- a/src/blob.h +++ b/src/blob.h @@ -12,13 +12,11 @@ class Blob : public Napi::ObjectWrap { public: explicit Blob(const Napi::CallbackInfo &info) - : Napi::ObjectWrap(info), blob_{std::make_shared()} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - - if (info[0].IsExternal()) { // handle internal zim::Blob - blob_ = std::make_shared( - *info[0].As>().Data()); + : Napi::ObjectWrap(info), blob_{} { + if (info[0].IsExternal()) { + // handle internal zim::Blob + // Copy blob (shared_ptr) from external + blob_ = zim::Blob(*info[0].As>().Data()); } else if (info.Length() > 0) { // use refcontent_ and copy content // TODO(kelvinhammond): avoid copying content somehow in certain scenarios // if possible Maybe use a reference object??? What is the lifecycle of @@ -38,28 +36,31 @@ class Blob : public Napi::ObjectWrap { data = std::shared_ptr(new char[size], std::default_delete()); memcpy(data.get(), buf.Data(), size); - } else { // all others toString() - auto str = info[0].ToString().Utf8Value(); // coerce to string + } else if (info[0].IsString()) { // all others toString() + auto str = info[0].As().Utf8Value(); // coerce to string size = str.size(); data = std::shared_ptr(new char[size], std::default_delete()); memcpy(data.get(), str.c_str(), size); + } else { + throw Napi::Error::New( + info.Env(), + "Blob constructor expects an ArrayBuffer, Buffer, or String"); } - blob_ = std::make_shared(data, size); // blob takes ownership + blob_ = zim::Blob(data, size); // blob takes ownership } } static Napi::Object New(Napi::Env env, zim::Blob &blob) { auto external = Napi::External::New(env, &blob); - auto &constructor = env.GetInstanceData()->blob; - return constructor.New({external}); + return GetConstructor(env).New({external}); } Napi::Value getData(const Napi::CallbackInfo &info) { try { // TODO(kelvinhammond): find a way to have a readonly buffer in NodeJS - return Napi::Buffer::Copy(info.Env(), blob_->data(), blob_->size()); + return Napi::Buffer::Copy(info.Env(), blob_.data(), blob_.size()); } catch (const std::exception &err) { throw Napi::Error::New(info.Env(), err.what()); } @@ -67,7 +68,7 @@ class Blob : public Napi::ObjectWrap { Napi::Value toString(const Napi::CallbackInfo &info) { try { - return Napi::Value::From(info.Env(), (std::string)*blob_); + return Napi::Value::From(info.Env(), (std::string)blob_); } catch (const std::exception &err) { throw Napi::Error::New(info.Env(), err.what()); } @@ -75,15 +76,27 @@ class Blob : public Napi::ObjectWrap { Napi::Value getSize(const Napi::CallbackInfo &info) { try { - return Napi::Value::From(info.Env(), blob_->size()); + return Napi::Value::From(info.Env(), blob_.size()); } catch (const std::exception &err) { throw Napi::Error::New(info.Env(), err.what()); } } + static bool InstanceOf(Napi::Env env, Napi::Value value) { + if (!value.IsObject()) { + return false; + } + Napi::Object obj = value.As(); + Napi::FunctionReference &constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + static Napi::FunctionReference &GetConstructor(Napi::Env env) { + return env.GetInstanceData()->blob; + } + static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "Blob", { @@ -97,8 +110,8 @@ class Blob : public Napi::ObjectWrap { } // internal module methods - std::shared_ptr blob() const { return blob_; } + const zim::Blob &blob() const { return blob_; } private: - std::shared_ptr blob_; + zim::Blob blob_; }; diff --git a/src/common.h b/src/common.h index 3ac0a20..e30c2de 100644 --- a/src/common.h +++ b/src/common.h @@ -17,6 +17,8 @@ using CompressionMap = struct ModuleConstructors { Napi::FunctionReference archive; + Napi::FunctionReference openConfig; + Napi::FunctionReference illustrationInfo; Napi::FunctionReference entry; Napi::FunctionReference item; Napi::FunctionReference blob; @@ -60,7 +62,6 @@ class Compression : public Napi::ObjectWrap { auto& compressionMap = env.GetInstanceData()->compressionMap; - Napi::HandleScope scope(env); for (const auto& [bit, symbolRef] : compressionMap) { if (!symbolRef.IsEmpty() && symbolRef.Value() == value) { return bit; @@ -71,8 +72,6 @@ class Compression : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors& constructors) { - Napi::HandleScope scope(env); - constexpr auto attrs = static_cast(napi_default | napi_enumerable); std::vector props; @@ -107,7 +106,6 @@ class IntegrityCheck : public Napi::ObjectWrap { } auto& integrityCheckMap = env.GetInstanceData()->integrityCheckMap; - Napi::HandleScope scope(env); for (const auto& [bit, symbolRef] : integrityCheckMap) { if (!symbolRef.IsEmpty() && symbolRef.Value() == value) { return bit; @@ -118,8 +116,6 @@ class IntegrityCheck : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors& constructors) { - Napi::HandleScope scope(env); - constexpr auto attrs = static_cast(napi_default | napi_enumerable); std::vector props; diff --git a/src/contentProvider.h b/src/contentProvider.h index fca1352..24d7ad2 100644 --- a/src/contentProvider.h +++ b/src/contentProvider.h @@ -6,7 +6,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -14,31 +16,92 @@ #include "blob.h" #include "common.h" +/** + * Thread Safe Function wrapper for calling the ContentProvider.feed function + * asynchronously from libzim + */ +class FeedTSFN { + public: + using BlobPtr = zim::Blob; + + FeedTSFN() = delete; + + FeedTSFN(Napi::Env &env, Napi::Function &feedFunc) { + tsfn_ = TSFN::New(env, + feedFunc, // JavaScript function called asynchronously + "FeedTSFN", // name + 0, // max queue size (0 = unlimited). + 1, // initial thread count + nullptr); // context + } + + ~FeedTSFN() { tsfn_.Release(); } + + BlobPtr feed() { + try { + DataType promise; + auto future = promise.get_future(); + tsfn_.NonBlockingCall(&promise); + return future.get(); + } catch (const std::exception &e) { + std::cerr << "FeedTSFN feed() exception: " << e.what() << std::endl; + throw std::runtime_error(std::string("Error in FeedTSFN feed(): ") + + e.what()); + } + } + + private: + using DataType = std::promise; + using Context = void; + + static void CallJs(Napi::Env env, Napi::Function callback, Context *context, + DataType *data) { + // Is the JavaScript environment still available to call into, eg. the TSFN + // is not aborted + if (env != nullptr) { + try { + // call feed(): object + auto result = callback.Call({}); + if (Blob::InstanceOf(env, result)) { + auto blob = Blob::Unwrap(result.As())->blob(); + // Note: Cannot move, blob could be used in nodejs world still + data->set_value(blob); + } else { + data->set_exception(std::make_exception_ptr(std::runtime_error( + "Expected an object of type Blob from feed()"))); + } + } catch (const std::exception &e) { + data->set_exception(std::make_exception_ptr(e)); + } + } else { + data->set_exception(std::make_exception_ptr( + std::runtime_error("Environment is shut down"))); + } + } + + using TSFN = Napi::TypedThreadSafeFunction; + + private: + TSFN tsfn_; +}; + /** * Wraps the js world ObjectWrap and Objects to a proper content provider for * use with libzim */ class ContentProviderWrapper : public zim::writer::ContentProvider { public: - explicit ContentProviderWrapper(Napi::Env env, const Napi::Object &provider) - : MAIN_THREAD_ID{} { - MAIN_THREAD_ID = std::this_thread::get_id(); + explicit ContentProviderWrapper(Napi::Env env, const Napi::Object &provider) { + size_ = parseSize(provider.Get("size")); if (!provider.Get("feed").IsFunction()) { throw std::runtime_error("ContentProvider.feed must be a function."); } auto feedFunc = provider.Get("feed").As(); - feed_ = Napi::Persistent(feedFunc); - size_ = parseSize(provider.Get("size")); - provider_ = Napi::Persistent(provider); - - tsfn_ = Napi::ThreadSafeFunction::New(env, feedFunc, - "getContentProvider.feed", 0, 1); + feedTSFN_ = std::make_unique(env, feedFunc); } - ~ContentProviderWrapper() { tsfn_.Release(); } - zim::size_type getSize() const override { return size_; } /** Parse the size, supports BigInt */ @@ -60,46 +123,13 @@ class ContentProviderWrapper : public zim::writer::ContentProvider { return static_cast(val); } - zim::Blob feed() override { - if (MAIN_THREAD_ID == std::this_thread::get_id()) { - // on main thread for some reason, do it here - auto blobObj = feed_.Call(provider_.Value(), {}); - if (!blobObj.IsObject()) { - throw std::runtime_error("ContentProvider.feed must return a blob"); - } - auto blob = Napi::ObjectWrap::Unwrap(blobObj.ToObject()); - return *(blob->blob()); - } - - // called from a thread - std::promise promise; - auto future = promise.get_future(); - - auto callback = [&promise, this](Napi::Env env, Napi::Function feedFunc) { - auto blobObj = feedFunc.Call(provider_.Value(), {}); - if (!blobObj.IsObject()) { - throw std::runtime_error("ContentProvider.feed must return a blob"); - } - auto blob = Napi::ObjectWrap::Unwrap(blobObj.ToObject()); - promise.set_value(*(blob->blob())); - }; - - auto status = tsfn_.BlockingCall(callback); - if (status != napi_ok) { - throw std::runtime_error("Error calling ThreadSafeFunction"); - } - - return future.get(); - } + zim::Blob feed() override { return feedTSFN_->feed(); } private: - // track the main thread - std::thread::id MAIN_THREAD_ID; - // js world reference, could be an ObjectWrap provider or custom js object - Napi::ObjectReference provider_; - Napi::FunctionReference feed_; - Napi::ThreadSafeFunction tsfn_; zim::size_type size_; + // Unique pointer so that it isn't copied and the destructor will only be + // called once + std::unique_ptr feedTSFN_; }; class StringProvider : public Napi::ObjectWrap { @@ -144,6 +174,11 @@ class StringProvider : public Napi::ObjectWrap { } Napi::Value getSize(const Napi::CallbackInfo &info) { + if (!provider_) { + throw Napi::Error::New( + info.Env(), "StringProvider has been moved and is no longer valid."); + } + try { return Napi::Value::From(info.Env(), provider_->getSize()); } catch (const std::exception &err) { @@ -152,8 +187,12 @@ class StringProvider : public Napi::ObjectWrap { } Napi::Value feed(const Napi::CallbackInfo &info) { + if (!provider_) { + throw Napi::Error::New( + info.Env(), "StringProvider has been moved and is no longer valid."); + } + try { - // TODO(kelvinhammond): need a way to move this to avoid copying auto blob = provider_->feed(); return Blob::New(info.Env(), blob); } catch (const std::exception &err) { @@ -161,9 +200,21 @@ class StringProvider : public Napi::ObjectWrap { } } + static bool InstanceOf(Napi::Env env, Napi::Value value) { + if (!value.IsObject()) { + return false; + } + Napi::Object obj = value.As(); + Napi::FunctionReference &constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + static Napi::FunctionReference &GetConstructor(Napi::Env env) { + return env.GetInstanceData()->stringProvider; + } + static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "StringProvider", { @@ -176,6 +227,11 @@ class StringProvider : public Napi::ObjectWrap { constructors.stringProvider = Napi::Persistent(func); } + // Internal use only + std::unique_ptr &&unwrapProvider() { + return std::move(provider_); + } + private: std::unique_ptr provider_; }; @@ -220,6 +276,11 @@ class FileProvider : public Napi::ObjectWrap { } Napi::Value getSize(const Napi::CallbackInfo &info) { + if (!provider_) { + throw Napi::Error::New( + info.Env(), "FileProvider has been moved and is no longer valid."); + } + try { return Napi::Value::From(info.Env(), provider_->getSize()); } catch (const std::exception &err) { @@ -228,8 +289,12 @@ class FileProvider : public Napi::ObjectWrap { } Napi::Value feed(const Napi::CallbackInfo &info) { + if (!provider_) { + throw Napi::Error::New( + info.Env(), "FileProvider has been moved and is no longer valid."); + } + try { - // TODO(kelvinhammond): need a way to move this to avoid copying auto blob = provider_->feed(); return Blob::New(info.Env(), blob); } catch (const std::exception &err) { @@ -237,9 +302,21 @@ class FileProvider : public Napi::ObjectWrap { } } + static bool InstanceOf(Napi::Env env, Napi::Value value) { + if (!value.IsObject()) { + return false; + } + Napi::Object obj = value.As(); + Napi::FunctionReference &constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + static Napi::FunctionReference &GetConstructor(Napi::Env env) { + return env.GetInstanceData()->fileProvider; + } + static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "FileProvider", { @@ -252,6 +329,11 @@ class FileProvider : public Napi::ObjectWrap { constructors.fileProvider = Napi::Persistent(func); } + // Internal use only + std::unique_ptr &&unwrapProvider() { + return std::move(provider_); + } + private: std::unique_ptr provider_; }; diff --git a/src/creator.h b/src/creator.h index 9218501..0be1ec7 100644 --- a/src/creator.h +++ b/src/creator.h @@ -1,15 +1,19 @@ #pragma once #include +#include #include #include #include +#include +#include #include #include #include #include "common.h" +#include "illustration.h" #include "writerItem.h" // Handles creator_->finishZimCreation() operations in the background off the @@ -24,7 +28,14 @@ class CreatorAsyncWorker : public Napi::AsyncWorker { ~CreatorAsyncWorker() {} - void Execute() override { creator_->finishZimCreation(); } + void Execute() override { + try { + creator_->finishZimCreation(); + } catch (const std::exception &e) { + std::cerr << "Error: finishZimCreation failed: " << e.what() << std::endl; + SetError(e.what()); + } + } void OnOK() override { auto env = Env(); @@ -54,7 +65,15 @@ class AddItemAsyncWorker : public Napi::AsyncWorker { Napi::Promise Promise() const { return promise_.Promise(); }; - void Execute() override { creator_->addItem(item_); } + void Execute() override { + try { + creator_->addItem(item_); + } catch (const std::exception &e) { + std::cerr << "Error: AddItemAsyncWorker failed: " << e.what() + << std::endl; + SetError(e.what()); + } + } void OnOK() override { auto env = Env(); @@ -163,16 +182,11 @@ class Creator : public Napi::ObjectWrap { throw Napi::Error::New(env, "addItem requires an item object"); } - const auto &stringItem = - env.GetInstanceData()->stringItem.Value(); - const auto &fileItem = - env.GetInstanceData()->fileItem.Value(); - std::shared_ptr item{}; - auto obj = info[0].ToObject(); - if (obj.InstanceOf(stringItem)) { + auto obj = info[0].As(); + if (StringItem::InstanceOf(env, obj)) { item = Napi::ObjectWrap::Unwrap(obj)->getItem(); - } else if (obj.InstanceOf(fileItem)) { + } else if (FileItem::InstanceOf(env, obj)) { item = Napi::ObjectWrap::Unwrap(obj)->getItem(); } else { item = std::make_shared(env, info[0].ToObject()); @@ -218,9 +232,28 @@ class Creator : public Napi::ObjectWrap { auto name = info[0].ToString().Utf8Value(); auto content = info[1]; - if (content.IsObject()) { // content provider - std::unique_ptr provider = - std::make_unique(env, content.ToObject()); + if (content.IsObject()) { + // addMetadata(name: string, content: ContentProvider, [mimetype]) + auto obj = content.As(); + std::unique_ptr provider{nullptr}; + + // Determine the type of ContentProvider + if (StringProvider::InstanceOf(env, content)) { + auto wrapped = Napi::ObjectWrap::Unwrap(obj); + provider = wrapped->unwrapProvider(); + } else if (FileProvider::InstanceOf(env, content)) { + auto wrapped = Napi::ObjectWrap::Unwrap(obj); + provider = wrapped->unwrapProvider(); + } else { + // Fallback to generic ContentProviderWrapper + provider = std::make_unique(env, obj); + } + + if (provider == nullptr) { + throw Napi::Error::New( + env, "addMetadata failed to create ContentProvider from object"); + } + if (info.Length() > 2) { // preserves default argument auto mimetype = info[2].ToString().Utf8Value(); creator_->addMetadata(name, std::move(provider), mimetype); @@ -228,7 +261,7 @@ class Creator : public Napi::ObjectWrap { const std::string mimetype = "text/plain;charset=utf-8"; creator_->addMetadata(name, std::move(provider), mimetype); } - } else { // string version + } else { // addMetadata(name: string, content: string, [mimetype]) auto str = content.ToString().Utf8Value(); if (info.Length() > 2) { auto mimetype = info[2].ToString().Utf8Value(); @@ -238,6 +271,7 @@ class Creator : public Napi::ObjectWrap { } } } catch (const std::exception &err) { + std::cerr << "Error: addMetadata failed: " << err.what() << std::endl; throw Napi::Error::New(info.Env(), err.what()); } } @@ -245,15 +279,40 @@ class Creator : public Napi::ObjectWrap { void addIllustration(const Napi::CallbackInfo &info) { try { auto env = info.Env(); - auto size = info[0].ToNumber().Uint32Value(); - auto content = info[1]; - if (content.IsObject()) { - std::unique_ptr provider = - std::make_unique(env, content.ToObject()); - creator_->addIllustration(size, std::move(provider)); + + // Inline template function to handle both size and IllustrationInfo + const auto addIllusWithContent = [&](auto &opt1) { + auto content = info[1]; + if (content.IsObject()) { + std::unique_ptr provider = + std::make_unique(env, content.ToObject()); + creator_->addIllustration(opt1, std::move(provider)); + } else { + auto str = content.ToString().Utf8Value(); + creator_->addIllustration(opt1, str); + } + }; + + auto arg0 = info[0]; + if (arg0.IsNumber()) { + auto size = arg0.ToNumber().Uint32Value(); + addIllusWithContent(size); + } else if (arg0.IsObject()) { + // Parse as IllustrationInfo + auto obj = arg0.ToObject(); + + // getIllustrationItem(illusInfo: IllustrationInfo) + // getIllustrationItem(illusInfo: object) + auto illusInfo = + IllustrationInfo::InstanceOf(env, obj) + ? IllustrationInfo::Unwrap(obj)->getInternalIllustrationInfo() + : IllustrationInfo::infoFrom(obj); + addIllusWithContent(illusInfo); } else { - auto str = content.ToString().Utf8Value(); - creator_->addIllustration(size, str); + throw Napi::Error::New( + env, + "addIllustration first argument must be size[number] or " + "IllustrationInfo[object]"); } } catch (const std::exception &err) { throw Napi::Error::New(info.Env(), err.what()); @@ -315,7 +374,6 @@ class Creator : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "Creator", { diff --git a/src/entry.h b/src/entry.h index df9cef2..1b31d89 100644 --- a/src/entry.h +++ b/src/entry.h @@ -93,7 +93,6 @@ class Entry : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "Entry", { diff --git a/src/entryrange.h b/src/entryrange.h deleted file mode 100644 index b001b0d..0000000 --- a/src/entryrange.h +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "entry.h" - -class EntryRange : public Napi::ObjectWrap { - public: - static constexpr const char *ENTRY_RANGE_CONSTRUCTOR_NAME = "EntryRange"; - - explicit EntryRange(const Napi::CallbackInfo &info) - : Napi::ObjectWrap(info) { - auto env = info.Env(); - - if (!info[0].IsExternal()) { - throw Napi::Error::New( - env, "EntryRange must be constructed internally by another class."); - } - - if (info[0].IsExternal()) { - try { - entry_ = std::make_shared( - *info[0].As>().Data()); - } catch (const std::exception &err) { - throw Napi::Error::New(env, err.what()); - } - } - } - - template - static Napi::Object New(Napi::Env env, RangeT range) { - Napi::Function iterator = Napi::Function::New( - env, [range](const Napi::CallbackInfo &info) mutable -> Napi::Value { - Napi::Env env = info.Env(); - Napi::Object iter = Napi::Object::New(env); - - auto it = range.begin(); - iter["next"] = Napi::Function::New( - env, - [range, - it](const Napi::CallbackInfo &info) mutable -> Napi::Value { - Napi::Env env = info.Env(); - Napi::Object res = Napi::Object::New(env); - if (it != range.end()) { - res["done"] = false; - res["value"] = Entry::New(env, zim::Entry(*it)); - it++; - } else { - res["done"] = true; - } - return res; - }); - return iter; - }); - - auto offset = Napi::Function::New( - env, [range](const Napi::CallbackInfo &info) -> Napi::Value { - if (info.Length() < 2) { - throw Napi::Error::New( - info.Env(), "start and maxResults are required for offset."); - } - if (!(info[0].IsNumber() && info[1].IsNumber())) { - throw Napi::Error::New( - info.Env(), "start and maxResults must be of type Number."); - } - auto start = info[0].ToNumber(); - auto maxResults = info[1].ToNumber(); - return NewEntryRange(info.Env(), range.offset(start, maxResults)); - }); - - auto size = Napi::Value::From(env, range.size()); - - auto &constructor = env.GetInstanceData()->at( - ENTRY_RANGE_CONSTRUCTOR_NAME); - return constructor.New({iterator, size, offset}); - } - - Napi::Value getSize(const Napi::CallbackInfo &info) { - try { - return Napi::Value::From(info.Env(), entry_->getIndex()); - } catch (const std::exception &err) { - throw Napi::Error::New(info.Env(), err.what()); - } - } - - static void Init(Napi::Env env, Napi::Object exports, - ConstructorsMap &constructors) { - Napi::HandleScope scope(env); - Napi::Function func = - DefineClass(env, "EntryRange", - { - InstanceAccessor<&EntryRange::getSize>("size"), - InstanceMethod<&EntryRange::getItem>("getItem"), - }); - - exports.Set("EntryRange", func); - constructors.insert_or_assign(ENTRY_RANGE_CONSTRUCTOR_NAME, - Napi::Persistent(func)); - } - - private: - std::shared_ptr entry_; -}; diff --git a/src/illustration.h b/src/illustration.h new file mode 100644 index 0000000..bbe3c11 --- /dev/null +++ b/src/illustration.h @@ -0,0 +1,167 @@ +#pragma once + +#include +#include + +#include +#include +#include + +class IllustrationInfo : public Napi::ObjectWrap { + public: + explicit IllustrationInfo(const Napi::CallbackInfo &info) + : Napi::ObjectWrap(info), ii_{} { + Napi::Env env = info.Env(); + + if (info.Length() == 0) { + // Default constructor + ii_ = zim::IllustrationInfo{}; + return; + } + + // IllustrationInfo(ii: External) + // Construct from external, used internally + if (info[0].IsExternal()) { + auto ext = info[0].As>(); + ii_ = *(ext.Data()); + return; + } + + if (!info[0].IsObject()) { + throw Napi::Error::New(env, + "IllustrationInfo constructor expects an " + "IllustrationInfo like object"); + } + + auto value = info[0]; + // IllustrationInfo(ii: IllustrationInfo) + // Copy constructor + if (InstanceOf(env, value)) { + auto unwrapped = Unwrap(value.As()); + ii_ = zim::IllustrationInfo(unwrapped->ii_); + return; + } + + // IllustrationInfo(ii: object) + // Construct from object + ii_ = infoFrom(value.As()); + } + + static Napi::Object New(Napi::Env env, const zim::IllustrationInfo &ii) { + Napi::FunctionReference &constructor = GetConstructor(env); + auto data = Napi::External::New( + env, new zim::IllustrationInfo(ii), + [](Napi::BasicEnv /*env*/, zim::IllustrationInfo *ptr) { delete ptr; }); + return constructor.New({data}); + } + + /** + * Construct zim::IllustrationInfo from a JS object + */ + static zim::IllustrationInfo infoFrom(Napi::Object obj) { + zim::IllustrationInfo ii{ + .width = + obj.Has("width") ? obj.Get("width").ToNumber().Uint32Value() : 0, + .height = + obj.Has("height") ? obj.Get("height").ToNumber().Uint32Value() : 0, + .scale = + obj.Has("scale") ? obj.Get("scale").ToNumber().FloatValue() : 0.0f, + .extraAttributes = std::map{}, + }; + + if (obj.Has("extraAttributes") && obj.Get("extraAttributes").IsObject()) { + auto extraAttributes = obj.Get("extraAttributes").ToObject(); + auto keys = extraAttributes.GetPropertyNames(); + for (const auto &e : keys) { + auto key = + static_cast(e.second).As().Utf8Value(); + auto value = extraAttributes.Get(key).ToString().Utf8Value(); + ii.extraAttributes[key] = value; + } + } + + return ii; + } + + Napi::Value getWidth(const Napi::CallbackInfo &info) { + Napi::Env env = info.Env(); + return Napi::Value::From(env, ii_.width); + } + + Napi::Value getHeight(const Napi::CallbackInfo &info) { + Napi::Env env = info.Env(); + return Napi::Value::From(env, ii_.height); + } + + Napi::Value getScale(const Napi::CallbackInfo &info) { + Napi::Env env = info.Env(); + return Napi::Value::From(env, ii_.scale); + } + + Napi::Value getExtraAttributes(const Napi::CallbackInfo &info) { + Napi::Env env = info.Env(); + Napi::Object obj = Napi::Object::New(env); + for (const auto &pair : ii_.extraAttributes) { + obj.Set(pair.first, pair.second); + } + obj.Freeze(); + return obj; + } + + Napi::Value asMetadataItemName(const Napi::CallbackInfo &info) { + Napi::Env env = info.Env(); + return Napi::Value::From(env, ii_.asMetadataItemName()); + } + + static Napi::Value fromMetadataItemName(const Napi::CallbackInfo &info) { + Napi::Env env = info.Env(); + if (info.Length() < 1 || !info[0].IsString()) { + throw Napi::TypeError::New( + env, "First argument must be a string for metadata item name."); + } + + auto name = info[0].As().Utf8Value(); + auto ii = zim::IllustrationInfo::fromMetadataItemName(name); + return New(env, ii); + } + + static bool InstanceOf(Napi::Env env, Napi::Value value) { + if (!value.IsObject()) { + return false; + } + Napi::Object obj = value.As(); + Napi::FunctionReference &constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + static Napi::FunctionReference &GetConstructor(Napi::Env env) { + auto constructors = env.GetInstanceData(); + return constructors->illustrationInfo; + } + + zim::IllustrationInfo &getInternalIllustrationInfo() { return ii_; } + + static void Init(Napi::Env env, Napi::Object exports, + ModuleConstructors &constructors) { + Napi::Function func = DefineClass( + env, "IllustrationInfo", + { + InstanceAccessor<&IllustrationInfo::getWidth>("width"), + InstanceAccessor<&IllustrationInfo::getHeight>("height"), + InstanceAccessor<&IllustrationInfo::getScale>("scale"), + InstanceAccessor<&IllustrationInfo::getExtraAttributes>( + "extraAttributes"), + InstanceMethod<&IllustrationInfo::asMetadataItemName>( + "asMetadataItemName"), + StaticMethod<&IllustrationInfo::fromMetadataItemName>( + "fromMetadataItemName"), + }); + + exports.Set("IllustrationInfo", func); + constructors.illustrationInfo = Napi::Persistent(func); + } + + private: + zim::IllustrationInfo ii_; +}; + diff --git a/src/index.d.ts b/src/index.d.ts index ed9f72b..21552a7 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,3 +1,7 @@ +export declare function getClusterCacheMaxSize(): number; +export declare function getClusterCacheCurrentSize(): number; +export declare function setClusterCacheMaxSize(nbClusters: number): void; + export class IntegrityCheck { static CHECKSUM: symbol; static DIRENT_PTRS: symbol; @@ -104,7 +108,10 @@ export class Creator { content: string | ContentProvider, mimetype?: string, ): void; - addIllustration(size: number, content: string | ContentProvider): void; + addIllustration( + sizeOrInfo: number | IIllustrationInfo, + content: string | ContentProvider, + ): void; addRedirection( path: string, title: string, @@ -146,8 +153,35 @@ export interface EntryRange extends Iterable { offset(start: number, maxResults: number): EntryRange; } +export interface IIllustrationInfo { + width?: number; + height?: number; + scale?: number; + extraAttributes?: Record; +} + +export class IllustrationInfo implements IIllustrationInfo { + constructor(info?: IIllustrationInfo | IllustrationInfo); + get width(): number; + get height(): number; + get scale(): number; + get extraAttributes(): Record; + asMetadataItemName(): string; + static fromMetadataItemName(name: string): IllustrationInfo; +} + +export class OpenConfig { + constructor(); + + preloadXapianDb(preload: boolean): this; + preloadDirentRanges(nbRanges: number): this; + + get m_preloadXapianDb(): boolean; + get m_preloadDirentRanges(): number; +} + export class Archive { - constructor(filepath: string); + constructor(filepath: string, config?: OpenConfig); get filename(): string; get filesize(): number | bigint; get allEntryCount(): number; @@ -158,8 +192,14 @@ export class Archive { getMetadata(name: string): string; getMetadataItem(name: string): Item; get metadataKeys(): string[]; - getIllustrationItem(size: number): Item; + getIllustrationItem(sizeOrInfo?: number | IIllustrationInfo): Item; get illustrationSizes(): Set; + getIllustrationInfos( + width?: number, + height?: number, + minScale?: number, + ): IllustrationInfo[]; + get illustrationInfos(): IllustrationInfo[]; getEntryByPath(path_or_idx: string | number): Entry; getEntryByTitle(title_or_idx: string | number): Entry; getEntryByClusterOrder(idx: number): Entry; @@ -182,14 +222,9 @@ export class Archive { checkIntegrity(checkType: symbol): boolean; // one of IntegrityCheck get isMultiPart(): boolean; get hasNewNamespaceScheme(): boolean; - getClusterCacheMaxSize(): number; - getClusterCacheCurrentSize(): number; - setClusterCacheMaxSize(nbClusters: number): void; getDirentCacheMaxSize(): number; getDirentCacheCurrentSize(): number; setDirentCacheMaxSize(nbDirents: number): void; - getDirentLookupCacheMaxSize(): number; - setDirentLookupCacheMaxSize(nbRanges: number): void; static validate(zimPath: string, checksToRun: symbol[]): boolean; // list of IntegrityCheck } diff --git a/src/index.js b/src/index.js index 58fbbd0..81b8476 100644 --- a/src/index.js +++ b/src/index.js @@ -2,9 +2,11 @@ import bindings from "bindings"; export const { Archive, + OpenConfig, Entry, IntegrityCheck, Compression, + IllustrationInfo, Blob, Searcher, Query, @@ -14,4 +16,7 @@ export const { FileProvider, StringItem, FileItem, + getClusterCacheMaxSize, + getClusterCacheCurrentSize, + setClusterCacheMaxSize, } = bindings("zim_binding"); diff --git a/src/item.h b/src/item.h index 1b0bfd4..e632de0 100644 --- a/src/item.h +++ b/src/item.h @@ -12,7 +12,6 @@ class Item : public Napi::ObjectWrap { explicit Item(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), item_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); if (!info[0].IsExternal()) { throw Napi::Error::New( @@ -108,10 +107,12 @@ class Item : public Napi::ObjectWrap { Napi::Value getDirectAccessInformation(const Napi::CallbackInfo &info) { try { auto env = info.Env(); - const auto valPair = item_->getDirectAccessInformation(); + const auto dai = item_->getDirectAccessInformation(); auto res = Napi::Object::New(env); - res["filename"] = Napi::Value::From(env, valPair.first); - res["offset"] = Napi::Value::From(env, valPair.second); + res["filename"] = Napi::Value::From(env, dai.filename); + res["offset"] = Napi::Value::From(env, dai.offset); + res["isValid"] = Napi::Value::From(env, dai.isValid()); + res.Freeze(); return res; } catch (const std::exception &err) { throw Napi::Error::New(info.Env(), err.what()); @@ -128,7 +129,6 @@ class Item : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "Item", { diff --git a/src/module.cc b/src/module.cc index b221b1a..ac25802 100644 --- a/src/module.cc +++ b/src/module.cc @@ -7,7 +7,9 @@ #include "contentProvider.h" #include "creator.h" #include "entry.h" +#include "illustration.h" #include "item.h" +#include "openconfig.h" #include "search.h" #include "suggestion.h" #include "writerItem.h" @@ -26,6 +28,8 @@ Napi::Object InitAll(Napi::Env env, Napi::Object exports) { Item::Init(env, exports, *constructors); Entry::Init(env, exports, *constructors); Archive::Init(env, exports, *constructors); + OpenConfig::Init(env, exports, *constructors); + IllustrationInfo::Init(env, exports, *constructors); Searcher::Init(env, exports, *constructors); Query::Init(env, exports, *constructors); @@ -45,6 +49,28 @@ Napi::Object InitAll(Napi::Env env, Napi::Object exports) { StringItem::Init(env, exports, *constructors); FileItem::Init(env, exports, *constructors); + // Extra helper functions from libzim + exports.Set("getClusterCacheMaxSize", + Napi::Function::New(env, [](const Napi::CallbackInfo &info) { + return Napi::Value::From(info.Env(), + zim::getClusterCacheMaxSize()); + })); + exports.Set("getClusterCacheCurrentSize", + Napi::Function::New(env, [](const Napi::CallbackInfo &info) { + return Napi::Value::From(info.Env(), + zim::getClusterCacheCurrentSize()); + })); + exports.Set("setClusterCacheMaxSize", + Napi::Function::New(env, [](const Napi::CallbackInfo &info) { + if (info.Length() < 1 || !info[0].IsNumber()) { + throw Napi::TypeError::New( + info.Env(), + "First argument must be a number for max size."); + } + auto size = info[0].As().Int64Value(); + zim::setClusterCacheMaxSize(size); + })); + return exports; } diff --git a/src/openconfig.h b/src/openconfig.h new file mode 100644 index 0000000..94fbe49 --- /dev/null +++ b/src/openconfig.h @@ -0,0 +1,83 @@ +#pragma once + +#include +#include + +class OpenConfig : public Napi::ObjectWrap { + public: + explicit OpenConfig(const Napi::CallbackInfo& info) + : Napi::ObjectWrap(info), config_{zim::OpenConfig()} { + if (info.Length() > 0) { + throw Napi::Error::New( + info.Env(), "OpenConfig constructor does not take any arguments."); + } + } + + Napi::Value preloadXapianDb(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 1 || !info[0].IsBoolean()) { + throw Napi::TypeError::New( + env, "First argument must be a boolean for preloadXapianDb."); + } + bool value = info[0].As().Value(); + config_.preloadXapianDb(value); + return info.This(); + } + + Napi::Value preloadDirentRanges(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 1 || !info[0].IsNumber()) { + throw Napi::TypeError::New( + env, "First argument must be a number for preloadDirentRanges."); + } + int value = info[0].As().Int32Value(); + config_.preloadDirentRanges(value); + return info.This(); + } + + Napi::Value getPreloadXapianDb(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + return Napi::Value::From(env, config_.m_preloadXapianDb); + } + + Napi::Value getPreloadDirentRanges(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + return Napi::Value::From(env, config_.m_preloadDirentRanges); + } + + static Napi::FunctionReference& GetConstructor(Napi::Env env) { + return env.GetInstanceData()->openConfig; + } + + static bool InstanceOf(Napi::Env env, Napi::Value value) { + if (!value.IsObject()) { + return false; + } + Napi::Object obj = value.As(); + Napi::FunctionReference& constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + const zim::OpenConfig& getInternalConfig() const { return config_; } + + static void Init(Napi::Env env, Napi::Object exports, + ModuleConstructors& constructors) { + Napi::Function func = DefineClass( + env, "OpenConfig", + { + InstanceMethod<&OpenConfig::preloadXapianDb>("preloadXapianDb"), + InstanceMethod<&OpenConfig::preloadDirentRanges>( + "preloadDirentRanges"), + InstanceAccessor<&OpenConfig::getPreloadXapianDb>( + "m_preloadXapianDb"), + InstanceAccessor<&OpenConfig::getPreloadDirentRanges>( + "m_preloadDirentRanges"), + }); + + exports.Set("OpenConfig", func); + constructors.openConfig = Napi::Persistent(func); + } + + private: + zim::OpenConfig config_; +}; diff --git a/src/search.h b/src/search.h index b8f57ab..3f27541 100644 --- a/src/search.h +++ b/src/search.h @@ -118,7 +118,6 @@ class Query : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "Query", { @@ -144,9 +143,6 @@ class SearchIterator : public Napi::ObjectWrap { public: explicit SearchIterator(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), searchIterator_{} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - if (info[0].IsExternal()) { searchIterator_ = *info[0].As>().Data(); @@ -233,7 +229,6 @@ class SearchIterator : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "SearchIterator", { @@ -260,7 +255,6 @@ class SearchResultSet : public Napi::ObjectWrap { explicit SearchResultSet(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), searchResultSet_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); if (!info[0].IsExternal()) { throw Napi::Error::New(env, @@ -326,7 +320,6 @@ class SearchResultSet : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "SearchResultSet", { @@ -347,11 +340,8 @@ class Search : public Napi::ObjectWrap { public: explicit Search(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), search_{nullptr} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - if (!info[0].IsExternal()) { - throw Napi::Error::New(env, "Search must be created internally."); + throw Napi::Error::New(info.Env(), "Search must be created internally."); } search_ = std::make_shared( @@ -393,7 +383,6 @@ class Search : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "Search", { @@ -414,7 +403,6 @@ class Searcher : public Napi::ObjectWrap { explicit Searcher(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), searcher_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); if (info[0].IsArray()) { auto array = info[0].As(); @@ -499,7 +487,6 @@ class Searcher : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "Searcher", { diff --git a/src/suggestion.h b/src/suggestion.h index 6458cdf..c83885c 100644 --- a/src/suggestion.h +++ b/src/suggestion.h @@ -17,9 +17,6 @@ class SuggestionIterator : public Napi::ObjectWrap { public: explicit SuggestionIterator(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), iterator_{} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - if (info[0].IsExternal()) { iterator_ = *info[0].As>().Data(); } @@ -75,7 +72,6 @@ class SuggestionIterator : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "SuggestionIterator", { @@ -99,7 +95,6 @@ class SuggestionResultSet : public Napi::ObjectWrap { explicit SuggestionResultSet(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), resultSet_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); if (!info[0].IsExternal()) { throw Napi::Error::New(env, @@ -163,7 +158,6 @@ class SuggestionResultSet : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "SuggestionResultSet", { @@ -185,7 +179,6 @@ class SuggestionSearch : public Napi::ObjectWrap { explicit SuggestionSearch(const Napi::CallbackInfo &info) : Napi::ObjectWrap(info), search_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); if (!info[0].IsExternal()) { throw Napi::Error::New(env, "Search must be created internally."); @@ -232,7 +225,6 @@ class SuggestionSearch : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "SuggestionSearch", { @@ -255,7 +247,6 @@ class SuggestionSearcher : public Napi::ObjectWrap { : Napi::ObjectWrap(info), suggestionSearcher_{nullptr} { Napi::Env env = info.Env(); - Napi::HandleScope scope(env); // TODO(kelvinhammond): Ask about support for suggestions from multiple // archives @@ -340,7 +331,6 @@ class SuggestionSearcher : public Napi::ObjectWrap { static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "SuggestionSearcher", { diff --git a/src/writerItem.h b/src/writerItem.h index c49a033..fb7a92c 100644 --- a/src/writerItem.h +++ b/src/writerItem.h @@ -7,11 +7,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include "blob.h" #include "common.h" @@ -89,18 +91,156 @@ class IndexDataWrapper : public zim::writer::IndexData { std::optional position_; }; +/** + * Wraps a the getIndexData JS function to a ThreadSafeFunction + */ +class GetIndexDataTSFN { + public: + using IndexDataWrapperPtr = std::shared_ptr; + + GetIndexDataTSFN() = delete; + + GetIndexDataTSFN(Napi::Env &env, Napi::Function &indexDataFunc) { + tsfn_ = + TSFN::New(env, + indexDataFunc, // JavaScript function called asynchronously + "GetIndexDataTSFN", // name + 0, // max queue size (0 = unlimited). + 1, // initial thread count + nullptr); // context + } + + ~GetIndexDataTSFN() { tsfn_.Release(); } + + IndexDataWrapperPtr getIndexData() { + try { + DataType promise; + auto future = promise.get_future(); + tsfn_.NonBlockingCall(&promise); + return future.get(); + } catch (const std::exception &e) { + std::cerr << "GetIndexDataTSFN getIndexData() exception: " << e.what() + << std::endl; + throw std::runtime_error( + std::string("Error in GetIndexDataTSFN getIndexData(): ") + e.what()); + } + } + + private: + using DataType = std::promise; + using Context = void; + + static void CallJs(Napi::Env env, Napi::Function callback, Context *context, + DataType *data) { + // Is the JavaScript environment still available to call into, eg. the TSFN + // is not aborted + if (env != nullptr) { + try { + // call getIndexData(): object + auto result = callback.Call({}); + if (result.IsObject()) { + auto indexData = + std::make_shared(result.As()); + data->set_value(indexData); + } else { + data->set_exception(std::make_exception_ptr( + std::runtime_error("Expected an object from getIndexData"))); + } + } catch (const std::exception &e) { + data->set_exception(std::make_exception_ptr(e)); + } + } else { + data->set_exception(std::make_exception_ptr( + std::runtime_error("Environment is shut down"))); + } + } + + using TSFN = Napi::TypedThreadSafeFunction; + + private: + TSFN tsfn_; +}; + +/** + * Wraps a the getContentProvider JS function to a ThreadSafeFunction + */ +class GetContentProviderTSFN { + public: + using ContentProviderWrapperPtr = std::unique_ptr; + + GetContentProviderTSFN() = delete; + + GetContentProviderTSFN(Napi::Env &env, Napi::Function &providerFunc) { + tsfn_ = + TSFN::New(env, + providerFunc, // JavaScript function called asynchronously + "GetContentProviderTSFN", // name + 0, // max queue size (0 = unlimited). + 1, // initial thread count + nullptr); // context + } + + ~GetContentProviderTSFN() { tsfn_.Release(); } + + ContentProviderWrapperPtr getContentProvider() { + try { + DataType promise; + auto future = promise.get_future(); + tsfn_.NonBlockingCall(&promise); + return future.get(); + } catch (const std::exception &e) { + std::cerr << "GetContentProviderTSFN getContentProvider() exception: " + << e.what() << std::endl; + throw std::runtime_error( + std::string( + "Error in GetContentProviderTSFN getContentProvider(): ") + + e.what()); + } + } + + private: + using DataType = std::promise; + using Context = void; + + static void CallJs(Napi::Env env, Napi::Function callback, Context *context, + DataType *data) { + // Is the JavaScript environment still available to call into, eg. the + // TSFN is not aborted + if (env != nullptr) { + try { + // call getContentProvider(): object + auto result = callback.Call({}); + if (result.IsObject()) { + auto provider = std::make_unique( + env, result.As()); + data->set_value(std::move(provider)); + } else { + data->set_exception(std::make_exception_ptr(std::runtime_error( + "Expected an object from getContentProvider"))); + } + } catch (const std::exception &e) { + data->set_exception(std::make_exception_ptr(e)); + } + } else { + data->set_exception(std::make_exception_ptr( + std::runtime_error("Environment is shut down"))); + } + } + + using TSFN = Napi::TypedThreadSafeFunction; + + private: + TSFN tsfn_; +}; + /** * Wraps a JS World Item to a zim::writer::Item * - * NOTE: should be initialized on the main thread + * NOTE: MUST BE initialized on the main thread */ class ItemWrapper : public zim::writer::Item { public: - ItemWrapper(Napi::Env env, Napi::Object item) - : MAIN_THREAD_ID{}, item_{}, hasIndexDataImpl_{false} { - MAIN_THREAD_ID = std::this_thread::get_id(); - item_ = Napi::Persistent(item); - + ItemWrapper(Napi::Env env, Napi::Object item) { path_ = item.Get("path").ToString(); title_ = item.Get("title").ToString(); mimeType_ = item.Get("mimeType").ToString(); @@ -118,9 +258,8 @@ class ItemWrapper : public zim::writer::Item { } auto indexDataFunc = indexDataFuncValue.As(); - indexDataFunc_ = Napi::Persistent(indexDataFunc); - indexDataTSNF_ = Napi::ThreadSafeFunction::New( - env, indexDataFunc, "ItemWrapper.indexData", 0, 1); + getIndexDataTSFN_ = + std::make_unique(env, indexDataFunc); } auto providerFuncValue = item.Get("getContentProvider"); @@ -128,16 +267,8 @@ class ItemWrapper : public zim::writer::Item { throw std::runtime_error("getContentProvider must be a function"); } auto providerFunc = providerFuncValue.As(); - contentProviderFunc_ = Napi::Persistent(providerFunc); - contentProviderTSNF_ = Napi::ThreadSafeFunction::New( - env, providerFunc, "ItemWrapper.contentProvider", 5, 1); - } - - ~ItemWrapper() { - if (hasIndexDataImpl_) { - indexDataTSNF_.Release(); - } - contentProviderTSNF_.Release(); + getContentProviderTSFN_ = + std::make_unique(env, providerFunc); } std::string getPath() const override { return path_; } @@ -154,31 +285,11 @@ class ItemWrapper : public zim::writer::Item { return zim::writer::Item::getIndexData(); } - if (MAIN_THREAD_ID == std::this_thread::get_id()) { - auto data = indexDataFunc_.Call(item_.Value(), {}); - return data.IsObject() - ? std::make_shared(data.ToObject()) - : nullptr; - } - - // called from a thread - using IndexDataWrapperPtr = std::shared_ptr; - std::promise promise; - auto future = promise.get_future(); - - auto callback = [&promise, this](Napi::Env env, Napi::Function idxFunc) { - auto data = idxFunc.Call(item_.Value(), {}); - promise.set_value( - data.IsObject() ? std::make_shared(data.ToObject()) - : nullptr); - }; - - auto status = indexDataTSNF_.BlockingCall(callback); - if (status != napi_ok) { - throw std::runtime_error("Error calling indexData ThreadSafeFunction"); + if (getIndexDataTSFN_ == nullptr) { + throw std::runtime_error("Error: getIndexDataTSFN_ is null"); } - return future.get(); + return getIndexDataTSFN_->getIndexData(); } /** @@ -187,65 +298,23 @@ class ItemWrapper : public zim::writer::Item { */ std::unique_ptr getContentProvider() const override { - if (MAIN_THREAD_ID == std::this_thread::get_id()) { - auto env = contentProviderFunc_.Env(); - auto provider = contentProviderFunc_.Call(item_.Value(), {}); - if (provider.IsObject()) { - return std::make_unique(env, - provider.ToObject()); - } else if (provider.IsNull() || provider.IsUndefined()) { - return nullptr; - } - - throw std::runtime_error( - "getContentProvider must return an object or null"); - } - - using ContentProviderWrapperPtr = std::unique_ptr; - std::promise promise; - auto future = promise.get_future(); - - auto callback = [&promise, this](Napi::Env env, - Napi::Function providerFunc) { - auto provider = providerFunc.Call(item_.Value(), {}); - if (provider.IsObject()) { - auto ptr = - std::make_unique(env, provider.ToObject()); - promise.set_value(std::move(ptr)); - } else if (provider.IsNull() || provider.IsUndefined()) { - promise.set_value(nullptr); - } else { - throw std::runtime_error( - "getContentProvider must return an object or null"); - } - }; - - auto status = contentProviderTSNF_.BlockingCall(callback); - if (status != napi_ok) { - throw std::runtime_error( - "Error calling contentProvider ThreadSafeFunction"); - } - - return future.get(); + return getContentProviderTSFN_->getContentProvider(); } private: - std::thread::id MAIN_THREAD_ID; - // js world reference, could be an ObjectWrap provider or custom js object - Napi::ObjectReference item_; - std::string path_; std::string title_; std::string mimeType_; zim::writer::Hints hints_; bool hasIndexDataImpl_; - Napi::FunctionReference indexDataFunc_; - Napi::ThreadSafeFunction indexDataTSNF_; - Napi::FunctionReference contentProviderFunc_; - Napi::ThreadSafeFunction contentProviderTSNF_; + std::unique_ptr getContentProviderTSFN_; + std::unique_ptr getIndexDataTSFN_; }; +/** + * Wraps a zim::writer::StringItem + */ class StringItem : public Napi::ObjectWrap { public: explicit StringItem(const Napi::CallbackInfo &info) @@ -340,9 +409,17 @@ class StringItem : public Napi::ObjectWrap { // TODO(kelvinhammond): implement getIndexData for StringItem and FileItem + static bool InstanceOf(Napi::Env env, Napi::Object obj) { + Napi::FunctionReference &constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + static Napi::FunctionReference &GetConstructor(Napi::Env env) { + return env.GetInstanceData()->stringItem; + } + static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "StringItem", { @@ -362,6 +439,9 @@ class StringItem : public Napi::ObjectWrap { std::shared_ptr item_; }; +/** + * Wraps a zim::writer::FileItem + */ class FileItem : public Napi::ObjectWrap { public: explicit FileItem(const Napi::CallbackInfo &info) @@ -439,9 +519,17 @@ class FileItem : public Napi::ObjectWrap { } } + static bool InstanceOf(Napi::Env env, Napi::Object obj) { + Napi::FunctionReference &constructor = GetConstructor(env); + return obj.InstanceOf(constructor.Value()); + } + + static Napi::FunctionReference &GetConstructor(Napi::Env env) { + return env.GetInstanceData()->fileItem; + } + static void Init(Napi::Env env, Napi::Object exports, ModuleConstructors &constructors) { - Napi::HandleScope scope(env); Napi::Function func = DefineClass( env, "FileItem", { diff --git a/test/makeLargeZim.ts b/test/makeLargeZim.ts index 4146c01..bcce585 100644 --- a/test/makeLargeZim.ts +++ b/test/makeLargeZim.ts @@ -1,19 +1,19 @@ import * as fs from "fs/promises"; import * as path from "path"; -import { Creator, Archive, StringItem } from "../src"; +import { Creator, Archive, StringItem, Blob } from "../src"; -const tqdm = require("tqdm"); +import tqdm from "tqdm"; const numArticles = 1000000; // const numArticles = 10000; -const outFile = path.join(__dirname, "../largeZim.zim"); +const outFile = path.join(import.meta.dirname, "../largeZim.zim"); -console.log(`Making ZIM file with [${numArticles}] articles`); +console.log(`Making ZIM file (${outFile}) with [${numArticles}] articles`); (async () => { console.info("Starting"); const creator = new Creator() - .configNbWorkers(1) + .configNbWorkers(5) .configIndexing(true, "en") .configClusterSize(2048) .startZimCreation(outFile); @@ -41,30 +41,31 @@ console.log(`Making ZIM file with [${numArticles}] articles`); { FRONT_ARTICLE: 1 }, data, ); + await creator.addItem(stringItem); - /* - const customItem = { // custom item + const customItem = { + // custom item path: url, mimeType: "text/html", title: title, - hints: {FRONT_ARTICLE: 1}, - getContentProvider() { // custom content provider + hints: { FRONT_ARTICLE: 1 }, + getContentProvider() { + // custom content provider let sent = false; return { size: data.length, feed() { - if(!sent) { + if (!sent) { sent = true; return new Blob(data); } return new Blob(); - } + }, }; }, }; - */ - await creator.addItem(stringItem); + await creator.addItem(customItem); } console.log("Finalizing..."); diff --git a/test/zim.test.ts b/test/zim.test.ts index c1e6862..e45385b 100644 --- a/test/zim.test.ts +++ b/test/zim.test.ts @@ -4,6 +4,8 @@ import crypto from "crypto"; import * as fs from "fs"; import { Archive, + OpenConfig, + IllustrationInfo, IntegrityCheck, Compression, Blob, @@ -14,6 +16,9 @@ import { Searcher, SuggestionSearcher, WriterItem, + getClusterCacheMaxSize, + getClusterCacheCurrentSize, + setClusterCacheMaxSize, } from "../src"; describe("IntegrityCheck", () => { @@ -54,6 +59,25 @@ describe("Blob", () => { }); }); +describe("StringProvider", () => { + it("constructs a StringProvider", () => { + const str = "hello world"; + const provider = new StringProvider(str); + expect(provider).toBeDefined(); + expect(provider.size).toBe(str.length); + + let feed = provider.feed(); + expect(feed).toBeDefined(); + expect(feed.size).toBe(str.length); + expect(feed.data.toString()).toBe(str); + + feed = provider.feed(); + expect(feed).toBeDefined(); + expect(feed.size).toBe(0); + expect(feed.data.toString()).toBe(""); + }); +}); + describe("StringItem", () => { const path = "test"; const mimeType = "text/plain"; @@ -191,6 +215,10 @@ describe("Creator", () => { "hex", ).toString("utf8"); creator.addIllustration(1, png); + creator.addIllustration( + new IllustrationInfo({ width: 10, height: 10 }), + png, + ); creator.addRedirection("redirect/test1", "Redirect to test 1", "test1", { COMPRESS: 1, }); @@ -202,6 +230,59 @@ describe("Creator", () => { }); }); +describe("IllustrationInfo", () => { + it("Creates a default IllustrationInfo", () => { + const info = new IllustrationInfo(); + expect(info).toBeDefined(); + expect(info.width).toBe(0); + expect(info.height).toBe(0); + expect(info.scale).toBe(0); + expect(info.extraAttributes).toEqual({}); + }); + + it("Creates an empty IllustrationInfo", () => { + const info = new IllustrationInfo({}); + expect(info).toBeDefined(); + expect(info.width).toBe(0); + expect(info.height).toBe(0); + expect(info.scale).toBe(0); + expect(info.extraAttributes).toEqual({}); + }); + + it("Creates an IllustrationInfo which functions", () => { + const info = new IllustrationInfo({ + width: 100, + height: 200, + scale: 2.0, + extraAttributes: { test: "value" }, + }); + expect(info).toBeDefined(); + expect(info.width).toBe(100); + expect(info.height).toBe(200); + expect(info.scale).toBe(2.0); + expect(info.extraAttributes).toEqual({ test: "value" }); + }); +}); + +describe("OpenConfig", () => { + it("Creates an OpenConfig which functions", () => { + const config = new OpenConfig(); + expect(config).toBeDefined(); + + // Integration tests, these are set to the defaults + expect(config.m_preloadXapianDb).toBe(true); + expect(config.m_preloadDirentRanges).toBe(1024); + + let res = config.preloadXapianDb(false); + expect(res).toBe(config); + expect(config.m_preloadXapianDb).toBe(false); + + res = config.preloadDirentRanges(5); + expect(res).toBe(config); + expect(config.m_preloadDirentRanges).toBe(5); + }); +}); + describe("Archive", () => { const outFile = "./test-read.zim"; @@ -326,6 +407,16 @@ describe("Archive", () => { expect(Archive.validate(outFile, checks)).toBe(true); }); + it("Opens an archive with OpenConfig", () => { + const config = new OpenConfig() + .preloadXapianDb(true) + .preloadDirentRanges(512); + const archive = new Archive(outFile, config); + expect(archive).toBeDefined(); + expect(archive.filename).toBe(outFile); + expect(archive.allEntryCount).toBeGreaterThanOrEqual(items.length); + }); + it("Reads items from an archive", () => { const archive = new Archive(outFile); expect(archive).toBeDefined(); @@ -336,11 +427,8 @@ describe("Archive", () => { expect(archive.articleCount).toBe(items.length); expect(archive.mediaCount).toBe(0); expect(archive.uuid).toBeDefined(); - expect(archive.getClusterCacheMaxSize()).toBeDefined(); - expect(archive.getClusterCacheCurrentSize()).toBeDefined(); expect(archive.getDirentCacheMaxSize()).toBeDefined(); expect(archive.getDirentCacheCurrentSize()).toBeDefined(); - expect(archive.getDirentLookupCacheMaxSize()).toBeDefined(); // test metadata expect(archive.metadataKeys).toEqual( @@ -363,6 +451,30 @@ describe("Archive", () => { expect(illustration.size).toBeGreaterThanOrEqual(png.length); expect(archive.illustrationSizes).toContain(png_size); + // Only 1 png added + const infos = archive.illustrationInfos; + expect(infos.length).toEqual(1); + expect(infos[0].width).toBeGreaterThan(0); + expect(infos[0].height).toBeGreaterThan(0); + + // That 1 png should be retrievable again using the info + const il1 = archive.getIllustrationItem(infos[0]); + expect(il1).toBeDefined(); + expect(il1).toEqual(illustration); + expect(il1.data.data.toString()).toEqual(png); + + // Matching illustration + expect( + archive.getIllustrationInfos( + infos[0].width, + infos[0].height, + infos[0].scale, + ).length, + ).toEqual(1); + + // Not matching illustrationInfos + expect(archive.getIllustrationInfos(100, 100, 3).length).toEqual(0); + for (const item of items) { const bypath = archive.getEntryByPath(item.path); expect(bypath).toBeDefined(); @@ -541,13 +653,12 @@ describe("Archive", () => { describe("Cache sizes", () => { it("Manipulate cluster cache max size", () => { - const archive = new Archive(outFile); - archive.setClusterCacheMaxSize(10); - expect(archive.getClusterCacheMaxSize()).toBe(10); - expect(archive.getClusterCacheCurrentSize()).toBe(1); // there is only one cluser in test ZIM - archive.setClusterCacheMaxSize(2); - expect(archive.getClusterCacheMaxSize()).toBe(2); - expect(archive.getClusterCacheCurrentSize()).toBe(1); + setClusterCacheMaxSize(10); + expect(getClusterCacheMaxSize()).toBe(10); + expect(getClusterCacheCurrentSize()).toEqual(expect.any(Number)); + setClusterCacheMaxSize(2); + expect(getClusterCacheMaxSize()).toBe(2); + expect(getClusterCacheCurrentSize()).toEqual(expect.any(Number)); }); it("Manipulate dirent cache max size", () => { const archive = new Archive(outFile); @@ -558,11 +669,6 @@ describe("Archive", () => { expect(archive.getDirentCacheMaxSize()).toBe(5); expect(archive.getDirentCacheCurrentSize()).toBe(5); }); - it("Manipulate dirent lookup cache max size", () => { - const archive = new Archive(outFile); - archive.setDirentLookupCacheMaxSize(6); - expect(archive.getDirentLookupCacheMaxSize()).toBe(6); - }); }); });