From 3cd6a54b6ca7417be9e6bd334bec98882a10a383 Mon Sep 17 00:00:00 2001 From: Cristiam Da Silva Date: Wed, 3 Jul 2024 09:30:27 +0200 Subject: [PATCH 01/40] 3 cli setup testing framework (#35) * test: setup jest configuration with typescript * refactor: removed path alias and changed simulator service toa class injected in the command declaration * test: added init action adn command tests * docs: added testing section on readme file * fix: handle Fetch Error (Mac M3) * refactor: improved function response * fix: await for runSimulator async function * fix: added init action test * fix: solving conflicts * test: added reset docker images and containers calls from init --- README.md | 28 ++ jest.config.js | 6 +- package-lock.json | 190 +++++--- package.json | 6 +- src/commands/general/index.ts | 10 +- src/commands/general/init.ts | 60 +-- src/commands/general/start.ts | 38 +- src/lib/clients/system.ts | 2 +- src/lib/interfaces/ISimulatorService.ts | 38 ++ src/lib/services/simulator.ts | 394 ++++++++------- src/types/node-fetch.d.ts | 1 + tests/actions/init.test.ts | 607 ++++++++++++++++++++++++ tests/commands/init.test.ts | 26 +- tests/utils.ts | 4 +- tsconfig.json | 12 +- 15 files changed, 1062 insertions(+), 360 deletions(-) create mode 100644 src/lib/interfaces/ISimulatorService.ts create mode 100644 src/types/node-fetch.d.ts create mode 100644 tests/actions/init.test.ts diff --git a/README.md b/README.md index 33e2a067..acc096aa 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,12 @@ Contributions to the GenLayer CLI are welcome! Please feel free to fork the repo ### Running the CLI from the repository First, install the dependencies and start the build process + ```bash npm install npm run dev ``` + This will continuously rebuild the CLI from the source Then in another window execute the CLI commands like so: @@ -41,6 +43,32 @@ Then in another window execute the CLI commands like so: node dist/index.js init ``` +## Testing + +### Overview + +The GenLayer CLI uses Jest in combination with ts-jest to handle testing of TypeScript files. The configuration is tailored to support ES Modules (ESM), aligning with the latest JavaScript standards and ensuring compatibility with modern tooling and Node.js features. + +### Running Tests + +To run the tests, use the following command: + +```bash +npm run test +``` + +This command sets the appropriate Node.js options to handle ES Modules and watches for changes in the test files, making it suitable for development. + +### Test Configuration + +Our `jest.config.js` is set up as follows: + +- ES Module Support: Configured to treat .ts files as ES Modules. +- Test Environment: Uses Node.js as the testing environment. +- Transformation: Utilizes ts-jest with an ESM preset to process TypeScript files. + +Tests are located in the tests/ directory and should be named using the following pattern: [filename].test.ts. When writing tests, you can use all Jest functionalities such as describe, test, expect, and Jest mocks for testing asynchronous functions, component interactions, or API calls. + ## License This project is licensed under the ... License - see the [LICENSE](LICENSE) file for details. diff --git a/jest.config.js b/jest.config.js index 2ab4265c..c91a9aa8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,4 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: "ts-jest", - testEnvironment: "node", - moduleNameMapper: { - "^@/(.*)$": "/src/$1", - }, + preset: "ts-jest/presets/default-esm", }; diff --git a/package-lock.json b/package-lock.json index 830877a9..0e2009ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "commander": "^12.0.0", "dotenv": "^16.4.5", "inquirer": "^9.2.19", - "node-fetch": "^3.3.2", + "node-fetch": "^2.7.0", "open": "^10.1.0", "uuid": "^9.0.1" }, @@ -37,7 +37,7 @@ "jest": "^29.7.0", "prettier": "^3.2.5", "release-it": "^17.2.0", - "ts-jest": "^29.1.2", + "ts-jest": "^29.1.3", "ts-node": "^10.9.2", "typescript": "^5.4.5" } @@ -97,21 +97,21 @@ } }, "node_modules/@babel/core": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", - "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", + "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.4", + "@babel/generator": "^7.24.5", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.4", - "@babel/parser": "^7.24.4", + "@babel/helper-module-transforms": "^7.24.5", + "@babel/helpers": "^7.24.5", + "@babel/parser": "^7.24.5", "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -148,12 +148,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", - "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "dependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.5", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -259,16 +259,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -278,33 +278,33 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -320,9 +320,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -338,14 +338,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", - "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", + "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -438,9 +438,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", - "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -641,19 +641,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -671,13 +671,13 @@ } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -3548,6 +3548,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "dev": true, "engines": { "node": ">= 12" } @@ -4641,6 +4642,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, "funding": [ { "type": "github", @@ -4765,6 +4767,7 @@ "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, "dependencies": { "fetch-blob": "^3.1.2" }, @@ -7206,6 +7209,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true, "funding": [ { "type": "github", @@ -7221,20 +7225,22 @@ } }, "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" + "whatwg-url": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": "4.x || >=6.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/node-int64": { @@ -8529,6 +8535,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/release-it/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, "node_modules/release-it/node_modules/npm-run-path": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", @@ -9577,6 +9601,11 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -9590,9 +9619,9 @@ } }, "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "version": "29.1.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.3.tgz", + "integrity": "sha512-6L9qz3ginTd1NKhOxmkP0qU3FyKjj5CPoY+anszfVn6Pmv/RIKzhiMCsH7Yb7UvJR9I2A64rm4zQl531s2F1iw==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -9608,10 +9637,11 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", "babel-jest": "^29.0.0", "jest": "^29.0.0", @@ -9621,6 +9651,9 @@ "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -10087,10 +10120,25 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "dev": true, "engines": { "node": ">= 8" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 17175a89..7fb8948a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "genlayer": "./dist/index.js" }, "scripts": { - "test": "jest", + "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch", "dev": "cross-env NODE_ENV=development node esbuild.config.js", "build": "cross-env NODE_ENV=production node esbuild.config.js", "release": "release-it --ci" @@ -47,7 +47,7 @@ "jest": "^29.7.0", "prettier": "^3.2.5", "release-it": "^17.2.0", - "ts-jest": "^29.1.2", + "ts-jest": "^29.1.3", "ts-node": "^10.9.2", "typescript": "^5.4.5" }, @@ -55,7 +55,7 @@ "commander": "^12.0.0", "dotenv": "^16.4.5", "inquirer": "^9.2.19", - "node-fetch": "^3.3.2", + "node-fetch": "^2.7.0", "open": "^10.1.0", "uuid": "^9.0.1" } diff --git a/src/commands/general/index.ts b/src/commands/general/index.ts index 5769be59..84027fd1 100644 --- a/src/commands/general/index.ts +++ b/src/commands/general/index.ts @@ -1,14 +1,16 @@ import {Command} from "commander"; -import {initAction} from "./init"; -import {startAction} from "./start"; +import simulatorService from "../../lib/services/simulator"; + +import {initAction, InitActionOptions} from "./init"; +import {startAction, StartActionOptions} from "./start"; export function initializeGeneralCommands(program: Command) { program .command("init") .description("Initialize the GenLayer Environment") .option("-n, --numValidators ", "Number of validators", "5") - .action(initAction); + .action((options: InitActionOptions) => initAction(options, simulatorService)); program .command("up") @@ -16,7 +18,7 @@ export function initializeGeneralCommands(program: Command) { .option("--no-reset-accounts", "Don't restart the database for accouts and transactions", true) .option("--reset-validators", "Remove all current validators and create new random ones", false) .option("--numValidators ", "Number of validators", "5") - .action(startAction); + .action((options: StartActionOptions) => startAction(options, simulatorService)); return program; } diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 140caaf0..29d7ba3a 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -1,25 +1,7 @@ import inquirer from "inquirer"; -import {AI_PROVIDERS_CONFIG, AiProviders} from "@/lib/config/simulator"; -import { - initializeDatabase, - checkRequirements, - downloadSimulator, - configSimulator, - runSimulator, - waitForSimulatorToBeReady, - updateSimulator, - clearAccountsAndTransactionsDatabase, - createRandomValidators, - deleteAllValidators, - pullOllamaModel, - getAiProvidersOptions, - getSimulatorLocation, - getFrontendUrl, - openFrontend, - resetDockerContainers, - resetDockerImages, -} from "@/lib/services/simulator"; +import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; +import {AI_PROVIDERS_CONFIG, AiProviders} from "../../lib/config/simulator"; export interface InitActionOptions { numValidators: number; } @@ -37,12 +19,12 @@ function getRequirementsErrorMessage({git, docker}: Record): st return ""; } -export async function initAction(options: InitActionOptions) { +export async function initAction(options: InitActionOptions, simulatorService: ISimulatorService) { console.log(`Initializing GenLayer CLI with ${options.numValidators} validators`); // Check if git and docker are installed try { - const {git, docker} = await checkRequirements(); + const {git, docker} = await simulatorService.checkRequirements(); const errorMessage = getRequirementsErrorMessage({git, docker}); if (errorMessage) { console.log( @@ -59,8 +41,8 @@ export async function initAction(options: InitActionOptions) { // Reset Docker containers and images console.log(`Resetting Docker containers and images...`); try { - await resetDockerContainers(); - await resetDockerImages(); + await simulatorService.resetDockerContainers(); + await simulatorService.resetDockerImages(); } catch (error) { console.error(error); return; @@ -71,7 +53,7 @@ export async function initAction(options: InitActionOptions) { { type: "confirm", name: "confirmDownload", - message: `This action is going to download the GenLayer Simulator from GitHub into "${getSimulatorLocation()}". Do you want to continue?`, + message: `This action is going to download the GenLayer Simulator from GitHub into "${simulatorService.getSimulatorLocation()}". Do you want to continue?`, default: true, }, ]); @@ -84,9 +66,9 @@ export async function initAction(options: InitActionOptions) { // Download the GenLayer Simulator from GitHub console.log(`Downloading GenLayer Simulator from GitHub...`); try { - const {wasInstalled} = await downloadSimulator(); + const {wasInstalled} = await simulatorService.downloadSimulator(); if (wasInstalled) { - await updateSimulator(); + await simulatorService.updateSimulator(); } } catch (error) { console.error(error); @@ -99,7 +81,7 @@ export async function initAction(options: InitActionOptions) { type: "checkbox", name: "selectedLlmProviders", message: "Select which LLM providers do you want to use:", - choices: getAiProvidersOptions(true), + choices: simulatorService.getAiProvidersOptions(true), validate: function (answer: string[]) { if (answer.length < 1) { return "You must choose at least one option."; @@ -141,7 +123,7 @@ export async function initAction(options: InitActionOptions) { console.log("Configuring GenLayer Simulator environment..."); try { - await configSimulator(aiProvidersEnvVars); + await simulatorService.configSimulator(aiProvidersEnvVars); } catch (error) { console.error(error); return; @@ -150,14 +132,15 @@ export async function initAction(options: InitActionOptions) { // Run the GenLayer Simulator console.log("Running the GenLayer Simulator..."); try { - runSimulator(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + await simulatorService.runSimulator(); } catch (error) { console.error(error); return; } try { - const {initialized, errorCode, errorMessage} = await waitForSimulatorToBeReady(); + const {initialized, errorCode, errorMessage} = await simulatorService.waitForSimulatorToBeReady(); if (!initialized && errorCode === "ERROR") { console.log(errorMessage); console.error("Unable to initialize the GenLayer simulator. Please try again."); @@ -178,16 +161,16 @@ export async function initAction(options: InitActionOptions) { // Ollama doesn't need changes in configuration, we just run it if (selectedLlmProviders.includes("ollama")) { console.log("Pulling llama3 from Ollama..."); - await pullOllamaModel(); + await simulatorService.pullOllamaModel(); } // Initialize the database console.log("Initializing the database..."); try { //remove everything from the database - await clearAccountsAndTransactionsDatabase(); + await simulatorService.clearAccountsAndTransactionsDatabase(); - const {createResponse, tablesResponse} = await initializeDatabase(); + const {createResponse, tablesResponse} = await simulatorService.initializeDatabase(); if (!createResponse || !tablesResponse) { console.error("Unable to initialize the database. Please try again."); return; @@ -201,9 +184,9 @@ export async function initAction(options: InitActionOptions) { console.log("Initializing validators..."); try { //remove all validators - await deleteAllValidators(); + await simulatorService.deleteAllValidators(); // create random validators - await createRandomValidators(Number(options.numValidators), selectedLlmProviders); + await simulatorService.createRandomValidators(Number(options.numValidators), selectedLlmProviders); } catch (error) { console.error("Unable to initialize the validators."); console.error(error); @@ -212,10 +195,11 @@ export async function initAction(options: InitActionOptions) { // Simulator ready console.log( - `GenLayer simulator initialized successfully! Go to ${getFrontendUrl()} in your browser to access it.`, + `GenLayer simulator initialized successfully! Go to ${simulatorService.getFrontendUrl()} in your browser to access it.`, ); try { - openFrontend(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + simulatorService.openFrontend(); } catch (error) { console.error(error); } diff --git a/src/commands/general/start.ts b/src/commands/general/start.ts index b49d18a6..c33447c1 100644 --- a/src/commands/general/start.ts +++ b/src/commands/general/start.ts @@ -1,17 +1,6 @@ import inquirer from "inquirer"; -import { - updateSimulator, - runSimulator, - waitForSimulatorToBeReady, - deleteAllValidators, - createRandomValidators, - clearAccountsAndTransactionsDatabase, - initializeDatabase, - getFrontendUrl, - openFrontend, - getAiProvidersOptions, -} from "@/lib/services/simulator"; +import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; export interface StartActionOptions { resetAccounts: string; @@ -19,7 +8,7 @@ export interface StartActionOptions { numValidators: number; } -export async function startAction(options: StartActionOptions) { +export async function startAction(options: StartActionOptions, simulatorService: ISimulatorService) { const {resetAccounts, resetValidators, numValidators} = options; const restartAccountsHintText = resetAccounts @@ -35,7 +24,7 @@ export async function startAction(options: StartActionOptions) { // Update the simulator to the latest version console.log(`Updating GenLayer Simulator...`); try { - await updateSimulator(); + await simulatorService.updateSimulator(); } catch (error) { console.error(error); return; @@ -44,14 +33,14 @@ export async function startAction(options: StartActionOptions) { // Run the GenLayer Simulator console.log("Running the GenLayer Simulator..."); try { - runSimulator(); + simulatorService.runSimulator(); } catch (error) { console.error(error); return; } try { - const {initialized, errorCode, errorMessage} = await waitForSimulatorToBeReady(); + const {initialized, errorCode, errorMessage} = await simulatorService.waitForSimulatorToBeReady(); if (!initialized && errorCode === "ERROR") { console.log(errorMessage); console.error("Unable to initialize the GenLayer simulator. Please try again."); @@ -74,9 +63,9 @@ export async function startAction(options: StartActionOptions) { console.log("Initializing the database..."); try { //remove everything from the database - await clearAccountsAndTransactionsDatabase(); + await simulatorService.clearAccountsAndTransactionsDatabase(); - const {createResponse, tablesResponse} = await initializeDatabase(); + const {createResponse, tablesResponse} = await simulatorService.initializeDatabase(); if (!createResponse || !tablesResponse) { console.error("Unable to initialize the database. Please try again."); return; @@ -93,13 +82,13 @@ export async function startAction(options: StartActionOptions) { console.log("Initializing validators..."); try { //remove all validators - await deleteAllValidators(); + await simulatorService.deleteAllValidators(); const questions = [ { type: "checkbox", name: "selectedLlmProviders", message: "Select which LLM providers do you want to use:", - choices: getAiProvidersOptions(false), + choices: simulatorService.getAiProvidersOptions(false), validate: function (answer: string[]) { if (answer.length < 1) { return "You must choose at least one option."; @@ -113,7 +102,10 @@ export async function startAction(options: StartActionOptions) { const llmProvidersAnswer = await inquirer.prompt(questions); // create random validators - await createRandomValidators(Number(options.numValidators), llmProvidersAnswer.selectedLlmProviders); + await simulatorService.createRandomValidators( + Number(options.numValidators), + llmProvidersAnswer.selectedLlmProviders, + ); } catch (error) { console.error("Unable to initialize the validators."); console.error(error); @@ -124,10 +116,10 @@ export async function startAction(options: StartActionOptions) { // Simulator ready console.log( - `GenLayer simulator initialized successfully! Go to ${getFrontendUrl()} in your browser to access it.`, + `GenLayer simulator initialized successfully! Go to ${simulatorService.getFrontendUrl()} in your browser to access it.`, ); try { - openFrontend(); + simulatorService.openFrontend(); } catch (error) { console.error(error); } diff --git a/src/lib/clients/system.ts b/src/lib/clients/system.ts index 09b482e9..addb0ab5 100644 --- a/src/lib/clients/system.ts +++ b/src/lib/clients/system.ts @@ -3,7 +3,7 @@ import {ChildProcess, PromiseWithChild, exec} from "child_process"; import os from "os"; import open from "open"; -import {RunningPlatform, AVAILABLE_PLATFORMS} from "@/lib/config/simulator"; +import {RunningPlatform, AVAILABLE_PLATFORMS} from "../config/simulator"; import {MissingRequirementError} from "../errors/missingRequirement"; const asyncExec = util.promisify(exec); diff --git a/src/lib/interfaces/ISimulatorService.ts b/src/lib/interfaces/ISimulatorService.ts new file mode 100644 index 00000000..9915c3cf --- /dev/null +++ b/src/lib/interfaces/ISimulatorService.ts @@ -0,0 +1,38 @@ +import {AiProviders} from "../config/simulator"; + +export interface ISimulatorService { + getSimulatorLocation(): string; + readEnvConfigValue(key: string): string; + addConfigToEnvFile(newConfig: Record): void; + checkRequirements(): Promise>; + downloadSimulator(): Promise; + updateSimulator(): Promise; + pullOllamaModel(): Promise; + configSimulator(newConfig: Record): Promise; + runSimulator(): Promise<{stdout: string; stderr: string}>; + waitForSimulatorToBeReady(retries?: number): Promise; + clearAccountsAndTransactionsDatabase(): Promise; + initializeDatabase(): Promise; + createRandomValidators(numValidators: number, llmProviders: AiProviders[]): Promise; + deleteAllValidators(): Promise; + getAiProvidersOptions(withHint: boolean): Array<{name: string; value: string}>; + getFrontendUrl(): string; + openFrontend(): Promise; + resetDockerContainers(): Promise; + resetDockerImages(): Promise; +} + +export type DownloadSimulatorResultType = { + wasInstalled: boolean; +}; + +export type WaitForSimulatorToBeReadyResultType = { + initialized: boolean; + errorCode?: "TIMEOUT" | "ERROR"; + errorMessage?: string; +}; + +export type InitializeDatabaseResultType = { + createResponse: any; + tablesResponse: any; +}; diff --git a/src/lib/services/simulator.ts b/src/lib/services/simulator.ts index d5c74a72..54ca62f9 100644 --- a/src/lib/services/simulator.ts +++ b/src/lib/services/simulator.ts @@ -2,7 +2,7 @@ import * as fs from "fs"; import * as dotenv from "dotenv"; import * as path from "path"; -import {rpcClient} from "@/lib/clients/jsonRpcClient"; +import {rpcClient} from "../clients/jsonRpcClient"; import { DEFAULT_REPO_GH_URL, DOCKER_IMAGES_AND_CONTAINERS_NAME_PREFIX, @@ -13,7 +13,7 @@ import { STARTING_TIMEOUT_ATTEMPTS, AI_PROVIDERS_CONFIG, AiProviders, -} from "@/lib/config/simulator"; +} from "../config/simulator"; import { checkCommand, getHomeDirectory, @@ -24,243 +24,237 @@ import { removeDockerContainer, listDockerImages, removeDockerImage, -} from "@/lib/clients/system"; +} from "../clients/system"; import {MissingRequirementError} from "../errors/missingRequirement"; -// Private helper functions -export function getSimulatorLocation(): string { - return path.join(getHomeDirectory(), "genlayer-simulator"); -} - -export function readEnvConfigValue(key: string): string { - const simulatorLocation = getSimulatorLocation(); - const envFilePath = path.join(simulatorLocation, ".env"); - // Transform the config string to object - const envConfig = dotenv.parse(fs.readFileSync(envFilePath, "utf8")); - return envConfig[key]; -} +import { + ISimulatorService, + DownloadSimulatorResultType, + WaitForSimulatorToBeReadyResultType, + InitializeDatabaseResultType, +} from "../interfaces/ISimulatorService"; function sleep(millliseconds: number): Promise { return new Promise(resolve => setTimeout(resolve, millliseconds)); } -function addConfigToEnvFile(newConfig: Record): void { - const simulatorLocation = getSimulatorLocation(); - const envFilePath = path.join(simulatorLocation, ".env"); +export class SimulatorService implements ISimulatorService { + public getSimulatorLocation(): string { + return path.join(getHomeDirectory(), "genlayer-simulator"); + } - // Create a backup of the original .env file - fs.writeFileSync(`${envFilePath}.bak`, fs.readFileSync(envFilePath)); + public readEnvConfigValue(key: string): string { + const simulatorLocation = this.getSimulatorLocation(); + const envFilePath = path.join(simulatorLocation, ".env"); + // Transform the config string to object + const envConfig = dotenv.parse(fs.readFileSync(envFilePath, "utf8")); + return envConfig[key]; + } - // Transform the config string to object - const envConfig = dotenv.parse(fs.readFileSync(envFilePath, "utf8")); - Object.keys(newConfig).forEach(key => { - envConfig[key] = newConfig[key]; - }); + public addConfigToEnvFile(newConfig: Record): void { + const simulatorLocation = this.getSimulatorLocation(); + const envFilePath = path.join(simulatorLocation, ".env"); - // Transform the updated config object back into a string - const updatedConfig = Object.keys(envConfig) - .map(key => { - return `${key}=${envConfig[key]}`; - }) - .join("\n"); + // Create a backup of the original .env file + fs.writeFileSync(`${envFilePath}.bak`, fs.readFileSync(envFilePath)); - // Write the new .env file - fs.writeFileSync(envFilePath, updatedConfig); -} + // Transform the config string to object + const envConfig = dotenv.parse(fs.readFileSync(envFilePath, "utf8")); + Object.keys(newConfig).forEach(key => { + envConfig[key] = newConfig[key]; + }); -// Public functions -export async function checkRequirements(): Promise> { - const requirementsInstalled = { - git: false, - docker: false, - }; - - try { - await checkCommand("git --version", "git"); - requirementsInstalled.git = true; - } catch (error) { - if (!(error instanceof MissingRequirementError)) { - throw error; - } - } - try { - await checkCommand("docker --version", "docker"); - requirementsInstalled.docker = true; - } catch (error: any) { - if (!(error instanceof MissingRequirementError)) { - throw error; - } + // Transform the updated config object back into a string + const updatedConfig = Object.keys(envConfig) + .map(key => { + return `${key}=${envConfig[key]}`; + }) + .join("\n"); + + // Write the new .env file + fs.writeFileSync(envFilePath, updatedConfig); } - if (requirementsInstalled.docker) { + public async checkRequirements(): Promise> { + const requirementsInstalled = { + git: false, + docker: false, + }; + try { - await checkCommand("docker ps", "docker"); + await checkCommand("git --version", "git"); + requirementsInstalled.git = true; + } catch (error) { + if (!(error instanceof MissingRequirementError)) { + throw error; + } + } + try { + await checkCommand("docker --version", "docker"); + requirementsInstalled.docker = true; } catch (error: any) { - await executeCommand(DEFAULT_RUN_DOCKER_COMMAND); + if (!(error instanceof MissingRequirementError)) { + throw error; + } } - } - return requirementsInstalled; -} + if (requirementsInstalled.docker) { + try { + await checkCommand("docker ps", "docker"); + } catch (error: any) { + await executeCommand(DEFAULT_RUN_DOCKER_COMMAND); + } + } -type DownloadSimulatorResultType = { - wasInstalled: boolean; -}; + return requirementsInstalled; + } -export async function downloadSimulator(): Promise { - const simulatorLocation = getSimulatorLocation(); + public async downloadSimulator(): Promise { + const simulatorLocation = this.getSimulatorLocation(); - try { - const gitCommand = `git clone ${DEFAULT_REPO_GH_URL} ${simulatorLocation}`; - const cmdsByPlatform = {darwin: gitCommand, win32: gitCommand, linux: gitCommand}; - await executeCommand(cmdsByPlatform, "git"); - } catch (error: any) { - const simulatorLocationExists = fs.existsSync(simulatorLocation); - if (simulatorLocationExists) { - return {wasInstalled: true}; + try { + const gitCommand = `git clone ${DEFAULT_REPO_GH_URL} ${simulatorLocation}`; + const cmdsByPlatform = {darwin: gitCommand, win32: gitCommand, linux: gitCommand}; + await executeCommand(cmdsByPlatform, "git"); + } catch (error: any) { + const simulatorLocationExists = fs.existsSync(simulatorLocation); + if (simulatorLocationExists) { + return {wasInstalled: true}; + } + throw error; } - throw error; + return {wasInstalled: false}; } - return {wasInstalled: false}; -} -export async function updateSimulator(): Promise { - const simulatorLocation = getSimulatorLocation(); - const gitCommand = `git -C "${simulatorLocation}" pull`; - const cmdsByPlatform = {darwin: gitCommand, win32: gitCommand, linux: gitCommand}; - await executeCommand(cmdsByPlatform, "git"); - return {wasInstalled: false}; -} + public async updateSimulator(): Promise { + const simulatorLocation = this.getSimulatorLocation(); + const gitCommand = `git -C "${simulatorLocation}" pull`; + const cmdsByPlatform = {darwin: gitCommand, win32: gitCommand, linux: gitCommand}; + await executeCommand(cmdsByPlatform, "git"); + return true; + } -export async function pullOllamaModel(): Promise { - const simulatorLocation = getSimulatorLocation(); - const cmdsByPlatform = DEFAULT_PULL_OLLAMA_COMMAND(simulatorLocation); - await executeCommand(cmdsByPlatform); - return true; -} + public async pullOllamaModel(): Promise { + const simulatorLocation = this.getSimulatorLocation(); + const cmdsByPlatform = DEFAULT_PULL_OLLAMA_COMMAND(simulatorLocation); + await executeCommand(cmdsByPlatform); + return true; + } -export async function configSimulator(newConfig: Record): Promise { - const simulatorLocation = getSimulatorLocation(); - const envExample = path.join(simulatorLocation, ".env.example"); - const envFilePath = path.join(simulatorLocation, ".env"); - fs.copyFileSync(envExample, envFilePath); - addConfigToEnvFile(newConfig); - return true; -} + public async configSimulator(newConfig: Record): Promise { + const simulatorLocation = this.getSimulatorLocation(); + const envExample = path.join(simulatorLocation, ".env.example"); + const envFilePath = path.join(simulatorLocation, ".env"); + fs.copyFileSync(envExample, envFilePath); + this.addConfigToEnvFile(newConfig); + return true; + } -export function runSimulator(): Promise<{stdout: string; stderr: string}> { - const simulatorLocation = getSimulatorLocation(); - const commandsByPlatform = DEFAULT_RUN_SIMULATOR_COMMAND(simulatorLocation); - return executeCommand(commandsByPlatform); -} + public runSimulator(): Promise<{stdout: string; stderr: string}> { + const simulatorLocation = this.getSimulatorLocation(); + const commandsByPlatform = DEFAULT_RUN_SIMULATOR_COMMAND(simulatorLocation); + return executeCommand(commandsByPlatform); + } -type WaitForSimulatorToBeReadyResultType = { - initialized: boolean; - errorCode?: "TIMEOUT" | "ERROR"; - errorMessage?: string; -}; - -export async function waitForSimulatorToBeReady( - retries: number = STARTING_TIMEOUT_ATTEMPTS, -): Promise { - console.log("Waiting for the simulator to start up..."); - try { - const response = await rpcClient.request({method: "ping", params: []}); - if (response && response.result.status === "OK") { - return {initialized: true}; - } - if (retries > 0) { - await sleep(STARTING_TIMEOUT_WAIT_CYLCE); - return waitForSimulatorToBeReady(retries - 1); - } - } catch (error: any) { - if ( - (error.name === "FetchError" || - error.message.includes("Fetch Error") || - error.message.includes("ECONNRESET") || - error.message.includes("ECONNREFUSED") || - error.message.includes("socket hang up")) && - retries > 0 - ) { - await sleep(STARTING_TIMEOUT_WAIT_CYLCE * 2); - return waitForSimulatorToBeReady(retries - 1); + public async waitForSimulatorToBeReady( + retries: number = STARTING_TIMEOUT_ATTEMPTS, + ): Promise { + console.log("Waiting for the simulator to start up..."); + try { + const response = await rpcClient.request({method: "ping", params: []}); + if (response && response.result.status === "OK") { + return {initialized: true}; + } + if (retries > 0) { + await sleep(STARTING_TIMEOUT_WAIT_CYLCE); + return this.waitForSimulatorToBeReady(retries - 1); + } + } catch (error: any) { + if ( + (error.name === "FetchError" || + error.message.includes("Fetch Error") || + error.message.includes("ECONNRESET") || + error.message.includes("ECONNREFUSED") || + error.message.includes("socket hang up")) && + retries > 0 + ) { + await sleep(STARTING_TIMEOUT_WAIT_CYLCE * 2); + return this.waitForSimulatorToBeReady(retries - 1); + } + return {initialized: false, errorCode: "ERROR", errorMessage: error.message}; } - return {initialized: false, errorCode: "ERROR", errorMessage: error.message}; + + return {initialized: false, errorCode: "TIMEOUT"}; } - return {initialized: false, errorCode: "TIMEOUT"}; -} + public clearAccountsAndTransactionsDatabase(): Promise { + return rpcClient.request({method: "clear_account_and_transactions_tables", params: []}); + } -export function clearAccountsAndTransactionsDatabase(): Promise { - return rpcClient.request({method: "clear_account_and_transactions_tables", params: []}); -} + public async initializeDatabase(): Promise { + const createResponse = await rpcClient.request({method: "create_db", params: []}); + const tablesResponse = await rpcClient.request({method: "create_tables", params: []}); + return {createResponse, tablesResponse}; + } -type InitializeDatabaseResultType = { - createResponse: any; - tablesResponse: any; -}; + public createRandomValidators(numValidators: number, llmProviders: AiProviders[]): Promise { + return rpcClient.request({ + method: "create_random_validators", + params: [numValidators, 1, 10, llmProviders], + }); + } -export async function initializeDatabase(): Promise { - const createResponse = await rpcClient.request({method: "create_db", params: []}); - const tablesResponse = await rpcClient.request({method: "create_tables", params: []}); - return {createResponse, tablesResponse}; -} + public deleteAllValidators(): Promise { + return rpcClient.request({method: "delete_all_validators", params: []}); + } -export function createRandomValidators(numValidators: number, llmProviders: AiProviders[]): Promise { - return rpcClient.request({ - method: "create_random_validators", - params: [numValidators, 1, 10, llmProviders], - }); -} + public getAiProvidersOptions(withHint: boolean = true): Array<{name: string; value: string}> { + return Object.values(AI_PROVIDERS_CONFIG).map(providerConfig => { + return { + name: `${providerConfig.name}${withHint ? ` ${providerConfig.hint}` : ""}`, + value: providerConfig.cliOptionValue, + }; + }); + } -export function deleteAllValidators(): Promise { - return rpcClient.request({method: "delete_all_validators", params: []}); -} + public getFrontendUrl(): string { + const frontendPort = this.readEnvConfigValue("FRONTEND_PORT"); + return `http://localhost:${frontendPort}`; + } -export function getAiProvidersOptions(withHint: boolean = true): Array<{name: string; value: string}> { - return Object.values(AI_PROVIDERS_CONFIG).map(providerConfig => { - return { - name: `${providerConfig.name}${withHint ? ` ${providerConfig.hint}` : ""}`, - value: providerConfig.cliOptionValue, - }; - }); -} + public async openFrontend(): Promise { + await openUrl(this.getFrontendUrl()); + return true; + } -export function getFrontendUrl(): string { - const frontendPort = readEnvConfigValue("FRONTEND_PORT"); - return `http://localhost:${frontendPort}`; -} + public async resetDockerContainers(): Promise { + const containers = await listDockerContainers(); + const genlayerContainers = containers.filter((container: string) => + container.startsWith(DOCKER_IMAGES_AND_CONTAINERS_NAME_PREFIX), + ); + const containersStopPromises = genlayerContainers.map((container: string) => + stopDockerContainer(container), + ); + await Promise.all(containersStopPromises); + + const containersRemovePromises = genlayerContainers.map((container: string) => + removeDockerContainer(container), + ); + await Promise.all(containersRemovePromises); + + return true; + } -export async function openFrontend(): Promise { - await openUrl(getFrontendUrl()); - return true; -} + public async resetDockerImages(): Promise { + const images = await listDockerImages(); + const genlayerImages = images.filter((image: string) => + image.startsWith(DOCKER_IMAGES_AND_CONTAINERS_NAME_PREFIX), + ); + const imagesRemovePromises = genlayerImages.map((image: string) => removeDockerImage(image)); + await Promise.all(imagesRemovePromises); -export async function resetDockerContainers(): Promise { - const containers = await listDockerContainers(); - const genlayerContainers = containers.filter((container: string) => - container.startsWith(DOCKER_IMAGES_AND_CONTAINERS_NAME_PREFIX), - ); - const containersStopPromises = genlayerContainers.map((container: string) => - stopDockerContainer(container), - ); - await Promise.all(containersStopPromises); - - const containersRemovePromises = genlayerContainers.map((container: string) => - removeDockerContainer(container), - ); - await Promise.all(containersRemovePromises); - - return true; + return true; + } } -export async function resetDockerImages(): Promise { - const images = await listDockerImages(); - const genlayerImages = images.filter((image: string) => - image.startsWith(DOCKER_IMAGES_AND_CONTAINERS_NAME_PREFIX), - ); - const imagesRemovePromises = genlayerImages.map((image: string) => removeDockerImage(image)); - await Promise.all(imagesRemovePromises); - - return true; -} +export default new SimulatorService(); diff --git a/src/types/node-fetch.d.ts b/src/types/node-fetch.d.ts new file mode 100644 index 00000000..d468e89f --- /dev/null +++ b/src/types/node-fetch.d.ts @@ -0,0 +1 @@ +declare module "node-fetch"; diff --git a/tests/actions/init.test.ts b/tests/actions/init.test.ts new file mode 100644 index 00000000..32f37a21 --- /dev/null +++ b/tests/actions/init.test.ts @@ -0,0 +1,607 @@ +/* eslint-disable import/no-named-as-default-member */ +import {jest} from "@jest/globals"; +import inquirer from "inquirer"; + +import simulatorService from "../../src/lib/services/simulator"; +import {initAction} from "../../src/commands/general/init"; + +// Default options for the action +const defaultActionOptions = {numValidators: 5}; + +describe("init action", () => { + let error: jest.Mock; + let log: jest.Mock; + let inquirerPrompt: jest.Mock; + + let simServCheckRequirements: jest.Mock; + let simServResetDockerContainers: jest.Mock; + let simServResetDockerImages: jest.Mock; + let simServDownloadSimulator: jest.Mock; + let simServUpdateSimulator: jest.Mock; + let simServgetAiProvidersOptions: jest.Mock; + let simServConfigSimulator: jest.Mock; + let simServRunSimulator: jest.Mock; + let simServWaitForSimulator: jest.Mock; + let simServPullOllamaModel: jest.Mock; + let simServClearAccAndTxsDb: jest.Mock; + let simServInitializeDatabase: jest.Mock; + let simServDeleteAllValidators: jest.Mock; + let simServCreateRandomValidators: jest.Mock; + let simServOpenFrontend: jest.Mock; + let simServRedEnvConfigVariable: jest.Mock; + + beforeEach(() => { + jest.clearAllMocks(); + + error = jest.spyOn(console, "error").mockImplementation(() => {}) as jest.Mock; + log = jest.spyOn(console, "log").mockImplementation(() => {}) as jest.Mock; + inquirerPrompt = jest.spyOn(inquirer, "prompt") as jest.Mock; + + simServCheckRequirements = jest.spyOn(simulatorService, "checkRequirements") as jest.Mock; + simServResetDockerContainers = jest.spyOn(simulatorService, "resetDockerContainers") as jest.Mock; + simServResetDockerImages = jest.spyOn(simulatorService, "resetDockerImages") as jest.Mock; + simServDownloadSimulator = jest.spyOn(simulatorService, "downloadSimulator") as jest.Mock; + simServUpdateSimulator = jest.spyOn(simulatorService, "updateSimulator") as jest.Mock; + simServConfigSimulator = jest.spyOn(simulatorService, "configSimulator") as jest.Mock; + simServgetAiProvidersOptions = jest.spyOn(simulatorService, "getAiProvidersOptions") as jest.Mock; + simServRunSimulator = jest.spyOn(simulatorService, "runSimulator") as jest.Mock; + simServWaitForSimulator = jest.spyOn(simulatorService, "waitForSimulatorToBeReady") as jest.Mock; + simServPullOllamaModel = jest.spyOn(simulatorService, "pullOllamaModel") as jest.Mock; + simServClearAccAndTxsDb = jest.spyOn( + simulatorService, + "clearAccountsAndTransactionsDatabase", + ) as jest.Mock; + simServInitializeDatabase = jest.spyOn(simulatorService, "initializeDatabase") as jest.Mock; + simServDeleteAllValidators = jest.spyOn(simulatorService, "deleteAllValidators") as jest.Mock; + simServCreateRandomValidators = jest.spyOn(simulatorService, "createRandomValidators") as jest.Mock; + simServOpenFrontend = jest.spyOn(simulatorService, "openFrontend") as jest.Mock; + simServRedEnvConfigVariable = jest.spyOn(simulatorService, "readEnvConfigValue") as jest.Mock; + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + test("if both requirements are missing, then the execution fails", async () => { + // Given + simServCheckRequirements.mockResolvedValue({git: false, docker: false}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith( + "Git and Docker are not installed. Please install them and try again.\n", + ); + }); + + test("if only docker is missing, then the execution fails", async () => { + // Given + simServCheckRequirements.mockResolvedValue({git: true, docker: false}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith("Docker is not installed. Please install Docker and try again.\n"); + }); + + test("if only git is missing, then the execution fails", async () => { + // Given + simServCheckRequirements.mockResolvedValue({git: false, docker: true}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith("Git is not installed. Please install Git and try again.\n"); + }); + + test("if check requirements fail, then the execution aborts", async () => { + // Given + simServCheckRequirements.mockRejectedValue(new Error("Error")); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("if resetDockerContainers fail, then the execution aborts", async () => { + // Given + simServResetDockerContainers.mockRejectedValue(new Error("Error")); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("if resetDockerImages fail, then the execution aborts", async () => { + // Given + simServResetDockerImages.mockRejectedValue(new Error("Error")); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("if download is not confirmed, abort", async () => { + // Given + inquirerPrompt.mockResolvedValue({confirmDownload: false}); + simServCheckRequirements.mockResolvedValue({git: true, docker: true}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(log).toHaveBeenCalledTimes(3); + expect(log).toHaveBeenNthCalledWith(3, "Aborted!"); + }); + + test("if not already installed, it should download and install the simulator", async () => { + // Given + inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + simServDownloadSimulator.mockResolvedValue({wasInstalled: false}); + simServConfigSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(simulatorService.downloadSimulator).toHaveBeenCalled(); + expect(simulatorService.updateSimulator).not.toHaveBeenCalled(); + }); + + test("if already installed, it should update the simulator", async () => { + // Given + inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + simServDownloadSimulator.mockResolvedValue({wasInstalled: true}); + simServUpdateSimulator.mockResolvedValue(true); + simServConfigSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(simulatorService.downloadSimulator).toHaveBeenCalled(); + expect(simulatorService.updateSimulator).toHaveBeenCalled(); + }); + + test("should prompt for LLM providers and call configSimulator with selected providers", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(inquirerPrompt).toHaveBeenNthCalledWith(2, [ + { + type: "checkbox", + name: "selectedLlmProviders", + message: "Select which LLM providers do you want to use:", + choices: [ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ], + validate: expect.any(Function), + }, + ]); + expect(simulatorService.configSimulator).toHaveBeenCalledWith({ + OPENAIKEY: "API_KEY1", + HEURISTAIAPIKEY: "API_KEY2", + }); + }); + + test("if configSimulator fails, then the execution aborts", async () => { + // Given + inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + simServConfigSimulator.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("if runSimulator fails, then the execution aborts", async () => { + // Given + inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + simServRunSimulator.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("should run the simulator after all configurations", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(simulatorService.runSimulator).toHaveBeenCalled(); + }); + + test("should abort if waiting for the simulator returns ERROR", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: false, + errorCode: "ERROR", + errorMessage: "errorMessage", + }); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(log).toHaveBeenCalledWith("errorMessage"); + expect(error).toHaveBeenCalledWith("Unable to initialize the GenLayer simulator. Please try again."); + }); + + test("should abort if waiting for the simulator returns TIMEOUT", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: false, + errorCode: "TIMEOUT", + errorMessage: "errorMessage", + }); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith( + "The simulator is taking too long to initialize. Please try again after the simulator is ready.", + ); + }); + + test("should abort if waiting for the simulator throws an error", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("should pull llama3 from Ollama if ollama is in providers", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai", "ollama"], + openai: "API_KEY1", + heuristai: "API_KEY2", + ollama: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + {name: "Ollama", value: "ollama"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // This will stop the execution + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(simServPullOllamaModel).toHaveBeenCalled(); + }); + + test("shouldn't pull llama3 from Ollama if ollama is not in providers", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // This will stop the execution + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(simServPullOllamaModel).not.toHaveBeenCalled(); + }); + + test("should abort if clear accounts and transactions throws an error", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("should abort if initialize database throws an error", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockResolvedValue(true); + simServInitializeDatabase.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("should abort if database create db is not successful", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockResolvedValue(true); + simServInitializeDatabase.mockResolvedValue({createResponse: false, tablesResponse: true}); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith("Unable to initialize the database. Please try again."); + }); + + test("should abort if database table creation is not successful", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockResolvedValue(true); + simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: false}); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith("Unable to initialize the database. Please try again."); + }); + + test("should abort if deleteAllValidators throws an error", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockResolvedValue(true); + simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: true}); + simServDeleteAllValidators.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith("Unable to initialize the validators."); + }); + + test("should abort if createRandomValidators throws an error", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockResolvedValue(true); + simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: true}); + simServDeleteAllValidators.mockResolvedValue(true); + simServCreateRandomValidators.mockRejectedValue(new Error("Error")); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + expect(error).toHaveBeenCalledWith("Unable to initialize the validators."); + }); + + test("should open the frontend if everything went well", async () => { + // Given + inquirerPrompt.mockResolvedValue({ + confirmDownload: true, + selectedLlmProviders: ["openai", "heuristai"], + openai: "API_KEY1", + heuristai: "API_KEY2", + }); + simServgetAiProvidersOptions.mockReturnValue([ + {name: "OpenAI", value: "openai"}, + {name: "Heurist", value: "heuristai"}, + ]); + simServConfigSimulator.mockResolvedValue(true); + simServRunSimulator.mockResolvedValue(true); + simServWaitForSimulator.mockResolvedValue({ + initialized: true, + }); + simServPullOllamaModel.mockResolvedValue(true); + simServClearAccAndTxsDb.mockResolvedValue(true); + simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: true}); + simServDeleteAllValidators.mockResolvedValue(true); + simServCreateRandomValidators.mockResolvedValue(true); + simServOpenFrontend.mockResolvedValue(true); + simServRedEnvConfigVariable.mockReturnValue("8080"); + + // When + await initAction({numValidators: 5}, simulatorService); + + // Then + const frontendUrl = simulatorService.getFrontendUrl(); + expect(log).toHaveBeenCalledWith( + `GenLayer simulator initialized successfully! Go to ${frontendUrl} in your browser to access it.`, + ); + }); +}); diff --git a/tests/commands/init.test.ts b/tests/commands/init.test.ts index 8e74a045..2ee87fab 100644 --- a/tests/commands/init.test.ts +++ b/tests/commands/init.test.ts @@ -1,19 +1,26 @@ -import {program} from "commander"; - +import {Command} from "commander"; +import {jest} from "@jest/globals"; import {initializeGeneralCommands} from "../../src/commands/general"; import {getCommand, getCommandOption} from "../utils"; jest.mock("inquirer", () => ({ - prompt: jest.fn().mockResolvedValue({}), + prompt: jest.fn(() => {}), })); const action = jest.fn(); describe("init command", () => { - initializeGeneralCommands(program); - const initCommand = getCommand("init"); - initCommand?.action(action); + let initCommand: Command; + let program: Command; beforeEach(() => { + program = new Command(); + initializeGeneralCommands(program); + + initCommand = getCommand(program, "init"); + initCommand?.action(async args => { + action(args); + }); + jest.clearAllMocks(); }); @@ -21,11 +28,11 @@ describe("init command", () => { jest.restoreAllMocks(); }); - test("doesn't have required arguments nor options", () => { + test("doesn't have required arguments nor options", async () => { expect(() => program.parse(["node", "test", "init"])).not.toThrow(); }); - test("option -n, --numValidators is accepted", () => { + test("option -n, --numValidators is accepted", async () => { expect(() => program.parse(["node", "test", "init", "-n", "10"])).not.toThrow(); expect(() => program.parse(["node", "test", "init", "--numValidators", "10"])).not.toThrow(); }); @@ -46,10 +53,11 @@ describe("init command", () => { ); }); - test("action is called", () => { + test("action is called", async () => { // Given When program.parse(["node", "test", "init"]); // Then expect(action).toHaveBeenCalledTimes(1); + expect(action).toHaveBeenCalledWith({numValidators: "5"}); }); }); diff --git a/tests/utils.ts b/tests/utils.ts index 860b6a5c..b60621cb 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -1,6 +1,6 @@ -import {Command, Option, program} from "commander"; +import {Command, Option} from "commander"; -export function getCommand(commandName: string): Command { +export function getCommand(program: Command, commandName: string): Command { const command = program.commands.find(command => command.name() === commandName); if (!command) { throw new Error(`Command ${commandName} not found`); diff --git a/tsconfig.json b/tsconfig.json index 5c23d36d..fbaa85cd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "ES2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ @@ -25,9 +25,9 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, + "module": "ES2022" /* Specify what module code is generated. */, // "rootDir": /* Specify the root folder within your source files. */, - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ "paths": { "@/*": ["./src/*"], @@ -38,7 +38,11 @@ "./tests" ] /* Allow multiple folders to be treated as one when resolving modules. */, // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + "types": [ + "jest", + "node", + "@types/jest" + ] /* Specify type package names to be included without being referenced in a source file. */, // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ From ab3b32bee5d06b65ec5c584aeede75f309fc7dc0 Mon Sep 17 00:00:00 2001 From: Cristiam Da Silva Date: Wed, 3 Jul 2024 11:23:12 +0200 Subject: [PATCH 02/40] 33 cli add a warning at init to say that the config is going to be overwritten (#38) * feat: added initial warning about reseting the setup * test: added a test for new step introduced --- src/commands/general/init.ts | 19 +++++++++++++++-- tests/actions/init.test.ts | 41 ++++++++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 29d7ba3a..33b1baf9 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -20,8 +20,6 @@ function getRequirementsErrorMessage({git, docker}: Record): st } export async function initAction(options: InitActionOptions, simulatorService: ISimulatorService) { - console.log(`Initializing GenLayer CLI with ${options.numValidators} validators`); - // Check if git and docker are installed try { const {git, docker} = await simulatorService.checkRequirements(); @@ -38,6 +36,23 @@ export async function initAction(options: InitActionOptions, simulatorService: I return; } + // Ask for confirmation on reseting the GenLayer Simulator from GitHub + const resetAnswers = await inquirer.prompt([ + { + type: "confirm", + name: "confirmReset", + message: `This command is going to reset GenLayer docker images and containers, providers API Keys, and GenLayer database (accounts, transactions, and validators). Do you want to continue?`, + default: true, + }, + ]); + + if (!resetAnswers.confirmReset) { + console.log("Aborted!"); + return; + } + + console.log(`Initializing GenLayer CLI with ${options.numValidators} validators`); + // Reset Docker containers and images console.log(`Resetting Docker containers and images...`); try { diff --git a/tests/actions/init.test.ts b/tests/actions/init.test.ts index 32f37a21..3a88a2fa 100644 --- a/tests/actions/init.test.ts +++ b/tests/actions/init.test.ts @@ -112,8 +112,22 @@ describe("init action", () => { expect(error).toHaveBeenCalledWith(new Error("Error")); }); + test("if reset is not confirmed, abort", async () => { + // Given + inquirerPrompt.mockResolvedValue({confirmReset: false}); + simServCheckRequirements.mockResolvedValue({git: true, docker: true}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(log).toHaveBeenCalledTimes(1); + expect(log).toHaveBeenNthCalledWith(1, "Aborted!"); + }); + test("if resetDockerContainers fail, then the execution aborts", async () => { // Given + inquirerPrompt.mockResolvedValue({confirmReset: true}); simServResetDockerContainers.mockRejectedValue(new Error("Error")); // When @@ -126,6 +140,7 @@ describe("init action", () => { test("if resetDockerImages fail, then the execution aborts", async () => { // Given + inquirerPrompt.mockResolvedValue({confirmReset: true}); simServResetDockerImages.mockRejectedValue(new Error("Error")); // When @@ -138,7 +153,7 @@ describe("init action", () => { test("if download is not confirmed, abort", async () => { // Given - inquirerPrompt.mockResolvedValue({confirmDownload: false}); + inquirerPrompt.mockResolvedValue({confirmReset: true, confirmDownload: false}); simServCheckRequirements.mockResolvedValue({git: true, docker: true}); // When @@ -151,7 +166,7 @@ describe("init action", () => { test("if not already installed, it should download and install the simulator", async () => { // Given - inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + inquirerPrompt.mockResolvedValue({confirmReset: true, confirmDownload: true, selectedLlmProviders: []}); simServDownloadSimulator.mockResolvedValue({wasInstalled: false}); simServConfigSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution @@ -165,7 +180,7 @@ describe("init action", () => { test("if already installed, it should update the simulator", async () => { // Given - inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + inquirerPrompt.mockResolvedValue({confirmReset: true, confirmDownload: true, selectedLlmProviders: []}); simServDownloadSimulator.mockResolvedValue({wasInstalled: true}); simServUpdateSimulator.mockResolvedValue(true); simServConfigSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution @@ -181,6 +196,7 @@ describe("init action", () => { test("should prompt for LLM providers and call configSimulator with selected providers", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -197,7 +213,7 @@ describe("init action", () => { await initAction({numValidators: 5}, simulatorService); // Then - expect(inquirerPrompt).toHaveBeenNthCalledWith(2, [ + expect(inquirerPrompt).toHaveBeenNthCalledWith(3, [ { type: "checkbox", name: "selectedLlmProviders", @@ -217,7 +233,7 @@ describe("init action", () => { test("if configSimulator fails, then the execution aborts", async () => { // Given - inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + inquirerPrompt.mockResolvedValue({confirmReset: true, confirmDownload: true, selectedLlmProviders: []}); simServConfigSimulator.mockRejectedValue(new Error("Error")); // When @@ -230,7 +246,7 @@ describe("init action", () => { test("if runSimulator fails, then the execution aborts", async () => { // Given - inquirerPrompt.mockResolvedValue({confirmDownload: true, selectedLlmProviders: []}); + inquirerPrompt.mockResolvedValue({confirmReset: true, confirmDownload: true, selectedLlmProviders: []}); simServRunSimulator.mockRejectedValue(new Error("Error")); // When @@ -244,6 +260,7 @@ describe("init action", () => { test("should run the simulator after all configurations", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -267,6 +284,7 @@ describe("init action", () => { test("should abort if waiting for the simulator returns ERROR", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -295,6 +313,7 @@ describe("init action", () => { test("should abort if waiting for the simulator returns TIMEOUT", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -324,6 +343,7 @@ describe("init action", () => { test("should abort if waiting for the simulator throws an error", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -347,6 +367,7 @@ describe("init action", () => { test("should pull llama3 from Ollama if ollama is in providers", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai", "ollama"], openai: "API_KEY1", @@ -376,6 +397,7 @@ describe("init action", () => { test("shouldn't pull llama3 from Ollama if ollama is not in providers", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -403,6 +425,7 @@ describe("init action", () => { test("should abort if clear accounts and transactions throws an error", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -430,6 +453,7 @@ describe("init action", () => { test("should abort if initialize database throws an error", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -458,6 +482,7 @@ describe("init action", () => { test("should abort if database create db is not successful", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -486,6 +511,7 @@ describe("init action", () => { test("should abort if database table creation is not successful", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -514,6 +540,7 @@ describe("init action", () => { test("should abort if deleteAllValidators throws an error", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -543,6 +570,7 @@ describe("init action", () => { test("should abort if createRandomValidators throws an error", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", @@ -573,6 +601,7 @@ describe("init action", () => { test("should open the frontend if everything went well", async () => { // Given inquirerPrompt.mockResolvedValue({ + confirmReset: true, confirmDownload: true, selectedLlmProviders: ["openai", "heuristai"], openai: "API_KEY1", From b77fec81a27272a0f3578f0479505803eb76cd22 Mon Sep 17 00:00:00 2001 From: Cristiam Da Silva Date: Wed, 3 Jul 2024 11:53:01 +0200 Subject: [PATCH 03/40] 37 cli run simulator on certain branch (#39) * feat: added initial warning about reseting the setup * test: added a test for new step introduced * feat: added optional branch when fetching the simulator from github * feat: added branch name on init and up commands * test: added tests for branch option on init command --- src/commands/general/index.ts | 4 ++- src/commands/general/init.ts | 7 +++-- src/commands/general/start.ts | 7 +++-- src/lib/interfaces/ISimulatorService.ts | 4 +-- src/lib/services/simulator.ts | 28 ++++++++++++++---- tests/actions/init.test.ts | 38 ++++++++++++------------- tests/commands/init.test.ts | 17 ++++++++--- 7 files changed, 67 insertions(+), 38 deletions(-) diff --git a/src/commands/general/index.ts b/src/commands/general/index.ts index 84027fd1..16a74077 100644 --- a/src/commands/general/index.ts +++ b/src/commands/general/index.ts @@ -9,7 +9,8 @@ export function initializeGeneralCommands(program: Command) { program .command("init") .description("Initialize the GenLayer Environment") - .option("-n, --numValidators ", "Number of validators", "5") + .option("--numValidators ", "Number of validators", "5") + .option("--branch ", "Branch", "main") .action((options: InitActionOptions) => initAction(options, simulatorService)); program @@ -18,6 +19,7 @@ export function initializeGeneralCommands(program: Command) { .option("--no-reset-accounts", "Don't restart the database for accouts and transactions", true) .option("--reset-validators", "Remove all current validators and create new random ones", false) .option("--numValidators ", "Number of validators", "5") + .option("--branch ", "Branch", "main") .action((options: StartActionOptions) => startAction(options, simulatorService)); return program; diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 33b1baf9..1705084f 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -4,6 +4,7 @@ import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; import {AI_PROVIDERS_CONFIG, AiProviders} from "../../lib/config/simulator"; export interface InitActionOptions { numValidators: number; + branch: string; } function getRequirementsErrorMessage({git, docker}: Record): string { @@ -68,7 +69,7 @@ export async function initAction(options: InitActionOptions, simulatorService: I { type: "confirm", name: "confirmDownload", - message: `This action is going to download the GenLayer Simulator from GitHub into "${simulatorService.getSimulatorLocation()}". Do you want to continue?`, + message: `This action is going to download the GenLayer Simulator from GitHub (branch ${options.branch}) into "${simulatorService.getSimulatorLocation()}". Do you want to continue?`, default: true, }, ]); @@ -81,9 +82,9 @@ export async function initAction(options: InitActionOptions, simulatorService: I // Download the GenLayer Simulator from GitHub console.log(`Downloading GenLayer Simulator from GitHub...`); try { - const {wasInstalled} = await simulatorService.downloadSimulator(); + const {wasInstalled} = await simulatorService.downloadSimulator(options.branch); if (wasInstalled) { - await simulatorService.updateSimulator(); + await simulatorService.updateSimulator(options.branch); } } catch (error) { console.error(error); diff --git a/src/commands/general/start.ts b/src/commands/general/start.ts index c33447c1..43cbb795 100644 --- a/src/commands/general/start.ts +++ b/src/commands/general/start.ts @@ -6,10 +6,11 @@ export interface StartActionOptions { resetAccounts: string; resetValidators: string; numValidators: number; + branch: string; } export async function startAction(options: StartActionOptions, simulatorService: ISimulatorService) { - const {resetAccounts, resetValidators, numValidators} = options; + const {resetAccounts, resetValidators, numValidators, branch} = options; const restartAccountsHintText = resetAccounts ? "restarting the accounts and transactions database" @@ -24,7 +25,7 @@ export async function startAction(options: StartActionOptions, simulatorService: // Update the simulator to the latest version console.log(`Updating GenLayer Simulator...`); try { - await simulatorService.updateSimulator(); + await simulatorService.updateSimulator(branch); } catch (error) { console.error(error); return; @@ -33,7 +34,7 @@ export async function startAction(options: StartActionOptions, simulatorService: // Run the GenLayer Simulator console.log("Running the GenLayer Simulator..."); try { - simulatorService.runSimulator(); + await simulatorService.runSimulator(); } catch (error) { console.error(error); return; diff --git a/src/lib/interfaces/ISimulatorService.ts b/src/lib/interfaces/ISimulatorService.ts index 9915c3cf..17308eed 100644 --- a/src/lib/interfaces/ISimulatorService.ts +++ b/src/lib/interfaces/ISimulatorService.ts @@ -5,8 +5,8 @@ export interface ISimulatorService { readEnvConfigValue(key: string): string; addConfigToEnvFile(newConfig: Record): void; checkRequirements(): Promise>; - downloadSimulator(): Promise; - updateSimulator(): Promise; + downloadSimulator(branch?: string): Promise; + updateSimulator(branch?: string): Promise; pullOllamaModel(): Promise; configSimulator(newConfig: Record): Promise; runSimulator(): Promise<{stdout: string; stderr: string}>; diff --git a/src/lib/services/simulator.ts b/src/lib/services/simulator.ts index 54ca62f9..d7f90d15 100644 --- a/src/lib/services/simulator.ts +++ b/src/lib/services/simulator.ts @@ -109,11 +109,11 @@ export class SimulatorService implements ISimulatorService { return requirementsInstalled; } - public async downloadSimulator(): Promise { + public async downloadSimulator(branch: string = "main"): Promise { const simulatorLocation = this.getSimulatorLocation(); try { - const gitCommand = `git clone ${DEFAULT_REPO_GH_URL} ${simulatorLocation}`; + const gitCommand = `git clone -b ${branch} ${DEFAULT_REPO_GH_URL} ${simulatorLocation}`; const cmdsByPlatform = {darwin: gitCommand, win32: gitCommand, linux: gitCommand}; await executeCommand(cmdsByPlatform, "git"); } catch (error: any) { @@ -126,11 +126,27 @@ export class SimulatorService implements ISimulatorService { return {wasInstalled: false}; } - public async updateSimulator(): Promise { + public async updateSimulator(branch: string = "main"): Promise { const simulatorLocation = this.getSimulatorLocation(); - const gitCommand = `git -C "${simulatorLocation}" pull`; - const cmdsByPlatform = {darwin: gitCommand, win32: gitCommand, linux: gitCommand}; - await executeCommand(cmdsByPlatform, "git"); + const gitCleanCommand = `git -C "${simulatorLocation}" clean -f`; + const cleanCmdsByPlatform = {darwin: gitCleanCommand, win32: gitCleanCommand, linux: gitCleanCommand}; + await executeCommand(cleanCmdsByPlatform, "git"); + + const gitFetchCommand = `git -C "${simulatorLocation}" fetch`; + const fetchCmdsByPlatform = {darwin: gitFetchCommand, win32: gitFetchCommand, linux: gitFetchCommand}; + await executeCommand(fetchCmdsByPlatform, "git"); + + const gitCheckoutCommand = `git -C "${simulatorLocation}" checkout ${branch}`; + const checkoutCmdsByPlatform = { + darwin: gitCheckoutCommand, + win32: gitCheckoutCommand, + linux: gitCheckoutCommand, + }; + await executeCommand(checkoutCmdsByPlatform, "git"); + + const gitPullCommand = `git -C "${simulatorLocation}" pull`; + const pullCmdsByPlatform = {darwin: gitPullCommand, win32: gitPullCommand, linux: gitPullCommand}; + await executeCommand(pullCmdsByPlatform, "git"); return true; } diff --git a/tests/actions/init.test.ts b/tests/actions/init.test.ts index 3a88a2fa..2bafa1bc 100644 --- a/tests/actions/init.test.ts +++ b/tests/actions/init.test.ts @@ -6,7 +6,7 @@ import simulatorService from "../../src/lib/services/simulator"; import {initAction} from "../../src/commands/general/init"; // Default options for the action -const defaultActionOptions = {numValidators: 5}; +const defaultActionOptions = {numValidators: 5, branch: "main"}; describe("init action", () => { let error: jest.Mock; @@ -171,7 +171,7 @@ describe("init action", () => { simServConfigSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(simulatorService.downloadSimulator).toHaveBeenCalled(); @@ -186,7 +186,7 @@ describe("init action", () => { simServConfigSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(simulatorService.downloadSimulator).toHaveBeenCalled(); @@ -210,7 +210,7 @@ describe("init action", () => { simServRunSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(inquirerPrompt).toHaveBeenNthCalledWith(3, [ @@ -237,7 +237,7 @@ describe("init action", () => { simServConfigSimulator.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledTimes(1); @@ -250,7 +250,7 @@ describe("init action", () => { simServRunSimulator.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledTimes(1); @@ -275,7 +275,7 @@ describe("init action", () => { simServWaitForSimulator.mockRejectedValue(new Error("Error")); // This will stop the execution // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(simulatorService.runSimulator).toHaveBeenCalled(); @@ -303,7 +303,7 @@ describe("init action", () => { }); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(log).toHaveBeenCalledWith("errorMessage"); @@ -332,7 +332,7 @@ describe("init action", () => { }); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith( @@ -358,7 +358,7 @@ describe("init action", () => { simServWaitForSimulator.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith(new Error("Error")); @@ -388,7 +388,7 @@ describe("init action", () => { simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // This will stop the execution // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(simServPullOllamaModel).toHaveBeenCalled(); @@ -416,7 +416,7 @@ describe("init action", () => { simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // This will stop the execution // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(simServPullOllamaModel).not.toHaveBeenCalled(); @@ -444,7 +444,7 @@ describe("init action", () => { simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith(new Error("Error")); @@ -473,7 +473,7 @@ describe("init action", () => { simServInitializeDatabase.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith(new Error("Error")); @@ -502,7 +502,7 @@ describe("init action", () => { simServInitializeDatabase.mockResolvedValue({createResponse: false, tablesResponse: true}); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith("Unable to initialize the database. Please try again."); @@ -531,7 +531,7 @@ describe("init action", () => { simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: false}); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith("Unable to initialize the database. Please try again."); @@ -561,7 +561,7 @@ describe("init action", () => { simServDeleteAllValidators.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith("Unable to initialize the validators."); @@ -592,7 +592,7 @@ describe("init action", () => { simServCreateRandomValidators.mockRejectedValue(new Error("Error")); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then expect(error).toHaveBeenCalledWith("Unable to initialize the validators."); @@ -625,7 +625,7 @@ describe("init action", () => { simServRedEnvConfigVariable.mockReturnValue("8080"); // When - await initAction({numValidators: 5}, simulatorService); + await initAction(defaultActionOptions, simulatorService); // Then const frontendUrl = simulatorService.getFrontendUrl(); diff --git a/tests/commands/init.test.ts b/tests/commands/init.test.ts index 2ee87fab..9b535387 100644 --- a/tests/commands/init.test.ts +++ b/tests/commands/init.test.ts @@ -32,17 +32,26 @@ describe("init command", () => { expect(() => program.parse(["node", "test", "init"])).not.toThrow(); }); - test("option -n, --numValidators is accepted", async () => { - expect(() => program.parse(["node", "test", "init", "-n", "10"])).not.toThrow(); + test("option --numValidators is accepted", async () => { expect(() => program.parse(["node", "test", "init", "--numValidators", "10"])).not.toThrow(); }); - test("option -n, --numValidators default value is 5", async () => { + test("option --numValidators default value is 5", async () => { // Given // When const numValidatorsOption = getCommandOption(initCommand, "--numValidators"); expect(numValidatorsOption?.defaultValue).toBe("5"); }); + test("option --branch is accepted", async () => { + expect(() => program.parse(["node", "test", "init", "--branch", "example"])).not.toThrow(); + }); + + test("option --branch default value is main", async () => { + // Given // When + const numValidatorsOption = getCommandOption(initCommand, "--branch"); + expect(numValidatorsOption?.defaultValue).toBe("main"); + }); + test("random option is not accepted", async () => { initCommand?.exitOverride(); expect(() => program.parse(["node", "test", "init", "-random"])).toThrow( @@ -58,6 +67,6 @@ describe("init command", () => { program.parse(["node", "test", "init"]); // Then expect(action).toHaveBeenCalledTimes(1); - expect(action).toHaveBeenCalledWith({numValidators: "5"}); + expect(action).toHaveBeenCalledWith({numValidators: "5", branch: "main"}); }); }); From ddb0714330c895c902e72d4dcc66e632142fd3cd Mon Sep 17 00:00:00 2001 From: Cristiam Da Silva Date: Wed, 3 Jul 2024 12:12:42 +0200 Subject: [PATCH 04/40] 41 cli add beta releases for staging branch (#42) * chore: added npm command for beta release * ci: added github action for beta release --- .github/workflows/publish-beta.yml | 41 ++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-beta.yml diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml new file mode 100644 index 00000000..77678e39 --- /dev/null +++ b/.github/workflows/publish-beta.yml @@ -0,0 +1,41 @@ +name: Release & Publish Beta version of the Package to NPM with @beta tag + +on: + workflow_dispatch: + push: + branches: + - staging + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Get CI Bot Token + uses: tibdex/github-app-token@v1 + id: ci_bot_token + with: + app_id: ${{ secrets.CI_BOT_APP_ID }} + private_key: ${{ secrets.CI_BOT_SECRET }} + + - name: Checkout source code + uses: actions/checkout@v4 + with: + token: ${{ steps.ci_bot_token.outputs.token }} + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: "18" + - name: Install the dependencies + run: npm ci + - name: Initialize Git User + run: | + git config --global user.email "github-actions[bot]@genlayer.com" + git config --global user.name "github-actions[bot]" + - name: Initialize the NPM configuration + run: npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + - run: npm run release-beta + env: + GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index 7fb8948a..51e30616 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch", "dev": "cross-env NODE_ENV=development node esbuild.config.js", "build": "cross-env NODE_ENV=production node esbuild.config.js", - "release": "release-it --ci" + "release": "release-it --ci", + "release-beta": "release-it --ci --preRelease=beta" }, "repository": { "type": "git", From 26302e448e73c4e77f93192338fd26feea7baf41 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 10:13:11 +0000 Subject: [PATCH 05/40] Release v0.0.32-beta.0 [skip ci] --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dea86730..b90996b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ +## 0.0.32-beta.0 (2024-07-03) + ## 0.0.31 (2024-05-27) diff --git a/package-lock.json b/package-lock.json index 0e2009ab..cd6a8abc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "genlayer", - "version": "0.0.31", + "version": "0.0.32-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "genlayer", - "version": "0.0.31", + "version": "0.0.32-beta.0", "license": "ISC", "dependencies": { "commander": "^12.0.0", diff --git a/package.json b/package.json index 51e30616..cc9a0bce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "genlayer", - "version": "0.0.31", + "version": "0.0.32-beta.0", "description": "GenLayer Command Line Tool", "main": "src/index.ts", "bin": { From 60d6da31f61d272ef9927f9c3ff073d118fb013f Mon Sep 17 00:00:00 2001 From: Cristiam Da Silva Date: Thu, 4 Jul 2024 01:00:46 +0200 Subject: [PATCH 06/40] 43 cli fix missing endpoints and simulator response (#44) * fix: removed non existing simulator endpoint * refactor: adapted ping simulator response for current and next version * tests: removed non existing simulator endpoint test --- src/commands/general/index.ts | 1 - src/commands/general/init.ts | 16 --- src/commands/general/start.ts | 32 +----- src/lib/interfaces/ISimulatorService.ts | 2 - src/lib/services/simulator.ts | 14 +-- tests/actions/init.test.ts | 132 +----------------------- 6 files changed, 9 insertions(+), 188 deletions(-) diff --git a/src/commands/general/index.ts b/src/commands/general/index.ts index 16a74077..764ec6af 100644 --- a/src/commands/general/index.ts +++ b/src/commands/general/index.ts @@ -16,7 +16,6 @@ export function initializeGeneralCommands(program: Command) { program .command("up") .description("Starts GenLayer's simulator") - .option("--no-reset-accounts", "Don't restart the database for accouts and transactions", true) .option("--reset-validators", "Remove all current validators and create new random ones", false) .option("--numValidators ", "Number of validators", "5") .option("--branch ", "Branch", "main") diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 1705084f..a85ee730 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -180,22 +180,6 @@ export async function initAction(options: InitActionOptions, simulatorService: I await simulatorService.pullOllamaModel(); } - // Initialize the database - console.log("Initializing the database..."); - try { - //remove everything from the database - await simulatorService.clearAccountsAndTransactionsDatabase(); - - const {createResponse, tablesResponse} = await simulatorService.initializeDatabase(); - if (!createResponse || !tablesResponse) { - console.error("Unable to initialize the database. Please try again."); - return; - } - } catch (error) { - console.error(error); - return; - } - // Initializing validators console.log("Initializing validators..."); try { diff --git a/src/commands/general/start.ts b/src/commands/general/start.ts index 43cbb795..b8031a53 100644 --- a/src/commands/general/start.ts +++ b/src/commands/general/start.ts @@ -3,24 +3,19 @@ import inquirer from "inquirer"; import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; export interface StartActionOptions { - resetAccounts: string; resetValidators: string; numValidators: number; branch: string; } export async function startAction(options: StartActionOptions, simulatorService: ISimulatorService) { - const {resetAccounts, resetValidators, numValidators, branch} = options; - - const restartAccountsHintText = resetAccounts - ? "restarting the accounts and transactions database" - : "keeping the accounts and transactions records"; + const {resetValidators, numValidators, branch} = options; const restartValidatorsHintText = resetValidators - ? `and creating new ${numValidators} random validators` - : "and keeping the existing validators"; + ? `creating new ${numValidators} random validators` + : "keeping the existing validators"; - console.log(`Starting GenLayer simulator ${restartAccountsHintText} ${restartValidatorsHintText}`); + console.log(`Starting GenLayer simulator ${restartValidatorsHintText}`); // Update the simulator to the latest version console.log(`Updating GenLayer Simulator...`); @@ -59,25 +54,6 @@ export async function startAction(options: StartActionOptions, simulatorService: return; } - if (resetAccounts) { - // Initialize the database - console.log("Initializing the database..."); - try { - //remove everything from the database - await simulatorService.clearAccountsAndTransactionsDatabase(); - - const {createResponse, tablesResponse} = await simulatorService.initializeDatabase(); - if (!createResponse || !tablesResponse) { - console.error("Unable to initialize the database. Please try again."); - return; - } - } catch (error) { - console.error(error); - return; - } - console.log("Database successfully reset..."); - } - if (resetValidators) { // Initializing validators console.log("Initializing validators..."); diff --git a/src/lib/interfaces/ISimulatorService.ts b/src/lib/interfaces/ISimulatorService.ts index 17308eed..7b3e132f 100644 --- a/src/lib/interfaces/ISimulatorService.ts +++ b/src/lib/interfaces/ISimulatorService.ts @@ -11,8 +11,6 @@ export interface ISimulatorService { configSimulator(newConfig: Record): Promise; runSimulator(): Promise<{stdout: string; stderr: string}>; waitForSimulatorToBeReady(retries?: number): Promise; - clearAccountsAndTransactionsDatabase(): Promise; - initializeDatabase(): Promise; createRandomValidators(numValidators: number, llmProviders: AiProviders[]): Promise; deleteAllValidators(): Promise; getAiProvidersOptions(withHint: boolean): Array<{name: string; value: string}>; diff --git a/src/lib/services/simulator.ts b/src/lib/services/simulator.ts index d7f90d15..abe7130f 100644 --- a/src/lib/services/simulator.ts +++ b/src/lib/services/simulator.ts @@ -178,7 +178,9 @@ export class SimulatorService implements ISimulatorService { console.log("Waiting for the simulator to start up..."); try { const response = await rpcClient.request({method: "ping", params: []}); - if (response && response.result.status === "OK") { + + //Compatibility with current simulator version + if (response && (response.result.status === "OK" || response.result.data.status === "OK")) { return {initialized: true}; } if (retries > 0) { @@ -203,16 +205,6 @@ export class SimulatorService implements ISimulatorService { return {initialized: false, errorCode: "TIMEOUT"}; } - public clearAccountsAndTransactionsDatabase(): Promise { - return rpcClient.request({method: "clear_account_and_transactions_tables", params: []}); - } - - public async initializeDatabase(): Promise { - const createResponse = await rpcClient.request({method: "create_db", params: []}); - const tablesResponse = await rpcClient.request({method: "create_tables", params: []}); - return {createResponse, tablesResponse}; - } - public createRandomValidators(numValidators: number, llmProviders: AiProviders[]): Promise { return rpcClient.request({ method: "create_random_validators", diff --git a/tests/actions/init.test.ts b/tests/actions/init.test.ts index 2bafa1bc..62b783d9 100644 --- a/tests/actions/init.test.ts +++ b/tests/actions/init.test.ts @@ -23,8 +23,6 @@ describe("init action", () => { let simServRunSimulator: jest.Mock; let simServWaitForSimulator: jest.Mock; let simServPullOllamaModel: jest.Mock; - let simServClearAccAndTxsDb: jest.Mock; - let simServInitializeDatabase: jest.Mock; let simServDeleteAllValidators: jest.Mock; let simServCreateRandomValidators: jest.Mock; let simServOpenFrontend: jest.Mock; @@ -47,11 +45,6 @@ describe("init action", () => { simServRunSimulator = jest.spyOn(simulatorService, "runSimulator") as jest.Mock; simServWaitForSimulator = jest.spyOn(simulatorService, "waitForSimulatorToBeReady") as jest.Mock; simServPullOllamaModel = jest.spyOn(simulatorService, "pullOllamaModel") as jest.Mock; - simServClearAccAndTxsDb = jest.spyOn( - simulatorService, - "clearAccountsAndTransactionsDatabase", - ) as jest.Mock; - simServInitializeDatabase = jest.spyOn(simulatorService, "initializeDatabase") as jest.Mock; simServDeleteAllValidators = jest.spyOn(simulatorService, "deleteAllValidators") as jest.Mock; simServCreateRandomValidators = jest.spyOn(simulatorService, "createRandomValidators") as jest.Mock; simServOpenFrontend = jest.spyOn(simulatorService, "openFrontend") as jest.Mock; @@ -385,7 +378,7 @@ describe("init action", () => { initialized: true, }); simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // This will stop the execution + simServDeleteAllValidators.mockRejectedValue(new Error("Error")); // This will stop the execution // When await initAction(defaultActionOptions, simulatorService); @@ -413,7 +406,7 @@ describe("init action", () => { initialized: true, }); simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); // This will stop the execution + simServDeleteAllValidators.mockRejectedValue(new Error("Error")); // This will stop the execution // When await initAction(defaultActionOptions, simulatorService); @@ -422,121 +415,6 @@ describe("init action", () => { expect(simServPullOllamaModel).not.toHaveBeenCalled(); }); - test("should abort if clear accounts and transactions throws an error", async () => { - // Given - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", - }); - simServgetAiProvidersOptions.mockReturnValue([ - {name: "OpenAI", value: "openai"}, - {name: "Heurist", value: "heuristai"}, - ]); - simServConfigSimulator.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ - initialized: true, - }); - simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockRejectedValue(new Error("Error")); - - // When - await initAction(defaultActionOptions, simulatorService); - - // Then - expect(error).toHaveBeenCalledWith(new Error("Error")); - }); - - test("should abort if initialize database throws an error", async () => { - // Given - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", - }); - simServgetAiProvidersOptions.mockReturnValue([ - {name: "OpenAI", value: "openai"}, - {name: "Heurist", value: "heuristai"}, - ]); - simServConfigSimulator.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ - initialized: true, - }); - simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockResolvedValue(true); - simServInitializeDatabase.mockRejectedValue(new Error("Error")); - - // When - await initAction(defaultActionOptions, simulatorService); - - // Then - expect(error).toHaveBeenCalledWith(new Error("Error")); - }); - - test("should abort if database create db is not successful", async () => { - // Given - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", - }); - simServgetAiProvidersOptions.mockReturnValue([ - {name: "OpenAI", value: "openai"}, - {name: "Heurist", value: "heuristai"}, - ]); - simServConfigSimulator.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ - initialized: true, - }); - simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockResolvedValue(true); - simServInitializeDatabase.mockResolvedValue({createResponse: false, tablesResponse: true}); - - // When - await initAction(defaultActionOptions, simulatorService); - - // Then - expect(error).toHaveBeenCalledWith("Unable to initialize the database. Please try again."); - }); - - test("should abort if database table creation is not successful", async () => { - // Given - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", - }); - simServgetAiProvidersOptions.mockReturnValue([ - {name: "OpenAI", value: "openai"}, - {name: "Heurist", value: "heuristai"}, - ]); - simServConfigSimulator.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ - initialized: true, - }); - simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockResolvedValue(true); - simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: false}); - - // When - await initAction(defaultActionOptions, simulatorService); - - // Then - expect(error).toHaveBeenCalledWith("Unable to initialize the database. Please try again."); - }); - test("should abort if deleteAllValidators throws an error", async () => { // Given inquirerPrompt.mockResolvedValue({ @@ -556,8 +434,6 @@ describe("init action", () => { initialized: true, }); simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockResolvedValue(true); - simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: true}); simServDeleteAllValidators.mockRejectedValue(new Error("Error")); // When @@ -586,8 +462,6 @@ describe("init action", () => { initialized: true, }); simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockResolvedValue(true); - simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: true}); simServDeleteAllValidators.mockResolvedValue(true); simServCreateRandomValidators.mockRejectedValue(new Error("Error")); @@ -617,8 +491,6 @@ describe("init action", () => { initialized: true, }); simServPullOllamaModel.mockResolvedValue(true); - simServClearAccAndTxsDb.mockResolvedValue(true); - simServInitializeDatabase.mockResolvedValue({createResponse: true, tablesResponse: true}); simServDeleteAllValidators.mockResolvedValue(true); simServCreateRandomValidators.mockResolvedValue(true); simServOpenFrontend.mockResolvedValue(true); From 6a2d6ab8be7c21454cd8e4ee6813f13329f2546d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 23:01:11 +0000 Subject: [PATCH 07/40] Release v0.0.32-beta.1 [skip ci] --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b90996b6..cee25b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ +## 0.0.32-beta.1 (2024-07-03) + ## 0.0.32-beta.0 (2024-07-03) ## 0.0.31 (2024-05-27) diff --git a/package-lock.json b/package-lock.json index cd6a8abc..705fecbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "genlayer", - "version": "0.0.32-beta.0", + "version": "0.0.32-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "genlayer", - "version": "0.0.32-beta.0", + "version": "0.0.32-beta.1", "license": "ISC", "dependencies": { "commander": "^12.0.0", diff --git a/package.json b/package.json index cc9a0bce..92acb85d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "genlayer", - "version": "0.0.32-beta.0", + "version": "0.0.32-beta.1", "description": "GenLayer Command Line Tool", "main": "src/index.ts", "bin": { From 586ffa8c363b3d24d134d602511dcb7fa9907954 Mon Sep 17 00:00:00 2001 From: Cristiam Da Silva Date: Thu, 4 Jul 2024 01:13:31 +0200 Subject: [PATCH 08/40] 43 cli fix missing endpoints and simulator response (#45) * fix: removed non existing simulator endpoint * refactor: adapted ping simulator response for current and next version * tests: removed non existing simulator endpoint test From 59a9fc6b53345fc5493acb1b89fd379fe7afa390 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 23:14:04 +0000 Subject: [PATCH 09/40] Release v0.0.32-beta.2 [skip ci] --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cee25b2a..e2441d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ +## 0.0.32-beta.2 (2024-07-03) + ## 0.0.32-beta.1 (2024-07-03) ## 0.0.32-beta.0 (2024-07-03) diff --git a/package-lock.json b/package-lock.json index 705fecbf..4fcfd216 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "genlayer", - "version": "0.0.32-beta.1", + "version": "0.0.32-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "genlayer", - "version": "0.0.32-beta.1", + "version": "0.0.32-beta.2", "license": "ISC", "dependencies": { "commander": "^12.0.0", diff --git a/package.json b/package.json index 92acb85d..79936d8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "genlayer", - "version": "0.0.32-beta.1", + "version": "0.0.32-beta.2", "description": "GenLayer Command Line Tool", "main": "src/index.ts", "bin": { From 0e96ecde16c65d67db9e440e1f5f387103aff70f Mon Sep 17 00:00:00 2001 From: den <26140541+denishacquin@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:40:35 +0200 Subject: [PATCH 10/40] 46 cli add node and docker version (#47) * add node and docker version checks * remove redundant check * set correct version numbers, add todo * use config constant for versions * refactor methods and improve error handling * implement PR comments: split install and version checks in two separate checks, move checkVersion method to simulator service * add tests for version checks on init command * flip version issue evalution * separate checks in two steps * remove console log --------- Co-authored-by: Den --- src/commands/general/init.ts | 43 ++++++++++--- src/lib/clients/system.ts | 24 ++++++++ src/lib/config/simulator.ts | 5 ++ src/lib/errors/versionRequired.ts | 9 +++ src/lib/interfaces/ISimulatorService.ts | 3 +- src/lib/services/simulator.ts | 42 ++++++++++++- tests/actions/init.test.ts | 80 ++++++++++++++++++++++--- 7 files changed, 187 insertions(+), 19 deletions(-) create mode 100644 src/lib/errors/versionRequired.ts diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index a85ee730..03244939 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -17,19 +17,46 @@ function getRequirementsErrorMessage({git, docker}: Record): st if (!docker) { return "Docker is not installed. Please install Docker and try again.\n"; } + return ""; } +function getVersionErrorMessage({docker, node}: Record): string { + let message = ""; + + if (docker) { + message += `Docker version ${docker} or higher is required. Please update Docker and try again.\n`; + } + + if (node) { + message += `Node version ${node} or higher is required. Please update Node and try again.\n`; + } + + return message; +} + export async function initAction(options: InitActionOptions, simulatorService: ISimulatorService) { - // Check if git and docker are installed + // Check if requirements are installed try { - const {git, docker} = await simulatorService.checkRequirements(); - const errorMessage = getRequirementsErrorMessage({git, docker}); - if (errorMessage) { - console.log( - "There was a problem running the docker service. Please start the docker service and try again.", - ); - console.error(errorMessage); + const requirementsInstalled = await simulatorService.checkInstallRequirements(); + const requirementErrorMessage = getRequirementsErrorMessage(requirementsInstalled); + + if (requirementErrorMessage) { + console.error(requirementErrorMessage); + return; + } + } catch (error) { + console.error(error); + return; + } + + // Check if the versions are correct + try { + const missingVersions = await simulatorService.checkVersionRequirements(); + const versionErrorMessage = getVersionErrorMessage(missingVersions); + + if (versionErrorMessage) { + console.error(versionErrorMessage); return; } } catch (error) { diff --git a/src/lib/clients/system.ts b/src/lib/clients/system.ts index addb0ab5..2d2d3ae4 100644 --- a/src/lib/clients/system.ts +++ b/src/lib/clients/system.ts @@ -5,6 +5,7 @@ import open from "open"; import {RunningPlatform, AVAILABLE_PLATFORMS} from "../config/simulator"; import {MissingRequirementError} from "../errors/missingRequirement"; +import {VersionRequiredError} from "../errors/versionRequired"; const asyncExec = util.promisify(exec); @@ -53,6 +54,29 @@ export function openUrl(url: string): Promise { return open(url); } +export async function getVersion(toolName: string): Promise { + try { + const toolResponse = await asyncExec(`${toolName} --version`); + + if (toolResponse.stderr) { + throw new Error(toolResponse.stderr); + } + + try { + const versionMatch = toolResponse.stdout.match(/(\d+\.\d+\.\d+)/); + if (versionMatch) { + return versionMatch[1]; + } + } catch (err) { + throw new Error(`Could not parse ${toolName} version.`); + } + } catch (error) { + throw new Error(`Error getting ${toolName} version.`); + } + + return ""; +} + export async function listDockerContainers(): Promise { try { const dockerResponse = await asyncExec("docker ps -a --format '{{.Names}}'"); diff --git a/src/lib/config/simulator.ts b/src/lib/config/simulator.ts index a532a598..49dfb732 100644 --- a/src/lib/config/simulator.ts +++ b/src/lib/config/simulator.ts @@ -17,6 +17,11 @@ export const DEFAULT_RUN_DOCKER_COMMAND = { linux: "sudo systemctl start docker", }; +export const VERSION_REQUIREMENTS = { + docker: "25.0.0", + node: "18.0.0", +}; + export const AVAILABLE_PLATFORMS = ["darwin", "win32", "linux"] as const; export type RunningPlatform = (typeof AVAILABLE_PLATFORMS)[number]; export const STARTING_TIMEOUT_WAIT_CYLCE = 2000; diff --git a/src/lib/errors/versionRequired.ts b/src/lib/errors/versionRequired.ts new file mode 100644 index 00000000..c8609150 --- /dev/null +++ b/src/lib/errors/versionRequired.ts @@ -0,0 +1,9 @@ +export class VersionRequiredError extends Error { + tool: string; + + constructor(tool: string, requiredVersion: string) { + super(`${tool} version ${requiredVersion} or higher is required. Please update ${tool}.`); + this.name = "VersionRequired"; + this.tool = tool; + } +} diff --git a/src/lib/interfaces/ISimulatorService.ts b/src/lib/interfaces/ISimulatorService.ts index 7b3e132f..efdd2b08 100644 --- a/src/lib/interfaces/ISimulatorService.ts +++ b/src/lib/interfaces/ISimulatorService.ts @@ -4,7 +4,8 @@ export interface ISimulatorService { getSimulatorLocation(): string; readEnvConfigValue(key: string): string; addConfigToEnvFile(newConfig: Record): void; - checkRequirements(): Promise>; + checkInstallRequirements(): Promise>; + checkVersionRequirements(): Promise>; downloadSimulator(branch?: string): Promise; updateSimulator(branch?: string): Promise; pullOllamaModel(): Promise; diff --git a/src/lib/services/simulator.ts b/src/lib/services/simulator.ts index abe7130f..ab0511fc 100644 --- a/src/lib/services/simulator.ts +++ b/src/lib/services/simulator.ts @@ -1,6 +1,7 @@ import * as fs from "fs"; import * as dotenv from "dotenv"; import * as path from "path"; +import * as semver from "semver"; import {rpcClient} from "../clients/jsonRpcClient"; import { @@ -13,9 +14,11 @@ import { STARTING_TIMEOUT_ATTEMPTS, AI_PROVIDERS_CONFIG, AiProviders, + VERSION_REQUIREMENTS, } from "../config/simulator"; import { checkCommand, + getVersion, getHomeDirectory, executeCommand, openUrl, @@ -33,6 +36,7 @@ import { WaitForSimulatorToBeReadyResultType, InitializeDatabaseResultType, } from "../interfaces/ISimulatorService"; +import {VersionRequiredError} from "../errors/versionRequired"; function sleep(millliseconds: number): Promise { return new Promise(resolve => setTimeout(resolve, millliseconds)); @@ -75,7 +79,7 @@ export class SimulatorService implements ISimulatorService { fs.writeFileSync(envFilePath, updatedConfig); } - public async checkRequirements(): Promise> { + public async checkInstallRequirements(): Promise> { const requirementsInstalled = { git: false, docker: false, @@ -89,6 +93,7 @@ export class SimulatorService implements ISimulatorService { throw error; } } + try { await checkCommand("docker --version", "docker"); requirementsInstalled.docker = true; @@ -109,6 +114,41 @@ export class SimulatorService implements ISimulatorService { return requirementsInstalled; } + public async checkVersionRequirements(): Promise> { + const missingVersions = { + docker: '', + node: '', + }; + + try { + await this.checkVersion(VERSION_REQUIREMENTS.node, "node"); + } catch (error: any) { + missingVersions.node = VERSION_REQUIREMENTS.node; + if (!(error instanceof VersionRequiredError)) { + throw error; + } + } + + try { + await this.checkVersion(VERSION_REQUIREMENTS.docker, "docker"); + } catch (error: any) { + missingVersions.docker = VERSION_REQUIREMENTS.docker; + if (!(error instanceof VersionRequiredError)) { + throw error; + } + } + + return missingVersions; + } + + public async checkVersion(minVersion: string, toolName: string): Promise { + const version = await getVersion(toolName); + + if (!semver.satisfies(version, `>=${minVersion}`)) { + throw new VersionRequiredError(toolName, minVersion); + } + } + public async downloadSimulator(branch: string = "main"): Promise { const simulatorLocation = this.getSimulatorLocation(); diff --git a/tests/actions/init.test.ts b/tests/actions/init.test.ts index 62b783d9..9f1c27fb 100644 --- a/tests/actions/init.test.ts +++ b/tests/actions/init.test.ts @@ -13,7 +13,8 @@ describe("init action", () => { let log: jest.Mock; let inquirerPrompt: jest.Mock; - let simServCheckRequirements: jest.Mock; + let simServCheckInstallRequirements: jest.Mock; + let simServCheckVersionRequirements: jest.Mock; let simServResetDockerContainers: jest.Mock; let simServResetDockerImages: jest.Mock; let simServDownloadSimulator: jest.Mock; @@ -35,7 +36,8 @@ describe("init action", () => { log = jest.spyOn(console, "log").mockImplementation(() => {}) as jest.Mock; inquirerPrompt = jest.spyOn(inquirer, "prompt") as jest.Mock; - simServCheckRequirements = jest.spyOn(simulatorService, "checkRequirements") as jest.Mock; + simServCheckInstallRequirements = jest.spyOn(simulatorService, "checkInstallRequirements") as jest.Mock; + simServCheckVersionRequirements = jest.spyOn(simulatorService, "checkVersionRequirements") as jest.Mock; simServResetDockerContainers = jest.spyOn(simulatorService, "resetDockerContainers") as jest.Mock; simServResetDockerImages = jest.spyOn(simulatorService, "resetDockerImages") as jest.Mock; simServDownloadSimulator = jest.spyOn(simulatorService, "downloadSimulator") as jest.Mock; @@ -57,7 +59,7 @@ describe("init action", () => { test("if both requirements are missing, then the execution fails", async () => { // Given - simServCheckRequirements.mockResolvedValue({git: false, docker: false}); + simServCheckInstallRequirements.mockResolvedValue({git: false, docker: false}); // When await initAction(defaultActionOptions, simulatorService); @@ -71,7 +73,7 @@ describe("init action", () => { test("if only docker is missing, then the execution fails", async () => { // Given - simServCheckRequirements.mockResolvedValue({git: true, docker: false}); + simServCheckInstallRequirements.mockResolvedValue({git: true, docker: false}); // When await initAction(defaultActionOptions, simulatorService); @@ -83,7 +85,7 @@ describe("init action", () => { test("if only git is missing, then the execution fails", async () => { // Given - simServCheckRequirements.mockResolvedValue({git: false, docker: true}); + simServCheckInstallRequirements.mockResolvedValue({git: false, docker: true}); // When await initAction(defaultActionOptions, simulatorService); @@ -93,9 +95,69 @@ describe("init action", () => { expect(error).toHaveBeenCalledWith("Git is not installed. Please install Git and try again.\n"); }); - test("if check requirements fail, then the execution aborts", async () => { + test("if check install requirements fail, then the execution aborts", async () => { // Given - simServCheckRequirements.mockRejectedValue(new Error("Error")); + simServCheckInstallRequirements.mockRejectedValue(new Error("Error")); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith(new Error("Error")); + }); + + test("if both versions are too low, then the execution fails", async () => { + const mockVersionNumber = "99.9.9"; + + // Given + simServCheckVersionRequirements.mockResolvedValue({node: mockVersionNumber, docker: mockVersionNumber}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith( + `Docker version ${mockVersionNumber} or higher is required. Please update Docker and try again.\nNode version ${mockVersionNumber} or higher is required. Please update Node and try again.\n`, + ); + }); + + test("if only docker version is too low, then the execution fails", async () => { + const mockVersionNumber = "99.9.9"; + + // Given + simServCheckVersionRequirements.mockResolvedValue({node: "", docker: mockVersionNumber}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith( + `Docker version ${mockVersionNumber} or higher is required. Please update Docker and try again.\n`, + ); + }); + + test("if only node version is too low, then the execution fails", async () => { + const mockVersionNumber = "99.9.9"; + + // Given + simServCheckVersionRequirements.mockResolvedValue({node: mockVersionNumber, docker: ""}); + + // When + await initAction(defaultActionOptions, simulatorService); + + // Then + expect(error).toHaveBeenCalledTimes(1); + expect(error).toHaveBeenCalledWith( + `Node version ${mockVersionNumber} or higher is required. Please update Node and try again.\n`, + ); + }); + + test("if check version requirements fail, then the execution aborts", async () => { + // Given + simServCheckVersionRequirements.mockRejectedValue(new Error("Error")); // When await initAction(defaultActionOptions, simulatorService); @@ -108,7 +170,7 @@ describe("init action", () => { test("if reset is not confirmed, abort", async () => { // Given inquirerPrompt.mockResolvedValue({confirmReset: false}); - simServCheckRequirements.mockResolvedValue({git: true, docker: true}); + simServCheckInstallRequirements.mockResolvedValue({git: true, docker: true}); // When await initAction(defaultActionOptions, simulatorService); @@ -147,7 +209,7 @@ describe("init action", () => { test("if download is not confirmed, abort", async () => { // Given inquirerPrompt.mockResolvedValue({confirmReset: true, confirmDownload: false}); - simServCheckRequirements.mockResolvedValue({git: true, docker: true}); + simServCheckInstallRequirements.mockResolvedValue({git: true, docker: true}); // When await initAction(defaultActionOptions, simulatorService); From 8f0a7987ac60c015c111281d92b1dbc63758e71f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Jul 2024 12:41:05 +0000 Subject: [PATCH 11/40] Release v0.0.32-beta.3 [skip ci] --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2441d1f..3998398f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ +## 0.0.32-beta.3 (2024-07-26) + ## 0.0.32-beta.2 (2024-07-03) ## 0.0.32-beta.1 (2024-07-03) diff --git a/package-lock.json b/package-lock.json index 4fcfd216..98cc5300 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "genlayer", - "version": "0.0.32-beta.2", + "version": "0.0.32-beta.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "genlayer", - "version": "0.0.32-beta.2", + "version": "0.0.32-beta.3", "license": "ISC", "dependencies": { "commander": "^12.0.0", diff --git a/package.json b/package.json index 79936d8b..ffa21d5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "genlayer", - "version": "0.0.32-beta.2", + "version": "0.0.32-beta.3", "description": "GenLayer Command Line Tool", "main": "src/index.ts", "bin": { From da8a16f400594868e2746d27c92bcff20cb6cae8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:55:42 +0000 Subject: [PATCH 12/40] chore(deps): update dependency eslint to v9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2318eef..869eccb1 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@typescript-eslint/parser": "^7.7.0", "cross-env": "^7.0.3", "esbuild": "^0.24.0", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", From 9a2befbce4ed6c2fb21c18d66a03eedce576e3de Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:19:38 +0000 Subject: [PATCH 13/40] chore(deps): update tibdex/github-app-token action to v2 --- .github/workflows/publish-beta.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 77678e39..b555cd30 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Get CI Bot Token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@v2 id: ci_bot_token with: app_id: ${{ secrets.CI_BOT_APP_ID }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8c855400..381896b9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Get CI Bot Token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@v2 id: ci_bot_token with: app_id: ${{ secrets.CI_BOT_APP_ID }} From fd4883e30fd5e433f6807f37e7ac684b8e013c49 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 06:53:14 +0000 Subject: [PATCH 14/40] chore(deps): update actions/setup-node action to v4 --- .github/workflows/publish-beta.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/validate-code.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 77678e39..7093dd76 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -22,7 +22,7 @@ jobs: with: token: ${{ steps.ci_bot_token.outputs.token }} - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: "18" - name: Install the dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8c855400..90deb8f1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: with: token: ${{ steps.ci_bot_token.outputs.token }} - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: "18" - name: Install the dependencies diff --git a/.github/workflows/validate-code.yml b/.github/workflows/validate-code.yml index aa84ee12..e11d838e 100644 --- a/.github/workflows/validate-code.yml +++ b/.github/workflows/validate-code.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 cache: "npm" From a46168826e7b07e906458d7d47eb13e0608fde33 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 07:04:05 +0000 Subject: [PATCH 15/40] chore(deps): update dependency esbuild to ^0.25.0 [security] --- package-lock.json | 208 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bcc27d7..db4707ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@typescript-eslint/parser": "^7.7.0", "@vitest/coverage-v8": "^2.1.4", "cross-env": "^7.0.3", - "esbuild": "^0.24.0", + "esbuild": "^0.25.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", @@ -172,9 +172,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", "cpu": [ "ppc64" ], @@ -189,9 +189,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "cpu": [ "arm" ], @@ -206,9 +206,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "cpu": [ "arm64" ], @@ -223,9 +223,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "cpu": [ "x64" ], @@ -240,9 +240,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "cpu": [ "arm64" ], @@ -257,9 +257,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "cpu": [ "x64" ], @@ -274,9 +274,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "cpu": [ "arm64" ], @@ -291,9 +291,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "cpu": [ "x64" ], @@ -308,9 +308,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "cpu": [ "arm" ], @@ -325,9 +325,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "cpu": [ "arm64" ], @@ -342,9 +342,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "cpu": [ "ia32" ], @@ -359,9 +359,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "cpu": [ "loong64" ], @@ -376,9 +376,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "cpu": [ "mips64el" ], @@ -393,9 +393,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "cpu": [ "ppc64" ], @@ -410,9 +410,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "cpu": [ "riscv64" ], @@ -427,9 +427,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "cpu": [ "s390x" ], @@ -444,9 +444,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", "cpu": [ "x64" ], @@ -461,9 +461,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", "cpu": [ "arm64" ], @@ -478,9 +478,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "cpu": [ "x64" ], @@ -495,9 +495,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", "cpu": [ "arm64" ], @@ -512,9 +512,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "cpu": [ "x64" ], @@ -529,9 +529,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "cpu": [ "arm64" ], @@ -563,9 +563,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "cpu": [ "ia32" ], @@ -580,9 +580,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "cpu": [ "x64" ], @@ -3778,9 +3778,9 @@ } }, "node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3791,31 +3791,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" } }, "node_modules/escape-goat": { diff --git a/package.json b/package.json index eccdfc12..199b93d1 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@typescript-eslint/parser": "^7.7.0", "@vitest/coverage-v8": "^2.1.4", "cross-env": "^7.0.3", - "esbuild": "^0.24.0", + "esbuild": "^0.25.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", From 39ec17bc20a8759bc0d9e74cf78006be554dab8d Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Fri, 14 Feb 2025 04:45:16 -0300 Subject: [PATCH 16/40] feat: new log and spinner class --- package-lock.json | 289 ++++++++++++++---- package.json | 2 + src/commands/general/stop.ts | 11 +- src/commands/update/ollama.ts | 110 ++++--- src/commands/validators/validators.ts | 103 +++---- src/lib/actions/BaseAction.ts | 74 ++++- tests/actions/ollama.test.ts | 87 ++---- tests/actions/stop.test.ts | 27 +- tests/actions/validators.test.ts | 415 +++++++++++++++++--------- tests/libs/baseAction.test.ts | 175 +++++++++++ 10 files changed, 921 insertions(+), 372 deletions(-) create mode 100644 tests/libs/baseAction.test.ts diff --git a/package-lock.json b/package-lock.json index 9bcc27d7..c19b4918 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "chalk": "^5.4.1", "commander": "^12.0.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", @@ -18,6 +19,7 @@ "inquirer": "^9.2.19", "node-fetch": "^2.7.0", "open": "^10.1.0", + "ora": "^8.2.0", "update-check": "^1.5.4", "uuid": "^9.0.1", "viem": "^2.21.54", @@ -2330,19 +2332,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.0.tgz", - "integrity": "sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/boxen/node_modules/emoji-regex": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", @@ -2588,16 +2577,12 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -4139,6 +4124,22 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4561,7 +4562,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -5227,6 +5227,45 @@ "node": ">=18" } }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -6258,6 +6297,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/loupe": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", @@ -6421,7 +6476,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -6808,28 +6862,176 @@ } }, "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", "license": "MIT", "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "license": "MIT" + }, + "node_modules/ora/node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/os-name": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/os-name/-/os-name-5.1.0.tgz", @@ -8442,7 +8644,6 @@ "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" @@ -8620,7 +8821,6 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -9330,19 +9530,6 @@ "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.0.tgz", - "integrity": "sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index eccdfc12..9d5af5a6 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "typescript": "^5.4.5" }, "dependencies": { + "chalk": "^5.4.1", "commander": "^12.0.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", @@ -64,6 +65,7 @@ "inquirer": "^9.2.19", "node-fetch": "^2.7.0", "open": "^10.1.0", + "ora": "^8.2.0", "update-check": "^1.5.4", "uuid": "^9.0.1", "viem": "^2.21.54", diff --git a/src/commands/general/stop.ts b/src/commands/general/stop.ts index 4583f647..39da59bd 100644 --- a/src/commands/general/stop.ts +++ b/src/commands/general/stop.ts @@ -11,15 +11,16 @@ export class StopAction extends BaseAction { } public async stop(): Promise { - try{ + try { await this.confirmPrompt( "Are you sure you want to stop all running GenLayer containers? This will halt all active processes." ); - console.log(`Stopping Docker containers...`); + + this.startSpinner("Stopping Docker containers..."); await this.simulatorService.stopDockerContainers(); - console.log(`All running GenLayer containers have been successfully stopped.`); - }catch (error) { - console.error("An error occurred while stopping the containers:", error) + this.succeedSpinner("All running GenLayer containers have been successfully stopped."); + } catch (error) { + this.failSpinner("An error occurred while stopping the containers.", error); } } } diff --git a/src/commands/update/ollama.ts b/src/commands/update/ollama.ts index 6f96f54e..6fb88441 100644 --- a/src/commands/update/ollama.ts +++ b/src/commands/update/ollama.ts @@ -1,72 +1,67 @@ import Docker from "dockerode"; import { rpcClient } from "../../lib/clients/jsonRpcClient"; +import { BaseAction } from "../../lib/actions/BaseAction"; -export class OllamaAction { +export class OllamaAction extends BaseAction { private docker: Docker; constructor() { + super(); this.docker = new Docker(); } async updateModel(modelName: string) { - const providersAndModels = await rpcClient.request({ - method: "sim_getProvidersAndModels", - params: [], - }); - - const existingOllamaProvider = providersAndModels.result.find( - (entry: any) => entry.plugin === "ollama" - ); - - if (!existingOllamaProvider) { - throw new Error("No existing 'ollama' provider found. Unable to add/update a model."); - } + try { + this.startSpinner(`Updating model "${modelName}"...`); - await this.executeModelCommand( - "pull", - modelName, - `Model "${modelName}" updated successfully` - ); - - const existingModel = providersAndModels.result.some( - (entry: any) => - entry.plugin === "ollama" && entry.model === modelName - ); - - if (!existingModel) { - console.log(`Model "${modelName}" not found in Provider Presets. Adding...`); - - const newModelConfig = { - config: existingOllamaProvider.config, - model: modelName, - plugin: "ollama", - plugin_config: existingOllamaProvider.plugin_config, - provider: "ollama", - }; - - await rpcClient.request({ - method: "sim_addProvider", - params: [newModelConfig], + const providersAndModels = await rpcClient.request({ + method: "sim_getProvidersAndModels", + params: [], }); - console.log(`Model "${modelName}" added successfully.`); + const existingOllamaProvider = providersAndModels.result.find( + (entry: any) => entry.plugin === "ollama" + ); + + if (!existingOllamaProvider) { + return this.failSpinner("No existing 'ollama' provider found. Unable to add/update a model."); + } + + await this.executeModelCommand("pull", modelName, `Model "${modelName}" updated successfully`); + + const existingModel = providersAndModels.result.some( + (entry: any) => entry.plugin === "ollama" && entry.model === modelName + ); + if (!existingModel) { + this.startSpinner(`Adding model "${modelName}" to Provider Presets...`); + + const newModelConfig = { + config: existingOllamaProvider.config, + model: modelName, + plugin: "ollama", + plugin_config: existingOllamaProvider.plugin_config, + provider: "ollama", + }; + + await rpcClient.request({ + method: "sim_addProvider", + params: [newModelConfig], + }); + this.succeedSpinner(`Model "${modelName}" added successfully.`); + } + } catch (error) { + this.failSpinner(`Error updating model "${modelName}"`, error); } } async removeModel(modelName: string) { - await this.executeModelCommand( - "rm", - modelName, - `Model "${modelName}" removed successfully` - ); + await this.executeModelCommand("rm", modelName, `Model "${modelName}" removed successfully`); } - private async executeModelCommand( - command: string, - modelName: string, - successMessage: string - ) { + private async executeModelCommand(command: string, modelName: string, successMessage: string) { try { + this.startSpinner(`Executing '${command}' command on model "${modelName}"...`); + let success = false; const ollamaContainer = this.docker.getContainer("ollama"); const exec = await ollamaContainer.exec({ @@ -74,12 +69,13 @@ export class OllamaAction { AttachStdout: true, AttachStderr: true, }); - const stream = await exec.start({Detach: false, Tty: false}); + const stream = await exec.start({ Detach: false, Tty: false }); stream.on("data", (chunk: any) => { - const chunkStr = chunk.toString(); - console.log(chunkStr); - if (chunkStr.includes("success") || chunkStr.includes("deleted")) { + const output = chunk.toString(); + this.setSpinnerText(output.trim()); + + if (output.includes("success") || output.includes("deleted")) { success = true; } }); @@ -87,17 +83,17 @@ export class OllamaAction { await new Promise((resolve, reject) => { stream.on("end", () => { if (success) { + this.succeedSpinner(successMessage); resolve(); } else { + this.failSpinner(`Failed to execute '${command}' on model "${modelName}".`); reject('internal error'); } }); stream.on("error", reject); }); - - console.log(successMessage); - }catch (error) { - console.error(`Error executing command "${command}" on model "${modelName}":`, error); + } catch (error) { + this.failSpinner(`Error executing command "${command}" on model "${modelName}"`, error); } } } diff --git a/src/commands/validators/validators.ts b/src/commands/validators/validators.ts index 99a4024e..1c8a4fe4 100644 --- a/src/commands/validators/validators.ts +++ b/src/commands/validators/validators.ts @@ -31,26 +31,25 @@ export class ValidatorsAction extends BaseAction { public async getValidator(options: ValidatorOptions): Promise { try { if (options.address) { - console.log(`Fetching validator with address: ${options.address}`); + this.startSpinner(`Fetching validator with address: ${options.address}`); const result = await rpcClient.request({ method: "sim_getValidator", params: [options.address], }); - console.log("Validator Details:", result.result); + this.succeedSpinner(`Successfully fetched validator with address: ${options.address}`, result.result); } else { - console.log("Fetching all validators..."); + this.startSpinner(`Fetching all validators...`); const result = await rpcClient.request({ method: "sim_getAllValidators", params: [], }); - - console.log("All Validators:", result.result); + this.succeedSpinner('Successfully fetched all validators.', result.result) } } catch (error) { - console.error("Error fetching validators:", error); + this.failSpinner("Error fetching validators", error); } } @@ -58,65 +57,60 @@ export class ValidatorsAction extends BaseAction { try { if (options.address) { await this.confirmPrompt(`This command will delete the validator with the address: ${options.address}. Do you want to continue?`); - console.log(`Deleting validator with address: ${options.address}`); + this.startSpinner(`Deleting validator with address: ${options.address}`); const result = await rpcClient.request({ method: "sim_deleteValidator", params: [options.address], }); - console.log("Deleted Address:", result.result); + this.succeedSpinner(`Deleted Address: ${result.result}`); } else { await this.confirmPrompt(`This command will delete all validators. Do you want to continue?`); - console.log("Deleting all validators..."); + this.startSpinner("Deleting all validators..."); await rpcClient.request({ method: "sim_deleteAllValidators", params: [], }); - console.log("Successfully deleted all validators"); + this.succeedSpinner("Successfully deleted all validators"); } } catch (error) { - console.error("Error deleting validators:", error); + this.failSpinner("Error deleting validators", error); } } public async countValidators(): Promise { try { - console.log("Counting all validators..."); + this.startSpinner("Counting all validators..."); const result = await rpcClient.request({ method: "sim_countValidators", params: [], }); - - console.log("Total Validators:", result.result); + this.succeedSpinner(`Total Validators: ${result.result}`); } catch (error) { - console.error("Error counting validators:", error); + this.failSpinner("Error counting validators", error); } } public async updateValidator(options: UpdateValidatorOptions): Promise { try { - console.log(`Fetching validator with address: ${options.address}...`); + this.startSpinner(`Fetching validator with address: ${options.address}...`); const currentValidator = await rpcClient.request({ method: "sim_getValidator", params: [options.address], }); - if (!currentValidator.result) { - throw new Error(`Validator with address ${options.address} not found.`); - } - - console.log("Current Validator Details:", currentValidator.result); + this.log("Current Validator Details:", currentValidator.result); const parsedStake = options.stake ? parseInt(options.stake, 10) : currentValidator.result.stake; if (isNaN(parsedStake) || parsedStake < 0) { - return console.error("Invalid stake value. Stake must be a positive integer."); + return this.failSpinner("Invalid stake value. Stake must be a positive integer."); } const updatedValidator = { @@ -127,7 +121,9 @@ export class ValidatorsAction extends BaseAction { config: options.config ? JSON.parse(options.config) : currentValidator.result.config, }; - console.log("Updated Validator Details:", updatedValidator); + this.log("Updated Validator Details:", updatedValidator); + + this.setSpinnerText('Updating Validator...'); const result = await rpcClient.request({ method: "sim_updateValidator", @@ -140,9 +136,9 @@ export class ValidatorsAction extends BaseAction { ], }); - console.log("Validator successfully updated:", result.result); + this.succeedSpinner("Validator successfully updated", result.result); } catch (error) { - console.error("Error updating validator:", error); + this.failSpinner("Error updating validator", error); } } @@ -150,21 +146,21 @@ export class ValidatorsAction extends BaseAction { try { const count = parseInt(options.count, 10); if (isNaN(count) || count < 1) { - return console.error("Invalid count. Please provide a positive integer."); + return this.logError("Invalid count. Please provide a positive integer."); } - console.log(`Creating ${count} random validator(s)...`); - console.log(`Providers: ${options.providers.length > 0 ? options.providers.join(", ") : "None"}`); - console.log(`Models: ${options.models.length > 0 ? options.models.join(", ") : "None"}`); + this.startSpinner(`Creating ${count} random validator(s)...`); + this.log(`Providers: ${options.providers.length > 0 ? options.providers.join(", ") : "All"}`); + this.log(`Models: ${options.models.length > 0 ? options.models.join(", ") : "All"}`); const result = await rpcClient.request({ method: "sim_createRandomValidators", params: [count, 1, 10, options.providers, options.models], }); - console.log("Random validators successfully created:", result.result); + this.succeedSpinner("Random validators successfully created", result.result); } catch (error) { - console.error("Error creating random validators:", error); + this.failSpinner("Error creating random validators", error); } } @@ -172,22 +168,23 @@ export class ValidatorsAction extends BaseAction { try { const stake = parseInt(options.stake, 10); if (isNaN(stake) || stake < 1) { - return console.error("Invalid stake. Please provide a positive integer."); + return this.logError("Invalid stake. Please provide a positive integer."); } if (options.model && !options.provider) { - return console.error("You must specify a provider if using a model."); + return this.logError("You must specify a provider if using a model."); } - console.log("Fetching available providers and models..."); + this.startSpinner("Fetching available providers and models..."); const providersAndModels = await rpcClient.request({ method: "sim_getProvidersAndModels", params: [], }); + this.stopSpinner(); if (!providersAndModels.result || providersAndModels.result.length === 0) { - return console.error("No providers or models available."); + return this.logError("No providers or models available."); } const availableProviders = [ @@ -218,7 +215,7 @@ export class ValidatorsAction extends BaseAction { ); if (availableModels.length === 0) { - return console.error("No models available for the selected provider."); + return this.logError("No models available for the selected provider."); } let model = options.model; @@ -241,34 +238,30 @@ export class ValidatorsAction extends BaseAction { ); if (!modelDetails) { - return console.error("Selected model details not found."); + return this.logError("Selected model details not found."); } const config = options.config ? JSON.parse(options.config) : modelDetails.config; - - console.log("Creating validator with the following details:"); - console.log(`Stake: ${stake}`); - console.log(`Provider: ${modelDetails.provider}`); - console.log(`Model: ${modelDetails.model}`); - console.log(`Config:`, config); - console.log(`Plugin:`, modelDetails.plugin); - console.log(`Plugin Config:`, modelDetails.plugin_config); + const params = [ + stake, + modelDetails.provider, + modelDetails.model, + config, + modelDetails.plugin, + modelDetails.plugin_config, + ] + + this.log("Validator details:", params); + this.startSpinner('Creating validator...'); const result = await rpcClient.request({ method: "sim_createValidator", - params: [ - stake, - modelDetails.provider, - modelDetails.model, - config, - modelDetails.plugin, - modelDetails.plugin_config, - ], + params, }); - console.log("Validator successfully created:", result.result); + this.succeedSpinner("Validator successfully created:", result.result); } catch (error) { - console.error("Error creating validator:", error); + this.failSpinner("Error creating validator", error); } } } diff --git a/src/lib/actions/BaseAction.ts b/src/lib/actions/BaseAction.ts index 93dab902..5ffba7b6 100644 --- a/src/lib/actions/BaseAction.ts +++ b/src/lib/actions/BaseAction.ts @@ -1,19 +1,87 @@ import inquirer from "inquirer"; +import chalk from "chalk"; +import ora, { Ora } from "ora"; export class BaseAction { + private spinner: Ora; + + constructor() { + this.spinner = ora({ text: "", spinner: "dots" }); + } + protected async confirmPrompt(message: string): Promise { const answer = await inquirer.prompt([ { type: "confirm", name: "confirmAction", - message: message, + message: chalk.yellow(message), default: true, }, ]); if (!answer.confirmAction) { - console.log("Operation aborted!"); + this.logError("Operation aborted!"); process.exit(0); } } -} + + private formatOutput(data: any): string { + if (data instanceof Error) { + const errorDetails = { + name: data.name, + message: data.message, + ...(Object.keys(data).length ? data : {}), + }; + return JSON.stringify(errorDetails, null, 2); + } + return typeof data === "object" ? JSON.stringify(data, null, 2) : String(data); + } + + protected log(message: string, data?: any): void { + console.log(chalk.white(`\n${message}`)); + if (data) console.log(this.formatOutput(data)); + } + + protected logSuccess(message: string, data?: any): void { + console.log(chalk.green(`\n✔ ${message}`)); + if (data) console.log(chalk.green(this.formatOutput(data))); + } + + protected logInfo(message: string, data?: any): void { + console.log(chalk.blue(`\nℹ ${message}`)); + if (data) console.log(chalk.blue(this.formatOutput(data))); + } + + protected logWarning(message: string, data?: any): void { + console.log(chalk.yellow(`\n⚠ ${message}`)); + if (data) console.log(chalk.yellow(this.formatOutput(data))); + } + + protected logError(message: string, error?: any): void { + console.error(chalk.red(`\n✖ ${message}`)); + if (error) console.error(chalk.red(this.formatOutput(error))); + } + + protected startSpinner(message: string) { + this.spinner.text = chalk.blue(`${message}`); + this.spinner.start(); + } + + protected succeedSpinner(message: string, data?: any): void { + if (data) this.log('Result:', data); + this.spinner.succeed(chalk.green(message)); + } + + protected failSpinner(message: string, error?:any): void { + if (error) this.log('Error:', error); + this.spinner.fail(chalk.red(message)); + } + + protected stopSpinner(): void { + this.spinner.stop(); + } + + protected setSpinnerText(message: string): void { + this.spinner.text = chalk.blue(message); + } +} \ No newline at end of file diff --git a/tests/actions/ollama.test.ts b/tests/actions/ollama.test.ts index 6827c089..76aa080d 100644 --- a/tests/actions/ollama.test.ts +++ b/tests/actions/ollama.test.ts @@ -1,7 +1,6 @@ import { describe, test, vi, beforeEach, afterEach, expect, Mock } from "vitest"; import { OllamaAction } from "../../src/commands/update/ollama"; import { rpcClient } from "../../src/lib/clients/jsonRpcClient"; - import Docker from "dockerode"; vi.mock("dockerode"); @@ -37,6 +36,11 @@ describe("OllamaAction", () => { } as unknown as Docker.Container); Docker.prototype.getContainer = mockGetContainer; + + vi.spyOn(ollamaAction as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(ollamaAction as any, "setSpinnerText").mockImplementation(() => {}); + vi.spyOn(ollamaAction as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(ollamaAction as any, "failSpinner").mockImplementation(() => {}); }); afterEach(() => { @@ -49,6 +53,7 @@ describe("OllamaAction", () => { config: { key: "value" }, plugin_config: { pluginKey: "pluginValue" }, }; + vi.mocked(rpcClient.request).mockResolvedValueOnce({ result: [mockProvider], }); @@ -62,10 +67,9 @@ describe("OllamaAction", () => { } }); - console.log = vi.fn(); - await ollamaAction.updateModel("mocked_model"); + expect(ollamaAction["startSpinner"]).toHaveBeenCalledWith(`Updating model "mocked_model"...`); expect(mockGetContainer).toHaveBeenCalledWith("ollama"); expect(mockExec).toHaveBeenCalledWith({ Cmd: ["ollama", "pull", "mocked_model"], @@ -73,10 +77,8 @@ describe("OllamaAction", () => { AttachStderr: true, }); expect(mockStart).toHaveBeenCalledWith({ Detach: false, Tty: false }); - expect(mockStream.on).toHaveBeenCalledWith("data", expect.any(Function)); - expect(mockStream.on).toHaveBeenCalledWith("end", expect.any(Function)); - expect(console.log).toHaveBeenCalledWith("Mocked output success"); - expect(console.log).toHaveBeenCalledWith('Model "mocked_model" updated successfully'); + expect(ollamaAction["setSpinnerText"]).toHaveBeenCalledWith("Mocked output success"); + expect(ollamaAction["succeedSpinner"]).toHaveBeenCalledWith(`Model "mocked_model" updated successfully`); }); test("should remove the model using 'rm'", async () => { @@ -89,10 +91,9 @@ describe("OllamaAction", () => { } }); - console.log = vi.fn(); - await ollamaAction.removeModel("mocked_model"); + expect(ollamaAction["startSpinner"]).toHaveBeenCalledWith(`Executing 'rm' command on model "mocked_model"...`); expect(mockGetContainer).toHaveBeenCalledWith("ollama"); expect(mockExec).toHaveBeenCalledWith({ Cmd: ["ollama", "rm", "mocked_model"], @@ -100,10 +101,8 @@ describe("OllamaAction", () => { AttachStderr: true, }); expect(mockStart).toHaveBeenCalledWith({ Detach: false, Tty: false }); - expect(mockStream.on).toHaveBeenCalledWith("data", expect.any(Function)); - expect(mockStream.on).toHaveBeenCalledWith("end", expect.any(Function)); - expect(console.log).toHaveBeenCalledWith("Mocked output success"); - expect(console.log).toHaveBeenCalledWith('Model "mocked_model" removed successfully'); + expect(ollamaAction["setSpinnerText"]).toHaveBeenCalledWith("Mocked output success"); + expect(ollamaAction["succeedSpinner"]).toHaveBeenCalledWith(`Model "mocked_model" removed successfully`); }); test("should log an error if an exception occurs during 'pull'", async () => { @@ -112,48 +111,26 @@ describe("OllamaAction", () => { config: { key: "value" }, plugin_config: { pluginKey: "pluginValue" }, }; + vi.mocked(rpcClient.request).mockResolvedValueOnce({ result: [mockProvider], }); const error = new Error("Mocked error"); - mockGetContainer.mockReturnValueOnce( - { - exec: () => { - throw new Error("Mocked error"); - } - } - ); - console.error = vi.fn(); + mockExec.mockRejectedValue(error); await ollamaAction.updateModel("mocked_model"); - expect(mockGetContainer).toHaveBeenCalledWith("ollama"); - expect(console.error).toHaveBeenCalledWith( - 'Error executing command "pull" on model "mocked_model":', - error - ); + expect(ollamaAction["failSpinner"]).toHaveBeenCalledWith(`Error executing command "pull" on model "mocked_model"`, error); }); test("should log an error if an exception occurs during 'rm'", async () => { const error = new Error("Mocked error"); - mockGetContainer.mockReturnValueOnce( - { - exec: () => { - throw new Error("Mocked error"); - } - } - ); - - console.error = vi.fn(); + mockExec.mockRejectedValue(error); await ollamaAction.removeModel("mocked_model"); - expect(mockGetContainer).toHaveBeenCalledWith("ollama"); - expect(console.error).toHaveBeenCalledWith( - 'Error executing command "rm" on model "mocked_model":', - error - ); + expect(ollamaAction["failSpinner"]).toHaveBeenCalledWith(`Error executing command "rm" on model "mocked_model"`, error); }); test("should throw an error if no 'ollama' provider exists during updateModel", async () => { @@ -161,21 +138,14 @@ describe("OllamaAction", () => { result: [], }); - const modelName = "mocked_model"; + await ollamaAction.updateModel("mocked_model"); - await expect(ollamaAction.updateModel(modelName)).rejects.toThrowError( + expect(ollamaAction["failSpinner"]).toHaveBeenCalledWith( "No existing 'ollama' provider found. Unable to add/update a model." ); - - expect(rpcClient.request).toHaveBeenCalledWith({ - method: "sim_getProvidersAndModels", - params: [], - }); }); test("should reject with an error if success is not set to true", async () => { - console.error = vi.fn(); - const mockProvider = { plugin: "ollama", config: { key: "value" }, @@ -195,14 +165,21 @@ describe("OllamaAction", () => { } }); - console.log = vi.fn(); - console.error = vi.fn(); - await ollamaAction.updateModel("mocked_model"); - expect(console.error).toHaveBeenCalledWith( - 'Error executing command "pull" on model "mocked_model":', 'internal error' + expect(ollamaAction["failSpinner"]).toHaveBeenCalledWith( + `Failed to execute 'pull' on model "mocked_model".` ); }); -}); + test("should log an error if an exception occurs inside updateModel", async () => { + const mockError = new Error("Mocked error"); + + vi.mocked(rpcClient.request).mockRejectedValue(mockError); + + await ollamaAction.updateModel("mocked_model"); + + expect(ollamaAction["failSpinner"]).toHaveBeenCalledWith(`Error updating model "mocked_model"`, mockError); + }); + +}); \ No newline at end of file diff --git a/tests/actions/stop.test.ts b/tests/actions/stop.test.ts index 9a308894..fdd1d354 100644 --- a/tests/actions/stop.test.ts +++ b/tests/actions/stop.test.ts @@ -2,6 +2,8 @@ import { describe, test, vi, beforeEach, afterEach, expect } from "vitest"; import { StopAction } from "../../src/commands/general/stop"; import { SimulatorService } from "../../src/lib/services/simulator"; import { ISimulatorService } from "../../src/lib/interfaces/ISimulatorService"; +import chalk from "chalk"; + import inquirer from "inquirer"; vi.mock("../../src/lib/services/simulator"); @@ -22,6 +24,10 @@ describe("StopAction", () => { stopAction = new StopAction(); (stopAction as any).simulatorService = mockSimulatorService; + + vi.spyOn(stopAction as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(stopAction as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(stopAction as any, "failSpinner").mockImplementation(() => {}); }); afterEach(() => { @@ -37,22 +43,35 @@ describe("StopAction", () => { { type: "confirm", name: "confirmAction", - message: "Are you sure you want to stop all running GenLayer containers? This will halt all active processes.", + message: chalk.yellow("Are you sure you want to stop all running GenLayer containers? This will halt all active processes."), default: true, }, ]); expect(mockSimulatorService.stopDockerContainers).toHaveBeenCalled(); + expect(stopAction["succeedSpinner"]).toHaveBeenCalledWith( + "All running GenLayer containers have been successfully stopped." + ); }); test("should abort if user cancels", async () => { vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: false }); - console.log = vi.fn(); - await stopAction.stop(); expect(inquirer.prompt).toHaveBeenCalled(); - expect(console.log).toHaveBeenCalledWith("Operation aborted!"); expect(mockSimulatorService.stopDockerContainers).not.toHaveBeenCalled(); }); + + test("should handle errors and call failSpinner", async () => { + vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: true }); + const error = new Error("Test Error"); + mockSimulatorService.stopDockerContainers = vi.fn().mockRejectedValue(error); + + await stopAction.stop(); + + expect(stopAction["failSpinner"]).toHaveBeenCalledWith( + "An error occurred while stopping the containers.", + error + ); + }); }); diff --git a/tests/actions/validators.test.ts b/tests/actions/validators.test.ts index 3e9b9979..40cc6c9a 100644 --- a/tests/actions/validators.test.ts +++ b/tests/actions/validators.test.ts @@ -17,6 +17,15 @@ describe("ValidatorsAction", () => { beforeEach(() => { vi.clearAllMocks(); validatorsAction = new ValidatorsAction(); + + vi.spyOn(validatorsAction as any, "logSuccess").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "logError").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "failSpinner").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "log").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "stopSpinner").mockImplementation(() => {}); + vi.spyOn(validatorsAction as any, "setSpinnerText").mockImplementation(() => {}); }); afterEach(() => { @@ -29,30 +38,44 @@ describe("ValidatorsAction", () => { const mockResponse = { result: { id: 1, name: "Validator1" } }; vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.log = vi.fn(); - await validatorsAction.getValidator({ address: mockAddress }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith( + `Fetching validator with address: ${mockAddress}` + ); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getValidator", params: [mockAddress], }); - expect(console.log).toHaveBeenCalledWith("Validator Details:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith( + `Successfully fetched validator with address: ${mockAddress}`, + mockResponse.result + ); + + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should fetch all validators when no address is provided", async () => { const mockResponse = { result: [{ id: 1 }, { id: 2 }] }; vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.log = vi.fn(); - await validatorsAction.getValidator({}); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching all validators..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getAllValidators", params: [], }); - expect(console.log).toHaveBeenCalledWith("All Validators:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith( + "Successfully fetched all validators.", + mockResponse.result + ); + + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if an exception occurs while fetching a specific validator", async () => { @@ -61,15 +84,19 @@ describe("ValidatorsAction", () => { vi.mocked(rpcClient.request).mockRejectedValue(mockError); - console.error = vi.fn(); - await validatorsAction.getValidator({ address: mockAddress }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith( + `Fetching validator with address: ${mockAddress}` + ); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getValidator", params: [mockAddress], }); - expect(console.error).toHaveBeenCalledWith("Error fetching validators:", mockError); + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Error fetching validators", mockError); + expect(validatorsAction["succeedSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if an exception occurs while fetching all validators", async () => { @@ -77,63 +104,78 @@ describe("ValidatorsAction", () => { vi.mocked(rpcClient.request).mockRejectedValue(mockError); - console.error = vi.fn(); - await validatorsAction.getValidator({}); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching all validators..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getAllValidators", params: [], }); - expect(console.error).toHaveBeenCalledWith("Error fetching validators:", mockError); + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Error fetching validators", mockError); + expect(validatorsAction["succeedSpinner"]).not.toHaveBeenCalled(); }); }); describe("deleteValidator", () => { - test("should delete a specific validator", async () => { - const mockAddress = "mocked_address"; + test("should delete a specific validator", async () => { + const mockAddress = "0x725a9D2D572E8833059a3e9a844791aF185C5Ff4"; vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: true }); - vi.mocked(rpcClient.request).mockResolvedValue({ result: { id: 1 } }); - - console.log = vi.fn(); + vi.mocked(rpcClient.request).mockResolvedValue({ result: mockAddress }); await validatorsAction.deleteValidator({ address: mockAddress }); - expect(inquirer.prompt).toHaveBeenCalled(); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith( + `Deleting validator with address: ${mockAddress}` + ); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_deleteValidator", params: [mockAddress], }); - expect(console.log).toHaveBeenCalledWith("Deleted Address:", { id: 1 }); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith( + `Deleted Address: ${mockAddress}` + ); + + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should delete all validators when no address is provided", async () => { vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: true }); vi.mocked(rpcClient.request).mockResolvedValue({}); - console.log = vi.fn(); - await validatorsAction.deleteValidator({}); - expect(inquirer.prompt).toHaveBeenCalled(); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith( + "Deleting all validators..." + ); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_deleteAllValidators", params: [], }); - expect(console.log).toHaveBeenCalledWith("Successfully deleted all validators"); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith( + "Successfully deleted all validators" + ); + + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should abort deletion if user declines confirmation", async () => { vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: false }); - console.log = vi.fn(); - - await validatorsAction.deleteValidator({ address: "mocked_address" }) + await validatorsAction.deleteValidator({ address: "mocked_address" }); expect(inquirer.prompt).toHaveBeenCalled(); - expect(console.log).toHaveBeenCalledWith("Operation aborted!"); + expect(validatorsAction["logError"]).toHaveBeenCalledWith("Operation aborted!"); expect(rpcClient.request).not.toHaveBeenCalled(); + expect(validatorsAction["startSpinner"]).not.toHaveBeenCalled(); + expect(validatorsAction["succeedSpinner"]).not.toHaveBeenCalled(); }); + }); describe("countValidators", () => { @@ -141,15 +183,17 @@ describe("ValidatorsAction", () => { const mockResponse = { result: 42 }; vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.log = vi.fn(); - await validatorsAction.countValidators(); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Counting all validators..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_countValidators", params: [], }); - expect(console.log).toHaveBeenCalledWith("Total Validators:", 42); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Total Validators: 42"); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if an exception occurs while counting validators", async () => { @@ -157,16 +201,19 @@ describe("ValidatorsAction", () => { vi.mocked(rpcClient.request).mockRejectedValue(mockError); - console.error = vi.fn(); - await validatorsAction.countValidators(); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Counting all validators..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_countValidators", params: [], }); - expect(console.error).toHaveBeenCalledWith("Error counting validators:", mockError); + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Error counting validators", mockError); + expect(validatorsAction["succeedSpinner"]).not.toHaveBeenCalled(); }); + }); describe("createValidator", () => { @@ -192,14 +239,37 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce({ selectedProvider: "Provider1" }) .mockResolvedValueOnce({ selectedModel: "Model1" }); - console.log = vi.fn(); - await validatorsAction.createValidator({ stake: "10" }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching available providers and models..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getProvidersAndModels", params: [], }); + + expect(validatorsAction["stopSpinner"]).toHaveBeenCalled(); + + expect(inquirer.prompt).toHaveBeenCalledWith([ + { + type: "list", + name: "selectedProvider", + message: "Select a provider:", + choices: ["Provider1"], + }, + ]); + + expect(inquirer.prompt).toHaveBeenCalledWith([ + { + type: "list", + name: "selectedModel", + message: "Select a model:", + choices: ["Model1"], + }, + ]); + + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Creating validator..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_createValidator", params: [ @@ -211,30 +281,46 @@ describe("ValidatorsAction", () => { { api_key_env_var: "KEY1" }, ], }); - expect(console.log).toHaveBeenCalledWith("Validator successfully created:", { id: 123 }); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith( + "Validator successfully created:", + mockResponse.result + ); + + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should log an error for invalid stake", async () => { - console.error = vi.fn(); await validatorsAction.createValidator({ stake: "invalid" }); - expect(console.error).toHaveBeenCalledWith("Invalid stake. Please provide a positive integer."); + expect(validatorsAction["logError"]).toHaveBeenCalledWith( + "Invalid stake. Please provide a positive integer." + ); + expect(rpcClient.request).not.toHaveBeenCalled(); + expect(validatorsAction["startSpinner"]).not.toHaveBeenCalled(); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if no providers or models are available", async () => { vi.mocked(rpcClient.request).mockResolvedValueOnce({ result: [] }); - console.error = vi.fn(); - await validatorsAction.createValidator({ stake: "10" }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching available providers and models..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getProvidersAndModels", params: [], }); - expect(console.error).toHaveBeenCalledWith("No providers or models available."); + + expect(validatorsAction["stopSpinner"]).toHaveBeenCalled(); + + expect(validatorsAction["logError"]).toHaveBeenCalledWith("No providers or models available."); + + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); + expect(validatorsAction["succeedSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if no models are available for the selected provider", async () => { @@ -245,11 +331,22 @@ describe("ValidatorsAction", () => { vi.mocked(rpcClient.request).mockResolvedValueOnce({ result: mockProvidersAndModels }); vi.mocked(inquirer.prompt).mockResolvedValueOnce({ selectedProvider: "Provider1" }); - console.error = vi.fn(); - await validatorsAction.createValidator({ stake: "10" }); - expect(console.error).toHaveBeenCalledWith("No models available for the selected provider."); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching available providers and models..."); + + expect(validatorsAction["stopSpinner"]).toHaveBeenCalled(); + + expect(inquirer.prompt).toHaveBeenCalledWith([ + { + type: "list", + name: "selectedProvider", + message: "Select a provider:", + choices: ["Provider1"], + }, + ]); + + expect(validatorsAction["logError"]).toHaveBeenCalledWith("No models available for the selected provider."); }); test("should log an error if selected model details are not found", async () => { @@ -267,22 +364,42 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce({ selectedProvider: "Provider1" }) .mockResolvedValueOnce({ selectedModel: "NonExistentModel" }); - console.error = vi.fn(); - await validatorsAction.createValidator({ stake: "10" }); - expect(console.error).toHaveBeenCalledWith("Selected model details not found."); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching available providers and models..."); + + expect(validatorsAction["stopSpinner"]).toHaveBeenCalled(); + + expect(inquirer.prompt).toHaveBeenCalledWith([ + { + type: "list", + name: "selectedProvider", + message: "Select a provider:", + choices: ["Provider1"], + }, + ]); + + expect(inquirer.prompt).toHaveBeenCalledWith([ + { + type: "list", + name: "selectedModel", + message: "Select a model:", + choices: ["Model1"], + }, + ]); + + expect(validatorsAction["logError"]).toHaveBeenCalledWith("Selected model details not found."); }); test("should log an error if an exception occurs during the process", async () => { const mockError = new Error("Unexpected error"); vi.mocked(rpcClient.request).mockRejectedValue(mockError); - console.error = vi.fn(); - await validatorsAction.createValidator({ stake: "10" }); - expect(console.error).toHaveBeenCalledWith("Error creating validator:", mockError); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching available providers and models..."); + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Error creating validator", mockError); }); test("should use user-provided config if specified", async () => { @@ -307,11 +424,22 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce({ selectedProvider: "Provider1" }) .mockResolvedValueOnce({ selectedModel: "Model1" }); - console.log = vi.fn(); - const customConfig = '{"custom_key":"custom_value"}'; await validatorsAction.createValidator({ stake: "10", config: customConfig }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Fetching available providers and models..."); + expect(rpcClient.request).toHaveBeenCalledWith({ + method: "sim_getProvidersAndModels", + params: [], + }); + expect(validatorsAction["stopSpinner"]).toHaveBeenCalled(); + expect(inquirer.prompt).toHaveBeenCalledWith([ + { type: "list", name: "selectedProvider", message: "Select a provider:", choices: ["Provider1"] }, + ]); + expect(inquirer.prompt).toHaveBeenCalledWith([ + { type: "list", name: "selectedModel", message: "Select a model:", choices: ["Model1"] }, + ]); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Creating validator..."); expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_createValidator", params: [ @@ -323,84 +451,100 @@ describe("ValidatorsAction", () => { { api_key_env_var: "KEY1" }, ], }); - expect(console.log).toHaveBeenCalledWith("Validator successfully created:", { id: 123 }); + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Validator successfully created:", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); + }); + + test("should log an error if model is provided without provider", async () => { + vi.spyOn(validatorsAction as any, "logError").mockImplementation(() => {}); + + await validatorsAction.createValidator({ stake: "10", model: "Model1" }); + + expect(validatorsAction["logError"]).toHaveBeenCalledWith("You must specify a provider if using a model."); + expect(rpcClient.request).not.toHaveBeenCalled(); }); }); + describe("createRandomValidators", () => { test("should create random validators with valid count and providers", async () => { const mockResponse = { result: { success: true } }; vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.log = vi.fn(); - await validatorsAction.createRandomValidators({ count: "5", providers: ["Provider1", "Provider2"], models: [] }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Creating 5 random validator(s)..."); + expect(validatorsAction["log"]).toHaveBeenCalledWith("Providers: Provider1, Provider2"); + expect(validatorsAction["log"]).toHaveBeenCalledWith("Models: All"); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_createRandomValidators", params: [5, 1, 10, ["Provider1", "Provider2"], []], }); - expect(console.log).toHaveBeenCalledWith("Creating 5 random validator(s)..."); - expect(console.log).toHaveBeenCalledWith("Providers: Provider1, Provider2"); - expect(console.log).toHaveBeenCalledWith("Random validators successfully created:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Random validators successfully created", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should create random validators with valid count, providers and models", async () => { const mockResponse = { result: { success: true } }; vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.log = vi.fn(); - await validatorsAction.createRandomValidators({ count: "10", providers: ["Provider3"], models: ["Model1", "Model2"] }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Creating 10 random validator(s)..."); + expect(validatorsAction["log"]).toHaveBeenCalledWith("Providers: Provider3"); + expect(validatorsAction["log"]).toHaveBeenCalledWith("Models: Model1, Model2"); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_createRandomValidators", params: [10, 1, 10, ["Provider3"], ["Model1", "Model2"]], }); - expect(console.log).toHaveBeenCalledWith("Creating 10 random validator(s)..."); - expect(console.log).toHaveBeenCalledWith("Providers: Provider3"); - expect(console.log).toHaveBeenCalledWith("Models: Model1, Model2"); - expect(console.log).toHaveBeenCalledWith("Random validators successfully created:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Random validators successfully created", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should create random validators with default provider message when providers list is empty", async () => { const mockResponse = { result: { success: true } }; vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.log = vi.fn(); - await validatorsAction.createRandomValidators({ count: "3", providers: [], models: [] }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Creating 3 random validator(s)..."); + expect(validatorsAction["log"]).toHaveBeenCalledWith("Providers: All"); + expect(validatorsAction["log"]).toHaveBeenCalledWith("Models: All"); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_createRandomValidators", params: [3, 1, 10, [], []], }); - expect(console.log).toHaveBeenCalledWith("Creating 3 random validator(s)..."); - expect(console.log).toHaveBeenCalledWith("Providers: None"); - expect(console.log).toHaveBeenCalledWith("Random validators successfully created:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Random validators successfully created", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should throw an error for invalid count", async () => { - console.error = vi.fn(); - await validatorsAction.createRandomValidators({ count: "invalid", providers: ["Provider1"], models: [] }); - expect(console.error).toHaveBeenCalledWith("Invalid count. Please provide a positive integer."); + expect(validatorsAction["logError"]).toHaveBeenCalledWith("Invalid count. Please provide a positive integer."); expect(rpcClient.request).not.toHaveBeenCalled(); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if rpc request fails", async () => { const mockError = new Error("RPC failure"); vi.mocked(rpcClient.request).mockRejectedValue(mockError); - console.error = vi.fn(); - await validatorsAction.createRandomValidators({ count: "5", providers: ["Provider1"], models: [] }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith("Creating 5 random validator(s)..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_createRandomValidators", params: [5, 1, 10, ["Provider1"], []], }); - expect(console.error).toHaveBeenCalledWith("Error creating random validators:", mockError); + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Error creating random validators", mockError); }); }); @@ -422,14 +566,17 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce(mockCurrentValidator) .mockResolvedValueOnce(mockResponse); - console.log = vi.fn(); - await validatorsAction.updateValidator({ address: mockAddress, stake: "200" }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith(`Fetching validator with address: ${mockAddress}...`); expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getValidator", params: [mockAddress], }); + + expect(validatorsAction["log"]).toHaveBeenCalledWith("Current Validator Details:", mockCurrentValidator.result); + expect(validatorsAction["setSpinnerText"]).toHaveBeenCalledWith("Updating Validator..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_updateValidator", params: [ @@ -440,7 +587,9 @@ describe("ValidatorsAction", () => { { max_tokens: 500 }, ], }); - expect(console.log).toHaveBeenCalledWith("Validator successfully updated:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Validator successfully updated", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should fetch and update a validator with new provider and model", async () => { @@ -460,18 +609,17 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce(mockCurrentValidator) .mockResolvedValueOnce(mockResponse); - console.log = vi.fn(); - - await validatorsAction.updateValidator({ - address: mockAddress, - provider: "Provider2", - model: "Model2", - }); + await validatorsAction.updateValidator({ address: mockAddress, provider: "Provider2", model: "Model2" }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith(`Fetching validator with address: ${mockAddress}...`); expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getValidator", params: [mockAddress], }); + + expect(validatorsAction["log"]).toHaveBeenCalledWith("Current Validator Details:", mockCurrentValidator.result); + expect(validatorsAction["setSpinnerText"]).toHaveBeenCalledWith("Updating Validator..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_updateValidator", params: [ @@ -482,7 +630,9 @@ describe("ValidatorsAction", () => { { max_tokens: 500 }, ], }); - expect(console.log).toHaveBeenCalledWith("Validator successfully updated:", mockResponse.result); + + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Validator successfully updated", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should fetch and update a validator with new config", async () => { @@ -502,15 +652,18 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce(mockCurrentValidator) .mockResolvedValueOnce(mockResponse); - console.log = vi.fn(); - const newConfig = '{"max_tokens":1000}'; await validatorsAction.updateValidator({ address: mockAddress, config: newConfig }); + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith(`Fetching validator with address: ${mockAddress}...`); expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_getValidator", params: [mockAddress], }); + + expect(validatorsAction["log"]).toHaveBeenCalledWith("Current Validator Details:", mockCurrentValidator.result); + expect(validatorsAction["setSpinnerText"]).toHaveBeenCalledWith("Updating Validator..."); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_updateValidator", params: [ @@ -521,28 +674,9 @@ describe("ValidatorsAction", () => { { max_tokens: 1000 }, ], }); - expect(console.log).toHaveBeenCalledWith("Validator successfully updated:", mockResponse.result); - }); - - test("should throw an error if validator is not found", async () => { - const mockAddress = "mocked_address"; - const mockResponse = { result: null }; - - vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); - console.error = vi.fn(); - - await validatorsAction.updateValidator({ address: mockAddress }); - - expect(rpcClient.request).toHaveBeenCalledWith({ - method: "sim_getValidator", - params: [mockAddress], - }); - expect(console.error).toHaveBeenCalledWith( - "Error updating validator:", - new Error(`Validator with address ${mockAddress} not found.`) - ); - expect(rpcClient.request).toHaveBeenCalledTimes(1); + expect(validatorsAction["succeedSpinner"]).toHaveBeenCalledWith("Validator successfully updated", mockResponse.result); + expect(validatorsAction["failSpinner"]).not.toHaveBeenCalled(); }); test("should log an error if updateValidator RPC call fails", async () => { @@ -562,7 +696,7 @@ describe("ValidatorsAction", () => { .mockResolvedValueOnce(mockCurrentValidator) .mockRejectedValueOnce(mockError); - console.error = vi.fn(); + vi.spyOn(validatorsAction as any, "failSpinner").mockImplementation(() => {}); await validatorsAction.updateValidator({ address: mockAddress, stake: "200" }); @@ -570,6 +704,7 @@ describe("ValidatorsAction", () => { method: "sim_getValidator", params: [mockAddress], }); + expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_updateValidator", params: [ @@ -580,40 +715,36 @@ describe("ValidatorsAction", () => { { max_tokens: 500 }, ], }); - expect(console.error).toHaveBeenCalledWith("Error updating validator:", mockError); - }); - }); - test("should log an error for invalid stake value", async () => { - const mockAddress = "mocked_address"; - const mockCurrentValidator = { - result: { - address: "mocked_address", - stake: 100, - provider: "Provider1", - model: "Model1", - config: { max_tokens: 500 }, - }, - }; - - vi.mocked(rpcClient.request).mockResolvedValue(mockCurrentValidator); - - console.error = vi.fn(); - - await validatorsAction.updateValidator({ address: mockAddress, stake: "-10" }); - - expect(rpcClient.request).toHaveBeenCalledWith({ - method: "sim_getValidator", - params: [mockAddress], + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Error updating validator", mockError); }); - expect(console.error).toHaveBeenCalledWith("Invalid stake value. Stake must be a positive integer."); - expect(rpcClient.request).toHaveBeenCalledTimes(1); - }); - test("should log an error if model is provided without provider", async () => { - console.error = vi.fn(); - await validatorsAction.createValidator({ stake: "10", model: "Model1" }); + test("should log an error for invalid stake value", async () => { + const mockAddress = "mocked_address"; + const mockCurrentValidator = { + result: { + address: "mocked_address", + stake: 100, + provider: "Provider1", + model: "Model1", + config: { max_tokens: 500 }, + }, + }; + + vi.mocked(rpcClient.request).mockResolvedValue(mockCurrentValidator); - expect(console.error).toHaveBeenCalledWith("You must specify a provider if using a model."); - expect(rpcClient.request).not.toHaveBeenCalled(); + vi.spyOn(validatorsAction as any, "failSpinner").mockImplementation(() => {}); + + await validatorsAction.updateValidator({ address: mockAddress, stake: "-10" }); + + expect(validatorsAction["startSpinner"]).toHaveBeenCalledWith(`Fetching validator with address: ${mockAddress}...`); + expect(rpcClient.request).toHaveBeenCalledWith({ + method: "sim_getValidator", + params: [mockAddress], + }); + + expect(validatorsAction["failSpinner"]).toHaveBeenCalledWith("Invalid stake value. Stake must be a positive integer."); + expect(rpcClient.request).toHaveBeenCalledTimes(1); + }); }); }); \ No newline at end of file diff --git a/tests/libs/baseAction.test.ts b/tests/libs/baseAction.test.ts new file mode 100644 index 00000000..1ac3bad7 --- /dev/null +++ b/tests/libs/baseAction.test.ts @@ -0,0 +1,175 @@ +import {describe, test, vi, beforeEach, afterEach, expect, Mock} from "vitest"; +import { BaseAction } from "../../src/lib/actions/BaseAction"; +import inquirer from "inquirer"; +import ora, { Ora } from "ora"; +import chalk from "chalk"; + +vi.mock("inquirer"); +vi.mock("ora"); + +describe("BaseAction", () => { + let baseAction: BaseAction; + let mockSpinner: Ora; + let consoleSpy: any; + let consoleErrorSpy: any; + + beforeEach(() => { + vi.clearAllMocks(); + consoleSpy = vi.spyOn(console, "log").mockImplementation(() => {}); + consoleErrorSpy = vi.spyOn(console, "error").mockImplementation(() => {}); + mockSpinner = { + start: vi.fn(), + stop: vi.fn(), + succeed: vi.fn(), + fail: vi.fn(), + text: "", + } as unknown as Ora; + + (ora as unknown as Mock).mockReturnValue(mockSpinner); + + baseAction = new BaseAction(); + }); + + afterEach(() => { + vi.restoreAllMocks(); + }); + + test("should start the spinner with a message", () => { + baseAction["startSpinner"]("Loading..."); + expect(mockSpinner.start).toHaveBeenCalled(); + expect(mockSpinner.text).toBe(chalk.blue("Loading...")); + }); + + test("should succeed the spinner with a message", () => { + baseAction["succeedSpinner"]("Success"); + expect(mockSpinner.succeed).toHaveBeenCalledWith(expect.stringContaining("Success")); + }); + + test("should fail the spinner with an error message", () => { + baseAction["failSpinner"]("Failure", new Error("Something went wrong")); + expect(mockSpinner.fail).toHaveBeenCalledWith(expect.stringContaining("Failure")); + }); + + test("should stop the spinner", () => { + baseAction["stopSpinner"](); + expect(mockSpinner.stop).toHaveBeenCalled(); + }); + + test("should set spinner text", () => { + baseAction["setSpinnerText"]("Updated text"); + expect(mockSpinner.text).toBe(chalk.blue("Updated text")); + }); + + test("should confirm prompt and proceed when confirmed", async () => { + vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: true }); + + await expect(baseAction["confirmPrompt"]("Are you sure?")).resolves.not.toThrow(); + expect(inquirer.prompt).toHaveBeenCalled(); + }); + + test("should confirm prompt and exit when declined", async () => { + vi.mocked(inquirer.prompt).mockResolvedValue({ confirmAction: false }); + const processExitSpy = vi.spyOn(process, "exit").mockImplementation(() => { + throw new Error("process exited"); + }); + + await expect(baseAction["confirmPrompt"]("Are you sure?")).rejects.toThrow("process exited"); + expect(inquirer.prompt).toHaveBeenCalled(); + expect(processExitSpy).toHaveBeenCalledWith(0); + }); + + test("should log a success message", () => { + baseAction["logSuccess"]("Success message"); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("✔ Success message")); + }); + + test("should log an error message", () => { + baseAction["logError"]("Error message"); + + expect(consoleErrorSpy).toHaveBeenCalledWith(expect.stringContaining("✖ Error message")); + }); + + test("should log a info message", () => { + baseAction["logInfo"]("Info message"); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("ℹ Info message")); + }); + + test("should log a warning message", () => { + baseAction["logWarning"]("Warning message"); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("⚠ Warning message")); + }); + + test("should log a success message with data", () => { + const data = { key: "value" }; + + baseAction["logSuccess"]("Success message", data); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("✔ Success message")); + expect(consoleSpy).toHaveBeenCalledWith(chalk.green(JSON.stringify(data, null, 2))); + }); + + test("should log an error message with error details", () => { + const error = new Error("Something went wrong"); + + baseAction["logError"]("Error message", error); + + expect(consoleErrorSpy).toHaveBeenCalledWith(expect.stringContaining("✖ Error message")); + expect(consoleErrorSpy).toHaveBeenCalledWith(chalk.red(JSON.stringify({ + name: error.name, + message: error.message, + }, null, 2))); + }); + + test("should log an info message with data", () => { + const data = { info: "This is some info" }; + + baseAction["logInfo"]("Info message", data); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("ℹ Info message")); + expect(consoleSpy).toHaveBeenCalledWith(chalk.blue(JSON.stringify(data, null, 2))); + }); + + test("should log a warning message with data", () => { + const data = { warning: "This is a warning" }; + + baseAction["logWarning"]("Warning message", data); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("⚠ Warning message")); + expect(consoleSpy).toHaveBeenCalledWith(chalk.yellow(JSON.stringify(data, null, 2))); + }); + + test("should succeed the spinner with a message and log result if data is provided", () => { + const mockData = { key: "value" }; + + baseAction["succeedSpinner"]("Success", mockData); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("Result:")); + expect(consoleSpy).toHaveBeenCalledWith(JSON.stringify(mockData, null, 2)); + expect(mockSpinner.succeed).toHaveBeenCalledWith(expect.stringContaining("Success")); + }); + + test("should format an Error instance with name, message, and additional properties", () => { + const error = new Error("Something went wrong"); + (error as any).code = 500; + + const result = (baseAction as any).formatOutput(error); + expect(result).toBe(JSON.stringify({ name: "Error", message: "Something went wrong", code: 500 }, null, 2)); + }); + + test("should format an object as JSON string", () => { + const data = { key: "value", num: 42 }; + const result = (baseAction as any).formatOutput(data); + + expect(result).toBe(JSON.stringify(data, null, 2)); + }); + + test("should return a string representation of a primitive", () => { + expect((baseAction as any).formatOutput("Hello")).toBe("Hello"); + expect((baseAction as any).formatOutput(42)).toBe("42"); + expect((baseAction as any).formatOutput(true)).toBe("true"); + }); + +}); From 134df7f99099bbb226d0197ba36c48f015fecf99 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Fri, 14 Feb 2025 12:34:39 -0300 Subject: [PATCH 17/40] feat: adding spinner to keygen command --- src/commands/keygen/create.ts | 13 +++++++------ tests/actions/create.test.ts | 33 +++++++++++++-------------------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/commands/keygen/create.ts b/src/commands/keygen/create.ts index b5150f23..918bfc8e 100644 --- a/src/commands/keygen/create.ts +++ b/src/commands/keygen/create.ts @@ -1,26 +1,28 @@ import { writeFileSync, existsSync } from "fs"; import { ethers } from "ethers"; import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; +import { BaseAction } from "../../lib/actions/BaseAction"; export interface CreateKeypairOptions { output: string; overwrite: boolean; } -export class KeypairCreator { +export class KeypairCreator extends BaseAction{ private filePathManager: ConfigFileManager; constructor() { + super() this.filePathManager = new ConfigFileManager(); } createKeypairAction(options: CreateKeypairOptions) { try { - + this.startSpinner(`Creating keypair...`); const outputPath = this.filePathManager.getFilePath(options.output); if(existsSync(outputPath) && !options.overwrite) { - console.warn( + this.failSpinner( `The file at ${outputPath} already exists. Use the '--overwrite' option to replace it.` ); return; @@ -35,10 +37,9 @@ export class KeypairCreator { writeFileSync(outputPath, JSON.stringify(keypairData, null, 2)); this.filePathManager.writeConfig('keyPairPath', outputPath); - console.log(`Keypair successfully created and saved to: ${outputPath}`); + this.succeedSpinner(`Keypair successfully created and saved to: ${outputPath}`); } catch (error) { - console.error("Failed to generate keypair:", error); - process.exit(1); + this.failSpinner("Failed to generate keypair:", error); } } } \ No newline at end of file diff --git a/tests/actions/create.test.ts b/tests/actions/create.test.ts index 7c61fef6..101aa734 100644 --- a/tests/actions/create.test.ts +++ b/tests/actions/create.test.ts @@ -31,6 +31,9 @@ describe("KeypairCreator", () => { beforeEach(() => { vi.clearAllMocks(); + vi.spyOn(keypairCreator as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(keypairCreator as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(keypairCreator as any, "failSpinner").mockImplementation(() => {}); vi.mocked(ethers.Wallet.createRandom).mockReturnValue(mockWallet); }); @@ -39,16 +42,16 @@ describe("KeypairCreator", () => { }); test("successfully creates and saves a keypair", () => { - const consoleLogSpy = vi.spyOn(console, "log"); vi.mocked(existsSync).mockReturnValue(false); const options = { output: "keypair.json", overwrite: false }; keypairCreator.createKeypairAction(options); + expect(keypairCreator["startSpinner"]).toHaveBeenCalledWith("Creating keypair..."); expect(ethers.Wallet.createRandom).toHaveBeenCalledTimes(1); - expect(keypairCreator["filePathManager"].getFilePath).toHaveBeenCalledWith("keypair.json"); + expect(writeFileSync).toHaveBeenCalledWith( "/mocked/path/keypair.json", JSON.stringify( @@ -66,15 +69,12 @@ describe("KeypairCreator", () => { "/mocked/path/keypair.json" ); - expect(consoleLogSpy).toHaveBeenCalledWith( + expect(keypairCreator["succeedSpinner"]).toHaveBeenCalledWith( "Keypair successfully created and saved to: /mocked/path/keypair.json" ); }); test("skips creation if file exists and overwrite is false", () => { - - - const consoleWarnSpy = vi.spyOn(console, "warn"); vi.mocked(existsSync).mockReturnValue(true); const options = { output: "keypair.json", overwrite: false }; @@ -82,20 +82,19 @@ describe("KeypairCreator", () => { expect(ethers.Wallet.createRandom).not.toHaveBeenCalled(); expect(writeFileSync).not.toHaveBeenCalled(); - expect(consoleWarnSpy).toHaveBeenCalledWith( + expect(keypairCreator["failSpinner"]).toHaveBeenCalledWith( "The file at /mocked/path/keypair.json already exists. Use the '--overwrite' option to replace it." ); }); test("overwrites the file if overwrite is true", () => { - const consoleLogSpy = vi.spyOn(console, "log"); vi.mocked(existsSync).mockReturnValue(true); const options = { output: "keypair.json", overwrite: true }; keypairCreator.createKeypairAction(options); + expect(keypairCreator["startSpinner"]).toHaveBeenCalledWith("Creating keypair..."); expect(ethers.Wallet.createRandom).toHaveBeenCalledTimes(1); - expect(keypairCreator["filePathManager"].getFilePath).toHaveBeenCalledWith("keypair.json"); expect(writeFileSync).toHaveBeenCalledWith( @@ -115,26 +114,20 @@ describe("KeypairCreator", () => { "/mocked/path/keypair.json" ); - expect(consoleLogSpy).toHaveBeenCalledWith( + expect(keypairCreator["succeedSpinner"]).toHaveBeenCalledWith( "Keypair successfully created and saved to: /mocked/path/keypair.json" ); }); test("handles errors during keypair creation", () => { - const consoleErrorSpy = vi.spyOn(console, "error"); - const processExitSpy = vi.spyOn(process, "exit").mockImplementation(() => { - throw new Error("process.exit"); - }); + const mockError = new Error("Mocked write error"); vi.mocked(writeFileSync).mockImplementation(() => { - throw new Error("Mocked write error"); + throw mockError; }); - expect(() => { - keypairCreator.createKeypairAction({ output: "keypair.json", overwrite: true }); - }).toThrowError("process.exit"); + keypairCreator.createKeypairAction({ output: "keypair.json", overwrite: true }); - expect(consoleErrorSpy).toHaveBeenCalledWith("Failed to generate keypair:", expect.any(Error)); - expect(processExitSpy).toHaveBeenCalledWith(1); + expect(keypairCreator["failSpinner"]).toHaveBeenCalledWith("Failed to generate keypair:", mockError); }); }); From 25967f9d743d9a26c4cd49bc93d9b43a990504b5 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Fri, 14 Feb 2025 14:49:08 -0300 Subject: [PATCH 18/40] feat: adding spinner and logs to command config --- src/commands/config/getSetReset.ts | 30 +++++++++----- tests/actions/getSetReset.test.ts | 63 ++++++++++++------------------ 2 files changed, 45 insertions(+), 48 deletions(-) diff --git a/src/commands/config/getSetReset.ts b/src/commands/config/getSetReset.ts index 2aae7c00..4774edea 100644 --- a/src/commands/config/getSetReset.ts +++ b/src/commands/config/getSetReset.ts @@ -1,44 +1,54 @@ import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; +import { BaseAction } from "../../lib/actions/BaseAction"; -export class ConfigActions { +export class ConfigActions extends BaseAction { private configManager: ConfigFileManager; constructor() { + super(); this.configManager = new ConfigFileManager(); } set(keyValue: string): void { const [key, value] = keyValue.split("="); + this.startSpinner(`Updating configuration: ${key}`); + if (!key || value === undefined) { - console.error("Invalid format. Use key=value."); - process.exit(1); + this.failSpinner("Invalid format. Use 'key=value'."); + return; } + this.configManager.writeConfig(key, value); - console.log(`Configuration updated: ${key}=${value}`); + this.succeedSpinner(`Configuration successfully updated`); } get(key?: string): void { + this.startSpinner(key ? `Retrieving value for: ${key}` : "Retrieving all configurations"); + if (key) { const value = this.configManager.getConfigByKey(key); if (value === null) { - console.log(`No value set for key: ${key}`); + this.failSpinner(`No configuration found for '${key}'.`); } else { - console.log(`${key}=${value}`); + this.succeedSpinner(`Configuration successfully retrieved`, `${key}=${value}`); } } else { const config = this.configManager.getConfig(); - console.log("Current configuration:", JSON.stringify(config, null, 2)); + this.succeedSpinner("All configurations successfully retrieved", JSON.stringify(config, null, 2)); } } reset(key: string): void { + this.startSpinner(`Resetting configuration: ${key}`); + const config = this.configManager.getConfig(); - if (config[key] === undefined) { - console.log(`Key does not exist in the configuration: ${key}`); + if (!(key in config)) { + this.failSpinner(`Configuration key '${key}' does not exist.`); return; } + delete config[key]; this.configManager.writeConfig(key, undefined); - console.log(`Configuration key reset: ${key}`); + this.succeedSpinner(`Configuration successfully reset`); } } diff --git a/tests/actions/getSetReset.test.ts b/tests/actions/getSetReset.test.ts index a4bb9549..8a8ac17c 100644 --- a/tests/actions/getSetReset.test.ts +++ b/tests/actions/getSetReset.test.ts @@ -10,92 +10,79 @@ describe("ConfigActions", () => { beforeEach(() => { configActions = new ConfigActions(); vi.clearAllMocks(); - }); - new ConfigFileManager(); + vi.spyOn(configActions as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(configActions as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(configActions as any, "failSpinner").mockImplementation(() => {}); + }); afterEach(() => { vi.restoreAllMocks(); }); test("set method writes key-value pair to the configuration", () => { - const consoleLogSpy = vi.spyOn(console, "log"); - configActions.set("defaultNetwork=testnet"); expect(configActions["configManager"].writeConfig).toHaveBeenCalledWith("defaultNetwork", "testnet"); - expect(consoleLogSpy).toHaveBeenCalledWith("Configuration updated: defaultNetwork=testnet"); + expect(configActions["startSpinner"]).toHaveBeenCalledWith("Updating configuration: defaultNetwork"); + expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("Configuration successfully updated"); }); - test("set method throws error for invalid format", () => { - const consoleErrorSpy = vi.spyOn(console, "error"); - const processExitSpy = vi.spyOn(process, "exit").mockImplementation(() => { - throw new Error("process.exit"); - }); + test("set method fails for invalid format", () => { + configActions.set("invalidFormat"); - expect(() => configActions.set("invalidFormat")).toThrowError("process.exit"); - - expect(consoleErrorSpy).toHaveBeenCalledWith("Invalid format. Use key=value."); - expect(processExitSpy).toHaveBeenCalledWith(1); + expect(configActions["failSpinner"]).toHaveBeenCalledWith("Invalid format. Use 'key=value'."); + expect(configActions["configManager"].writeConfig).not.toHaveBeenCalled(); }); test("get method retrieves value for a specific key", () => { vi.mocked(ConfigFileManager.prototype.getConfigByKey).mockReturnValue("testnet"); - const consoleLogSpy = vi.spyOn(console, "log"); - configActions.get("defaultNetwork"); expect(configActions["configManager"].getConfigByKey).toHaveBeenCalledWith("defaultNetwork"); - expect(consoleLogSpy).toHaveBeenCalledWith("defaultNetwork=testnet"); + expect(configActions["startSpinner"]).toHaveBeenCalledWith("Retrieving value for: defaultNetwork"); + expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("Configuration successfully retrieved", "defaultNetwork=testnet"); }); - test("get method prints message when key has no value", () => { + test("get method prints failure message when key does not exist", () => { vi.mocked(ConfigFileManager.prototype.getConfigByKey).mockReturnValue(null); - const consoleLogSpy = vi.spyOn(console, "log"); - configActions.get("nonexistentKey"); expect(configActions["configManager"].getConfigByKey).toHaveBeenCalledWith("nonexistentKey"); - expect(consoleLogSpy).toHaveBeenCalledWith("No value set for key: nonexistentKey"); + expect(configActions["failSpinner"]).toHaveBeenCalledWith("No configuration found for 'nonexistentKey'."); }); test("get method retrieves the entire configuration when no key is provided", () => { const mockConfig = { defaultNetwork: "testnet" }; vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue(mockConfig); - const consoleLogSpy = vi.spyOn(console, "log"); - configActions.get(); - expect(configActions["configManager"].getConfig).toHaveBeenCalledTimes(1); - expect(consoleLogSpy).toHaveBeenCalledWith("Current configuration:", JSON.stringify(mockConfig, null, 2)); + expect(configActions["configManager"].getConfig).toHaveBeenCalled(); + expect(configActions["startSpinner"]).toHaveBeenCalledWith("Retrieving all configurations"); + expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("All configurations successfully retrieved", JSON.stringify(mockConfig, null, 2)); }); test("reset method removes key from configuration", () => { const mockConfig = { defaultNetwork: "testnet" }; vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue(mockConfig); - const consoleLogSpy = vi.spyOn(console, "log"); - configActions.reset("defaultNetwork"); - expect(configActions["configManager"].getConfig).toHaveBeenCalledTimes(1); + expect(configActions["configManager"].getConfig).toHaveBeenCalled(); + expect(configActions["startSpinner"]).toHaveBeenCalledWith("Resetting configuration: defaultNetwork"); expect(configActions["configManager"].writeConfig).toHaveBeenCalledWith("defaultNetwork", undefined); - expect(consoleLogSpy).toHaveBeenCalledWith("Configuration key reset: defaultNetwork"); + expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("Configuration successfully reset"); }); - test("reset method prints message when key does not exist", () => { - const mockConfig = {}; - vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue(mockConfig); - - const consoleLogSpy = vi.spyOn(console, "log"); + test("reset method prints failure message when key does not exist", () => { + vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue({}); configActions.reset("nonexistentKey"); - expect(configActions["configManager"].getConfig).toHaveBeenCalledTimes(1); - expect(configActions["configManager"].writeConfig).not.toHaveBeenCalled(); - expect(consoleLogSpy).toHaveBeenCalledWith("Key does not exist in the configuration: nonexistentKey"); + expect(configActions["configManager"].getConfig).toHaveBeenCalled(); + expect(configActions["failSpinner"]).toHaveBeenCalledWith("Configuration key 'nonexistentKey' does not exist."); }); -}); +}); \ No newline at end of file From 0c9f777f73fa088e24b47c752a0ff5ebc4f1dc48 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Mon, 17 Feb 2025 10:15:33 -0300 Subject: [PATCH 19/40] feat: new up command(class) --- src/commands/general/index.ts | 7 +- src/commands/general/start.ts | 152 ++++++++++++------------ src/lib/services/simulator.ts | 1 - tests/actions/start.test.ts | 215 +++++++++++++++++----------------- tests/commands/up.test.ts | 52 ++++---- 5 files changed, 217 insertions(+), 210 deletions(-) diff --git a/src/commands/general/index.ts b/src/commands/general/index.ts index 67fd14e0..f318c835 100644 --- a/src/commands/general/index.ts +++ b/src/commands/general/index.ts @@ -2,7 +2,7 @@ import { Command } from "commander"; import simulatorService from "../../lib/services/simulator"; import { initAction, InitActionOptions } from "./init"; -import { startAction, StartActionOptions } from "./start"; +import { StartAction, StartActionOptions } from "./start"; import {localnetCompatibleVersion} from "../../lib/config/simulator"; import {StopAction} from "./stop"; @@ -23,7 +23,10 @@ export function initializeGeneralCommands(program: Command) { .option("--numValidators ", "Number of validators", "5") .option("--headless", "Headless mode", false) .option("--reset-db", "Reset Database", false) - .action((options: StartActionOptions) => startAction(options, simulatorService)); + .action(async (options: StartActionOptions) => { + const startAction = new StartAction(); + await startAction.execute(options); + }); program .command("stop") diff --git a/src/commands/general/start.ts b/src/commands/general/start.ts index e7c7cbfc..c543846e 100644 --- a/src/commands/general/start.ts +++ b/src/commands/general/start.ts @@ -1,104 +1,102 @@ import inquirer from "inquirer"; - -import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; +import { ISimulatorService } from "../../lib/interfaces/ISimulatorService"; +import { BaseAction } from "../../lib/actions/BaseAction"; +import { SimulatorService } from "../../lib/services/simulator"; export interface StartActionOptions { resetValidators: boolean; numValidators: number; headless: boolean; - resetDb: boolean + resetDb: boolean; } -export async function startAction(options: StartActionOptions, simulatorService: ISimulatorService) { - const {resetValidators, numValidators, headless, resetDb} = options; +export class StartAction extends BaseAction { + private simulatorService: ISimulatorService; - simulatorService.setComposeOptions(headless); + constructor() { + super(); + this.simulatorService = new SimulatorService(); + } - await simulatorService.checkCliVersion(); + async execute(options: StartActionOptions) { + const { resetValidators, numValidators, headless, resetDb } = options; - const restartValidatorsHintText = resetValidators - ? `creating new ${numValidators} random validators` - : "keeping the existing validators"; + this.simulatorService.setComposeOptions(headless); + this.startSpinner("Checking CLI version..."); + await this.simulatorService.checkCliVersion(); - console.log(`Starting GenLayer simulator ${restartValidatorsHintText}`); + const restartValidatorsHintText = resetValidators + ? `creating new ${numValidators} random validators` + : "keeping the existing validators"; + this.setSpinnerText(`Starting GenLayer Localnet (${restartValidatorsHintText})...`); - try { - await simulatorService.runSimulator(); - } catch (error) { - console.error(error); - return; - } - - try { - const {initialized, errorCode, errorMessage} = await simulatorService.waitForSimulatorToBeReady(); - if (!initialized && errorCode === "ERROR") { - console.log(errorMessage); - console.error("Unable to initialize the GenLayer simulator. Please try again."); - return; - } - if (!initialized && errorCode === "TIMEOUT") { - console.error( - "The simulator is taking too long to initialize. Please try again after the simulator is ready.", - ); + try { + await this.simulatorService.runSimulator(); + } catch (error) { + this.failSpinner("Error starting the simulator", error); return; } - console.log("Simulator is running!"); - } catch (error) { - console.error(error); - return; - } - - if(resetDb){ - await simulatorService.cleanDatabase() - } - if (resetValidators) { - // Initializing validators - console.log("Initializing validators..."); try { - //remove all validators - await simulatorService.deleteAllValidators(); - const questions = [ - { - type: "checkbox", - name: "selectedLlmProviders", - message: "Select which LLM providers do you want to use:", - choices: simulatorService.getAiProvidersOptions(false), - validate: function (answer: string[]) { - if (answer.length < 1) { - return "You must choose at least one option."; - } - return true; - }, - }, - ]; + this.setSpinnerText("Waiting for the simulator to be ready..."); + const { initialized, errorCode, errorMessage } = await this.simulatorService.waitForSimulatorToBeReady(); - // Since ollama runs locally we can run it here and then look for the other providers - const llmProvidersAnswer = await inquirer.prompt(questions); + if (!initialized) { + if (errorCode === "ERROR") { + this.failSpinner("Unable to initialize the GenLayer simulator.", errorMessage); + return; + } + if (errorCode === "TIMEOUT") { + this.failSpinner("The simulator is taking too long to initialize. Please try again later."); + return; + } + } - // create random validators - await simulatorService.createRandomValidators( - Number(options.numValidators), - llmProvidersAnswer.selectedLlmProviders, - ); } catch (error) { - console.error("Unable to initialize the validators."); - console.error(error); + this.failSpinner("Error waiting for the simulator to be ready", error); return; } - console.log("New random validators successfully created..."); - } - // Simulator ready - let successMessage = "GenLayer simulator initialized successfully! " - successMessage += headless ? '' : `Go to ${simulatorService.getFrontendUrl()} in your browser to access it.`; - console.log(successMessage); - try { - if(!headless) { - await simulatorService.openFrontend(); + if (resetDb) { + this.setSpinnerText("Resetting database..."); + await this.simulatorService.cleanDatabase(); + } + + if (resetValidators) { + this.setSpinnerText("Initializing validators..."); + try { + await this.simulatorService.deleteAllValidators(); + + const questions = [ + { + type: "checkbox", + name: "selectedLlmProviders", + message: "Select which LLM providers do you want to use:", + choices: this.simulatorService.getAiProvidersOptions(false), + validate: (answer: string[]) => (answer.length < 1 ? "You must choose at least one option." : true), + }, + ]; + + const llmProvidersAnswer = await inquirer.prompt(questions); + await this.simulatorService.createRandomValidators(numValidators, llmProvidersAnswer.selectedLlmProviders); + } catch (error) { + this.failSpinner("Unable to initialize the validators", error); + return; + } } - } catch (error) { - console.error(error); + let successMessage = "GenLayer simulator initialized successfully! "; + successMessage += headless ? "" : `Go to ${this.simulatorService.getFrontendUrl()} in your browser to access it.`; + this.succeedSpinner(successMessage); + + if (!headless) { + try { + this.startSpinner("Opening frontend..."); + await this.simulatorService.openFrontend(); + this.succeedSpinner("Frontend opened successfully"); + } catch (error) { + this.failSpinner("Error opening the frontend", error); + } + } } } diff --git a/src/lib/services/simulator.ts b/src/lib/services/simulator.ts index 5cf69300..7750277e 100644 --- a/src/lib/services/simulator.ts +++ b/src/lib/services/simulator.ts @@ -184,7 +184,6 @@ export class SimulatorService implements ISimulatorService { public async waitForSimulatorToBeReady( retries: number = STARTING_TIMEOUT_ATTEMPTS, ): Promise { - console.log("Waiting for the simulator to start up..."); try { const response = await rpcClient.request({method: "ping", params: []}); diff --git a/tests/actions/start.test.ts b/tests/actions/start.test.ts index b3a14b98..a0ea38d6 100644 --- a/tests/actions/start.test.ts +++ b/tests/actions/start.test.ts @@ -1,175 +1,174 @@ import { describe, beforeEach, afterEach, test, expect, vi, Mock } from "vitest"; import inquirer from "inquirer"; -import { startAction, StartActionOptions } from "../../src/commands/general/start"; -import { ISimulatorService } from "../../src/lib/interfaces/ISimulatorService"; +import { StartAction, StartActionOptions } from "../../src/commands/general/start"; +import { SimulatorService } from "../../src/lib/services/simulator"; -describe("startAction - Additional Tests", () => { - let simulatorService: ISimulatorService; - let logSpy: ReturnType; - let errorSpy: ReturnType; - let promptSpy: ReturnType; +vi.mock("../../src/lib/services/simulator"); +vi.mock("inquirer"); - const defaultOptions: StartActionOptions = { - resetValidators: false, - numValidators: 5, - headless: false, - resetDb: false - }; +describe("StartAction", () => { + let startAction: StartAction; + let mockSimulatorService: SimulatorService; beforeEach(() => { - logSpy = vi.spyOn(console, "log").mockImplementation(() => {}); - errorSpy = vi.spyOn(console, "error").mockImplementation(() => {}); - promptSpy = vi.spyOn(inquirer, "prompt"); - - simulatorService = { - updateSimulator: vi.fn().mockResolvedValue(undefined), - runSimulator: vi.fn().mockResolvedValue(undefined), - waitForSimulatorToBeReady: vi.fn().mockResolvedValue({ initialized: true }), - deleteAllValidators: vi.fn().mockResolvedValue(undefined), - createRandomValidators: vi.fn().mockResolvedValue(undefined), - openFrontend: vi.fn().mockResolvedValue(undefined), - setSimulatorLocation: vi.fn().mockResolvedValue(undefined), - setComposeOptions: vi.fn(), - checkCliVersion: vi.fn(), - getAiProvidersOptions: vi.fn(() => [ - { name: "Provider A", value: "providerA" }, - { name: "Provider B", value: "providerB" }, - ]), - getFrontendUrl: vi.fn(() => "http://localhost:8080"), - cleanDatabase: vi.fn().mockResolvedValue(undefined), - } as unknown as ISimulatorService; + vi.clearAllMocks(); + + mockSimulatorService = new SimulatorService(); + startAction = new StartAction(); + startAction["simulatorService"] = mockSimulatorService; + + mockSimulatorService.waitForSimulatorToBeReady = vi.fn().mockResolvedValue({ initialized: true }); + + vi.spyOn(startAction as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(startAction as any, "setSpinnerText").mockImplementation(() => {}); + vi.spyOn(startAction as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(startAction as any, "failSpinner").mockImplementation(() => {}); }); afterEach(() => { vi.restoreAllMocks(); }); - test("runs successfully with default options and keeps existing validators", async () => { - await startAction(defaultOptions, simulatorService); + const defaultOptions: StartActionOptions = { + resetValidators: false, + numValidators: 5, + headless: false, + resetDb: false, + }; + + test("should start the simulator successfully", async () => { + mockSimulatorService.checkCliVersion = vi.fn().mockResolvedValue(undefined); + mockSimulatorService.runSimulator = vi.fn().mockResolvedValue(undefined); + mockSimulatorService.getFrontendUrl = vi.fn().mockReturnValue("http://localhost:8080"); + + await startAction.execute(defaultOptions); + + expect(startAction["startSpinner"]).toHaveBeenCalledWith("Checking CLI version..."); + expect(mockSimulatorService.checkCliVersion).toHaveBeenCalled(); - expect(simulatorService.runSimulator).toHaveBeenCalled(); - expect(simulatorService.waitForSimulatorToBeReady).toHaveBeenCalled(); + expect(startAction["setSpinnerText"]).toHaveBeenCalledWith("Starting GenLayer Localnet (keeping the existing validators)..."); + expect(mockSimulatorService.runSimulator).toHaveBeenCalled(); - expect(logSpy).toHaveBeenCalledWith("Starting GenLayer simulator keeping the existing validators"); - expect(logSpy).toHaveBeenCalledWith("Simulator is running!"); - expect(logSpy).toHaveBeenCalledWith("GenLayer simulator initialized successfully! Go to http://localhost:8080 in your browser to access it."); + expect(startAction["setSpinnerText"]).toHaveBeenCalledWith("Waiting for the simulator to be ready..."); + expect(mockSimulatorService.waitForSimulatorToBeReady).toHaveBeenCalled(); - expect(simulatorService.openFrontend).toHaveBeenCalled(); + expect(startAction["succeedSpinner"]).toHaveBeenCalledWith("GenLayer simulator initialized successfully! Go to http://localhost:8080 in your browser to access it."); }); - test("runs successfully with custom options and keeps existing validators", async () => { - await startAction({...defaultOptions, headless: true, resetDb: true}, simulatorService); + test("should fail when simulator fails to start", async () => { + const errorMsg = new Error("runSimulator error"); + (mockSimulatorService.runSimulator as Mock).mockRejectedValueOnce(errorMsg); + + await startAction.execute(defaultOptions); + + expect(startAction["failSpinner"]).toHaveBeenCalledWith("Error starting the simulator", errorMsg); + }); - expect(simulatorService.runSimulator).toHaveBeenCalled(); - expect(simulatorService.waitForSimulatorToBeReady).toHaveBeenCalled(); + test("should fail when waiting for simulator initialization times out", async () => { + (mockSimulatorService.waitForSimulatorToBeReady as Mock).mockResolvedValue({ initialized: false, errorCode: "TIMEOUT" }); - expect(logSpy).toHaveBeenCalledWith("Starting GenLayer simulator keeping the existing validators"); + await startAction.execute(defaultOptions); - expect(logSpy).toHaveBeenCalledWith("Simulator is running!"); - expect(logSpy).toHaveBeenCalledWith("GenLayer simulator initialized successfully! "); + expect(startAction["failSpinner"]).toHaveBeenCalledWith("The simulator is taking too long to initialize. Please try again later."); }); + test("should reset the database if resetDb is true", async () => { + const options: StartActionOptions = { ...defaultOptions, resetDb: true }; - test("logs error and stops if runSimulator fails", async () => { - const errorMsg = new Error("runSimulator error"); - (simulatorService.runSimulator as Mock).mockRejectedValueOnce(errorMsg); + mockSimulatorService.cleanDatabase = vi.fn().mockResolvedValue(undefined); - await startAction(defaultOptions, simulatorService); + await startAction.execute(options); - expect(errorSpy).toHaveBeenCalledWith(errorMsg); - expect(simulatorService.waitForSimulatorToBeReady).not.toHaveBeenCalled(); + expect(startAction["setSpinnerText"]).toHaveBeenCalledWith("Resetting database..."); + expect(mockSimulatorService.cleanDatabase).toHaveBeenCalled(); }); - test("handles resetfValidators correctly by deleting and creating new validators", async () => { - promptSpy.mockResolvedValueOnce({ selectedLlmProviders: ["providerA"] }); - const optionsWithReset: StartActionOptions = { ...defaultOptions, resetValidators: true }; + test("should initialize validators when resetValidators is true", async () => { + const options: StartActionOptions = { ...defaultOptions, resetValidators: true }; + + mockSimulatorService.deleteAllValidators = vi.fn().mockResolvedValue(undefined); + mockSimulatorService.createRandomValidators = vi.fn().mockResolvedValue(undefined); + mockSimulatorService.getAiProvidersOptions = vi.fn().mockReturnValue(["Provider1", "Provider2"]); - await startAction(optionsWithReset, simulatorService); + vi.mocked(inquirer.prompt).mockResolvedValue({ selectedLlmProviders: ["Provider1"] }); - expect(simulatorService.deleteAllValidators).toHaveBeenCalled(); - expect(simulatorService.createRandomValidators).toHaveBeenCalledWith(5, ["providerA"]); - expect(logSpy).toHaveBeenCalledWith("New random validators successfully created..."); + await startAction.execute(options); + + expect(startAction["setSpinnerText"]).toHaveBeenCalledWith("Initializing validators..."); + expect(mockSimulatorService.deleteAllValidators).toHaveBeenCalled(); + expect(mockSimulatorService.createRandomValidators).toHaveBeenCalledWith(5, ["Provider1"]); }); - test("logs error if deleteAllValidators fails when resetValidators is true", async () => { - const errorMsg = new Error("deleteAllValidators error"); - (simulatorService.deleteAllValidators as Mock).mockRejectedValueOnce(errorMsg); - const optionsWithReset: StartActionOptions = { ...defaultOptions, resetValidators: true }; + test("should fail when initializing validators fails", async () => { + const options: StartActionOptions = { ...defaultOptions, resetValidators: true }; + + mockSimulatorService.deleteAllValidators = vi.fn().mockRejectedValue(new Error("Failed to delete validators")); - await startAction(optionsWithReset, simulatorService); + await startAction.execute(options); - expect(errorSpy).toHaveBeenCalledWith("Unable to initialize the validators."); - expect(errorSpy).toHaveBeenCalledWith(errorMsg); - expect(simulatorService.createRandomValidators).not.toHaveBeenCalled(); + expect(startAction["failSpinner"]).toHaveBeenCalledWith("Unable to initialize the validators", expect.any(Error)); }); - test("prompts for LLM providers and validates at least one option is selected", async () => { - const aiProviders = simulatorService.getAiProvidersOptions(false); - expect(aiProviders).toEqual([ - { name: "Provider A", value: "providerA" }, - { name: "Provider B", value: "providerB" }, - ]); + test("should open frontend when not in headless mode", async () => { + mockSimulatorService.checkCliVersion = vi.fn().mockResolvedValue(undefined); + mockSimulatorService.runSimulator = vi.fn().mockResolvedValue(undefined); + mockSimulatorService.getFrontendUrl = vi.fn().mockReturnValue("http://localhost:8080"); + mockSimulatorService.openFrontend = vi.fn().mockResolvedValue(undefined); - promptSpy.mockImplementation(async (questions: any) => { - const validateFunction = questions[0].validate; + await startAction.execute(defaultOptions); - expect(validateFunction([])).toBe("You must choose at least one option."); - expect(validateFunction(["providerA"])).toBe(true); + expect(startAction["startSpinner"]).toHaveBeenCalledWith("Opening frontend..."); + expect(mockSimulatorService.openFrontend).toHaveBeenCalled(); + expect(startAction["succeedSpinner"]).toHaveBeenCalledWith("Frontend opened successfully"); + }); - return { selectedLlmProviders: ["providerA"] }; - }); + test("should handle errors when opening frontend", async () => { + const errorMsg = new Error("Failed to open frontend"); + (mockSimulatorService.openFrontend as Mock).mockRejectedValueOnce(errorMsg); - const optionsWithReset: StartActionOptions = { ...defaultOptions, resetValidators: true }; - await startAction(optionsWithReset, simulatorService); + await startAction.execute(defaultOptions); - expect(promptSpy).toHaveBeenCalled(); - expect(simulatorService.createRandomValidators).toHaveBeenCalledWith(5, ["providerA"]); + expect(startAction["failSpinner"]).toHaveBeenCalledWith("Error opening the frontend", errorMsg); }); - test("logs specific message if waitForSimulatorToBeReady returns TIMEOUT errorCode", async () => { - (simulatorService.waitForSimulatorToBeReady as Mock).mockResolvedValue({ + test("should log specific message if waitForSimulatorToBeReady returns TIMEOUT errorCode", async () => { + (mockSimulatorService.waitForSimulatorToBeReady as Mock).mockResolvedValue({ initialized: false, errorCode: "TIMEOUT", errorMessage: "Initialization timed out", }); - await startAction(defaultOptions, simulatorService); + await startAction.execute(defaultOptions); - expect(errorSpy).toHaveBeenCalledWith( - "The simulator is taking too long to initialize. Please try again after the simulator is ready." - ); + expect(startAction["failSpinner"]).toHaveBeenCalledWith("The simulator is taking too long to initialize. Please try again later."); }); - test("logs error message if simulator fails to initialize with ERROR code", async () => { - (simulatorService.waitForSimulatorToBeReady as Mock).mockResolvedValue({ + test("should log error message if simulator fails to initialize with ERROR code", async () => { + (mockSimulatorService.waitForSimulatorToBeReady as Mock).mockResolvedValue({ initialized: false, errorCode: "ERROR", errorMessage: "Initialization failed", }); - await startAction(defaultOptions, simulatorService); + await startAction.execute(defaultOptions); - expect(logSpy).toHaveBeenCalledWith("Initialization failed"); - expect(errorSpy).toHaveBeenCalledWith("Unable to initialize the GenLayer simulator. Please try again."); + expect(startAction["failSpinner"]).toHaveBeenCalledWith("Unable to initialize the GenLayer simulator.", "Initialization failed"); }); test("catches and logs error if waitForSimulatorToBeReady throws an exception", async () => { const errorMsg = new Error("Unexpected initialization error"); - (simulatorService.waitForSimulatorToBeReady as Mock).mockRejectedValueOnce(errorMsg); + (mockSimulatorService.waitForSimulatorToBeReady as Mock).mockRejectedValueOnce(errorMsg); - await startAction(defaultOptions, simulatorService); + await startAction.execute(defaultOptions); - expect(errorSpy).toHaveBeenCalledWith(errorMsg); + expect(startAction["failSpinner"]).toHaveBeenCalledWith("Error waiting for the simulator to be ready", errorMsg); }); - test("catches and logs error if openFrontend throws an exception", async () => { - const errorMsg = new Error("Failed to open frontend"); - (simulatorService.openFrontend as Mock).mockImplementationOnce(() => { - throw errorMsg; - }); + test("should not append frontend URL when in headless mode", async () => { + await startAction.execute({ ...defaultOptions, headless: true }); - await startAction(defaultOptions, simulatorService); - - expect(errorSpy).toHaveBeenCalledWith(errorMsg); + expect(startAction["succeedSpinner"]).toHaveBeenCalledWith( + "GenLayer simulator initialized successfully! " + ); }); }); diff --git a/tests/commands/up.test.ts b/tests/commands/up.test.ts index ca8f3bde..605ca899 100644 --- a/tests/commands/up.test.ts +++ b/tests/commands/up.test.ts @@ -2,17 +2,9 @@ import { Command } from "commander"; import { vi, describe, beforeEach, afterEach, test, expect } from "vitest"; import { initializeGeneralCommands } from "../../src/commands/general"; import { getCommand, getCommandOption } from "../utils"; -import simulatorService from '../../src/lib/services/simulator' +import { StartAction } from "../../src/commands/general/start"; -const openFrontendSpy = vi.spyOn(simulatorService, "openFrontend"); - -const action = vi.fn(); -const defaultOptions = { - resetValidators: false, - numValidators: "5", - headless: false , - resetDb: false -} +vi.mock("../../src/commands/general/start"); describe("up command", () => { let upCommand: Command; @@ -23,10 +15,6 @@ describe("up command", () => { initializeGeneralCommands(program); upCommand = getCommand(program, "up"); - upCommand?.action(async (args) => { - action(args); - }); - vi.clearAllMocks(); }); @@ -36,6 +24,15 @@ describe("up command", () => { test("doesn't require arguments or options", async () => { expect(() => program.parse(["node", "test", "up"])).not.toThrow(); + expect(StartAction).toHaveBeenCalledTimes(1); + expect(StartAction.prototype.execute).toHaveBeenCalledWith( + expect.objectContaining({ + resetValidators: false, + numValidators: "5", + headless: false, + resetDb: false, + }) + ); }); test("option --reset-validators is accepted", async () => { @@ -56,7 +53,6 @@ describe("up command", () => { expect(numValidatorsOption?.defaultValue).toBe("5"); }); - test("unrecognized option is not accepted", async () => { upCommand?.exitOverride(); expect(() => program.parse(["node", "test", "up", "-unknown"])).toThrowError( @@ -69,8 +65,15 @@ describe("up command", () => { test("action is called with default options", async () => { program.parse(["node", "test", "up"]); - expect(action).toHaveBeenCalledTimes(1); - expect(action).toHaveBeenCalledWith(defaultOptions); + expect(StartAction).toHaveBeenCalledTimes(1); + expect(StartAction.prototype.execute).toHaveBeenCalledWith( + expect.objectContaining({ + resetValidators: false, + numValidators: "5", + headless: false, + resetDb: false, + }) + ); }); test("action is called with custom options", async () => { @@ -82,12 +85,17 @@ describe("up command", () => { "--numValidators", "10", "--headless", - "true", "--reset-db", - "true" ]); - expect(action).toHaveBeenCalledTimes(1); - expect(action).toHaveBeenCalledWith({...defaultOptions, headless: true, numValidators: '10', resetValidators: true, resetDb: true}); - expect(openFrontendSpy).not.toHaveBeenCalled(); + + expect(StartAction).toHaveBeenCalledTimes(1); + expect(StartAction.prototype.execute).toHaveBeenCalledWith( + expect.objectContaining({ + resetValidators: true, + numValidators: "10", + headless: true, + resetDb: true, + }) + ); }); }); From 5544edbd02efd2195d21b4100b80b06ea4feabaf Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 20 Feb 2025 12:24:58 -0300 Subject: [PATCH 20/40] feat: refac init, base action and unit tests --- src/commands/config/getSetReset.ts | 13 +- src/commands/general/index.ts | 7 +- src/commands/general/init.ts | 325 ++++++------- src/commands/keygen/create.ts | 7 +- src/commands/update/index.ts | 11 +- src/commands/update/ollama.ts | 6 +- src/lib/actions/BaseAction.ts | 9 +- tests/actions/create.test.ts | 17 +- tests/actions/getSetReset.test.ts | 16 +- tests/actions/init.test.ts | 715 ++++++++++------------------- tests/actions/ollama.test.ts | 8 + tests/commands/init.test.ts | 23 +- tests/commands/update.test.ts | 7 +- tests/services/simulator.test.ts | 15 + 14 files changed, 452 insertions(+), 727 deletions(-) diff --git a/src/commands/config/getSetReset.ts b/src/commands/config/getSetReset.ts index 4774edea..b7499316 100644 --- a/src/commands/config/getSetReset.ts +++ b/src/commands/config/getSetReset.ts @@ -1,12 +1,9 @@ -import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; import { BaseAction } from "../../lib/actions/BaseAction"; export class ConfigActions extends BaseAction { - private configManager: ConfigFileManager; constructor() { super(); - this.configManager = new ConfigFileManager(); } set(keyValue: string): void { @@ -18,7 +15,7 @@ export class ConfigActions extends BaseAction { return; } - this.configManager.writeConfig(key, value); + this.writeConfig(key, value); this.succeedSpinner(`Configuration successfully updated`); } @@ -26,14 +23,14 @@ export class ConfigActions extends BaseAction { this.startSpinner(key ? `Retrieving value for: ${key}` : "Retrieving all configurations"); if (key) { - const value = this.configManager.getConfigByKey(key); + const value = this.getConfigByKey(key); if (value === null) { this.failSpinner(`No configuration found for '${key}'.`); } else { this.succeedSpinner(`Configuration successfully retrieved`, `${key}=${value}`); } } else { - const config = this.configManager.getConfig(); + const config = this.getConfig(); this.succeedSpinner("All configurations successfully retrieved", JSON.stringify(config, null, 2)); } } @@ -41,14 +38,14 @@ export class ConfigActions extends BaseAction { reset(key: string): void { this.startSpinner(`Resetting configuration: ${key}`); - const config = this.configManager.getConfig(); + const config = this.getConfig(); if (!(key in config)) { this.failSpinner(`Configuration key '${key}' does not exist.`); return; } delete config[key]; - this.configManager.writeConfig(key, undefined); + this.writeConfig(key, undefined); this.succeedSpinner(`Configuration successfully reset`); } } diff --git a/src/commands/general/index.ts b/src/commands/general/index.ts index f318c835..04512fe6 100644 --- a/src/commands/general/index.ts +++ b/src/commands/general/index.ts @@ -1,7 +1,7 @@ import { Command } from "commander"; import simulatorService from "../../lib/services/simulator"; -import { initAction, InitActionOptions } from "./init"; +import { InitAction, InitActionOptions } from "./init"; import { StartAction, StartActionOptions } from "./start"; import {localnetCompatibleVersion} from "../../lib/config/simulator"; import {StopAction} from "./stop"; @@ -14,7 +14,10 @@ export function initializeGeneralCommands(program: Command) { .option("--headless", "Headless mode", false) .option("--reset-db", "Reset Database", false) .option("--localnet-version ", "Select a specific localnet version", localnetCompatibleVersion) - .action((options: InitActionOptions) => initAction(options, simulatorService)); + .action(async (options: InitActionOptions) => { + const initAction = new InitAction(); + await initAction.execute(options) + }); program .command("up") diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 9c1a7934..c2de9f4c 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -1,8 +1,9 @@ import inquirer from "inquirer"; -import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; -import {AI_PROVIDERS_CONFIG, AiProviders} from "../../lib/config/simulator"; +import { ISimulatorService } from "../../lib/interfaces/ISimulatorService"; +import { AI_PROVIDERS_CONFIG, AiProviders } from "../../lib/config/simulator"; import { OllamaAction } from "../update/ollama"; -import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; +import { BaseAction } from "../../lib/actions/BaseAction"; +import { SimulatorService } from "../../lib/services/simulator"; export interface InitActionOptions { numValidators: number; @@ -11,217 +12,163 @@ export interface InitActionOptions { localnetVersion: string; } -function getRequirementsErrorMessage({docker}: Record): string { - +function getRequirementsErrorMessage({ docker }: Record): string { if (!docker) { return "Docker is not installed. Please install Docker and try again.\n"; } - return ""; } -function getVersionErrorMessage({docker, node}: Record): string { +function getVersionErrorMessage({ docker, node }: Record): string { let message = ""; if (docker) { message += `Docker version ${docker} or higher is required. Please update Docker and try again.\n`; } - if (node) { message += `Node version ${node} or higher is required. Please update Node and try again.\n`; } - return message; } -export async function initAction(options: InitActionOptions, simulatorService: ISimulatorService) { - simulatorService.setComposeOptions(options.headless); - - let localnetVersion = options.localnetVersion; - - if(localnetVersion !== 'latest'){ - localnetVersion = simulatorService.normalizeLocalnetVersion(localnetVersion); +export class InitAction extends BaseAction { + private simulatorService: ISimulatorService; + constructor() { + super(); + this.simulatorService = new SimulatorService(); } - await simulatorService.checkCliVersion(); - - // Check if requirements are installed - try { - const requirementsInstalled = await simulatorService.checkInstallRequirements(); - const requirementErrorMessage = getRequirementsErrorMessage(requirementsInstalled); - - if (requirementErrorMessage) { - console.error(requirementErrorMessage); - return; - } - } catch (error) { - console.error(error); - return; - } - - // Check if the versions are correct - try { - const missingVersions = await simulatorService.checkVersionRequirements(); - const versionErrorMessage = getVersionErrorMessage(missingVersions); - if (versionErrorMessage) { - console.error(versionErrorMessage); - return; - } - } catch (error) { - console.error(error); - return; - } - - // Ask for confirmation on reseting the GenLayer Simulator from GitHub - const resetAnswers = await inquirer.prompt([ - { - type: "confirm", - name: "confirmReset", - message: `This command is going to reset GenLayer docker images and containers, providers API Keys, and GenLayer database (accounts, transactions, validators and logs). Contract code (gpy files) will be kept. Do you want to continue?`, - default: true, - }, - ]); - - if (!resetAnswers.confirmReset) { - console.log("Aborted!"); - return; - } - - console.log(`Initializing GenLayer CLI with ${options.numValidators} validators`); - - // Reset Docker containers and images - console.log(`Resetting Docker containers and images...`); - try { - await simulatorService.resetDockerContainers(); - await simulatorService.resetDockerImages(); - } catch (error) { - console.error(error); - return; - } + public async execute(options: InitActionOptions): Promise { + try { + this.simulatorService.setComposeOptions(options.headless); + let localnetVersion = options.localnetVersion; + if (localnetVersion !== "latest") { + localnetVersion = this.simulatorService.normalizeLocalnetVersion(localnetVersion); + } + + this.startSpinner("Checking CLI version..."); + await this.simulatorService.checkCliVersion(); + + this.setSpinnerText("Checking installation requirements..."); + const requirementsInstalled = await this.simulatorService.checkInstallRequirements(); + const requirementErrorMessage = getRequirementsErrorMessage(requirementsInstalled); + if (requirementErrorMessage) { + this.failSpinner(requirementErrorMessage); + return; + } + + this.setSpinnerText("Checking version requirements..."); + const missingVersions = await this.simulatorService.checkVersionRequirements(); + const versionErrorMessage = getVersionErrorMessage(missingVersions); + if (versionErrorMessage) { + this.failSpinner(versionErrorMessage); + return; + } + this.stopSpinner(); + + // Confirm reset action with the user using BaseAction's confirm prompt + await this.confirmPrompt( + `This command is going to reset GenLayer docker images and containers, providers API Keys, and GenLayer database (accounts, transactions, validators and logs). Contract code (gpy files) will be kept. Do you want to continue?` + ); - // Check LLM configuration - const questions = [ - { - type: "checkbox", - name: "selectedLlmProviders", - message: "Select which LLM providers do you want to use:", - choices: simulatorService.getAiProvidersOptions(true), - validate: function (answer: string[]) { - if (answer.length < 1) { - return "You must choose at least one option."; - } - return true; - }, - }, - ]; - - // Since ollama runs locally we can run it here and then look for the other providers - const llmProvidersAnswer = await inquirer.prompt(questions); - const selectedLlmProviders = llmProvidersAnswer.selectedLlmProviders as AiProviders[]; - - // Gather the API Keys - const aiProvidersEnvVars: Record = {}; - const configurableAiProviders = selectedLlmProviders.filter( - (provider: AiProviders) => AI_PROVIDERS_CONFIG[provider].envVar, - ); - for (let i = 0; i < configurableAiProviders.length; i++) { - const provider = configurableAiProviders[i]; - const providerConfig = AI_PROVIDERS_CONFIG[provider]; - const questions = [ - { - type: "input", - name: providerConfig.cliOptionValue, - message: `Please enter your ${providerConfig.name} API Key:`, - validate: function (value: string) { - if (value.length) { - return true; - } - return `Please enter a valid API Key for ${providerConfig.name}.`; + this.logInfo(`Initializing GenLayer CLI with ${options.numValidators} validators`); + + // Reset Docker containers and images + this.startSpinner("Resetting Docker containers and images..."); + await this.simulatorService.resetDockerContainers(); + await this.simulatorService.resetDockerImages(); + this.stopSpinner(); + + const llmQuestions = [ + { + type: "checkbox", + name: "selectedLlmProviders", + message: "Select which LLM providers do you want to use:", + choices: this.simulatorService.getAiProvidersOptions(true), + validate: (answer: string[]) => + answer.length < 1 ? "You must choose at least one option." : true, }, - }, - ]; - - const apiKeyAnswer = await inquirer.prompt(questions); - aiProvidersEnvVars[providerConfig.envVar!] = apiKeyAnswer[providerConfig.cliOptionValue]; - } - - console.log("Configuring GenLayer Simulator environment..."); - simulatorService.addConfigToEnvFile(aiProvidersEnvVars); - simulatorService.addConfigToEnvFile({LOCALNETVERSION: localnetVersion}); - - // Run the GenLayer Simulator - console.log("Running the GenLayer Simulator..."); - try { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - await simulatorService.runSimulator(); - } catch (error) { - console.error(error); - return; - } - - try { - const {initialized, errorCode, errorMessage} = await simulatorService.waitForSimulatorToBeReady(); - if (!initialized && errorCode === "ERROR") { - console.log(errorMessage); - console.error("Unable to initialize the GenLayer simulator. Please try again."); - return; - } - if (!initialized && errorCode === "TIMEOUT") { - console.error( - "The simulator is taking too long to initialize. Please try again after the simulator is ready.", + ]; + const llmProvidersAnswer = await inquirer.prompt(llmQuestions); + const selectedLlmProviders = llmProvidersAnswer.selectedLlmProviders as AiProviders[]; + + let defaultOllamaModel = this.getConfig().defaultOllamaModel; + AI_PROVIDERS_CONFIG.ollama.hint = `(This will download and run a local instance of ${defaultOllamaModel})`; + const aiProvidersEnvVars: Record = {}; + const configurableAiProviders = selectedLlmProviders.filter( + (provider: AiProviders) => AI_PROVIDERS_CONFIG[provider].envVar ); - return; - } - console.log("Simulator is running!"); - } catch (error) { - console.error(error); - return; - } - - // Ollama doesn't need changes in configuration, we just run it - if (selectedLlmProviders.includes("ollama")) { - - const ollamaAction = new OllamaAction(); - const configManager = new ConfigFileManager(); - const config = configManager.getConfig() - let ollamaModel = config.defaultOllamaModel; - - if(!config.defaultOllamaModel){ - configManager.writeConfig('defaultOllamaModel', 'llama3'); - ollamaModel = 'llama3' - } - - console.log(`Pulling ${ollamaModel} from Ollama...`); - - await ollamaAction.updateModel(ollamaModel); - } + for (const provider of configurableAiProviders) { + const providerConfig = AI_PROVIDERS_CONFIG[provider]; + const keyQuestion = [ + { + type: "input", + name: providerConfig.cliOptionValue, + message: `Please enter your ${providerConfig.name} API Key:`, + validate: (value: string) => + value.length ? true : `Please enter a valid API Key for ${providerConfig.name}.`, + }, + ]; + const apiKeyAnswer = await inquirer.prompt(keyQuestion); + aiProvidersEnvVars[providerConfig.envVar!] = apiKeyAnswer[providerConfig.cliOptionValue]; + } + + this.startSpinner("Configuring GenLayer Localnet environment..."); + this.simulatorService.addConfigToEnvFile(aiProvidersEnvVars); + this.simulatorService.addConfigToEnvFile({ LOCALNETVERSION: localnetVersion }); + + this.setSpinnerText("Running GenLayer Localnet..."); + await this.simulatorService.runSimulator(); + + this.setSpinnerText("Waiting for localnet to be ready..."); + const { initialized, errorCode, errorMessage } = + await this.simulatorService.waitForSimulatorToBeReady(); + if (!initialized) { + if (errorCode === "ERROR") { + this.failSpinner(`Unable to initialize the GenLayer Localnet: ${errorMessage}`); + return; + } + if (errorCode === "TIMEOUT") { + this.failSpinner( + "The localnet is taking too long to initialize. Please try again after the localnet is ready." + ); + return; + } + } - // Initializing validators - console.log("Initializing validators..."); - try { - //remove all validators - await simulatorService.deleteAllValidators(); - // create random validators - await simulatorService.createRandomValidators(Number(options.numValidators), selectedLlmProviders); - } catch (error) { - console.error("Unable to initialize the validators."); - console.error(error); - return; - } + this.stopSpinner(); - if(options.resetDb){ - await simulatorService.cleanDatabase() - } + if (selectedLlmProviders.includes("ollama")) { + const ollamaAction = new OllamaAction(); + if (!defaultOllamaModel) { + this.writeConfig("defaultOllamaModel", "llama3"); + defaultOllamaModel = "llama3"; + } + await ollamaAction.updateModel(defaultOllamaModel); + } + + this.startSpinner("Initializing validators..."); + await this.simulatorService.deleteAllValidators(); + await this.simulatorService.createRandomValidators( + Number(options.numValidators), + selectedLlmProviders + ); - // Simulator ready - let successMessage = "GenLayer simulator initialized successfully! " - successMessage += options.headless ? '' : `Go to ${simulatorService.getFrontendUrl()} in your browser to access it.`; - console.log(successMessage); - try { - if(!options.headless){ - await simulatorService.openFrontend(); + if (options.resetDb) { + this.setSpinnerText("Cleaning database..."); + await this.simulatorService.cleanDatabase(); + } + + let successMessage = "GenLayer Localnet initialized successfully! "; + if (!options.headless) { + successMessage += `Go to ${this.simulatorService.getFrontendUrl()} in your browser to access it.`; + } + if (!options.headless) { + await this.simulatorService.openFrontend(); + } + this.succeedSpinner(successMessage); + } catch (error) { + this.failSpinner("An error occurred during initialization.", error); } - } catch (error) { - console.error(error); } } diff --git a/src/commands/keygen/create.ts b/src/commands/keygen/create.ts index 918bfc8e..8509d090 100644 --- a/src/commands/keygen/create.ts +++ b/src/commands/keygen/create.ts @@ -1,6 +1,5 @@ import { writeFileSync, existsSync } from "fs"; import { ethers } from "ethers"; -import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; import { BaseAction } from "../../lib/actions/BaseAction"; export interface CreateKeypairOptions { @@ -9,17 +8,15 @@ export interface CreateKeypairOptions { } export class KeypairCreator extends BaseAction{ - private filePathManager: ConfigFileManager; constructor() { super() - this.filePathManager = new ConfigFileManager(); } createKeypairAction(options: CreateKeypairOptions) { try { this.startSpinner(`Creating keypair...`); - const outputPath = this.filePathManager.getFilePath(options.output); + const outputPath = this.getFilePath(options.output); if(existsSync(outputPath) && !options.overwrite) { this.failSpinner( @@ -36,7 +33,7 @@ export class KeypairCreator extends BaseAction{ writeFileSync(outputPath, JSON.stringify(keypairData, null, 2)); - this.filePathManager.writeConfig('keyPairPath', outputPath); + this.writeConfig('keyPairPath', outputPath); this.succeedSpinner(`Keypair successfully created and saved to: ${outputPath}`); } catch (error) { this.failSpinner("Failed to generate keypair:", error); diff --git a/src/commands/update/index.ts b/src/commands/update/index.ts index e0a19f74..3857b2bf 100644 --- a/src/commands/update/index.ts +++ b/src/commands/update/index.ts @@ -1,6 +1,5 @@ import { Command } from "commander"; import { OllamaAction } from "./ollama"; -import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; export function initializeUpdateCommands(program: Command) { const updateCommand = program @@ -10,19 +9,15 @@ export function initializeUpdateCommands(program: Command) { updateCommand .command("ollama") .description("Manage Ollama models (update or remove)") - .option("--model [model-name]", "Specify the model to update or remove") + .option("--model [model-name]", "Specify the model to update or remove", '') .option("--remove", "Remove the specified model instead of updating") .action(async (options) => { - const configManager = new ConfigFileManager(); - const config = configManager.getConfig() - - const modelName = options.model || config.defaultOllamaModel; const ollamaAction = new OllamaAction(); if (options.remove) { - await ollamaAction.removeModel(modelName); + await ollamaAction.removeModel(options.model); } else { - await ollamaAction.updateModel(modelName); + await ollamaAction.updateModel(options.model); } }); diff --git a/src/commands/update/ollama.ts b/src/commands/update/ollama.ts index 6fb88441..0d93c340 100644 --- a/src/commands/update/ollama.ts +++ b/src/commands/update/ollama.ts @@ -14,6 +14,10 @@ export class OllamaAction extends BaseAction { try { this.startSpinner(`Updating model "${modelName}"...`); + if(!modelName){ + modelName = this.getConfig().defaultOllamaModel; + } + const providersAndModels = await rpcClient.request({ method: "sim_getProvidersAndModels", params: [], @@ -47,7 +51,7 @@ export class OllamaAction extends BaseAction { method: "sim_addProvider", params: [newModelConfig], }); - this.succeedSpinner(`Model "${modelName}" added successfully.`); + this.succeedSpinner(`Model "${modelName}" added to Provider Presets successfully.`); } } catch (error) { this.failSpinner(`Error updating model "${modelName}"`, error); diff --git a/src/lib/actions/BaseAction.ts b/src/lib/actions/BaseAction.ts index 5ffba7b6..32dd96db 100644 --- a/src/lib/actions/BaseAction.ts +++ b/src/lib/actions/BaseAction.ts @@ -1,11 +1,14 @@ -import inquirer from "inquirer"; -import chalk from "chalk"; +import { ConfigFileManager } from "../../lib/config/ConfigFileManager"; import ora, { Ora } from "ora"; +import chalk from "chalk"; +import inquirer from "inquirer"; + -export class BaseAction { +export class BaseAction extends ConfigFileManager { private spinner: Ora; constructor() { + super() this.spinner = ora({ text: "", spinner: "dots" }); } diff --git a/tests/actions/create.test.ts b/tests/actions/create.test.ts index 101aa734..e111c2ba 100644 --- a/tests/actions/create.test.ts +++ b/tests/actions/create.test.ts @@ -13,13 +13,6 @@ vi.mock("ethers", () => ({ }, })); -vi.mock("../../src/lib/config/ConfigFileManager", () => ({ - ConfigFileManager: vi.fn().mockImplementation(() => ({ - getFilePath: vi.fn((fileName) => `/mocked/path/${fileName}`), - writeConfig: vi.fn(), - })), -})); - describe("KeypairCreator", () => { let keypairCreator: KeypairCreator; @@ -34,6 +27,8 @@ describe("KeypairCreator", () => { vi.spyOn(keypairCreator as any, "startSpinner").mockImplementation(() => {}); vi.spyOn(keypairCreator as any, "succeedSpinner").mockImplementation(() => {}); vi.spyOn(keypairCreator as any, "failSpinner").mockImplementation(() => {}); + vi.spyOn(keypairCreator as any, "writeConfig").mockImplementation(() => {}); + vi.spyOn(keypairCreator as any, "getFilePath").mockImplementation((fileName) => `/mocked/path/${fileName}`); vi.mocked(ethers.Wallet.createRandom).mockReturnValue(mockWallet); }); @@ -49,7 +44,7 @@ describe("KeypairCreator", () => { expect(keypairCreator["startSpinner"]).toHaveBeenCalledWith("Creating keypair..."); expect(ethers.Wallet.createRandom).toHaveBeenCalledTimes(1); - expect(keypairCreator["filePathManager"].getFilePath).toHaveBeenCalledWith("keypair.json"); + expect(keypairCreator["getFilePath"]).toHaveBeenCalledWith("keypair.json"); expect(writeFileSync).toHaveBeenCalledWith( @@ -64,7 +59,7 @@ describe("KeypairCreator", () => { ) ); - expect(keypairCreator["filePathManager"].writeConfig).toHaveBeenCalledWith( + expect(keypairCreator["writeConfig"]).toHaveBeenCalledWith( "keyPairPath", "/mocked/path/keypair.json" ); @@ -95,7 +90,7 @@ describe("KeypairCreator", () => { expect(keypairCreator["startSpinner"]).toHaveBeenCalledWith("Creating keypair..."); expect(ethers.Wallet.createRandom).toHaveBeenCalledTimes(1); - expect(keypairCreator["filePathManager"].getFilePath).toHaveBeenCalledWith("keypair.json"); + expect(keypairCreator["getFilePath"]).toHaveBeenCalledWith("keypair.json"); expect(writeFileSync).toHaveBeenCalledWith( "/mocked/path/keypair.json", @@ -109,7 +104,7 @@ describe("KeypairCreator", () => { ) ); - expect(keypairCreator["filePathManager"].writeConfig).toHaveBeenCalledWith( + expect(keypairCreator["writeConfig"]).toHaveBeenCalledWith( "keyPairPath", "/mocked/path/keypair.json" ); diff --git a/tests/actions/getSetReset.test.ts b/tests/actions/getSetReset.test.ts index 8a8ac17c..fb0ded72 100644 --- a/tests/actions/getSetReset.test.ts +++ b/tests/actions/getSetReset.test.ts @@ -23,7 +23,7 @@ describe("ConfigActions", () => { test("set method writes key-value pair to the configuration", () => { configActions.set("defaultNetwork=testnet"); - expect(configActions["configManager"].writeConfig).toHaveBeenCalledWith("defaultNetwork", "testnet"); + expect(configActions["writeConfig"]).toHaveBeenCalledWith("defaultNetwork", "testnet"); expect(configActions["startSpinner"]).toHaveBeenCalledWith("Updating configuration: defaultNetwork"); expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("Configuration successfully updated"); }); @@ -32,7 +32,7 @@ describe("ConfigActions", () => { configActions.set("invalidFormat"); expect(configActions["failSpinner"]).toHaveBeenCalledWith("Invalid format. Use 'key=value'."); - expect(configActions["configManager"].writeConfig).not.toHaveBeenCalled(); + expect(configActions["writeConfig"]).not.toHaveBeenCalled(); }); test("get method retrieves value for a specific key", () => { @@ -40,7 +40,7 @@ describe("ConfigActions", () => { configActions.get("defaultNetwork"); - expect(configActions["configManager"].getConfigByKey).toHaveBeenCalledWith("defaultNetwork"); + expect(configActions["getConfigByKey"]).toHaveBeenCalledWith("defaultNetwork"); expect(configActions["startSpinner"]).toHaveBeenCalledWith("Retrieving value for: defaultNetwork"); expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("Configuration successfully retrieved", "defaultNetwork=testnet"); }); @@ -50,7 +50,7 @@ describe("ConfigActions", () => { configActions.get("nonexistentKey"); - expect(configActions["configManager"].getConfigByKey).toHaveBeenCalledWith("nonexistentKey"); + expect(configActions["getConfigByKey"]).toHaveBeenCalledWith("nonexistentKey"); expect(configActions["failSpinner"]).toHaveBeenCalledWith("No configuration found for 'nonexistentKey'."); }); @@ -60,7 +60,7 @@ describe("ConfigActions", () => { configActions.get(); - expect(configActions["configManager"].getConfig).toHaveBeenCalled(); + expect(configActions["getConfig"]).toHaveBeenCalled(); expect(configActions["startSpinner"]).toHaveBeenCalledWith("Retrieving all configurations"); expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("All configurations successfully retrieved", JSON.stringify(mockConfig, null, 2)); }); @@ -71,9 +71,9 @@ describe("ConfigActions", () => { configActions.reset("defaultNetwork"); - expect(configActions["configManager"].getConfig).toHaveBeenCalled(); + expect(configActions["getConfig"]).toHaveBeenCalled(); expect(configActions["startSpinner"]).toHaveBeenCalledWith("Resetting configuration: defaultNetwork"); - expect(configActions["configManager"].writeConfig).toHaveBeenCalledWith("defaultNetwork", undefined); + expect(configActions["writeConfig"]).toHaveBeenCalledWith("defaultNetwork", undefined); expect(configActions["succeedSpinner"]).toHaveBeenCalledWith("Configuration successfully reset"); }); @@ -82,7 +82,7 @@ describe("ConfigActions", () => { configActions.reset("nonexistentKey"); - expect(configActions["configManager"].getConfig).toHaveBeenCalled(); + expect(configActions["getConfig"]).toHaveBeenCalled(); expect(configActions["failSpinner"]).toHaveBeenCalledWith("Configuration key 'nonexistentKey' does not exist."); }); }); \ No newline at end of file diff --git a/tests/actions/init.test.ts b/tests/actions/init.test.ts index 0a173eb0..bbe4a21c 100644 --- a/tests/actions/init.test.ts +++ b/tests/actions/init.test.ts @@ -1,523 +1,288 @@ -import {vi, describe, beforeEach, afterEach, test, expect} from "vitest"; +import { describe, test, vi, beforeEach, afterEach, expect } from "vitest"; import inquirer from "inquirer"; -import simulatorService from "../../src/lib/services/simulator"; -import { initAction } from "../../src/commands/general/init"; -import { tmpdir } from "os"; -import {mkdtempSync} from "fs"; -import {join} from "path"; -import fs from "fs"; -import * as dotenv from "dotenv"; -import {localnetCompatibleVersion} from "../../src/lib/config/simulator"; +import { InitAction, InitActionOptions } from "../../src/commands/general/init"; +import { SimulatorService } from "../../src/lib/services/simulator"; import { OllamaAction } from "../../src/commands/update/ollama"; -import { ConfigFileManager } from "../../src/lib/config/ConfigFileManager"; - -vi.mock("fs"); -vi.mock("dotenv"); -vi.mock("../../src/commands/update/ollama") -vi.mock("../../src/lib/config/ConfigFileManager"); - - -const tempDir = mkdtempSync(join(tmpdir(), "test-initAction-")); -const defaultActionOptions = { numValidators: 5, branch: "main", location: tempDir, headless: false, resetDb: false, localnetVersion: localnetCompatibleVersion }; - -describe("init action", () => { - let error: ReturnType; - let log: ReturnType; - let inquirerPrompt: ReturnType; - - let simServCheckInstallRequirements: ReturnType; - let simServCheckVersionRequirements: ReturnType; - let simServResetDockerContainers: ReturnType; - let simServResetDockerImages: ReturnType; - let simServgetAiProvidersOptions: ReturnType; - let simServRunSimulator: ReturnType; - let simServWaitForSimulator: ReturnType; - let simServDeleteAllValidators: ReturnType; - let simServCreateRandomValidators: ReturnType; - let simServOpenFrontend: ReturnType; - let simGetSimulatorUrl: ReturnType; - let simAddConfigToEnvFile: ReturnType; +describe("InitAction", () => { + let initAction: InitAction; + let inquirerPromptSpy: ReturnType; + let checkCliVersionSpy: ReturnType; + let checkInstallRequirementsSpy: ReturnType; + let checkVersionRequirementsSpy: ReturnType; + let resetDockerContainersSpy: ReturnType; + let resetDockerImagesSpy: ReturnType; + let addConfigToEnvFileSpy: ReturnType; + let runSimulatorSpy: ReturnType; + let waitForSimulatorSpy: ReturnType; + let deleteAllValidatorsSpy: ReturnType; + let createRandomValidatorsSpy: ReturnType; + let cleanDatabaseSpy: ReturnType; + let openFrontendSpy: ReturnType; + let getFrontendUrlSpy: ReturnType; + let normalizeLocalnetVersionSpy: ReturnType; + + const defaultConfig = { defaultOllamaModel: "llama3" }; + + const defaultOptions: InitActionOptions = { + numValidators: 5, + headless: false, + resetDb: false, + localnetVersion: "v1.0.0", + }; beforeEach(() => { vi.clearAllMocks(); - - error = vi.spyOn(console, "error").mockImplementation(() => {}); - log = vi.spyOn(console, "log").mockImplementation(() => {}); - inquirerPrompt = vi.spyOn(inquirer, "prompt"); - - simServCheckInstallRequirements = vi.spyOn(simulatorService, "checkInstallRequirements"); - simServCheckVersionRequirements = vi.spyOn(simulatorService, "checkVersionRequirements"); - simServResetDockerContainers = vi.spyOn(simulatorService, "resetDockerContainers"); - simServResetDockerImages = vi.spyOn(simulatorService, "resetDockerImages"); - simServgetAiProvidersOptions = vi.spyOn(simulatorService, "getAiProvidersOptions"); - simServRunSimulator = vi.spyOn(simulatorService, "runSimulator"); - simServWaitForSimulator = vi.spyOn(simulatorService, "waitForSimulatorToBeReady"); - simServDeleteAllValidators = vi.spyOn(simulatorService, "deleteAllValidators"); - simServCreateRandomValidators = vi.spyOn(simulatorService, "createRandomValidators"); - simServOpenFrontend = vi.spyOn(simulatorService, "openFrontend"); - simGetSimulatorUrl = vi.spyOn(simulatorService, "getFrontendUrl") - simAddConfigToEnvFile = vi.spyOn(simulatorService, "addConfigToEnvFile") - - simServCheckVersionRequirements.mockResolvedValue({ - node: '', - docker: '', - }); - simServCheckInstallRequirements.mockResolvedValue({ - git: true, - docker: true, - }) - simAddConfigToEnvFile.mockResolvedValue(true); - const mockEnvContent = "FRONTEND_PORT=8080"; - const mockEnvConfig = { FRONTEND_PORT: "8080" }; - vi.mocked(fs.readFileSync).mockReturnValue(mockEnvContent); - vi.mocked(dotenv.parse).mockReturnValue(mockEnvConfig); + initAction = new InitAction(); + inquirerPromptSpy = vi.spyOn(inquirer, "prompt"); + vi.spyOn(initAction as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(initAction as any, "setSpinnerText").mockImplementation(() => {}); + vi.spyOn(initAction as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(initAction as any, "failSpinner").mockImplementation(() => {}); + vi.spyOn(initAction as any, "stopSpinner").mockImplementation(() => {}); + vi.spyOn(initAction as any, "logError").mockImplementation(() => {}); + vi.spyOn(initAction, "getConfig").mockReturnValue(defaultConfig); + checkCliVersionSpy = vi.spyOn(SimulatorService.prototype, "checkCliVersion").mockResolvedValue(undefined); + checkInstallRequirementsSpy = vi.spyOn(SimulatorService.prototype, "checkInstallRequirements").mockResolvedValue({ git: true, docker: true }); + checkVersionRequirementsSpy = vi.spyOn(SimulatorService.prototype, "checkVersionRequirements").mockResolvedValue({ node: "", docker: "" }); + resetDockerContainersSpy = vi.spyOn(SimulatorService.prototype, "resetDockerContainers").mockResolvedValue(undefined); + resetDockerImagesSpy = vi.spyOn(SimulatorService.prototype, "resetDockerImages").mockResolvedValue(undefined); + addConfigToEnvFileSpy = vi.spyOn(SimulatorService.prototype, "addConfigToEnvFile").mockResolvedValue(); + runSimulatorSpy = vi.spyOn(SimulatorService.prototype, "runSimulator").mockResolvedValue(undefined as any); + waitForSimulatorSpy = vi.spyOn(SimulatorService.prototype, "waitForSimulatorToBeReady").mockResolvedValue({ initialized: true }) as any; + deleteAllValidatorsSpy = vi.spyOn(SimulatorService.prototype, "deleteAllValidators").mockResolvedValue(undefined); + createRandomValidatorsSpy = vi.spyOn(SimulatorService.prototype, "createRandomValidators").mockResolvedValue(undefined) as any; + cleanDatabaseSpy = vi.spyOn(SimulatorService.prototype, "cleanDatabase").mockResolvedValue(true); + openFrontendSpy = vi.spyOn(SimulatorService.prototype, "openFrontend").mockResolvedValue(true); + getFrontendUrlSpy = vi.spyOn(SimulatorService.prototype, "getFrontendUrl").mockReturnValue("http://localhost:8080"); + normalizeLocalnetVersionSpy = vi.spyOn(SimulatorService.prototype, "normalizeLocalnetVersion").mockImplementation((v: string) => v) as any; }); afterEach(() => { vi.restoreAllMocks(); }); - test("if only docker is missing, then the execution fails", async () => { - simServCheckInstallRequirements.mockResolvedValue({ git: true, docker: false }); - - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith("Docker is not installed. Please install Docker and try again.\n"); - }); - - test("if check install requirements fail, then the execution aborts", async () => { - simServCheckInstallRequirements.mockRejectedValue(new Error("Error")); - - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith(new Error("Error")); - }); - - test("if both versions are too low, then the execution fails", async () => { - const mockVersionNumber = "99.9.9"; - simServCheckVersionRequirements.mockResolvedValue({ - node: mockVersionNumber, - docker: mockVersionNumber, + describe("Successful Execution", () => { + test("executes the full flow in non-headless mode", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai", "heuristai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }) + .mockResolvedValueOnce({ heuristai: "API_KEY_HEURIST" }); + await initAction.execute(defaultOptions); + expect(checkCliVersionSpy).toHaveBeenCalled(); + expect(checkInstallRequirementsSpy).toHaveBeenCalled(); + expect(checkVersionRequirementsSpy).toHaveBeenCalled(); + expect(resetDockerContainersSpy).toHaveBeenCalled(); + expect(resetDockerImagesSpy).toHaveBeenCalled(); + expect(addConfigToEnvFileSpy).toHaveBeenCalledWith({ OPENAIKEY: "API_KEY_OPENAI", HEURISTAIAPIKEY: "API_KEY_HEURIST" }); + expect(addConfigToEnvFileSpy).toHaveBeenCalledWith({ LOCALNETVERSION: "v1.0.0" }); + expect(runSimulatorSpy).toHaveBeenCalled(); + expect(waitForSimulatorSpy).toHaveBeenCalled(); + expect(deleteAllValidatorsSpy).toHaveBeenCalled(); + expect(createRandomValidatorsSpy).toHaveBeenCalledWith(5, ["openai", "heuristai"]); + expect(getFrontendUrlSpy).toHaveBeenCalled(); + expect(openFrontendSpy).toHaveBeenCalled(); + expect((initAction as any).succeedSpinner).toHaveBeenCalledWith("GenLayer Localnet initialized successfully! Go to http://localhost:8080 in your browser to access it."); }); - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith( - `Docker version ${mockVersionNumber} or higher is required. Please update Docker and try again.\nNode version ${mockVersionNumber} or higher is required. Please update Node and try again.\n` - ); - }); - - test("if only docker version is too low, then the execution fails", async () => { - const mockVersionNumber = "99.9.9"; - simServCheckVersionRequirements.mockResolvedValue({ - docker: mockVersionNumber, + test("executes correctly in headless mode with DB reset and 'ollama' selected", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai", "ollama"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + const ollamaUpdateSpy = vi.spyOn(OllamaAction.prototype, "updateModel").mockResolvedValue(undefined); + const headlessOptions: InitActionOptions = { + numValidators: 5, + headless: true, + resetDb: true, + localnetVersion: "v1.0.0", + }; + await initAction.execute(headlessOptions); + expect(cleanDatabaseSpy).toHaveBeenCalled(); + expect(openFrontendSpy).not.toHaveBeenCalled(); + expect((initAction as any).succeedSpinner).toHaveBeenCalledWith("GenLayer Localnet initialized successfully! "); + expect(ollamaUpdateSpy).toHaveBeenCalledWith("llama3"); }); - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith( - `Docker version ${mockVersionNumber} or higher is required. Please update Docker and try again.\n` - ); - }); - - test("if only node version is too low, then the execution fails", async () => { - const mockVersionNumber = "99.9.9"; - simServCheckVersionRequirements.mockResolvedValue({ - node: mockVersionNumber + test("normalizes localnetVersion if not 'latest'", async () => { + const customVersion = "custom-v1"; + normalizeLocalnetVersionSpy.mockReturnValue(customVersion); + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + await initAction.execute({ ...defaultOptions, localnetVersion: customVersion }); + expect(normalizeLocalnetVersionSpy).toHaveBeenCalledWith(customVersion); + expect(addConfigToEnvFileSpy).toHaveBeenCalledWith({ LOCALNETVERSION: customVersion }); }); - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith( - `Node version ${mockVersionNumber} or higher is required. Please update Node and try again.\n` - ); - }); - - test("if reset is not confirmed, abort", async () => { - inquirerPrompt.mockResolvedValue({ confirmReset: false }); - simServCheckInstallRequirements.mockResolvedValue({ git: true, docker: true }); - - await initAction(defaultActionOptions, simulatorService); - - expect(log).toHaveBeenCalledWith("Aborted!"); - }); - - test("if resetDockerContainers fail, then the execution aborts", async () => { - inquirerPrompt.mockResolvedValue({ confirmReset: true }); - simServResetDockerContainers.mockRejectedValue(new Error("Error")); - - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith(new Error("Error")); - }); - - test("should open the frontend if everything went well", async () => { - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", + test("should set defaultOllamaModel to 'llama3' if not provided in config", async () => { + vi.spyOn(initAction, "getConfig").mockReturnValue({}); + const writeConfigSpy = vi.spyOn(initAction, "writeConfig").mockImplementation(() => {}); + const ollamaUpdateSpy = vi.spyOn(OllamaAction.prototype, "updateModel").mockResolvedValue(undefined); + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["ollama"] }) + .mockResolvedValueOnce({ ollama: "API_KEY_OLLAMA" }); + await initAction.execute(defaultOptions); + expect(writeConfigSpy).toHaveBeenCalledWith("defaultOllamaModel", "llama3"); + expect(ollamaUpdateSpy).toHaveBeenCalledWith("llama3"); }); - simServgetAiProvidersOptions.mockReturnValue([ - { name: "OpenAI", value: "openai" }, - { name: "Heurist", value: "heuristai" }, - ]); - - vi.mocked(OllamaAction.prototype.updateModel).mockResolvedValueOnce(undefined); - - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServCreateRandomValidators.mockResolvedValue(true); - simServOpenFrontend.mockResolvedValue(true); - simGetSimulatorUrl.mockResolvedValue('http://localhost:8080/'); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - await initAction(defaultActionOptions, simulatorService); - - const frontendUrl = simulatorService.getFrontendUrl(); - expect(log).toHaveBeenCalledWith( - `GenLayer simulator initialized successfully! Go to ${frontendUrl} in your browser to access it.` - ); - }); - - test("should open the frontend if everything went well (custom options)", async () => { - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", + test("validates API key input for configurable provider", async () => { + inquirerPromptSpy.mockResolvedValueOnce({ confirmAction: true }); + inquirerPromptSpy.mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }); + let capturedQuestion: any; + inquirerPromptSpy.mockImplementationOnce((questions: any) => { + capturedQuestion = questions[0]; + return Promise.resolve({ openai: "dummy-key" }); + }); + await initAction.execute(defaultOptions); + expect(capturedQuestion).toBeDefined(); + const expectedError = `Please enter a valid API Key for OpenAI.`; + expect(capturedQuestion.validate("")).toBe(expectedError); + expect(capturedQuestion.validate("non-empty-key")).toBe(true); }); - simServgetAiProvidersOptions.mockReturnValue([ - { name: "OpenAI", value: "openai" }, - { name: "Heurist", value: "heuristai" }, - ]); - - vi.mocked(OllamaAction.prototype.updateModel).mockResolvedValueOnce(undefined); - - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServCreateRandomValidators.mockResolvedValue(true); - simServOpenFrontend.mockResolvedValue(true); - simGetSimulatorUrl.mockResolvedValue('http://localhost:8080/'); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - - await initAction({...defaultActionOptions, headless: true, resetDb: true, localnetVersion: "v1.0.0"}, simulatorService); - expect(log).toHaveBeenCalledWith( - `GenLayer simulator initialized successfully! ` - ); - }); - - test("should throw an error if validator are not initialized", async () => { - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai"], - openai: "API_KEY1", - heuristai: "API_KEY2", + test("validates LLM provider selection prompt", async () => { + let capturedQuestion: any; + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockImplementationOnce((questions: any) => { + capturedQuestion = questions[0]; + return Promise.resolve({ selectedLlmProviders: ["openai"] }); + }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + await initAction.execute(defaultOptions); + expect(capturedQuestion.validate([])).toBe("You must choose at least one option."); + expect(capturedQuestion.validate(["openai"])).toBe(true); }); - simServgetAiProvidersOptions.mockReturnValue([ - { name: "OpenAI", value: "openai" }, - { name: "Heurist", value: "heuristai" }, - ]); - - vi.mocked(OllamaAction.prototype.updateModel).mockResolvedValueOnce(undefined); - - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - simServCreateRandomValidators.mockRejectedValue(); - simServOpenFrontend.mockResolvedValue(true); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - - await initAction({...defaultActionOptions, headless: true}, simulatorService); - - expect(log).toHaveBeenCalledWith('Initializing validators...'); - expect(error).toHaveBeenCalledWith('Unable to initialize the validators.'); }); - test("if runSimulator fails, then the execution aborts", async () => { - inquirerPrompt.mockResolvedValue({ confirmReset: true, confirmDownload: true, selectedLlmProviders: [] }); - simServRunSimulator.mockRejectedValue(new Error("Error")); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith(new Error("Error")); - }); - - test("should pull Ollama model if 'ollama' is in providers", async () => { - - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai", "ollama"], - openai: "API_KEY1", - heuristai: "API_KEY2", - ollama: "API_KEY3", + describe("Error Handling", () => { + test("fails if Docker is not installed", async () => { + checkInstallRequirementsSpy.mockResolvedValue({ git: true, docker: false }); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("Docker is not installed. Please install Docker and try again.\n"); }); - simServgetAiProvidersOptions.mockReturnValue([ - { name: "OpenAI", value: "openai" }, - { name: "Heurist", value: "heuristai" }, - { name: "Ollama", value: "ollama" }, - ]); - - vi.mocked(OllamaAction.prototype.updateModel).mockResolvedValueOnce(undefined); - - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue({}); - await initAction(defaultActionOptions, simulatorService); - - expect(log).toHaveBeenCalledWith(`Pulling llama3 from Ollama...`); - expect(OllamaAction.prototype.updateModel).toHaveBeenCalled(); - }); - - test("should pull Ollama model if 'ollama' is in providers using defaultOllamaModel", async () => { - const ollamaModel = "gemma"; - - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai", "ollama"], - openai: "API_KEY1", - heuristai: "API_KEY2", - ollama: "API_KEY3", + test("fails if checkInstallRequirements throws an error", async () => { + const error = new Error("Install error"); + checkInstallRequirementsSpy.mockRejectedValue(error); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", error); }); - simServgetAiProvidersOptions.mockReturnValue([ - { name: "OpenAI", value: "openai" }, - { name: "Heurist", value: "heuristai" }, - { name: "Ollama", value: "ollama" }, - ]); - - vi.mocked(OllamaAction.prototype.updateModel).mockResolvedValueOnce(undefined); - - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue({defaultOllamaModel: ollamaModel}); - - await initAction(defaultActionOptions, simulatorService); - expect(log).toHaveBeenCalledWith(`Pulling ${ollamaModel} from Ollama...`); - expect(OllamaAction.prototype.updateModel).toHaveBeenCalled(); - }); - - test("should set defaultOllamaModel to llama 3 if no defaultOllamaModel is provided", async () => { - - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai", "heuristai", "ollama"], - openai: "API_KEY1", - heuristai: "API_KEY2", - ollama: "API_KEY3", + test("fails if version requirements are not met (both docker and node)", async () => { + const version = "99.9.9"; + checkVersionRequirementsSpy.mockResolvedValue({ docker: version, node: version }); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith(`Docker version ${version} or higher is required. Please update Docker and try again.\nNode version ${version} or higher is required. Please update Node and try again.\n`); }); - simServgetAiProvidersOptions.mockReturnValue([ - { name: "OpenAI", value: "openai" }, - { name: "Heurist", value: "heuristai" }, - { name: "Ollama", value: "ollama" }, - ]); - - vi.mocked(ConfigFileManager.prototype.getConfig).mockResolvedValueOnce({}) - vi.mocked(OllamaAction.prototype.updateModel).mockResolvedValueOnce(undefined); - - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - vi.mocked(fs.readFileSync).mockReturnValue(JSON.stringify({})); - - await initAction(defaultActionOptions, simulatorService); - - expect(ConfigFileManager.prototype.writeConfig).toHaveBeenCalledWith('defaultOllamaModel', 'llama3') - expect(log).toHaveBeenCalledWith(`Pulling llama3 from Ollama...`); - expect(OllamaAction.prototype.updateModel).toHaveBeenCalled(); - }); - - test("logs error if checkVersionRequirements throws", async () => { - simServCheckInstallRequirements.mockResolvedValue({ git: true, docker: true }); - const errorMsg = new Error("checkVersionRequirements error"); - simServCheckVersionRequirements.mockRejectedValueOnce(errorMsg); - - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith(errorMsg); - }); - - test("logs error if resetDockerContainers throws", async () => { - inquirerPrompt.mockResolvedValue({ confirmReset: true }); - simServCheckInstallRequirements.mockResolvedValue({ git: true, docker: true }); - const errorMsg = new Error("resetDockerContainers error"); - simServResetDockerContainers.mockRejectedValueOnce(errorMsg); - - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith(errorMsg); - }); - - test("prompts for LLM providers and validates that at least one is selected", async () => { - const mockEnvContent = "FRONTEND_PORT=8080"; - vi.mocked(fs.readFileSync).mockReturnValue(mockEnvContent); - - inquirerPrompt - .mockResolvedValueOnce({ confirmReset: true }) - .mockImplementation((questions: any) => { - if (questions[0].type === "checkbox") { - const validateFunction = questions[0].validate; - expect(validateFunction([])).toBe("You must choose at least one option."); - expect(validateFunction(["openai"])).toBe(true); - return Promise.resolve({ selectedLlmProviders: ["openai"] }); - } - - if (questions[0].type === "input") { - const validateFunction = questions[0].validate; - expect(validateFunction("")).toBe("Please enter a valid API Key for OpenAI."); - expect(validateFunction("API_KEY1")).toBe(true); - return Promise.resolve({ openai: "API_KEY1" }); - } - }); - simServCheckInstallRequirements.mockResolvedValue({ docker: true }); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServCreateRandomValidators.mockResolvedValue(true); - simServOpenFrontend.mockResolvedValue(true); - - await initAction(defaultActionOptions, simulatorService); - }); - - - test("logs error message if simulator fails to initialize with ERROR code", async () => { - inquirerPrompt - .mockResolvedValueOnce({ confirmReset: true }) - .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) - .mockResolvedValueOnce({ openai: "API_KEY1" }); - - simServCheckInstallRequirements.mockResolvedValue({ docker: true }); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - - simServWaitForSimulator.mockResolvedValue({ - initialized: false, - errorCode: "ERROR", - errorMessage: "Simulator failed to initialize due to configuration error.", + test("fails if version requirement for docker is not met", async () => { + const version = "99.9.9"; + checkVersionRequirementsSpy.mockResolvedValue({ docker: version }); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith(`Docker version ${version} or higher is required. Please update Docker and try again.\n`); }); - await initAction(defaultActionOptions, simulatorService); - - expect(log).toHaveBeenCalledWith("Simulator failed to initialize due to configuration error."); - expect(error).toHaveBeenCalledWith("Unable to initialize the GenLayer simulator. Please try again."); - }); - - test("logs error if runSimulator throws", async () => { - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai"], - openai: "API_KEY1", + test("fails if version requirement for node is not met", async () => { + const version = "99.9.9"; + checkVersionRequirementsSpy.mockResolvedValue({ node: version }); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith(`Node version ${version} or higher is required. Please update Node and try again.\n`); }); - simServCheckInstallRequirements.mockResolvedValue({ git: true, docker: true }); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - const errorMsg = new Error("runSimulator error"); - simServRunSimulator.mockRejectedValueOnce(errorMsg); - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith(errorMsg); - }); - - test("logs specific message if waitForSimulatorToBeReady returns TIMEOUT errorCode", async () => { - inquirerPrompt.mockResolvedValue({ - confirmReset: true, - confirmDownload: true, - selectedLlmProviders: ["openai"], - openai: "API_KEY1", - }); - simServCheckInstallRequirements.mockResolvedValue({ git: true, docker: true }); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ - initialized: false, - errorCode: "TIMEOUT", - errorMessage: "errorMessage", + test("aborts if user does not confirm reset action", async () => { + inquirerPromptSpy.mockResolvedValueOnce({ confirmAction: false }); + await initAction.execute(defaultOptions) + expect((initAction as any).logError).toHaveBeenCalledWith(`Operation aborted!`); }); - await initAction(defaultActionOptions, simulatorService); - - expect(error).toHaveBeenCalledWith( - "The simulator is taking too long to initialize. Please try again after the simulator is ready." - ); - }); - - test("catches and logs error if waitForSimulatorToBeReady throws an exception", async () => { - inquirerPrompt - .mockResolvedValueOnce({ confirmReset: true }) - .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) - .mockResolvedValueOnce({ openai: "API_KEY1" }); - - simServCheckInstallRequirements.mockResolvedValue({ docker: true }); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - - const errorMsg = new Error("Unexpected simulator error"); - simServWaitForSimulator.mockRejectedValueOnce(errorMsg); + test("fails if resetDockerContainers throws an error", async () => { + inquirerPromptSpy.mockResolvedValueOnce({ confirmAction: true }); + resetDockerContainersSpy.mockRejectedValue(new Error("Container reset error")); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", new Error("Container reset error")); + }); - await initAction(defaultActionOptions, simulatorService); + test("fails if runSimulator throws an error", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + runSimulatorSpy.mockRejectedValue(new Error("Run simulator error")); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", new Error("Run simulator error")); + }); - expect(error).toHaveBeenCalledWith(errorMsg); - }); + test("fails if waitForSimulatorToBeReady returns ERROR code", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + waitForSimulatorSpy.mockResolvedValue({ initialized: false, errorCode: "ERROR", errorMessage: "Initialization failed" }); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("Unable to initialize the GenLayer Localnet: Initialization failed"); + }); - test("catches and logs error if openFrontend throws an exception", async () => { - const mockEnvContent = "FRONTEND_PORT=8080"; - vi.mocked(fs.readFileSync).mockReturnValue(mockEnvContent); + test("fails if waitForSimulatorToBeReady returns TIMEOUT code", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + waitForSimulatorSpy.mockResolvedValue({ initialized: false, errorCode: "TIMEOUT", errorMessage: "Timeout" }); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("The localnet is taking too long to initialize. Please try again after the localnet is ready."); + }); - inquirerPrompt - .mockResolvedValueOnce({ confirmReset: true }) - .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) - .mockResolvedValueOnce({ openai: "API_KEY1" }); + test("fails if deleteAllValidators throws an error", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + deleteAllValidatorsSpy.mockRejectedValue(new Error("Validator deletion error")); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", expect.any(Error)); + }); - simServCheckInstallRequirements.mockResolvedValue({ docker: true }); - simServResetDockerContainers.mockResolvedValue(true); - simServResetDockerImages.mockResolvedValue(true); - simServRunSimulator.mockResolvedValue(true); - simServWaitForSimulator.mockResolvedValue({ initialized: true }); - simServDeleteAllValidators.mockResolvedValue(true); - simServCreateRandomValidators.mockResolvedValue(true); + test("fails if createRandomValidators throws an error", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + createRandomValidatorsSpy.mockRejectedValue(new Error("Validator creation error")); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", Error("Validator creation error")); + }); - const errorMsg = new Error("Failed to open frontend"); - simServOpenFrontend.mockImplementationOnce(() => { - throw errorMsg; + test("fails if cleanDatabase throws an error when resetDb is true", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + cleanDatabaseSpy.mockRejectedValue(new Error("Database error")); + const optionsWithResetDb: InitActionOptions = { ...defaultOptions, resetDb: true }; + await initAction.execute(optionsWithResetDb); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", new Error("Database error")); }); - await initAction(defaultActionOptions, simulatorService); + test("fails if openFrontend throws an error", async () => { + inquirerPromptSpy + .mockResolvedValueOnce({ confirmAction: true }) + .mockResolvedValueOnce({ selectedLlmProviders: ["openai"] }) + .mockResolvedValueOnce({ openai: "API_KEY_OPENAI" }); + openFrontendSpy.mockRejectedValue(new Error("Frontend error")); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", new Error("Frontend error")); + }); - expect(error).toHaveBeenCalledWith(errorMsg); + test("catches and logs unexpected errors", async () => { + inquirerPromptSpy.mockRejectedValueOnce(new Error("Unexpected prompt error")); + await initAction.execute(defaultOptions); + expect((initAction as any).failSpinner).toHaveBeenCalledWith("An error occurred during initialization.", new Error("Unexpected prompt error")); + }); }); - }); \ No newline at end of file diff --git a/tests/actions/ollama.test.ts b/tests/actions/ollama.test.ts index 76aa080d..c38b343e 100644 --- a/tests/actions/ollama.test.ts +++ b/tests/actions/ollama.test.ts @@ -182,4 +182,12 @@ describe("OllamaAction", () => { expect(ollamaAction["failSpinner"]).toHaveBeenCalledWith(`Error updating model "mocked_model"`, mockError); }); + test("should call get config if modelName is empty", async () => { + const defaultModel = "default_model"; + vi.spyOn(ollamaAction as any, "getConfig").mockReturnValue({ defaultOllamaModel: defaultModel }); + + await ollamaAction.updateModel(""); + expect(ollamaAction.getConfig).toHaveBeenCalledTimes(1); + }); + }); \ No newline at end of file diff --git a/tests/commands/init.test.ts b/tests/commands/init.test.ts index bf0182ac..fd856080 100644 --- a/tests/commands/init.test.ts +++ b/tests/commands/init.test.ts @@ -4,6 +4,11 @@ import { initializeGeneralCommands } from "../../src/commands/general"; import { getCommand, getCommandOption } from "../utils"; import simulatorService from '../../src/lib/services/simulator' import {localnetCompatibleVersion} from "../../src/lib/config/simulator"; +import { InitAction } from "../../src/commands/general/init"; + + +vi.mock("../../src/commands/general/init"); + const openFrontendSpy = vi.spyOn(simulatorService, "openFrontend"); const defaultOptions = { @@ -17,8 +22,6 @@ vi.mock("inquirer", () => ({ prompt: vi.fn(() => {}), })); -const action = vi.fn(); - describe("init command", () => { let initCommand: Command; let program: Command; @@ -28,10 +31,6 @@ describe("init command", () => { initializeGeneralCommands(program); initCommand = getCommand(program, "init"); - initCommand?.action(async (args) => { - action(args); - }); - vi.clearAllMocks(); }); @@ -65,21 +64,21 @@ describe("init command", () => { test("action is called", async () => { program.parse(["node", "test", "init"]); - expect(action).toHaveBeenCalledTimes(1); - expect(action).toHaveBeenCalledWith(defaultOptions); + expect(InitAction).toHaveBeenCalledTimes(1); + expect(InitAction.prototype.execute).toHaveBeenCalledWith(defaultOptions); }); test("option --headless is accepted", async () => { program.parse(["node", "test", "init", "--headless"]); - expect(action).toHaveBeenCalledTimes(1); - expect(action).toHaveBeenCalledWith({...defaultOptions, headless: true}); + expect(InitAction).toHaveBeenCalledTimes(1); + expect(InitAction.prototype.execute).toHaveBeenCalledWith({...defaultOptions, headless: true}); expect(openFrontendSpy).not.toHaveBeenCalled(); }); test("option --localnet-version is accepted", async () => { program.parse(["node", "test", "init", "--localnet-version", "v1.0.0"]); - expect(action).toHaveBeenCalledTimes(1); - expect(action).toHaveBeenCalledWith({...defaultOptions, localnetVersion: "v1.0.0"}); + expect(InitAction).toHaveBeenCalledTimes(1); + expect(InitAction.prototype.execute).toHaveBeenCalledWith({...defaultOptions, localnetVersion: "v1.0.0"}); expect(openFrontendSpy).not.toHaveBeenCalled(); }); }); diff --git a/tests/commands/update.test.ts b/tests/commands/update.test.ts index dc30bb50..d0b1694a 100644 --- a/tests/commands/update.test.ts +++ b/tests/commands/update.test.ts @@ -2,10 +2,8 @@ import { Command } from "commander"; import { vi, describe, beforeEach, afterEach, test, expect } from "vitest"; import { initializeUpdateCommands } from "../../src/commands/update"; import { OllamaAction } from "../../src/commands/update/ollama"; -import { ConfigFileManager } from "../../src/lib/config/ConfigFileManager"; vi.mock("../../src/commands/update/ollama"); -vi.mock("../../src/lib/config/ConfigFileManager"); describe("ollama command", () => { let program: Command; @@ -15,7 +13,6 @@ describe("ollama command", () => { initializeUpdateCommands(program); const mockConfig = { defaultOllamaModel: "default-model" }; - vi.mocked(ConfigFileManager.prototype.getConfig).mockReturnValue(mockConfig); }); afterEach(() => { @@ -31,7 +28,7 @@ describe("ollama command", () => { test("OllamaAction.updateModel is called with default model", async () => { program.parse(["node", "test", "update", "ollama"]); expect(OllamaAction).toHaveBeenCalledTimes(1); - expect(OllamaAction.prototype.updateModel).toHaveBeenCalledWith("default-model"); + expect(OllamaAction.prototype.updateModel).toHaveBeenCalledWith(""); }); test("OllamaAction.removeModel is called with model option", async () => { @@ -43,6 +40,6 @@ describe("ollama command", () => { test("OllamaAction.removeModel is called with default model", async () => { program.parse(["node", "test", "update", "ollama", "--remove"]); expect(OllamaAction).toHaveBeenCalledTimes(1); - expect(OllamaAction.prototype.removeModel).toHaveBeenCalledWith("default-model"); + expect(OllamaAction.prototype.removeModel).toHaveBeenCalledWith(""); }); }); diff --git a/tests/services/simulator.test.ts b/tests/services/simulator.test.ts index 92782f3b..57aa0496 100644 --- a/tests/services/simulator.test.ts +++ b/tests/services/simulator.test.ts @@ -282,6 +282,21 @@ describe("SimulatorService - Basic Tests", () => { expect(rpcClient.request).toHaveBeenCalledWith({ method: "sim_clearDbTables", params: [['current_state', 'transactions']] }); }); + test("should create random validators", async () => { + const numValidators = 5; + const llmProviders = ["openai", "ollama"]; + const mockResponse = { success: true }; + vi.mocked(rpcClient.request).mockResolvedValue(mockResponse); + + const result = await simulatorService.createRandomValidators(numValidators, llmProviders); + + expect(rpcClient.request).toHaveBeenCalledWith({ + method: "sim_createRandomValidators", + params: [numValidators, 1, 10, llmProviders], + }); + expect(result).toEqual(mockResponse); + }); + }); describe("SimulatorService - Docker Tests", () => { let mockGetContainer: Mock; From 07d1f86ee83580d1a0470d04a9e60e696344fcba Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 20 Feb 2025 12:31:58 -0300 Subject: [PATCH 21/40] fix: merging commit --- tests/commands/call.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/commands/call.test.ts b/tests/commands/call.test.ts index 038f239c..7fd2d48e 100644 --- a/tests/commands/call.test.ts +++ b/tests/commands/call.test.ts @@ -1,7 +1,7 @@ import { Command } from "commander"; +import { CallAction } from "../../src/commands/contracts/call"; import { vi, describe, beforeEach, afterEach, test, expect } from "vitest"; import { initializeContractsCommands } from "../../src/commands/contracts"; -import { CallAction } from "../../src/commands/contracts/call"; vi.mock("../../src/commands/contracts/call"); From df6c84605f93c05f2f268669cacec43dc453c0ca Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:28:48 +0000 Subject: [PATCH 22/40] chore(deps): update dependency @release-it/conventional-changelog to v10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c84250a..6d2afee8 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/yeagerai/genlayer-cli#readme", "devDependencies": { - "@release-it/conventional-changelog": "^8.0.1", + "@release-it/conventional-changelog": "^10.0.0", "@types/dockerode": "^3.3.31", "@types/inquirer": "^9.0.7", "@types/node": "^22.0.0", From e4616928fc34af00d4e18b27a18220cdeb77e124 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:29:07 +0000 Subject: [PATCH 23/40] chore(deps): update dependency eslint-config-prettier to v10 --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a74a4c28..69e77ce1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "cross-env": "^7.0.3", "esbuild": "^0.24.0", "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "jsdom": "^25.0.1", @@ -4219,13 +4219,13 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", + "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", "dev": true, "license": "MIT", "bin": { - "eslint-config-prettier": "bin/cli.js" + "eslint-config-prettier": "build/bin/cli.js" }, "peerDependencies": { "eslint": ">=7.0.0" diff --git a/package.json b/package.json index 4c84250a..af180e76 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "cross-env": "^7.0.3", "esbuild": "^0.24.0", "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "jsdom": "^25.0.1", From c0ebac0bbb94740c1f1ad2bd32c3ac9b7c436991 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:29:19 +0000 Subject: [PATCH 24/40] fix(deps): update dependency inquirer to v12 --- package-lock.json | 475 ++++++++++++++++++++++++++++++++-------------- package.json | 2 +- 2 files changed, 331 insertions(+), 146 deletions(-) diff --git a/package-lock.json b/package-lock.json index a74a4c28..cd710561 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "dotenv": "^16.4.5", "ethers": "^6.13.4", "genlayer-js": "^0.6.0", - "inquirer": "^9.3.7", + "inquirer": "^12.0.0", "node-fetch": "^3.0.0", "open": "^10.1.0", "update-check": "^1.5.4", @@ -911,6 +911,131 @@ "dev": true, "license": "ISC" }, + "node_modules/@inquirer/checkbox": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.2.tgz", + "integrity": "sha512-PL9ixC5YsPXzXhAZFUPmkXGxfgjkdfZdPEPPmt4kFwQ4LBMDG9n/nHXYRGGZSKZJs+d1sGKWgS2GiPzVRKUdtQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.6.tgz", + "integrity": "sha512-6ZXYK3M1XmaVBZX6FCfChgtponnL0R6I7k8Nu+kaoNkT828FVZTcca1MqmWQipaW2oNREQl5AaPCUOOCVNdRMw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "10.1.7", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.7.tgz", + "integrity": "sha512-AA9CQhlrt6ZgiSy6qoAigiA1izOa751ugX6ioSjqgJ+/Gd+tEN/TORk5sUYNjXuHWfW0r1n/a6ak4u/NqHHrtA==", + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core/node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@inquirer/editor": { + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.7.tgz", + "integrity": "sha512-gktCSQtnSZHaBytkJKMKEuswSk2cDBuXX5rxGFv306mwHfBPjg5UAldw9zWGoEyvA9KpRDkeM4jfrx0rXn0GyA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.9.tgz", + "integrity": "sha512-Xxt6nhomWTAmuSX61kVgglLjMEFGa+7+F6UUtdEUeg7fg4r9vaFttUUKrtkViYYrQBA5Ia1tkOJj2koP9BuLig==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/figures": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.10.tgz", @@ -920,6 +1045,185 @@ "node": ">=18" } }, + "node_modules/@inquirer/input": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.6.tgz", + "integrity": "sha512-1f5AIsZuVjPT4ecA8AwaxDFNHny/tSershP/cTvTDxLdiIGTeILNcKozB0LaYt6mojJLUbOYhpIxicaYf7UKIQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.9.tgz", + "integrity": "sha512-iN2xZvH3tyIYXLXBvlVh0npk1q/aVuKXZo5hj+K3W3D4ngAEq/DkLpofRzx6oebTUhBvOgryZ+rMV0yImKnG3w==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.9.tgz", + "integrity": "sha512-xBEoOw1XKb0rIN208YU7wM7oJEHhIYkfG7LpTJAEW913GZeaoQerzf5U/LSHI45EVvjAdgNXmXgH51cUXKZcJQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.3.2.tgz", + "integrity": "sha512-G1ytyOoHh5BphmEBxSwALin3n1KGNYB6yImbICcRQdzXfOGbuJ9Jske/Of5Sebk339NSGGNfUshnzK8YWkTPsQ==", + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^4.1.2", + "@inquirer/confirm": "^5.1.6", + "@inquirer/editor": "^4.2.7", + "@inquirer/expand": "^4.0.9", + "@inquirer/input": "^4.1.6", + "@inquirer/number": "^3.0.9", + "@inquirer/password": "^4.0.9", + "@inquirer/rawlist": "^4.0.9", + "@inquirer/search": "^3.0.9", + "@inquirer/select": "^4.0.9" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.9.tgz", + "integrity": "sha512-+5t6ebehKqgoxV8fXwE49HkSF2Rc9ijNiVGEQZwvbMI61/Q5RcD+jWD6Gs1tKdz5lkI8GRBL31iO0HjGK1bv+A==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.9.tgz", + "integrity": "sha512-DWmKztkYo9CvldGBaRMr0ETUHgR86zE6sPDVOHsqz4ISe9o1LuiWfgJk+2r75acFclA93J/lqzhT0dTjCzHuoA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.0.9.tgz", + "integrity": "sha512-BpJyJe7Dkhv2kz7yG7bPSbJLQuu/rqyNlF1CfiiFeFwouegfH+zh13KDyt6+d9DwucKo7hqM3wKLLyJxZMO+Xg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.7", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz", + "integrity": "sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2890,6 +3194,7 @@ "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2962,6 +3267,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8" @@ -3660,6 +3966,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, "license": "MIT", "dependencies": { "clone": "^1.0.2" @@ -5581,161 +5888,38 @@ "license": "ISC" }, "node_modules/inquirer": { - "version": "9.3.7", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.7.tgz", - "integrity": "sha512-LJKFHCSeIRq9hanN14IlOtPSTe3lNES7TYDTE2xxdAy1LS5rYphajK1qtwvj3YmQXvvk0U2Vbmcni8P9EIQW9w==", + "version": "12.4.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.4.2.tgz", + "integrity": "sha512-reyjHcwyK2LObXgTJH4T1Dpfhwu88LNPTZmg/KenmTsy3T8lN/kZT8Oo7UwwkB9q8+ss2qjjN7GV8oFAfyz9Xg==", "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.3", + "@inquirer/core": "^10.1.7", + "@inquirer/prompts": "^7.3.2", + "@inquirer/type": "^3.0.4", "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "external-editor": "^3.1.0", - "mute-stream": "1.0.0", - "ora": "^5.4.1", + "mute-stream": "^2.0.0", "run-async": "^3.0.0", - "rxjs": "^7.8.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.2" + "rxjs": "^7.8.1" }, "engines": { "node": ">=18" - } - }, - "node_modules/inquirer/node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/inquirer/node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inquirer/node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inquirer/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/inquirer/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inquirer/node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inquirer/node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "peerDependencies": { + "@types/node": ">=18" }, - "engines": { - "node": ">=8" + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/inquirer/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "license": "ISC" - }, - "node_modules/inquirer/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, + "node_modules/inquirer/node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", "engines": { - "node": ">=8" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/internal-slot": { @@ -7031,6 +7215,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -9015,7 +9200,6 @@ "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" @@ -10662,6 +10846,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, "license": "MIT", "dependencies": { "defaults": "^1.0.3" diff --git a/package.json b/package.json index 4c84250a..d50e83ac 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "dotenv": "^16.4.5", "ethers": "^6.13.4", "genlayer-js": "^0.6.0", - "inquirer": "^9.3.7", + "inquirer": "^12.0.0", "node-fetch": "^3.0.0", "open": "^10.1.0", "update-check": "^1.5.4", From 753158fb61c0301207cec0136558e11f109e99aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:55:26 +0000 Subject: [PATCH 25/40] chore(deps): update dependency jsdom to v26 --- package-lock.json | 37 +++++++++++++++---------------------- package.json | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 24799eda..d8c93453 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "jsdom": "^25.0.1", + "jsdom": "^26.0.0", "prettier": "^3.2.5", "release-it": "^17.2.0", "ts-node": "^10.9.2", @@ -3486,13 +3486,6 @@ "node": ">=18" } }, - "node_modules/cssstyle/node_modules/rrweb-cssom": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", - "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", - "devOptional": true, - "license": "MIT" - }, "node_modules/dargs": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", @@ -6493,23 +6486,23 @@ "license": "MIT" }, "node_modules/jsdom": { - "version": "25.0.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.1.tgz", - "integrity": "sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.0.0.tgz", + "integrity": "sha512-BZYDGVAIriBWTpIxYzrXjv3E/4u8+/pSG5bQdIYCbNCGOvsPkDQfTVLAIXAf9ETdCpduCVTkDe2NNZ8NIwUVzw==", "devOptional": true, "license": "MIT", "dependencies": { - "cssstyle": "^4.1.0", + "cssstyle": "^4.2.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "form-data": "^4.0.0", + "form-data": "^4.0.1", "html-encoding-sniffer": "^4.0.0", "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.5", + "https-proxy-agent": "^7.0.6", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.12", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.7.1", + "nwsapi": "^2.2.16", + "parse5": "^7.2.1", + "rrweb-cssom": "^0.8.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^5.0.0", @@ -6517,7 +6510,7 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0", + "whatwg-url": "^14.1.0", "ws": "^8.18.0", "xml-name-validator": "^5.0.0" }, @@ -6525,7 +6518,7 @@ "node": ">=18" }, "peerDependencies": { - "canvas": "^2.11.2" + "canvas": "^3.0.0" }, "peerDependenciesMeta": { "canvas": { @@ -8685,9 +8678,9 @@ } }, "node_modules/rrweb-cssom": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", - "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", "devOptional": true, "license": "MIT" }, diff --git a/package.json b/package.json index 0623181a..12cebe93 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "jsdom": "^25.0.1", + "jsdom": "^26.0.0", "prettier": "^3.2.5", "release-it": "^17.2.0", "ts-node": "^10.9.2", From ac0ab0e3c090a667652ac90b38333f294c80e446 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:55:33 +0000 Subject: [PATCH 26/40] chore(deps): update dependency release-it to v18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0623181a..663d186d 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "eslint-plugin-import": "^2.29.1", "jsdom": "^25.0.1", "prettier": "^3.2.5", - "release-it": "^17.2.0", + "release-it": "^18.0.0", "ts-node": "^10.9.2", "typescript": "^5.4.5" }, From 69416b50c85c35be1b649b9f4717071cfe7eee01 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 11:34:33 +0000 Subject: [PATCH 27/40] fix(deps): update all non-major dependencies --- docker-compose.yml | 2 +- package-lock.json | 172 ++++++++++++++++++++++++++++----------------- 2 files changed, 109 insertions(+), 65 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 379455a4..9e2797d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,7 +93,7 @@ services: max-file: "3" ollama: - image: ollama/ollama:0.5.7 + image: ollama/ollama:0.5.11 ports: - 11434:11434 container_name: ollama diff --git a/package-lock.json b/package-lock.json index 24799eda..7856d114 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1647,9 +1647,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.13.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", - "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", + "version": "22.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", + "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -1731,17 +1731,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.23.0.tgz", - "integrity": "sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.1.tgz", + "integrity": "sha512-ll1StnKtBigWIGqvYDVuDmXJHVH4zLVot1yQ4fJtLpL7qacwkxJc1T0bptqw+miBQ/QfUbhl1TcQ4accW5KUyA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/type-utils": "8.23.0", - "@typescript-eslint/utils": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/type-utils": "8.24.1", + "@typescript-eslint/utils": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1761,16 +1761,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.23.0.tgz", - "integrity": "sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.1.tgz", + "integrity": "sha512-Tqoa05bu+t5s8CTZFaGpCH2ub3QeT9YDkXbPd3uQ4SfsLoh1/vv2GEYAioPoxCWJJNsenXlC88tRjwoHNts1oQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/typescript-estree": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "debug": "^4.3.4" }, "engines": { @@ -1786,14 +1786,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.23.0.tgz", - "integrity": "sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.1.tgz", + "integrity": "sha512-OdQr6BNBzwRjNEXMQyaGyZzgg7wzjYKfX2ZBV3E04hUCBDv3GQCHiz9RpqdUIiVrMgJGkXm3tcEh4vFSHreS2Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0" + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1804,14 +1804,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.23.0.tgz", - "integrity": "sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.1.tgz", + "integrity": "sha512-/Do9fmNgCsQ+K4rCz0STI7lYB4phTtEXqqCAs3gZW0pnK7lWNkvWd5iW545GSmApm4AzmQXmSqXPO565B4WVrw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.23.0", - "@typescript-eslint/utils": "8.23.0", + "@typescript-eslint/typescript-estree": "8.24.1", + "@typescript-eslint/utils": "8.24.1", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -1828,9 +1828,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.23.0.tgz", - "integrity": "sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.1.tgz", + "integrity": "sha512-9kqJ+2DkUXiuhoiYIUvIYjGcwle8pcPpdlfkemGvTObzgmYfJ5d0Qm6jwb4NBXP9W1I5tss0VIAnWFumz3mC5A==", "dev": true, "license": "MIT", "engines": { @@ -1842,14 +1842,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.23.0.tgz", - "integrity": "sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.1.tgz", + "integrity": "sha512-UPyy4MJ/0RE648DSKQe9g0VDSehPINiejjA6ElqnFaFIhI6ZEiZAkUI0D5MCk0bQcTf/LVqZStvQ6K4lPn/BRg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/visitor-keys": "8.24.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1869,16 +1869,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.23.0.tgz", - "integrity": "sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.1.tgz", + "integrity": "sha512-OOcg3PMMQx9EXspId5iktsI3eMaXVwlhC8BvNnX6B5w9a4dVgpkQZuU8Hy67TolKcl+iFWq0XX+jbDGN4xWxjQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/typescript-estree": "8.23.0" + "@typescript-eslint/scope-manager": "8.24.1", + "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/typescript-estree": "8.24.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1893,13 +1893,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.23.0.tgz", - "integrity": "sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ==", + "version": "8.24.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.1.tgz", + "integrity": "sha512-EwVHlp5l+2vp8CoqJm9KikPZgi3gbdZAtabKT9KPShGeOcJhsv4Zdo3oc8T8I0uKEmYoU4ItyxbptjF08enaxg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.23.0", + "@typescript-eslint/types": "8.24.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -4252,20 +4252,19 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", - "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.8.3.tgz", + "integrity": "sha512-A0bu4Ks2QqDWNpeEgTQMPTngaMhuDu4yv6xpftBMAf+1ziXnpx+eSR1WRfoPTe2BAiAjHFZ7kSNx1fvr5g5pmQ==", "dev": true, "license": "ISC", "dependencies": { "@nolyfill/is-core-module": "1.0.39", "debug": "^4.3.7", "enhanced-resolve": "^5.15.0", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", + "get-tsconfig": "^4.10.0", "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3", - "stable-hash": "^0.0.4" + "stable-hash": "^0.0.4", + "tinyglobby": "^0.2.12" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -4891,9 +4890,9 @@ } }, "node_modules/genlayer-js": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/genlayer-js/-/genlayer-js-0.6.3.tgz", - "integrity": "sha512-kVC2pwNRBifkKJ1raBz3vktql9HBJ6OX2yFcBh5BawhO3sHF8X44sUWCqUFB/CjikRRvVnuCdyzL2aE70Ecikw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/genlayer-js/-/genlayer-js-0.6.4.tgz", + "integrity": "sha512-tbsBRyVUGZ0a+661ML6wu3U3p5CtHkik7a4qTc68OZgf1pX1G4JBs7CzAmqAkMt8HUyD/J413raDs9Q5s3psWw==", "license": "MIT", "dependencies": { "eslint-plugin-import": "^2.30.0", @@ -7858,9 +7857,9 @@ } }, "node_modules/prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.1.tgz", + "integrity": "sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==", "dev": true, "license": "MIT", "bin": { @@ -9549,6 +9548,51 @@ "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", "license": "MIT" }, + "node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tinypool": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", @@ -9985,9 +10029,9 @@ "license": "MIT" }, "node_modules/uuid": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.5.tgz", - "integrity": "sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -10016,9 +10060,9 @@ } }, "node_modules/viem": { - "version": "2.22.21", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.22.21.tgz", - "integrity": "sha512-CujapStF+F3VP+bKBQOGFk5YHyJKZOY2TGvD1e04CAm8VrtLo3sfTydYW2Rri6LMktqp6ilGB9GvSiZczxvOBQ==", + "version": "2.23.4", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.4.tgz", + "integrity": "sha512-UQquuolKlS1w5H5e0Fd1KKoUlIPJryIEBzY5AUhGyV1ka+9O6+3uYVhUzj6RbvGK0PtsMKn2ddwPZFwjNDVU/A==", "funding": [ { "type": "github", From c293befc9d9e04ac51319c80883557a9993e7699 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Fri, 21 Feb 2025 17:21:23 -0300 Subject: [PATCH 28/40] fix: updating packages and fixing breaking changes --- .eslintrc.js | 58 - esbuild.config.dev | 16 - esbuild.config.dev.js | 18 + esbuild.config.js | 15 +- esbuild.config.prod | 16 - esbuild.config.prod.js | 16 + eslint.config.js | 59 + package-lock.json | 2408 +++++++++++++++------------------ package.json | 3 +- scripts/postinstall.js | 16 +- src/commands/general/init.ts | 7 +- src/commands/general/start.ts | 5 +- src/lib/services/simulator.ts | 4 +- tests/commands/up.test.ts | 4 +- 14 files changed, 1202 insertions(+), 1443 deletions(-) delete mode 100644 .eslintrc.js delete mode 100644 esbuild.config.dev create mode 100644 esbuild.config.dev.js delete mode 100644 esbuild.config.prod create mode 100644 esbuild.config.prod.js create mode 100644 eslint.config.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 71b587d8..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,58 +0,0 @@ -module.exports = { - root: true, - env: { - es6: true, - node: true, - jest: true, - }, - extends: ["eslint:recommended", "prettier", "plugin:import/typescript"], - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint", "import"], - overrides: [ - { - files: "**/*.ts", - parserOptions: { - project: ["./tsconfig.json"], - sourceType: "module", - }, - extends: [ - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/typescript", - "plugin:@typescript-eslint/recommended", - ], - rules: { - "import/namespace": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-empty-interface": "off", - "no-constant-condition": "off", - "@typescript-eslint/no-explicit-any": "off", - "prefer-const": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/no-loss-of-precision": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-non-null-asserted-optional-chain": "off", - "@typescript-eslint/no-var-requires": "off", - "import/export": "off", - "no-fallthrough": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-floating-promises": ["error"], - "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], - }, - }, - ], - ignorePatterns: [ - "**/dist/**/*", // Ignore built files. - "esbuild.config.js", - "jest.config.js", - "Config.js", - "commitLint.config.ts", - ], - settings: { - "import/resolver": { - typescript: {}, - }, - }, -}; diff --git a/esbuild.config.dev b/esbuild.config.dev deleted file mode 100644 index e1a76486..00000000 --- a/esbuild.config.dev +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - context: { - tsconfig: "./tsconfig.json", - entryPoints: ["src/index.ts"], - bundle: true, // Bundle all dependencies - outfile: "dist/index.js", // Output file - platform: "node", - target: "es2020", - define: { 'import.meta.url': '_importMetaUrl' }, - banner: { - js: "const _importMetaUrl=require('url').pathToFileURL(__filename)", - }, - external: ['ssh2'], - }, - watch: true, -}; diff --git a/esbuild.config.dev.js b/esbuild.config.dev.js new file mode 100644 index 00000000..c0c30730 --- /dev/null +++ b/esbuild.config.dev.js @@ -0,0 +1,18 @@ +export default { + context: { + tsconfig: "./tsconfig.json", + entryPoints: ["src/index.ts"], + bundle: true, + outfile: "dist/index.js", + platform: "node", + target: "es2020", + format: "esm", + define: { "import.meta.url": "import.meta.url" }, + banner: { + js: `const _importMetaUrl = new URL(import.meta.url).pathname;`, + }, + external: ["commander", "dockerode", "dotenv", "ethers", "inquirer", "update-check", "ssh2"] + + }, + watch: true, +}; diff --git a/esbuild.config.js b/esbuild.config.js index 79dc3566..a37d3e48 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -1,13 +1,18 @@ -const esbuild = require("esbuild"); +/* eslint-disable no-undef -- Allow process and console in ignored file */ + +import esbuild from "esbuild"; + const isProduction = process.env.NODE_ENV === "production"; -const config = require(isProduction ? "./esbuild.config.prod" : "./esbuild.config.dev"); +const config = isProduction + ? await import("./esbuild.config.prod.js") + : await import("./esbuild.config.dev.js"); const run = async () => { - if (config.watch) { - const context = await esbuild.context(config.context); + if (config.default.watch) { + const context = await esbuild.context(config.default.context); await context.watch(); } else { - await esbuild.build(config.context); + await esbuild.build(config.default.context); } }; diff --git a/esbuild.config.prod b/esbuild.config.prod deleted file mode 100644 index 41a349d4..00000000 --- a/esbuild.config.prod +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - context: { - tsconfig: "./tsconfig.json", - entryPoints: ["src/index.ts"], - bundle: true, // Bundle all dependencies - outfile: "dist/index.js", // Output file - platform: "node", - target: "es2020", - define: { 'import.meta.url': '_importMetaUrl' }, - banner: { - js: "const _importMetaUrl=require('url').pathToFileURL(__filename)", - }, - external: ['ssh2'], - }, - watch: false, -}; diff --git a/esbuild.config.prod.js b/esbuild.config.prod.js new file mode 100644 index 00000000..69e8e550 --- /dev/null +++ b/esbuild.config.prod.js @@ -0,0 +1,16 @@ +export default { + context: { + tsconfig: "./tsconfig.json", + entryPoints: ["src/index.ts"], + bundle: true, + outfile: "dist/index.js", + platform: "node", + target: "es2020", + define: { "import.meta.url": "_importMetaUrl" }, + banner: { + js: `const _importMetaUrl = new URL(import.meta.url).pathname;`, + }, + external: ["commander", "dockerode", "dotenv", "ethers", "inquirer", "update-check", "ssh2"] + }, + watch: false, +}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..22a5c517 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,59 @@ +import js from "@eslint/js"; +import tseslint from "@typescript-eslint/eslint-plugin"; +import tsparser from "@typescript-eslint/parser"; +import prettier from "eslint-config-prettier"; +import importPlugin from "eslint-plugin-import"; + +export default [ + js.configs.recommended, + prettier, + { + languageOptions: { + parser: tsparser, + parserOptions: { + project: ["./tsconfig.json"], + sourceType: "module", + }, + }, + ignores: [ + "**/dist/**/*", + "esbuild.config.js", + "esbuild.config.dev.js", + "esbuild.config.prod.js", + "jest.config.js", + "eslint.config.js", + "Config.js", + "commitLint.config.ts", + "scripts/postinstall.js" + ], + plugins: { + "@typescript-eslint": tseslint, + import: importPlugin, + }, + rules: { + "import/namespace": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-empty-interface": "off", + "no-constant-condition": "off", + "@typescript-eslint/no-explicit-any": "off", + "prefer-const": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/no-loss-of-precision": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-non-null-asserted-optional-chain": "off", + "@typescript-eslint/no-var-requires": "off", + "import/export": "off", + "no-fallthrough": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-floating-promises": ["error"], + "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], + }, + settings: { + "import/resolver": { + typescript: {}, + }, + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index d74a8e8c..1a3e9609 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "commander": "^12.0.0", + "commander": "^13.1.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", "ethers": "^6.13.4", @@ -27,7 +27,7 @@ "genlayer": "dist/index.js" }, "devDependencies": { - "@release-it/conventional-changelog": "^8.0.1", + "@release-it/conventional-changelog": "^10.0.0", "@types/dockerode": "^3.3.31", "@types/inquirer": "^9.0.7", "@types/node": "^22.0.0", @@ -38,13 +38,13 @@ "@vitest/coverage-v8": "^2.1.4", "cross-env": "^7.0.3", "esbuild": "^0.25.0", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^10.0.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "jsdom": "^26.0.0", "prettier": "^3.2.5", - "release-it": "^17.2.0", + "release-it": "^18.0.0", "ts-node": "^10.9.2", "typescript": "^5.4.5" } @@ -119,13 +119,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz", - "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", + "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.7" + "@babel/types": "^7.26.9" }, "bin": { "parser": "bin/babel-parser.js" @@ -135,9 +135,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz", - "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", + "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", "dev": true, "license": "MIT", "dependencies": { @@ -161,6 +161,32 @@ "dev": true, "license": "MIT" }, + "node_modules/@conventional-changelog/git-client": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-1.0.1.tgz", + "integrity": "sha512-PJEqBwAleffCMETaVm/fUgHldzBE35JFk3/9LL6NUA5EXa3qednu+UT6M7E5iBu3zIQZCULYIiZ90fBYHt6xUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/semver": "^7.5.5", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0" + }, + "peerDependenciesMeta": { + "conventional-commits-filter": { + "optional": true + }, + "conventional-commits-parser": { + "optional": true + } + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -752,16 +778,64 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/core": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", + "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -769,7 +843,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -798,18 +872,52 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", + "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.12.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@grpc/grpc-js": { - "version": "1.12.5", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.5.tgz", - "integrity": "sha512-d3iiHxdpg5+ZcJ6jnDSOT8Z0O0VMVGy34jAnYLUX8yd36b1qn8f1TwOA/Lc7TsOh03IkPJ38eGI5qD2EjNkoEA==", + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", + "integrity": "sha512-JXUj6PI0oqqzTGvKtzOkxtpsyPRNsrmhh41TtIz/zEB6J+AUiZZ0dxWzcMwO9Ns5rmSPuMdghlTbUuqIM48d3Q==", "license": "Apache-2.0", "dependencies": { "@grpc/proto-loader": "^0.7.13", @@ -837,41 +945,39 @@ "node": ">=6" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "license": "Apache-2.0", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "license": "Apache-2.0", "engines": { - "node": "*" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -887,12 +993,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "license": "BSD-3-Clause" + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@hutson/parse-repository-url": { "version": "5.0.0", @@ -983,15 +1095,6 @@ } } }, - "node_modules/@inquirer/core/node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/@inquirer/editor": { "version": "4.2.7", "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.7.tgz", @@ -1242,19 +1345,6 @@ "node": ">=12" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "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", @@ -1293,22 +1383,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", @@ -1427,6 +1501,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1440,6 +1515,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1449,6 +1525,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -1469,9 +1546,9 @@ } }, "node_modules/@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", + "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", "dev": true, "license": "MIT", "engines": { @@ -1479,48 +1556,48 @@ } }, "node_modules/@octokit/core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz", - "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz", + "integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.1.0", - "@octokit/request": "^8.3.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "@octokit/auth-token": "^5.0.0", + "@octokit/graphql": "^8.1.2", + "@octokit/request": "^9.2.1", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", + "before-after-hook": "^3.0.2", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/endpoint": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.5.tgz", - "integrity": "sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz", + "integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" + "@octokit/types": "^13.6.2", + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/graphql": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz", - "integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz", + "integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/request": "^8.3.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^6.0.0" + "@octokit/request": "^9.2.2", + "@octokit/types": "^13.8.0", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" @@ -1534,92 +1611,91 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.1.tgz", - "integrity": "sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==", + "version": "11.4.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz", + "integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.7.0" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/plugin-request-log": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz", - "integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz", + "integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==", "dev": true, "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz", - "integrity": "sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz", + "integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.8.0" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "^5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/request": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz", - "integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz", + "integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/endpoint": "^9.0.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" + "@octokit/endpoint": "^10.1.3", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", + "fast-content-type-parse": "^2.0.0", + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/request-error": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz", - "integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz", + "integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.1.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "@octokit/types": "^13.6.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/rest": { - "version": "20.1.1", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.1.1.tgz", - "integrity": "sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw==", + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz", + "integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/core": "^5.0.2", - "@octokit/plugin-paginate-rest": "11.3.1", - "@octokit/plugin-request-log": "^4.0.0", - "@octokit/plugin-rest-endpoint-methods": "13.2.2" + "@octokit/core": "^6.1.2", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/plugin-request-log": "^5.3.1", + "@octokit/plugin-rest-endpoint-methods": "^13.0.0" }, "engines": { "node": ">= 18" @@ -1756,23 +1832,23 @@ "license": "BSD-3-Clause" }, "node_modules/@release-it/conventional-changelog": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@release-it/conventional-changelog/-/conventional-changelog-8.0.2.tgz", - "integrity": "sha512-WpnWWRr7O0JeLoiejLrPEWnnwFhCscBn1wBTAXeitiz2/Ifaol0s+t8otf/HYq/OiQOri2iH8d0CnVb72tBdIQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@release-it/conventional-changelog/-/conventional-changelog-10.0.0.tgz", + "integrity": "sha512-49qf9phGmPUIGpY2kwfgehs9en1znbPv2zdNn1WMLAH9DtHUh4m6KNSB+mLFGAMUhv24JhsA8ruYRYgluc2UJw==", "dev": true, "license": "MIT", "dependencies": { "concat-stream": "^2.0.0", - "conventional-changelog": "^5.1.0", - "conventional-recommended-bump": "^9.0.0", + "conventional-changelog": "^6.0.0", + "conventional-recommended-bump": "^10.0.0", "git-semver-tags": "^8.0.0", "semver": "^7.6.3" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || ^22.0.0" + "node": "^20.9.0 || >=22.0.0" }, "peerDependencies": { - "release-it": "^17.0.0" + "release-it": "^18.0.0" } }, "node_modules/@rtsao/scc": { @@ -1856,10 +1932,17 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@sec-ant/readable-stream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", + "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", + "dev": true, + "license": "MIT" + }, "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", "dev": true, "license": "MIT", "engines": { @@ -1944,6 +2027,12 @@ "rxjs": "^7.2.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -1966,6 +2055,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/parse-path": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/parse-path/-/parse-path-7.0.3.tgz", + "integrity": "sha512-LriObC2+KYZD3FzCrgWGv/qufdUy4eXrxcLgQMfYXgPbLIecKIsVBaQgUPmxSSLcjmYbDTQbMgr6qr6l/eb7Bg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -2001,9 +2097,9 @@ } }, "node_modules/@types/ssh2/node_modules/@types/node": { - "version": "18.19.75", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.75.tgz", - "integrity": "sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==", + "version": "18.19.76", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.76.tgz", + "integrity": "sha512-yvR7Q9LdPz2vGpmpJX5LolrgRdWvB67MJKDPSgIIzpFbaf9a1j/f5DnLp5VDyHGMR0QZHlTr1afsD87QCXFHKw==", "dev": true, "license": "MIT", "dependencies": { @@ -2227,12 +2323,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "license": "ISC" - }, "node_modules/@vitest/coverage-v8": { "version": "2.1.9", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.9.tgz", @@ -2476,6 +2566,16 @@ "string-width": "^4.1.0" } }, + "node_modules/ansi-align/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-align/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2498,6 +2598,19 @@ "node": ">=8" } }, + "node_modules/ansi-align/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2513,25 +2626,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { @@ -2810,9 +2915,9 @@ } }, "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", + "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==", "dev": true, "license": "Apache-2.0" }, @@ -2850,19 +2955,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boxen/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/boxen/node_modules/ansi-styles": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", @@ -2889,33 +2981,17 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/boxen/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==", + "node_modules/boxen/node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=12" + "node": ">=16" }, "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/boxen/node_modules/wrap-ansi": { @@ -3042,9 +3118,9 @@ } }, "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3093,9 +3169,9 @@ } }, "node_modules/chai": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", - "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", @@ -3226,6 +3302,15 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3246,6 +3331,18 @@ "node": ">=8" } }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3263,16 +3360,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3305,9 +3392,9 @@ } }, "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "license": "MIT", "engines": { "node": ">=18" @@ -3393,9 +3480,9 @@ } }, "node_modules/configstore/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -3406,262 +3493,222 @@ } }, "node_modules/conventional-changelog": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-5.1.0.tgz", - "integrity": "sha512-aWyE/P39wGYRPllcCEZDxTVEmhyLzTc9XA6z6rVfkuCD2UBnhV/sgSOKbQrEG5z9mEZJjnopjgQooTKxEg8mAg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-6.0.0.tgz", + "integrity": "sha512-tuUH8H/19VjtD9Ig7l6TQRh+Z0Yt0NZ6w/cCkkyzUbGQTnUEmKfGtkC9gGfVgCfOL1Rzno5NgNF4KY8vR+Jo3w==", "dev": true, "license": "MIT", "dependencies": { - "conventional-changelog-angular": "^7.0.0", - "conventional-changelog-atom": "^4.0.0", - "conventional-changelog-codemirror": "^4.0.0", - "conventional-changelog-conventionalcommits": "^7.0.2", - "conventional-changelog-core": "^7.0.0", - "conventional-changelog-ember": "^4.0.0", - "conventional-changelog-eslint": "^5.0.0", - "conventional-changelog-express": "^4.0.0", - "conventional-changelog-jquery": "^5.0.0", - "conventional-changelog-jshint": "^4.0.0", - "conventional-changelog-preset-loader": "^4.1.0" + "conventional-changelog-angular": "^8.0.0", + "conventional-changelog-atom": "^5.0.0", + "conventional-changelog-codemirror": "^5.0.0", + "conventional-changelog-conventionalcommits": "^8.0.0", + "conventional-changelog-core": "^8.0.0", + "conventional-changelog-ember": "^5.0.0", + "conventional-changelog-eslint": "^6.0.0", + "conventional-changelog-express": "^5.0.0", + "conventional-changelog-jquery": "^6.0.0", + "conventional-changelog-jshint": "^5.0.0", + "conventional-changelog-preset-loader": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.0.0.tgz", + "integrity": "sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==", "dev": true, "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-atom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-4.0.0.tgz", - "integrity": "sha512-q2YtiN7rnT1TGwPTwjjBSIPIzDJCRE+XAUahWxnh+buKK99Kks4WLMHoexw38GXx9OUxAsrp44f9qXe5VEMYhw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-5.0.0.tgz", + "integrity": "sha512-WfzCaAvSCFPkznnLgLnfacRAzjgqjLUjvf3MftfsJzQdDICqkOOpcMtdJF3wTerxSpv2IAAjX8doM3Vozqle3g==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-codemirror": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-4.0.0.tgz", - "integrity": "sha512-hQSojc/5imn1GJK3A75m9hEZZhc3urojA5gMpnar4JHmgLnuM3CUIARPpEk86glEKr3c54Po3WV/vCaO/U8g3Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-5.0.0.tgz", + "integrity": "sha512-8gsBDI5Y3vrKUCxN6Ue8xr6occZ5nsDEc4C7jO/EovFGozx8uttCAyfhRrvoUAWi2WMm3OmYs+0mPJU7kQdYWQ==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", - "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-8.0.0.tgz", + "integrity": "sha512-eOvlTO6OcySPyyyk8pKz2dP4jjElYunj9hn9/s0OB+gapTO8zwS9UQWrZ1pmF2hFs3vw1xhonOLGcGjy/zgsuA==", "dev": true, "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-core": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-7.0.0.tgz", - "integrity": "sha512-UYgaB1F/COt7VFjlYKVE/9tTzfU3VUq47r6iWf6lM5T7TlOxr0thI63ojQueRLIpVbrtHK4Ffw+yQGduw2Bhdg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-8.0.0.tgz", + "integrity": "sha512-EATUx5y9xewpEe10UEGNpbSHRC6cVZgO+hXQjofMqpy+gFIrcGvH3Fl6yk2VFKh7m+ffenup2N7SZJYpyD9evw==", "dev": true, "license": "MIT", "dependencies": { "@hutson/parse-repository-url": "^5.0.0", "add-stream": "^1.0.0", - "conventional-changelog-writer": "^7.0.0", - "conventional-commits-parser": "^5.0.0", - "git-raw-commits": "^4.0.0", - "git-semver-tags": "^7.0.0", + "conventional-changelog-writer": "^8.0.0", + "conventional-commits-parser": "^6.0.0", + "git-raw-commits": "^5.0.0", + "git-semver-tags": "^8.0.0", "hosted-git-info": "^7.0.0", "normalize-package-data": "^6.0.0", - "read-pkg": "^8.0.0", - "read-pkg-up": "^10.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/conventional-changelog-core/node_modules/git-semver-tags": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-7.0.1.tgz", - "integrity": "sha512-NY0ZHjJzyyNXHTDZmj+GG7PyuAKtMsyWSwh07CR2hOZFa+/yoTsXci/nF2obzL8UDhakFNkD9gNdt/Ed+cxh2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "meow": "^12.0.1", - "semver": "^7.5.2" - }, - "bin": { - "git-semver-tags": "cli.mjs" + "read-package-up": "^11.0.0", + "read-pkg": "^9.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-ember": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-4.0.0.tgz", - "integrity": "sha512-D0IMhwcJUg1Y8FSry6XAplEJcljkHVlvAZddhhsdbL1rbsqRsMfGx/PIkPYq0ru5aDgn+OxhQ5N5yR7P9mfsvA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-5.0.0.tgz", + "integrity": "sha512-RPflVfm5s4cSO33GH/Ey26oxhiC67akcxSKL8CLRT3kQX2W3dbE19sSOM56iFqUJYEwv9mD9r6k79weWe1urfg==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-eslint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-5.0.0.tgz", - "integrity": "sha512-6JtLWqAQIeJLn/OzUlYmzd9fKeNSWmQVim9kql+v4GrZwLx807kAJl3IJVc3jTYfVKWLxhC3BGUxYiuVEcVjgA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-6.0.0.tgz", + "integrity": "sha512-eiUyULWjzq+ybPjXwU6NNRflApDWlPEQEHvI8UAItYW/h22RKkMnOAtfCZxMmrcMO1OKUWtcf2MxKYMWe9zJuw==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-express": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-4.0.0.tgz", - "integrity": "sha512-yWyy5c7raP9v7aTvPAWzqrztACNO9+FEI1FSYh7UP7YT1AkWgv5UspUeB5v3Ibv4/o60zj2o9GF2tqKQ99lIsw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-5.0.0.tgz", + "integrity": "sha512-D8Q6WctPkQpvr2HNCCmwU5GkX22BVHM0r4EW8vN0230TSyS/d6VQJDAxGb84lbg0dFjpO22MwmsikKL++Oo/oQ==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-jquery": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-5.0.0.tgz", - "integrity": "sha512-slLjlXLRNa/icMI3+uGLQbtrgEny3RgITeCxevJB+p05ExiTgHACP5p3XiMKzjBn80n+Rzr83XMYfRInEtCPPw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-6.0.0.tgz", + "integrity": "sha512-2kxmVakyehgyrho2ZHBi90v4AHswkGzHuTaoH40bmeNqUt20yEkDOSpw8HlPBfvEQBwGtbE+5HpRwzj6ac2UfA==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-jshint": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-4.0.0.tgz", - "integrity": "sha512-LyXq1bbl0yG0Ai1SbLxIk8ZxUOe3AjnlwE6sVRQmMgetBk+4gY9EO3d00zlEt8Y8gwsITytDnPORl8al7InTjg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-5.0.0.tgz", + "integrity": "sha512-gGNphSb/opc76n2eWaO6ma4/Wqu3tpa2w7i9WYqI6Cs2fncDSI2/ihOfMvXveeTTeld0oFvwMVNV+IYQIk3F3g==", "dev": true, "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-preset-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-4.1.0.tgz", - "integrity": "sha512-HozQjJicZTuRhCRTq4rZbefaiCzRM2pr6u2NL3XhrmQm4RMnDXfESU6JKu/pnKwx5xtdkYfNCsbhN5exhiKGJA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-5.0.0.tgz", + "integrity": "sha512-SetDSntXLk8Jh1NOAl1Gu5uLiCNSYenB5tm0YVeZKePRIgDW9lQImromTwLa3c/Gae298tsgOM+/CYT9XAl0NA==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-writer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-7.0.1.tgz", - "integrity": "sha512-Uo+R9neH3r/foIvQ0MKcsXkX642hdm9odUp7TqgFS7BsalTcjzRlIfWZrZR1gbxOozKucaKt5KAbjW8J8xRSmA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-8.0.1.tgz", + "integrity": "sha512-hlqcy3xHred2gyYg/zXSMXraY2mjAYYo0msUCpK+BGyaVJMFCKWVXPIHiaacGO2GGp13kvHWXFhYmxT4QQqW3Q==", "dev": true, "license": "MIT", "dependencies": { - "conventional-commits-filter": "^4.0.0", + "conventional-commits-filter": "^5.0.0", "handlebars": "^4.7.7", - "json-stringify-safe": "^5.0.1", - "meow": "^12.0.1", - "semver": "^7.5.2", - "split2": "^4.0.0" + "meow": "^13.0.0", + "semver": "^7.5.2" }, "bin": { - "conventional-changelog-writer": "cli.mjs" + "conventional-changelog-writer": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-commits-filter": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-4.0.0.tgz", - "integrity": "sha512-rnpnibcSOdFcdclpFwWa+pPlZJhXE7l+XK04zxhbWrhgpR96h33QLz8hITTXbcYICxVr3HZFtbtUAQ+4LdBo9A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-5.0.0.tgz", + "integrity": "sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-commits-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", - "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.1.0.tgz", + "integrity": "sha512-5nxDo7TwKB5InYBl4ZC//1g9GRwB/F3TXOGR9hgUjMGfvSP4Vu5NkpNro2+1+TIEy1vwxApl5ircECr2ri5JIw==", "dev": true, "license": "MIT", "dependencies": { - "is-text-path": "^2.0.0", - "JSONStream": "^1.3.5", - "meow": "^12.0.1", - "split2": "^4.0.0" + "meow": "^13.0.0" }, "bin": { - "conventional-commits-parser": "cli.mjs" + "conventional-commits-parser": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-recommended-bump": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-9.0.0.tgz", - "integrity": "sha512-HR1yD0G5HgYAu6K0wJjLd7QGRK8MQDqqj6Tn1n/ja1dFwBCE6QmV+iSgQ5F7hkx7OUR/8bHpxJqYtXj2f/opPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "conventional-changelog-preset-loader": "^4.1.0", - "conventional-commits-filter": "^4.0.0", - "conventional-commits-parser": "^5.0.0", - "git-raw-commits": "^4.0.0", - "git-semver-tags": "^7.0.0", - "meow": "^12.0.1" - }, - "bin": { - "conventional-recommended-bump": "cli.mjs" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/conventional-recommended-bump/node_modules/git-semver-tags": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-7.0.1.tgz", - "integrity": "sha512-NY0ZHjJzyyNXHTDZmj+GG7PyuAKtMsyWSwh07CR2hOZFa+/yoTsXci/nF2obzL8UDhakFNkD9gNdt/Ed+cxh2Q==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-10.0.0.tgz", + "integrity": "sha512-RK/fUnc2btot0oEVtrj3p2doImDSs7iiz/bftFCDzels0Qs1mxLghp+DFHMaOC0qiCI6sWzlTDyBFSYuot6pRA==", "dev": true, "license": "MIT", "dependencies": { - "meow": "^12.0.1", - "semver": "^7.5.2" + "@conventional-changelog/git-client": "^1.0.0", + "conventional-changelog-preset-loader": "^5.0.0", + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0", + "meow": "^13.0.0" }, "bin": { - "git-semver-tags": "cli.mjs" + "conventional-recommended-bump": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cosmiconfig": { @@ -3691,20 +3738,6 @@ } } }, - "node_modules/cosmiconfig/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/cosmiconfig/node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, "node_modules/cosmiconfig/node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -3792,19 +3825,6 @@ "node": ">=18" } }, - "node_modules/dargs": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", - "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -3955,19 +3975,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -4039,13 +4046,6 @@ "node": ">=0.4.0" } }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "dev": true, - "license": "ISC" - }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -4103,15 +4103,15 @@ } }, "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "node_modules/dot-prop": { @@ -4177,9 +4177,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", - "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", "dev": true, "license": "MIT", "dependencies": { @@ -4340,12 +4340,15 @@ } }, "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-to-primitive": { @@ -4463,59 +4466,62 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.20.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", + "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.11.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.20.0", + "@eslint/plugin-kit": "^0.2.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-config-prettier": { @@ -4664,18 +4670,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4698,16 +4692,16 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4735,6 +4729,18 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4748,17 +4754,29 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4879,24 +4897,27 @@ "license": "MIT" }, "node_modules/execa": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.0.tgz", - "integrity": "sha512-CTNS0BcKBcoOsawKBlpcKNmK4Kjuyz5jVLhf+PUsHGMqiKMVTa4cN3U7r7bRY8KTpfOGpXMo27fdy0dYVg2pqA==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.5.2.tgz", + "integrity": "sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q==", "dev": true, "license": "MIT", "dependencies": { + "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", + "figures": "^6.1.0", + "get-stream": "^9.0.0", + "human-signals": "^8.0.0", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^6.0.0", + "pretty-ms": "^9.0.0", "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.0.0" }, "engines": { - "node": ">=16.17" + "node": "^18.19.0 || >=20.5.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" @@ -4925,6 +4946,23 @@ "node": ">=4" } }, + "node_modules/fast-content-type-parse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", + "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4977,6 +5015,7 @@ "version": "1.19.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -5005,16 +5044,32 @@ "node": "^12.20 || >= 14.13" } }, + "node_modules/figures": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", + "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -5046,30 +5101,42 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "license": "ISC" }, "node_modules/for-each": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.4.tgz", - "integrity": "sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "license": "MIT", "dependencies": { "is-callable": "^1.2.7" @@ -5099,14 +5166,15 @@ } }, "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", "devOptional": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" }, "engines": { @@ -5135,6 +5203,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -5260,13 +5329,17 @@ } }, "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", "dev": true, "license": "MIT", + "dependencies": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5328,21 +5401,20 @@ } }, "node_modules/git-raw-commits": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz", - "integrity": "sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-5.0.0.tgz", + "integrity": "sha512-I2ZXrXeOc0KrCvC7swqtIFXFN+rbjnC7b2T943tvemIOVNl+XP8YnA9UVwqFhzzLClnSA60KR/qEjLpXzs73Qg==", "dev": true, "license": "MIT", "dependencies": { - "dargs": "^8.0.0", - "meow": "^12.0.1", - "split2": "^4.0.0" + "@conventional-changelog/git-client": "^1.0.0", + "meow": "^13.0.0" }, "bin": { - "git-raw-commits": "cli.mjs" + "git-raw-commits": "src/cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/git-semver-tags": { @@ -5362,94 +5434,25 @@ "node": ">=18" } }, - "node_modules/git-semver-tags/node_modules/@conventional-changelog/git-client": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-1.0.1.tgz", - "integrity": "sha512-PJEqBwAleffCMETaVm/fUgHldzBE35JFk3/9LL6NUA5EXa3qednu+UT6M7E5iBu3zIQZCULYIiZ90fBYHt6xUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/semver": "^7.5.5", - "semver": "^7.5.2" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "conventional-commits-filter": "^5.0.0", - "conventional-commits-parser": "^6.0.0" - }, - "peerDependenciesMeta": { - "conventional-commits-filter": { - "optional": true - }, - "conventional-commits-parser": { - "optional": true - } - } - }, - "node_modules/git-semver-tags/node_modules/conventional-commits-filter": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-5.0.0.tgz", - "integrity": "sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/git-semver-tags/node_modules/conventional-commits-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.0.0.tgz", - "integrity": "sha512-TbsINLp48XeMXR8EvGjTnKGsZqBemisPoyWESlpRyR8lif0lcwzqz+NMtYSj1ooF/WYjSuu7wX0CtdeeMEQAmA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "meow": "^13.0.0" - }, - "bin": { - "conventional-commits-parser": "dist/cli/index.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/git-semver-tags/node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/git-up": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz", - "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-8.0.1.tgz", + "integrity": "sha512-2XFu1uNZMSjkyetaF+8rqn6P0XqpMq/C+2ycjI6YwrIKcszZ5/WR4UubxjN0lILOKqLkLaHDaCr2B6fP1cke6g==", "dev": true, "license": "MIT", "dependencies": { "is-ssh": "^1.4.0", - "parse-url": "^8.1.0" + "parse-url": "^9.2.0" } }, "node_modules/git-url-parse": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-14.0.0.tgz", - "integrity": "sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-16.0.0.tgz", + "integrity": "sha512-Y8iAF0AmCaqXc6a5GYgPQW9ESbncNLOL+CeQAJRhmWUOmnPkKpBYeWYp4mFd3LA5j53CdGDdslzX12yEBVHQQg==", "dev": true, "license": "MIT", "dependencies": { - "git-up": "^7.0.0" + "git-up": "^8.0.0" } }, "node_modules/glob": { @@ -5457,6 +5460,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -5489,6 +5493,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -5499,6 +5504,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -5534,15 +5540,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5585,6 +5588,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby/node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -5608,6 +5624,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, "license": "MIT" }, "node_modules/handlebars": { @@ -5781,13 +5798,13 @@ } }, "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.0.tgz", + "integrity": "sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=16.17.0" + "node": ">=18.18.0" } }, "node_modules/iconv-lite": { @@ -5856,11 +5873,25 @@ "node": ">=0.8.19" } }, + "node_modules/index-to-position": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-0.1.2.tgz", + "integrity": "sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -5905,15 +5936,6 @@ } } }, - "node_modules/inquirer/node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -6011,12 +6033,12 @@ } }, "node_modules/is-boolean-object": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", - "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -6225,19 +6247,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-installed-globally/node_modules/is-path-inside": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", - "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-interactive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", @@ -6313,12 +6322,29 @@ } }, "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-potential-custom-element-name": { @@ -6374,9 +6400,9 @@ } }, "node_modules/is-ssh": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz", - "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz", + "integrity": "sha512-JNeu1wQsHjyHgn9NcWTaXq6zWSR6hqE0++zhfZlkFBbScNkyvxCdeV8sRkSBaeLKxmbpR21brail63ACNxJ0Tg==", "dev": true, "license": "MIT", "dependencies": { @@ -6384,13 +6410,13 @@ } }, "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6429,19 +6455,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-text-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", - "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "text-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", @@ -6710,9 +6723,9 @@ } }, "node_modules/jsdom/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", "devOptional": true, "license": "MIT", "engines": { @@ -6738,14 +6751,11 @@ "license": "MIT" }, "node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "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, - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -6759,13 +6769,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "license": "MIT" }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "license": "ISC" - }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -6778,33 +6781,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT" - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "license": "(MIT OR Apache-2.0)", - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -6815,9 +6791,9 @@ } }, "node_modules/ky": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/ky/-/ky-1.7.4.tgz", - "integrity": "sha512-zYEr/gh7uLW2l4su11bmQ2M9xLgQLjyvx58UyNM/6nuqyWFHPX5ktMjvpev3F8QWdjSsHUpnWew4PBCswBNuMQ==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.7.5.tgz", + "integrity": "sha512-HzhziW6sc5m0pwi5M196+7cEBtbt0lCYi67wNsiwMUmz833wloE0gbzJPWKs1gliFKQb34huItDQX97LyOdPdA==", "dev": true, "license": "MIT", "engines": { @@ -6857,14 +6833,11 @@ } }, "node_modules/lines-and-columns": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", - "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "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, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } + "license": "MIT" }, "node_modules/locate-path": { "version": "6.0.0", @@ -6979,9 +6952,9 @@ } }, "node_modules/long": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.4.tgz", - "integrity": "sha512-qtzLbJE8hq7VabR3mISmVGtoXP8KGc2Z/AT8OuqlYD7JTR3oqrgwdjnk07wpj1twXxYmgDXgoKVWUG/fReSzHg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", "license": "Apache-2.0" }, "node_modules/loupe": { @@ -7064,13 +7037,13 @@ } }, "node_modules/meow": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", - "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", "dev": true, "license": "MIT", "engines": { - "node": ">=16.10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7204,19 +7177,18 @@ "license": "MIT" }, "node_modules/mute-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", - "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", - "dev": true, - "license": "ISC", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/nan": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", - "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.1.tgz", + "integrity": "sha512-pfRR4ZcNTSm2ZFHaztuvbICf+hyiG6ecA06SfAxoPmuHjvMu0KUIae7Y8GyVkbBqeEIidsmXeYooWIX9+qjfRQ==", "license": "MIT", "optional": true }, @@ -7343,16 +7315,17 @@ } }, "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", + "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^4.0.0" + "path-key": "^4.0.0", + "unicorn-magic": "^0.3.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7371,6 +7344,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/npm-run-path/node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/nwsapi": { "version": "2.2.16", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.16.tgz", @@ -7379,9 +7365,9 @@ "license": "MIT" }, "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -7479,16 +7465,16 @@ } }, "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-function": "^5.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7553,19 +7539,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/ora/node_modules/chalk": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", @@ -7579,34 +7552,18 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/ora/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/os-name": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/os-name/-/os-name-5.1.0.tgz", - "integrity": "sha512-YEIoAnM6zFmzw3PQ201gCVCIWbXNyKObGlVvpAVvraAeOHnlYVKFssbA/riRX5R40WA6kKrZ7Dr7dWzO3nKSeQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-6.0.0.tgz", + "integrity": "sha512-bv608E0UX86atYi2GMGjDe0vF/X1TJjemNS8oEW6z22YW1Rc3QykSYoGfkQbX0zZX9H0ZB6CQP/3GTf1I5hURg==", "dev": true, "license": "MIT", "dependencies": { - "macos-release": "^3.1.0", - "windows-release": "^5.0.1" + "macos-release": "^3.2.0", + "windows-release": "^6.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7725,9 +7682,9 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz", - "integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", "dev": true, "license": "MIT", "dependencies": { @@ -7785,9 +7742,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/package-json/node_modules/registry-auth-token": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.3.tgz", - "integrity": "sha512-1bpc9IyC+e+CNFRaWyn77tk4xGG4PPUyfakSmA6F6cvUDjrm58dfyJ3II+9yb10EDkHoy1LaPSmHaWLOH3m6HA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", + "integrity": "sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==", "dev": true, "license": "MIT", "dependencies": { @@ -7826,42 +7783,53 @@ } }, "node_modules/parse-json": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", - "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.1.0.tgz", + "integrity": "sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.21.4", - "error-ex": "^1.3.2", - "json-parse-even-better-errors": "^3.0.0", - "lines-and-columns": "^2.0.3", - "type-fest": "^3.8.0" + "@babel/code-frame": "^7.22.13", + "index-to-position": "^0.1.2", + "type-fest": "^4.7.1" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parse-json/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=14.16" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-ms": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", + "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parse-path": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz", - "integrity": "sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.1.tgz", + "integrity": "sha512-6ReLMptznuuOEzLoGEa+I1oWRSj2Zna5jLWC+l6zlfAI4dbbSaIES29ThzuPkbhNahT65dWzfoZEO6cfJw2Ksg==", "dev": true, "license": "MIT", "dependencies": { @@ -7869,13 +7837,17 @@ } }, "node_modules/parse-url": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz", - "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-9.2.0.tgz", + "integrity": "sha512-bCgsFI+GeGWPAvAiUv63ZorMeif3/U0zaXABGJbOWt5OH2KCaPHF6S+0ok4aqM9RuIPGyZdx9tR9l13PsW4AYQ==", "dev": true, "license": "MIT", "dependencies": { + "@types/parse-path": "^7.0.0", "parse-path": "^7.0.0" + }, + "engines": { + "node": ">=14.13.0" } }, "node_modules/parse5": { @@ -7904,6 +7876,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7989,18 +7962,18 @@ } }, "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/postcss": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", - "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "funding": [ { "type": "opencollective", @@ -8050,6 +8023,22 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-ms": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", + "integrity": "sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-ms": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -8082,9 +8071,9 @@ } }, "node_modules/protocols": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", - "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.2.tgz", + "integrity": "sha512-hHVTzba3wboROl0/aWRRG9dMytgH6ow//STBZh43l/wQgmMhYhOFi0EHWAPtoCz9IAUymsyP0TSBHkhgMEGNnQ==", "dev": true, "license": "MIT" }, @@ -8164,6 +8153,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -8204,36 +8194,30 @@ "node": ">=0.10.0" } }, - "node_modules/read-pkg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-8.1.0.tgz", - "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", + "node_modules/read-package-up": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", + "integrity": "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/normalize-package-data": "^2.4.1", - "normalize-package-data": "^6.0.0", - "parse-json": "^7.0.0", - "type-fest": "^4.2.0" + "find-up-simple": "^1.0.0", + "read-pkg": "^9.0.0", + "type-fest": "^4.6.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-10.1.0.tgz", - "integrity": "sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==", + "node_modules/read-package-up/node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^6.3.0", - "read-pkg": "^8.1.0", - "type-fest": "^4.2.0" - }, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=16" }, @@ -8241,111 +8225,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "node_modules/read-pkg": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", + "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "@types/normalize-package-data": "^2.4.3", + "normalize-package-data": "^6.0.0", + "parse-json": "^8.0.0", + "type-fest": "^4.6.0", + "unicorn-magic": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/yocto-queue": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=12.20" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -8446,9 +8349,9 @@ } }, "node_modules/release-it": { - "version": "17.11.0", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-17.11.0.tgz", - "integrity": "sha512-qQGgfMbUZ3/vpXUPmngsgjFObOLjlkwtiozHUYen9fo9AEGciXjG1ZpGr+FNmuBT8R7TOSY+x/s84wOCRKJjbA==", + "version": "18.1.2", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-18.1.2.tgz", + "integrity": "sha512-HOVRcicehCgoCsPFOu0iCBlEC8GDOoKS5s6ICkWmqomGEoZtRQ88D3RCsI5MciSU8vAQU+aWZW2z57NQNNb74w==", "dev": true, "funding": [ { @@ -8463,25 +8366,26 @@ "license": "MIT", "dependencies": { "@iarna/toml": "2.2.5", - "@octokit/rest": "20.1.1", + "@octokit/rest": "21.0.2", "async-retry": "1.3.3", "chalk": "5.4.1", "ci-info": "^4.1.0", "cosmiconfig": "9.0.0", - "execa": "8.0.0", - "git-url-parse": "14.0.0", + "execa": "9.5.2", + "git-url-parse": "16.0.0", "globby": "14.0.2", - "inquirer": "9.3.2", + "inquirer": "12.3.0", "issue-parser": "7.0.1", "lodash": "4.17.21", "mime-types": "2.1.35", "new-github-release-url": "2.0.0", "open": "10.1.0", "ora": "8.1.1", - "os-name": "5.1.0", + "os-name": "6.0.0", "proxy-agent": "6.5.0", "semver": "7.6.3", "shelljs": "0.8.5", + "undici": "6.21.1", "update-notifier": "7.3.1", "url-join": "5.0.0", "wildcard-match": "5.1.4", @@ -8491,7 +8395,7 @@ "release-it": "bin/release-it.js" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || ^22.0.0" + "node": "^20.9.0 || >=22.0.0" } }, "node_modules/release-it/node_modules/chalk": { @@ -8507,186 +8411,26 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/release-it/node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/release-it/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, "node_modules/release-it/node_modules/inquirer": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.2.tgz", - "integrity": "sha512-+ynEbhWKhyomnaX0n2aLIMSkgSlGB5RrWbNXnEqj6mdaIydu6y40MdBjL38SAB0JcdmOaIaMua1azdjLEr3sdw==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.3.0.tgz", + "integrity": "sha512-3NixUXq+hM8ezj2wc7wC37b32/rHq1MwNZDYdvx+d6jokOD+r+i8Q4Pkylh9tISYP114A128LCX8RKhopC5RfQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.3", + "@inquirer/core": "^10.1.2", + "@inquirer/prompts": "^7.2.1", + "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "external-editor": "^3.1.0", - "mute-stream": "1.0.0", - "ora": "^5.4.1", + "mute-stream": "^2.0.0", "run-async": "^3.0.0", - "rxjs": "^7.8.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.1" + "rxjs": "^7.8.1" }, "engines": { "node": ">=18" - } - }, - "node_modules/release-it/node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/release-it/node_modules/inquirer/node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/release-it/node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/release-it/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/release-it/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" }, - "engines": { - "node": ">=8" + "peerDependencies": { + "@types/node": ">=18" } }, "node_modules/release-it/node_modules/semver": { @@ -8702,28 +8446,6 @@ "node": ">=10" } }, - "node_modules/release-it/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/release-it/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -8789,22 +8511,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -8818,34 +8524,19 @@ "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, "node_modules/rollup": { "name": "@rollup/wasm-node", - "version": "4.34.2", - "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.34.2.tgz", - "integrity": "sha512-+lN8XHBdka9vIq0Hdsn1NLjdRYQXG1eoFCQws8K7KXPfw2jE0j1c3rSAi50pVrk9ykVPDJHoPq79twHOA5RvGg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.34.8.tgz", + "integrity": "sha512-+bu9Ce1VDob+hfEQYPwC03Lds+ACDlGVwuWeLZE2fN+O52O74RZ0F5engVpv7i2YDyTyj4oU/NKO4pjSXMdn6g==", "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -8893,6 +8584,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -9225,9 +8917,9 @@ } }, "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.4", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", + "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9315,16 +9007,6 @@ "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==", "license": "ISC" }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 10.x" - } - }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", @@ -9424,6 +9106,16 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9431,33 +9123,17 @@ "dev": true, "license": "MIT" }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/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==", + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/string.prototype.trim": { @@ -9517,15 +9193,19 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/strip-ansi-cjs": { @@ -9542,6 +9222,16 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -9552,13 +9242,13 @@ } }, "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9687,32 +9377,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-extensions": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", - "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "license": "MIT" - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, - "license": "MIT" - }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -9798,22 +9462,22 @@ } }, "node_modules/tldts": { - "version": "6.1.76", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.76.tgz", - "integrity": "sha512-6U2ti64/nppsDxQs9hw8ephA3nO6nSQvVVfxwRw8wLQPFtLI1cFI1a1eP22g+LUP+1TA2pKKjUTwWB+K2coqmQ==", + "version": "6.1.78", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.78.tgz", + "integrity": "sha512-fSgYrW0ITH0SR/CqKMXIruYIPpNu5aDgUp22UhYoSrnUQwc7SBqifEBFNce7AAcygUPBo6a/gbtcguWdmko4RQ==", "devOptional": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.76" + "tldts-core": "^6.1.78" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.76", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.76.tgz", - "integrity": "sha512-uzhJ02RaMzgQR3yPoeE65DrcHI6LoM4saUqXOt/b5hmb3+mc4YWpdSeAQqVqRUlQ14q8ZuLRWyBR1ictK1dzzg==", + "version": "6.1.78", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.78.tgz", + "integrity": "sha512-jS0svNsB99jR6AJBmfmEWuKIgz91Haya91Z43PATaeHJ24BkMoNRb/jlaD37VYjb0mYf6gRL/HOnvS1zEnYBiw==", "devOptional": true, "license": "MIT" }, @@ -9843,9 +9507,9 @@ } }, "node_modules/tough-cookie": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.0.tgz", - "integrity": "sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.1.tgz", + "integrity": "sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==", "devOptional": true, "license": "BSD-3-Clause", "dependencies": { @@ -9962,9 +9626,9 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -10106,6 +9770,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici": { + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/undici-types": { "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", @@ -10126,9 +9800,9 @@ } }, "node_modules/universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", + "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==", "dev": true, "license": "ISC" }, @@ -10879,16 +10553,6 @@ "node": ">=18" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/web-streams-polyfill": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", @@ -10945,9 +10609,9 @@ } }, "node_modules/whatwg-url": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.0.tgz", - "integrity": "sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.1.tgz", + "integrity": "sha512-mDGf9diDad/giZ/Sm9Xi2YcyzaFpbdLpJPr+E9fSkyQ7KpQD4SdFcugkRQYzhmfI4KeV4Qpnn2sKPdo+kmsgRQ==", "devOptional": true, "license": "MIT", "dependencies": { @@ -11104,135 +10768,137 @@ "license": "ISC" }, "node_modules/windows-release": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-5.1.1.tgz", - "integrity": "sha512-NMD00arvqcq2nwqc5Q6KtrSRHK+fVD31erE5FEMahAw5PmVCgD7MUXodq3pdZSUkqA9Cda2iWx6s1XYwiJWRmw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-6.0.1.tgz", + "integrity": "sha512-MS3BzG8QK33dAyqwxfYJCJ03arkwKaddUOvvnnlFdXLudflsQF6I8yAxrLBeQk4yO8wjdH/+ax0YzxJEDrOftg==", "dev": true, "license": "MIT", "dependencies": { - "execa": "^5.1.1" + "execa": "^8.0.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/windows-release/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/windows-release/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/windows-release/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=10.17.0" + "node": ">=16.17.0" } }, "node_modules/windows-release/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/windows-release/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/windows-release/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/windows-release/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/windows-release/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/windows-release/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "license": "ISC" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/windows-release/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/word-wrap": { @@ -11284,6 +10950,16 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -11306,6 +10982,28 @@ "node": ">=8" } }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -11326,6 +11024,18 @@ "node": ">=8" } }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -11419,6 +11129,15 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -11439,6 +11158,18 @@ "node": ">=8" } }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -11461,6 +11192,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yoctocolors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", + "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yoctocolors-cjs": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", diff --git a/package.json b/package.json index 49adac94..5fbb40a6 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.12.1", "description": "GenLayer Command Line Tool", "main": "src/index.ts", + "type": "module", "bin": { "genlayer": "./dist/index.js" }, @@ -56,7 +57,7 @@ "typescript": "^5.4.5" }, "dependencies": { - "commander": "^12.0.0", + "commander": "^13.1.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", "ethers": "^6.13.4", diff --git a/scripts/postinstall.js b/scripts/postinstall.js index d1f1326c..de204e96 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -1,16 +1,20 @@ #!/usr/bin/env node +/* eslint-disable no-undef -- Allow process and console in ignored file */ -const fs = require('fs'); -const path = require('path'); +import { existsSync, copyFileSync } from 'fs'; +import { resolve, dirname } from 'path'; +import { fileURLToPath } from 'url'; -const envExamplePath = path.resolve(__dirname, '../.env.example'); -const envPath = path.resolve(__dirname, '../.env'); +const __dirname = dirname(fileURLToPath(import.meta.url)); + +const envExamplePath = resolve(__dirname, '../.env.example'); +const envPath = resolve(__dirname, '../.env'); try { - if (fs.existsSync(envPath)) { + if (existsSync(envPath)) { console.log(`⚠️ .env file already exists. Skipping creation.`); } else { - fs.copyFileSync(envExamplePath, envPath); + copyFileSync(envExamplePath, envPath); console.log(`✅ .env file created successfully from .env.example.`); } } catch (error) { diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 9c1a7934..58713ed4 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -1,4 +1,5 @@ import inquirer from "inquirer"; +import { DistinctQuestion } from "inquirer"; import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; import {AI_PROVIDERS_CONFIG, AiProviders} from "../../lib/config/simulator"; import { OllamaAction } from "../update/ollama"; @@ -100,13 +101,13 @@ export async function initAction(options: InitActionOptions, simulatorService: I } // Check LLM configuration - const questions = [ + const questions: DistinctQuestion[] = [ { type: "checkbox", name: "selectedLlmProviders", message: "Select which LLM providers do you want to use:", choices: simulatorService.getAiProvidersOptions(true), - validate: function (answer: string[]) { + validate: function (answer) { if (answer.length < 1) { return "You must choose at least one option."; } @@ -127,7 +128,7 @@ export async function initAction(options: InitActionOptions, simulatorService: I for (let i = 0; i < configurableAiProviders.length; i++) { const provider = configurableAiProviders[i]; const providerConfig = AI_PROVIDERS_CONFIG[provider]; - const questions = [ + const questions: DistinctQuestion[] = [ { type: "input", name: providerConfig.cliOptionValue, diff --git a/src/commands/general/start.ts b/src/commands/general/start.ts index e7c7cbfc..dcc7618b 100644 --- a/src/commands/general/start.ts +++ b/src/commands/general/start.ts @@ -1,4 +1,5 @@ import inquirer from "inquirer"; +import { DistinctQuestion } from "inquirer"; import {ISimulatorService} from "../../lib/interfaces/ISimulatorService"; @@ -58,13 +59,13 @@ export async function startAction(options: StartActionOptions, simulatorService: try { //remove all validators await simulatorService.deleteAllValidators(); - const questions = [ + const questions: DistinctQuestion[] = [ { type: "checkbox", name: "selectedLlmProviders", message: "Select which LLM providers do you want to use:", choices: simulatorService.getAiProvidersOptions(false), - validate: function (answer: string[]) { + validate: function (answer) { if (answer.length < 1) { return "You must choose at least one option."; } diff --git a/src/lib/services/simulator.ts b/src/lib/services/simulator.ts index 5cf69300..50e55e98 100644 --- a/src/lib/services/simulator.ts +++ b/src/lib/services/simulator.ts @@ -4,6 +4,7 @@ import * as dotenv from "dotenv"; import * as path from "path"; import * as semver from "semver"; import updateCheck from "update-check"; +import { fileURLToPath } from "url"; import pkg from '../../../package.json' import {rpcClient} from "../clients/jsonRpcClient"; @@ -43,7 +44,8 @@ export class SimulatorService implements ISimulatorService { public location: string; constructor() { - this.location = path.resolve(__dirname, '..'); + const __filename = fileURLToPath(import.meta.url); + this.location = path.resolve(path.dirname(__filename), '..'); this.composeOptions = ""; this.docker = new Docker(); } diff --git a/tests/commands/up.test.ts b/tests/commands/up.test.ts index ca8f3bde..cb01f2b0 100644 --- a/tests/commands/up.test.ts +++ b/tests/commands/up.test.ts @@ -82,9 +82,7 @@ describe("up command", () => { "--numValidators", "10", "--headless", - "true", - "--reset-db", - "true" + "--reset-db" ]); expect(action).toHaveBeenCalledTimes(1); expect(action).toHaveBeenCalledWith({...defaultOptions, headless: true, numValidators: '10', resetValidators: true, resetDb: true}); From 189dc35e22a093dcfb84ef95c4fee977c89c9ab4 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Mon, 24 Feb 2025 16:54:28 -0300 Subject: [PATCH 29/40] fix: package json --- package-lock.json | 2691 ++++++++++++++++++++------------------------- 1 file changed, 1190 insertions(+), 1501 deletions(-) diff --git a/package-lock.json b/package-lock.json index d74a8e8c..2668be19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "chalk": "^5.4.1", "commander": "^12.0.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", @@ -18,6 +19,7 @@ "inquirer": "^12.0.0", "node-fetch": "^3.0.0", "open": "^10.1.0", + "ora": "^8.2.0", "update-check": "^1.5.4", "uuid": "^11.0.0", "viem": "^2.21.54", @@ -27,7 +29,7 @@ "genlayer": "dist/index.js" }, "devDependencies": { - "@release-it/conventional-changelog": "^8.0.1", + "@release-it/conventional-changelog": "^10.0.0", "@types/dockerode": "^3.3.31", "@types/inquirer": "^9.0.7", "@types/node": "^22.0.0", @@ -38,13 +40,13 @@ "@vitest/coverage-v8": "^2.1.4", "cross-env": "^7.0.3", "esbuild": "^0.25.0", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^10.0.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "jsdom": "^26.0.0", "prettier": "^3.2.5", - "release-it": "^17.2.0", + "release-it": "^18.0.0", "ts-node": "^10.9.2", "typescript": "^5.4.5" } @@ -119,13 +121,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz", - "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", + "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.7" + "@babel/types": "^7.26.9" }, "bin": { "parser": "bin/babel-parser.js" @@ -135,9 +137,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz", - "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", + "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", "dev": true, "license": "MIT", "dependencies": { @@ -161,6 +163,32 @@ "dev": true, "license": "MIT" }, + "node_modules/@conventional-changelog/git-client": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-1.0.1.tgz", + "integrity": "sha512-PJEqBwAleffCMETaVm/fUgHldzBE35JFk3/9LL6NUA5EXa3qednu+UT6M7E5iBu3zIQZCULYIiZ90fBYHt6xUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/semver": "^7.5.5", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0" + }, + "peerDependenciesMeta": { + "conventional-commits-filter": { + "optional": true + }, + "conventional-commits-parser": { + "optional": true + } + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -186,9 +214,9 @@ } }, "node_modules/@csstools/color-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.1.tgz", - "integrity": "sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz", + "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==", "devOptional": true, "funding": [ { @@ -206,9 +234,9 @@ } }, "node_modules/@csstools/css-calc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.1.tgz", - "integrity": "sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.2.tgz", + "integrity": "sha512-TklMyb3uBB28b5uQdxjReG4L80NxAqgrECqLZFQbyLekwwlcDDS8r3f07DKqeo8C4926Br0gf/ZDe17Zv4wIuw==", "devOptional": true, "funding": [ { @@ -230,9 +258,9 @@ } }, "node_modules/@csstools/css-color-parser": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.7.tgz", - "integrity": "sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.8.tgz", + "integrity": "sha512-pdwotQjCCnRPuNi06jFuP68cykU1f3ZWExLe/8MQ1LOs8Xq+fTkYgd+2V8mWUWMrOn9iS2HftPVaMZDaXzGbhQ==", "devOptional": true, "funding": [ { @@ -246,8 +274,8 @@ ], "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^5.0.1", - "@csstools/css-calc": "^2.1.1" + "@csstools/color-helpers": "^5.0.2", + "@csstools/css-calc": "^2.1.2" }, "engines": { "node": ">=18" @@ -752,16 +780,64 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", + "integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -769,7 +845,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -798,18 +874,40 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", + "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.12.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@grpc/grpc-js": { - "version": "1.12.5", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.5.tgz", - "integrity": "sha512-d3iiHxdpg5+ZcJ6jnDSOT8Z0O0VMVGy34jAnYLUX8yd36b1qn8f1TwOA/Lc7TsOh03IkPJ38eGI5qD2EjNkoEA==", + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", + "integrity": "sha512-JXUj6PI0oqqzTGvKtzOkxtpsyPRNsrmhh41TtIz/zEB6J+AUiZZ0dxWzcMwO9Ns5rmSPuMdghlTbUuqIM48d3Q==", "license": "Apache-2.0", "dependencies": { "@grpc/proto-loader": "^0.7.13", @@ -837,41 +935,39 @@ "node": ">=6" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "license": "Apache-2.0", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "license": "Apache-2.0", "engines": { - "node": "*" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -887,12 +983,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "license": "BSD-3-Clause" + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@hutson/parse-repository-url": { "version": "5.0.0", @@ -983,15 +1085,6 @@ } } }, - "node_modules/@inquirer/core/node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/@inquirer/editor": { "version": "4.2.7", "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.7.tgz", @@ -1242,19 +1335,6 @@ "node": ">=12" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "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", @@ -1293,22 +1373,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", @@ -1427,6 +1491,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1440,6 +1505,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1449,6 +1515,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -1469,9 +1536,9 @@ } }, "node_modules/@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", + "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", "dev": true, "license": "MIT", "engines": { @@ -1479,48 +1546,48 @@ } }, "node_modules/@octokit/core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz", - "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz", + "integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.1.0", - "@octokit/request": "^8.3.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "@octokit/auth-token": "^5.0.0", + "@octokit/graphql": "^8.1.2", + "@octokit/request": "^9.2.1", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", + "before-after-hook": "^3.0.2", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/endpoint": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.5.tgz", - "integrity": "sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz", + "integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" + "@octokit/types": "^13.6.2", + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/graphql": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz", - "integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz", + "integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/request": "^8.3.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^6.0.0" + "@octokit/request": "^9.2.2", + "@octokit/types": "^13.8.0", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" @@ -1534,92 +1601,91 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.1.tgz", - "integrity": "sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==", + "version": "11.4.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.3.tgz", + "integrity": "sha512-tBXaAbXkqVJlRoA/zQVe9mUdb8rScmivqtpv3ovsC5xhje/a+NOCivs7eUhWBwCApJVsR4G5HMeaLbq7PxqZGA==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.7.0" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/plugin-request-log": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz", - "integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz", + "integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==", "dev": true, "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz", - "integrity": "sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz", + "integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.8.0" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "^5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/request": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz", - "integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz", + "integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/endpoint": "^9.0.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" + "@octokit/endpoint": "^10.1.3", + "@octokit/request-error": "^6.1.7", + "@octokit/types": "^13.6.2", + "fast-content-type-parse": "^2.0.0", + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/request-error": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz", - "integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz", + "integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.1.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "@octokit/types": "^13.6.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/rest": { - "version": "20.1.1", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.1.1.tgz", - "integrity": "sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw==", + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz", + "integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/core": "^5.0.2", - "@octokit/plugin-paginate-rest": "11.3.1", - "@octokit/plugin-request-log": "^4.0.0", - "@octokit/plugin-rest-endpoint-methods": "13.2.2" + "@octokit/core": "^6.1.2", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/plugin-request-log": "^5.3.1", + "@octokit/plugin-rest-endpoint-methods": "^13.0.0" }, "engines": { "node": ">= 18" @@ -1756,23 +1822,23 @@ "license": "BSD-3-Clause" }, "node_modules/@release-it/conventional-changelog": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@release-it/conventional-changelog/-/conventional-changelog-8.0.2.tgz", - "integrity": "sha512-WpnWWRr7O0JeLoiejLrPEWnnwFhCscBn1wBTAXeitiz2/Ifaol0s+t8otf/HYq/OiQOri2iH8d0CnVb72tBdIQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@release-it/conventional-changelog/-/conventional-changelog-10.0.0.tgz", + "integrity": "sha512-49qf9phGmPUIGpY2kwfgehs9en1znbPv2zdNn1WMLAH9DtHUh4m6KNSB+mLFGAMUhv24JhsA8ruYRYgluc2UJw==", "dev": true, "license": "MIT", "dependencies": { "concat-stream": "^2.0.0", - "conventional-changelog": "^5.1.0", - "conventional-recommended-bump": "^9.0.0", + "conventional-changelog": "^6.0.0", + "conventional-recommended-bump": "^10.0.0", "git-semver-tags": "^8.0.0", "semver": "^7.6.3" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || ^22.0.0" + "node": "^20.9.0 || >=22.0.0" }, "peerDependencies": { - "release-it": "^17.0.0" + "release-it": "^18.0.0" } }, "node_modules/@rtsao/scc": { @@ -1856,10 +1922,17 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@sec-ant/readable-stream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", + "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", + "dev": true, + "license": "MIT" + }, "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", "dev": true, "license": "MIT", "engines": { @@ -1916,9 +1989,9 @@ } }, "node_modules/@types/dockerode": { - "version": "3.3.34", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.34.tgz", - "integrity": "sha512-mH9SuIb8NuTDsMus5epcbTzSbEo52fKLBMo0zapzYIAIyfDqoIFn7L3trekHLKC8qmxGV++pPUP4YqQ9n5v2Zg==", + "version": "3.3.35", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.35.tgz", + "integrity": "sha512-P+DCMASlsH+QaKkDpekKrP5pLls767PPs+/LrlVbKnEnY5tMpEUa2C6U4gRsdFZengOqxdCIqy16R22Q3pLB6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1944,6 +2017,12 @@ "rxjs": "^7.2.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -1951,9 +2030,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", - "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -1966,6 +2045,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/parse-path": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/parse-path/-/parse-path-7.0.3.tgz", + "integrity": "sha512-LriObC2+KYZD3FzCrgWGv/qufdUy4eXrxcLgQMfYXgPbLIecKIsVBaQgUPmxSSLcjmYbDTQbMgr6qr6l/eb7Bg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -1974,9 +2060,9 @@ "license": "MIT" }, "node_modules/@types/sinon": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", - "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", + "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", "dev": true, "license": "MIT", "dependencies": { @@ -2001,9 +2087,9 @@ } }, "node_modules/@types/ssh2/node_modules/@types/node": { - "version": "18.19.75", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.75.tgz", - "integrity": "sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==", + "version": "18.19.76", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.76.tgz", + "integrity": "sha512-yvR7Q9LdPz2vGpmpJX5LolrgRdWvB67MJKDPSgIIzpFbaf9a1j/f5DnLp5VDyHGMR0QZHlTr1afsD87QCXFHKw==", "dev": true, "license": "MIT", "dependencies": { @@ -2035,17 +2121,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.1.tgz", - "integrity": "sha512-ll1StnKtBigWIGqvYDVuDmXJHVH4zLVot1yQ4fJtLpL7qacwkxJc1T0bptqw+miBQ/QfUbhl1TcQ4accW5KUyA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.25.0.tgz", + "integrity": "sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.24.1", - "@typescript-eslint/type-utils": "8.24.1", - "@typescript-eslint/utils": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1", + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/type-utils": "8.25.0", + "@typescript-eslint/utils": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2065,16 +2151,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.1.tgz", - "integrity": "sha512-Tqoa05bu+t5s8CTZFaGpCH2ub3QeT9YDkXbPd3uQ4SfsLoh1/vv2GEYAioPoxCWJJNsenXlC88tRjwoHNts1oQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.25.0.tgz", + "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.24.1", - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/typescript-estree": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1", + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/typescript-estree": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "debug": "^4.3.4" }, "engines": { @@ -2090,14 +2176,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.1.tgz", - "integrity": "sha512-OdQr6BNBzwRjNEXMQyaGyZzgg7wzjYKfX2ZBV3E04hUCBDv3GQCHiz9RpqdUIiVrMgJGkXm3tcEh4vFSHreS2Q==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz", + "integrity": "sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1" + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2108,14 +2194,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.1.tgz", - "integrity": "sha512-/Do9fmNgCsQ+K4rCz0STI7lYB4phTtEXqqCAs3gZW0pnK7lWNkvWd5iW545GSmApm4AzmQXmSqXPO565B4WVrw==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.25.0.tgz", + "integrity": "sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.24.1", - "@typescript-eslint/utils": "8.24.1", + "@typescript-eslint/typescript-estree": "8.25.0", + "@typescript-eslint/utils": "8.25.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -2132,9 +2218,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.1.tgz", - "integrity": "sha512-9kqJ+2DkUXiuhoiYIUvIYjGcwle8pcPpdlfkemGvTObzgmYfJ5d0Qm6jwb4NBXP9W1I5tss0VIAnWFumz3mC5A==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.25.0.tgz", + "integrity": "sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==", "dev": true, "license": "MIT", "engines": { @@ -2146,14 +2232,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.1.tgz", - "integrity": "sha512-UPyy4MJ/0RE648DSKQe9g0VDSehPINiejjA6ElqnFaFIhI6ZEiZAkUI0D5MCk0bQcTf/LVqZStvQ6K4lPn/BRg==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.25.0.tgz", + "integrity": "sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2173,16 +2259,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.1.tgz", - "integrity": "sha512-OOcg3PMMQx9EXspId5iktsI3eMaXVwlhC8BvNnX6B5w9a4dVgpkQZuU8Hy67TolKcl+iFWq0XX+jbDGN4xWxjQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.25.0.tgz", + "integrity": "sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.24.1", - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/typescript-estree": "8.24.1" + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/typescript-estree": "8.25.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2197,13 +2283,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.1.tgz", - "integrity": "sha512-EwVHlp5l+2vp8CoqJm9KikPZgi3gbdZAtabKT9KPShGeOcJhsv4Zdo3oc8T8I0uKEmYoU4ItyxbptjF08enaxg==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz", + "integrity": "sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/types": "8.25.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2227,12 +2313,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "license": "ISC" - }, "node_modules/@vitest/coverage-v8": { "version": "2.1.9", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.9.tgz", @@ -2476,6 +2556,16 @@ "string-width": "^4.1.0" } }, + "node_modules/ansi-align/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-align/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2498,6 +2588,19 @@ "node": ">=8" } }, + "node_modules/ansi-align/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2513,25 +2616,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { @@ -2810,9 +2904,9 @@ } }, "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", + "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==", "dev": true, "license": "Apache-2.0" }, @@ -2850,19 +2944,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boxen/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/boxen/node_modules/ansi-styles": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", @@ -2876,52 +2957,23 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "node_modules/boxen/node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, - "license": "MIT", + "license": "(MIT OR CC0-1.0)", "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "node": ">=16" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boxen/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "node_modules/boxen/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "license": "MIT", "dependencies": { @@ -3042,9 +3094,9 @@ } }, "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3093,9 +3145,9 @@ } }, "node_modules/chai": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", - "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", @@ -3109,16 +3161,12 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -3178,7 +3226,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^5.0.0" @@ -3194,7 +3241,6 @@ "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -3226,6 +3272,15 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3246,6 +3301,18 @@ "node": ">=8" } }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3263,16 +3330,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3393,9 +3450,9 @@ } }, "node_modules/configstore/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -3406,262 +3463,222 @@ } }, "node_modules/conventional-changelog": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-5.1.0.tgz", - "integrity": "sha512-aWyE/P39wGYRPllcCEZDxTVEmhyLzTc9XA6z6rVfkuCD2UBnhV/sgSOKbQrEG5z9mEZJjnopjgQooTKxEg8mAg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-6.0.0.tgz", + "integrity": "sha512-tuUH8H/19VjtD9Ig7l6TQRh+Z0Yt0NZ6w/cCkkyzUbGQTnUEmKfGtkC9gGfVgCfOL1Rzno5NgNF4KY8vR+Jo3w==", "dev": true, "license": "MIT", "dependencies": { - "conventional-changelog-angular": "^7.0.0", - "conventional-changelog-atom": "^4.0.0", - "conventional-changelog-codemirror": "^4.0.0", - "conventional-changelog-conventionalcommits": "^7.0.2", - "conventional-changelog-core": "^7.0.0", - "conventional-changelog-ember": "^4.0.0", - "conventional-changelog-eslint": "^5.0.0", - "conventional-changelog-express": "^4.0.0", - "conventional-changelog-jquery": "^5.0.0", - "conventional-changelog-jshint": "^4.0.0", - "conventional-changelog-preset-loader": "^4.1.0" + "conventional-changelog-angular": "^8.0.0", + "conventional-changelog-atom": "^5.0.0", + "conventional-changelog-codemirror": "^5.0.0", + "conventional-changelog-conventionalcommits": "^8.0.0", + "conventional-changelog-core": "^8.0.0", + "conventional-changelog-ember": "^5.0.0", + "conventional-changelog-eslint": "^6.0.0", + "conventional-changelog-express": "^5.0.0", + "conventional-changelog-jquery": "^6.0.0", + "conventional-changelog-jshint": "^5.0.0", + "conventional-changelog-preset-loader": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.0.0.tgz", + "integrity": "sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==", "dev": true, "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-atom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-4.0.0.tgz", - "integrity": "sha512-q2YtiN7rnT1TGwPTwjjBSIPIzDJCRE+XAUahWxnh+buKK99Kks4WLMHoexw38GXx9OUxAsrp44f9qXe5VEMYhw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-5.0.0.tgz", + "integrity": "sha512-WfzCaAvSCFPkznnLgLnfacRAzjgqjLUjvf3MftfsJzQdDICqkOOpcMtdJF3wTerxSpv2IAAjX8doM3Vozqle3g==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-codemirror": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-4.0.0.tgz", - "integrity": "sha512-hQSojc/5imn1GJK3A75m9hEZZhc3urojA5gMpnar4JHmgLnuM3CUIARPpEk86glEKr3c54Po3WV/vCaO/U8g3Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-5.0.0.tgz", + "integrity": "sha512-8gsBDI5Y3vrKUCxN6Ue8xr6occZ5nsDEc4C7jO/EovFGozx8uttCAyfhRrvoUAWi2WMm3OmYs+0mPJU7kQdYWQ==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", - "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-8.0.0.tgz", + "integrity": "sha512-eOvlTO6OcySPyyyk8pKz2dP4jjElYunj9hn9/s0OB+gapTO8zwS9UQWrZ1pmF2hFs3vw1xhonOLGcGjy/zgsuA==", "dev": true, "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-core": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-7.0.0.tgz", - "integrity": "sha512-UYgaB1F/COt7VFjlYKVE/9tTzfU3VUq47r6iWf6lM5T7TlOxr0thI63ojQueRLIpVbrtHK4Ffw+yQGduw2Bhdg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-8.0.0.tgz", + "integrity": "sha512-EATUx5y9xewpEe10UEGNpbSHRC6cVZgO+hXQjofMqpy+gFIrcGvH3Fl6yk2VFKh7m+ffenup2N7SZJYpyD9evw==", "dev": true, "license": "MIT", "dependencies": { "@hutson/parse-repository-url": "^5.0.0", "add-stream": "^1.0.0", - "conventional-changelog-writer": "^7.0.0", - "conventional-commits-parser": "^5.0.0", - "git-raw-commits": "^4.0.0", - "git-semver-tags": "^7.0.0", + "conventional-changelog-writer": "^8.0.0", + "conventional-commits-parser": "^6.0.0", + "git-raw-commits": "^5.0.0", + "git-semver-tags": "^8.0.0", "hosted-git-info": "^7.0.0", "normalize-package-data": "^6.0.0", - "read-pkg": "^8.0.0", - "read-pkg-up": "^10.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/conventional-changelog-core/node_modules/git-semver-tags": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-7.0.1.tgz", - "integrity": "sha512-NY0ZHjJzyyNXHTDZmj+GG7PyuAKtMsyWSwh07CR2hOZFa+/yoTsXci/nF2obzL8UDhakFNkD9gNdt/Ed+cxh2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "meow": "^12.0.1", - "semver": "^7.5.2" - }, - "bin": { - "git-semver-tags": "cli.mjs" + "read-package-up": "^11.0.0", + "read-pkg": "^9.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-ember": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-4.0.0.tgz", - "integrity": "sha512-D0IMhwcJUg1Y8FSry6XAplEJcljkHVlvAZddhhsdbL1rbsqRsMfGx/PIkPYq0ru5aDgn+OxhQ5N5yR7P9mfsvA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-5.0.0.tgz", + "integrity": "sha512-RPflVfm5s4cSO33GH/Ey26oxhiC67akcxSKL8CLRT3kQX2W3dbE19sSOM56iFqUJYEwv9mD9r6k79weWe1urfg==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-eslint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-5.0.0.tgz", - "integrity": "sha512-6JtLWqAQIeJLn/OzUlYmzd9fKeNSWmQVim9kql+v4GrZwLx807kAJl3IJVc3jTYfVKWLxhC3BGUxYiuVEcVjgA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-6.0.0.tgz", + "integrity": "sha512-eiUyULWjzq+ybPjXwU6NNRflApDWlPEQEHvI8UAItYW/h22RKkMnOAtfCZxMmrcMO1OKUWtcf2MxKYMWe9zJuw==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-express": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-4.0.0.tgz", - "integrity": "sha512-yWyy5c7raP9v7aTvPAWzqrztACNO9+FEI1FSYh7UP7YT1AkWgv5UspUeB5v3Ibv4/o60zj2o9GF2tqKQ99lIsw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-5.0.0.tgz", + "integrity": "sha512-D8Q6WctPkQpvr2HNCCmwU5GkX22BVHM0r4EW8vN0230TSyS/d6VQJDAxGb84lbg0dFjpO22MwmsikKL++Oo/oQ==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-jquery": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-5.0.0.tgz", - "integrity": "sha512-slLjlXLRNa/icMI3+uGLQbtrgEny3RgITeCxevJB+p05ExiTgHACP5p3XiMKzjBn80n+Rzr83XMYfRInEtCPPw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-6.0.0.tgz", + "integrity": "sha512-2kxmVakyehgyrho2ZHBi90v4AHswkGzHuTaoH40bmeNqUt20yEkDOSpw8HlPBfvEQBwGtbE+5HpRwzj6ac2UfA==", "dev": true, "license": "ISC", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-jshint": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-4.0.0.tgz", - "integrity": "sha512-LyXq1bbl0yG0Ai1SbLxIk8ZxUOe3AjnlwE6sVRQmMgetBk+4gY9EO3d00zlEt8Y8gwsITytDnPORl8al7InTjg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-5.0.0.tgz", + "integrity": "sha512-gGNphSb/opc76n2eWaO6ma4/Wqu3tpa2w7i9WYqI6Cs2fncDSI2/ihOfMvXveeTTeld0oFvwMVNV+IYQIk3F3g==", "dev": true, "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-preset-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-4.1.0.tgz", - "integrity": "sha512-HozQjJicZTuRhCRTq4rZbefaiCzRM2pr6u2NL3XhrmQm4RMnDXfESU6JKu/pnKwx5xtdkYfNCsbhN5exhiKGJA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-5.0.0.tgz", + "integrity": "sha512-SetDSntXLk8Jh1NOAl1Gu5uLiCNSYenB5tm0YVeZKePRIgDW9lQImromTwLa3c/Gae298tsgOM+/CYT9XAl0NA==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-changelog-writer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-7.0.1.tgz", - "integrity": "sha512-Uo+R9neH3r/foIvQ0MKcsXkX642hdm9odUp7TqgFS7BsalTcjzRlIfWZrZR1gbxOozKucaKt5KAbjW8J8xRSmA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-8.0.1.tgz", + "integrity": "sha512-hlqcy3xHred2gyYg/zXSMXraY2mjAYYo0msUCpK+BGyaVJMFCKWVXPIHiaacGO2GGp13kvHWXFhYmxT4QQqW3Q==", "dev": true, "license": "MIT", "dependencies": { - "conventional-commits-filter": "^4.0.0", + "conventional-commits-filter": "^5.0.0", "handlebars": "^4.7.7", - "json-stringify-safe": "^5.0.1", - "meow": "^12.0.1", - "semver": "^7.5.2", - "split2": "^4.0.0" + "meow": "^13.0.0", + "semver": "^7.5.2" }, "bin": { - "conventional-changelog-writer": "cli.mjs" + "conventional-changelog-writer": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-commits-filter": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-4.0.0.tgz", - "integrity": "sha512-rnpnibcSOdFcdclpFwWa+pPlZJhXE7l+XK04zxhbWrhgpR96h33QLz8hITTXbcYICxVr3HZFtbtUAQ+4LdBo9A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-5.0.0.tgz", + "integrity": "sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-commits-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", - "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.1.0.tgz", + "integrity": "sha512-5nxDo7TwKB5InYBl4ZC//1g9GRwB/F3TXOGR9hgUjMGfvSP4Vu5NkpNro2+1+TIEy1vwxApl5ircECr2ri5JIw==", "dev": true, "license": "MIT", "dependencies": { - "is-text-path": "^2.0.0", - "JSONStream": "^1.3.5", - "meow": "^12.0.1", - "split2": "^4.0.0" + "meow": "^13.0.0" }, "bin": { - "conventional-commits-parser": "cli.mjs" + "conventional-commits-parser": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-recommended-bump": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-9.0.0.tgz", - "integrity": "sha512-HR1yD0G5HgYAu6K0wJjLd7QGRK8MQDqqj6Tn1n/ja1dFwBCE6QmV+iSgQ5F7hkx7OUR/8bHpxJqYtXj2f/opPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "conventional-changelog-preset-loader": "^4.1.0", - "conventional-commits-filter": "^4.0.0", - "conventional-commits-parser": "^5.0.0", - "git-raw-commits": "^4.0.0", - "git-semver-tags": "^7.0.0", - "meow": "^12.0.1" - }, - "bin": { - "conventional-recommended-bump": "cli.mjs" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/conventional-recommended-bump/node_modules/git-semver-tags": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-7.0.1.tgz", - "integrity": "sha512-NY0ZHjJzyyNXHTDZmj+GG7PyuAKtMsyWSwh07CR2hOZFa+/yoTsXci/nF2obzL8UDhakFNkD9gNdt/Ed+cxh2Q==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-10.0.0.tgz", + "integrity": "sha512-RK/fUnc2btot0oEVtrj3p2doImDSs7iiz/bftFCDzels0Qs1mxLghp+DFHMaOC0qiCI6sWzlTDyBFSYuot6pRA==", "dev": true, "license": "MIT", "dependencies": { - "meow": "^12.0.1", - "semver": "^7.5.2" + "@conventional-changelog/git-client": "^1.0.0", + "conventional-changelog-preset-loader": "^5.0.0", + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0", + "meow": "^13.0.0" }, "bin": { - "git-semver-tags": "cli.mjs" + "conventional-recommended-bump": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cosmiconfig": { @@ -3691,20 +3708,6 @@ } } }, - "node_modules/cosmiconfig/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/cosmiconfig/node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, "node_modules/cosmiconfig/node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -3792,19 +3795,6 @@ "node": ">=18" } }, - "node_modules/dargs": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", - "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -3955,19 +3945,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -4039,13 +4016,6 @@ "node": ">=0.4.0" } }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "dev": true, - "license": "ISC" - }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -4103,15 +4073,15 @@ } }, "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "node_modules/dot-prop": { @@ -4164,7 +4134,6 @@ "version": "10.4.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, "license": "MIT" }, "node_modules/end-of-stream": { @@ -4177,9 +4146,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", - "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", "dev": true, "license": "MIT", "dependencies": { @@ -4340,12 +4309,15 @@ } }, "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-to-primitive": { @@ -4463,59 +4435,62 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", + "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.2", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "9.21.0", + "@eslint/plugin-kit": "^0.2.7", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-config-prettier": { @@ -4664,18 +4639,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4698,16 +4661,16 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4735,30 +4698,70 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", "dependencies": { - "brace-expansion": "^1.1.7" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4879,24 +4882,27 @@ "license": "MIT" }, "node_modules/execa": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.0.tgz", - "integrity": "sha512-CTNS0BcKBcoOsawKBlpcKNmK4Kjuyz5jVLhf+PUsHGMqiKMVTa4cN3U7r7bRY8KTpfOGpXMo27fdy0dYVg2pqA==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.5.2.tgz", + "integrity": "sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q==", "dev": true, "license": "MIT", "dependencies": { + "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", + "figures": "^6.1.0", + "get-stream": "^9.0.0", + "human-signals": "^8.0.0", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^6.0.0", + "pretty-ms": "^9.0.0", "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.0.0" }, "engines": { - "node": ">=16.17" + "node": "^18.19.0 || >=20.5.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" @@ -4925,6 +4931,23 @@ "node": ">=4" } }, + "node_modules/fast-content-type-parse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", + "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4977,6 +5000,7 @@ "version": "1.19.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -5005,16 +5029,32 @@ "node": "^12.20 || >= 14.13" } }, + "node_modules/figures": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", + "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -5046,30 +5086,42 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "license": "ISC" }, "node_modules/for-each": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.4.tgz", - "integrity": "sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "license": "MIT", "dependencies": { "is-callable": "^1.2.7" @@ -5082,13 +5134,13 @@ } }, "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "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.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -5099,14 +5151,15 @@ } }, "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", "devOptional": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" }, "engines": { @@ -5135,6 +5188,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -5213,7 +5267,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -5223,17 +5276,17 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", + "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "get-proto": "^1.0.0", + "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", @@ -5260,13 +5313,17 @@ } }, "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", "dev": true, "license": "MIT", + "dependencies": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5328,21 +5385,20 @@ } }, "node_modules/git-raw-commits": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz", - "integrity": "sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-5.0.0.tgz", + "integrity": "sha512-I2ZXrXeOc0KrCvC7swqtIFXFN+rbjnC7b2T943tvemIOVNl+XP8YnA9UVwqFhzzLClnSA60KR/qEjLpXzs73Qg==", "dev": true, "license": "MIT", "dependencies": { - "dargs": "^8.0.0", - "meow": "^12.0.1", - "split2": "^4.0.0" + "@conventional-changelog/git-client": "^1.0.0", + "meow": "^13.0.0" }, "bin": { - "git-raw-commits": "cli.mjs" + "git-raw-commits": "src/cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/git-semver-tags": { @@ -5362,94 +5418,25 @@ "node": ">=18" } }, - "node_modules/git-semver-tags/node_modules/@conventional-changelog/git-client": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-1.0.1.tgz", - "integrity": "sha512-PJEqBwAleffCMETaVm/fUgHldzBE35JFk3/9LL6NUA5EXa3qednu+UT6M7E5iBu3zIQZCULYIiZ90fBYHt6xUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/semver": "^7.5.5", - "semver": "^7.5.2" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "conventional-commits-filter": "^5.0.0", - "conventional-commits-parser": "^6.0.0" - }, - "peerDependenciesMeta": { - "conventional-commits-filter": { - "optional": true - }, - "conventional-commits-parser": { - "optional": true - } - } - }, - "node_modules/git-semver-tags/node_modules/conventional-commits-filter": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-5.0.0.tgz", - "integrity": "sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/git-semver-tags/node_modules/conventional-commits-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.0.0.tgz", - "integrity": "sha512-TbsINLp48XeMXR8EvGjTnKGsZqBemisPoyWESlpRyR8lif0lcwzqz+NMtYSj1ooF/WYjSuu7wX0CtdeeMEQAmA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "meow": "^13.0.0" - }, - "bin": { - "conventional-commits-parser": "dist/cli/index.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/git-semver-tags/node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/git-up": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz", - "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-8.0.1.tgz", + "integrity": "sha512-2XFu1uNZMSjkyetaF+8rqn6P0XqpMq/C+2ycjI6YwrIKcszZ5/WR4UubxjN0lILOKqLkLaHDaCr2B6fP1cke6g==", "dev": true, "license": "MIT", "dependencies": { "is-ssh": "^1.4.0", - "parse-url": "^8.1.0" + "parse-url": "^9.2.0" } }, "node_modules/git-url-parse": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-14.0.0.tgz", - "integrity": "sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-16.0.0.tgz", + "integrity": "sha512-Y8iAF0AmCaqXc6a5GYgPQW9ESbncNLOL+CeQAJRhmWUOmnPkKpBYeWYp4mFd3LA5j53CdGDdslzX12yEBVHQQg==", "dev": true, "license": "MIT", "dependencies": { - "git-up": "^7.0.0" + "git-up": "^8.0.0" } }, "node_modules/glob": { @@ -5457,6 +5444,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -5489,6 +5477,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -5499,6 +5488,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -5534,15 +5524,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5585,6 +5572,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby/node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -5608,6 +5608,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, "license": "MIT" }, "node_modules/handlebars": { @@ -5781,13 +5782,13 @@ } }, "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.0.tgz", + "integrity": "sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=16.17.0" + "node": ">=18.18.0" } }, "node_modules/iconv-lite": { @@ -5856,11 +5857,25 @@ "node": ">=0.8.19" } }, + "node_modules/index-to-position": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-0.1.2.tgz", + "integrity": "sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -5905,15 +5920,6 @@ } } }, - "node_modules/inquirer/node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -6011,12 +6017,12 @@ } }, "node_modules/is-boolean-object": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", - "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -6225,24 +6231,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-installed-globally/node_modules/is-path-inside": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", - "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-interactive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -6313,14 +6305,31 @@ } }, "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8" - } - }, + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -6374,9 +6383,9 @@ } }, "node_modules/is-ssh": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz", - "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz", + "integrity": "sha512-JNeu1wQsHjyHgn9NcWTaXq6zWSR6hqE0++zhfZlkFBbScNkyvxCdeV8sRkSBaeLKxmbpR21brail63ACNxJ0Tg==", "dev": true, "license": "MIT", "dependencies": { @@ -6384,13 +6393,13 @@ } }, "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6429,19 +6438,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-text-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", - "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "text-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", @@ -6461,7 +6457,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -6710,9 +6705,9 @@ } }, "node_modules/jsdom/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", "devOptional": true, "license": "MIT", "engines": { @@ -6738,14 +6733,11 @@ "license": "MIT" }, "node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "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, - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -6759,13 +6751,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "license": "MIT" }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "license": "ISC" - }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -6778,33 +6763,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT" - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "license": "(MIT OR Apache-2.0)", - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -6815,9 +6773,9 @@ } }, "node_modules/ky": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/ky/-/ky-1.7.4.tgz", - "integrity": "sha512-zYEr/gh7uLW2l4su11bmQ2M9xLgQLjyvx58UyNM/6nuqyWFHPX5ktMjvpev3F8QWdjSsHUpnWew4PBCswBNuMQ==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.7.5.tgz", + "integrity": "sha512-HzhziW6sc5m0pwi5M196+7cEBtbt0lCYi67wNsiwMUmz833wloE0gbzJPWKs1gliFKQb34huItDQX97LyOdPdA==", "dev": true, "license": "MIT", "engines": { @@ -6857,14 +6815,11 @@ } }, "node_modules/lines-and-columns": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", - "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "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, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } + "license": "MIT" }, "node_modules/locate-path": { "version": "6.0.0", @@ -6939,7 +6894,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", - "dev": true, "license": "MIT", "dependencies": { "chalk": "^5.3.0", @@ -6952,24 +6906,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/log-symbols/node_modules/is-unicode-supported": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -6979,9 +6919,9 @@ } }, "node_modules/long": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.4.tgz", - "integrity": "sha512-qtzLbJE8hq7VabR3mISmVGtoXP8KGc2Z/AT8OuqlYD7JTR3oqrgwdjnk07wpj1twXxYmgDXgoKVWUG/fReSzHg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", "license": "Apache-2.0" }, "node_modules/loupe": { @@ -7064,13 +7004,13 @@ } }, "node_modules/meow": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", - "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", "dev": true, "license": "MIT", "engines": { - "node": ">=16.10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7147,7 +7087,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -7204,19 +7143,18 @@ "license": "MIT" }, "node_modules/mute-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", - "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/nan": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", - "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.1.tgz", + "integrity": "sha512-pfRR4ZcNTSm2ZFHaztuvbICf+hyiG6ecA06SfAxoPmuHjvMu0KUIae7Y8GyVkbBqeEIidsmXeYooWIX9+qjfRQ==", "license": "MIT", "optional": true }, @@ -7343,16 +7281,17 @@ } }, "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", + "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^4.0.0" + "path-key": "^4.0.0", + "unicorn-magic": "^0.3.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7371,6 +7310,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/npm-run-path/node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/nwsapi": { "version": "2.2.16", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.16.tgz", @@ -7379,9 +7331,9 @@ "license": "MIT" }, "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -7479,16 +7431,15 @@ } }, "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "license": "MIT", "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-function": "^5.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7530,10 +7481,9 @@ } }, "node_modules/ora": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz", - "integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==", - "dev": true, + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", "license": "MIT", "dependencies": { "chalk": "^5.3.0", @@ -7553,60 +7503,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/os-name": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/os-name/-/os-name-5.1.0.tgz", - "integrity": "sha512-YEIoAnM6zFmzw3PQ201gCVCIWbXNyKObGlVvpAVvraAeOHnlYVKFssbA/riRX5R40WA6kKrZ7Dr7dWzO3nKSeQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-6.0.0.tgz", + "integrity": "sha512-bv608E0UX86atYi2GMGjDe0vF/X1TJjemNS8oEW6z22YW1Rc3QykSYoGfkQbX0zZX9H0ZB6CQP/3GTf1I5hURg==", "dev": true, "license": "MIT", "dependencies": { - "macos-release": "^3.1.0", - "windows-release": "^5.0.1" + "macos-release": "^3.2.0", + "windows-release": "^6.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7725,9 +7633,9 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz", - "integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", "dev": true, "license": "MIT", "dependencies": { @@ -7785,9 +7693,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/package-json/node_modules/registry-auth-token": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.3.tgz", - "integrity": "sha512-1bpc9IyC+e+CNFRaWyn77tk4xGG4PPUyfakSmA6F6cvUDjrm58dfyJ3II+9yb10EDkHoy1LaPSmHaWLOH3m6HA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", + "integrity": "sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==", "dev": true, "license": "MIT", "dependencies": { @@ -7826,42 +7734,53 @@ } }, "node_modules/parse-json": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", - "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.1.0.tgz", + "integrity": "sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.21.4", - "error-ex": "^1.3.2", - "json-parse-even-better-errors": "^3.0.0", - "lines-and-columns": "^2.0.3", - "type-fest": "^3.8.0" + "@babel/code-frame": "^7.22.13", + "index-to-position": "^0.1.2", + "type-fest": "^4.7.1" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parse-json/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=14.16" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-ms": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", + "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parse-path": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz", - "integrity": "sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.1.tgz", + "integrity": "sha512-6ReLMptznuuOEzLoGEa+I1oWRSj2Zna5jLWC+l6zlfAI4dbbSaIES29ThzuPkbhNahT65dWzfoZEO6cfJw2Ksg==", "dev": true, "license": "MIT", "dependencies": { @@ -7869,13 +7788,17 @@ } }, "node_modules/parse-url": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz", - "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-9.2.0.tgz", + "integrity": "sha512-bCgsFI+GeGWPAvAiUv63ZorMeif3/U0zaXABGJbOWt5OH2KCaPHF6S+0ok4aqM9RuIPGyZdx9tR9l13PsW4AYQ==", "dev": true, "license": "MIT", "dependencies": { + "@types/parse-path": "^7.0.0", "parse-path": "^7.0.0" + }, + "engines": { + "node": ">=14.13.0" } }, "node_modules/parse5": { @@ -7904,6 +7827,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7989,18 +7913,18 @@ } }, "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/postcss": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", - "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "funding": [ { "type": "opencollective", @@ -8035,9 +7959,9 @@ } }, "node_modules/prettier": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.1.tgz", - "integrity": "sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz", + "integrity": "sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==", "dev": true, "license": "MIT", "bin": { @@ -8050,6 +7974,22 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-ms": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", + "integrity": "sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-ms": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -8082,9 +8022,9 @@ } }, "node_modules/protocols": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", - "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.2.tgz", + "integrity": "sha512-hHVTzba3wboROl0/aWRRG9dMytgH6ow//STBZh43l/wQgmMhYhOFi0EHWAPtoCz9IAUymsyP0TSBHkhgMEGNnQ==", "dev": true, "license": "MIT" }, @@ -8164,6 +8104,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -8204,36 +8145,30 @@ "node": ">=0.10.0" } }, - "node_modules/read-pkg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-8.1.0.tgz", - "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", + "node_modules/read-package-up": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", + "integrity": "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/normalize-package-data": "^2.4.1", - "normalize-package-data": "^6.0.0", - "parse-json": "^7.0.0", - "type-fest": "^4.2.0" + "find-up-simple": "^1.0.0", + "read-pkg": "^9.0.0", + "type-fest": "^4.6.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-10.1.0.tgz", - "integrity": "sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==", + "node_modules/read-package-up/node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^6.3.0", - "read-pkg": "^8.1.0", - "type-fest": "^4.2.0" - }, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=16" }, @@ -8241,111 +8176,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "node_modules/read-pkg": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", + "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "@types/normalize-package-data": "^2.4.3", + "normalize-package-data": "^6.0.0", + "parse-json": "^8.0.0", + "type-fest": "^4.6.0", + "unicorn-magic": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/yocto-queue": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=12.20" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz", - "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -8446,9 +8300,9 @@ } }, "node_modules/release-it": { - "version": "17.11.0", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-17.11.0.tgz", - "integrity": "sha512-qQGgfMbUZ3/vpXUPmngsgjFObOLjlkwtiozHUYen9fo9AEGciXjG1ZpGr+FNmuBT8R7TOSY+x/s84wOCRKJjbA==", + "version": "18.1.2", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-18.1.2.tgz", + "integrity": "sha512-HOVRcicehCgoCsPFOu0iCBlEC8GDOoKS5s6ICkWmqomGEoZtRQ88D3RCsI5MciSU8vAQU+aWZW2z57NQNNb74w==", "dev": true, "funding": [ { @@ -8463,25 +8317,26 @@ "license": "MIT", "dependencies": { "@iarna/toml": "2.2.5", - "@octokit/rest": "20.1.1", + "@octokit/rest": "21.0.2", "async-retry": "1.3.3", "chalk": "5.4.1", "ci-info": "^4.1.0", "cosmiconfig": "9.0.0", - "execa": "8.0.0", - "git-url-parse": "14.0.0", + "execa": "9.5.2", + "git-url-parse": "16.0.0", "globby": "14.0.2", - "inquirer": "9.3.2", + "inquirer": "12.3.0", "issue-parser": "7.0.1", "lodash": "4.17.21", "mime-types": "2.1.35", "new-github-release-url": "2.0.0", "open": "10.1.0", "ora": "8.1.1", - "os-name": "5.1.0", + "os-name": "6.0.0", "proxy-agent": "6.5.0", "semver": "7.6.3", "shelljs": "0.8.5", + "undici": "6.21.1", "update-notifier": "7.3.1", "url-join": "5.0.0", "wildcard-match": "5.1.4", @@ -8491,204 +8346,55 @@ "release-it": "bin/release-it.js" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || ^22.0.0" - } - }, - "node_modules/release-it/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": "^20.9.0 || >=22.0.0" } }, - "node_modules/release-it/node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/release-it/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, "node_modules/release-it/node_modules/inquirer": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.2.tgz", - "integrity": "sha512-+ynEbhWKhyomnaX0n2aLIMSkgSlGB5RrWbNXnEqj6mdaIydu6y40MdBjL38SAB0JcdmOaIaMua1azdjLEr3sdw==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.3.0.tgz", + "integrity": "sha512-3NixUXq+hM8ezj2wc7wC37b32/rHq1MwNZDYdvx+d6jokOD+r+i8Q4Pkylh9tISYP114A128LCX8RKhopC5RfQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.3", + "@inquirer/core": "^10.1.2", + "@inquirer/prompts": "^7.2.1", + "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "external-editor": "^3.1.0", - "mute-stream": "1.0.0", - "ora": "^5.4.1", + "mute-stream": "^2.0.0", "run-async": "^3.0.0", - "rxjs": "^7.8.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.1" + "rxjs": "^7.8.1" }, "engines": { "node": ">=18" - } - }, - "node_modules/release-it/node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/release-it/node_modules/inquirer/node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/release-it/node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/release-it/node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/release-it/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" + "peerDependencies": { + "@types/node": ">=18" } }, - "node_modules/release-it/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "node_modules/release-it/node_modules/ora": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz", + "integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^2.1.0" + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=6" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/release-it/node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/release-it/node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -8702,28 +8408,6 @@ "node": ">=10" } }, - "node_modules/release-it/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/release-it/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -8776,7 +8460,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", - "dev": true, "license": "MIT", "dependencies": { "onetime": "^7.0.0", @@ -8789,22 +8472,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -8819,33 +8486,18 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rollup": { "name": "@rollup/wasm-node", - "version": "4.34.2", - "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.34.2.tgz", - "integrity": "sha512-+lN8XHBdka9vIq0Hdsn1NLjdRYQXG1eoFCQws8K7KXPfw2jE0j1c3rSAi50pVrk9ykVPDJHoPq79twHOA5RvGg==", + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.34.8.tgz", + "integrity": "sha512-+bu9Ce1VDob+hfEQYPwC03Lds+ACDlGVwuWeLZE2fN+O52O74RZ0F5engVpv7i2YDyTyj4oU/NKO4pjSXMdn6g==", "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -8893,6 +8545,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -8913,9 +8566,9 @@ } }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -9225,9 +8878,9 @@ } }, "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.4", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", + "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9312,18 +8965,8 @@ "node_modules/split-ca": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz", - "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==", - "license": "ISC" - }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 10.x" - } + "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==", + "license": "ISC" }, "node_modules/sprintf-js": { "version": "1.1.3", @@ -9372,7 +9015,6 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -9394,7 +9036,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", @@ -9424,6 +9065,16 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9431,33 +9082,17 @@ "dev": true, "license": "MIT" }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/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==", + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/string.prototype.trim": { @@ -9517,15 +9152,18 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/strip-ansi-cjs": { @@ -9542,6 +9180,16 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -9552,13 +9200,13 @@ } }, "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9687,32 +9335,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-extensions": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", - "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "license": "MIT" - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, - "license": "MIT" - }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -9798,22 +9420,22 @@ } }, "node_modules/tldts": { - "version": "6.1.76", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.76.tgz", - "integrity": "sha512-6U2ti64/nppsDxQs9hw8ephA3nO6nSQvVVfxwRw8wLQPFtLI1cFI1a1eP22g+LUP+1TA2pKKjUTwWB+K2coqmQ==", + "version": "6.1.78", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.78.tgz", + "integrity": "sha512-fSgYrW0ITH0SR/CqKMXIruYIPpNu5aDgUp22UhYoSrnUQwc7SBqifEBFNce7AAcygUPBo6a/gbtcguWdmko4RQ==", "devOptional": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.76" + "tldts-core": "^6.1.78" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.76", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.76.tgz", - "integrity": "sha512-uzhJ02RaMzgQR3yPoeE65DrcHI6LoM4saUqXOt/b5hmb3+mc4YWpdSeAQqVqRUlQ14q8ZuLRWyBR1ictK1dzzg==", + "version": "6.1.78", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.78.tgz", + "integrity": "sha512-jS0svNsB99jR6AJBmfmEWuKIgz91Haya91Z43PATaeHJ24BkMoNRb/jlaD37VYjb0mYf6gRL/HOnvS1zEnYBiw==", "devOptional": true, "license": "MIT" }, @@ -9843,9 +9465,9 @@ } }, "node_modules/tough-cookie": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.0.tgz", - "integrity": "sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.1.tgz", + "integrity": "sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==", "devOptional": true, "license": "BSD-3-Clause", "dependencies": { @@ -9962,9 +9584,9 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -10106,6 +9728,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici": { + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/undici-types": { "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", @@ -10126,9 +9758,9 @@ } }, "node_modules/universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", + "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==", "dev": true, "license": "ISC" }, @@ -10167,19 +9799,6 @@ "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -10237,9 +9856,9 @@ } }, "node_modules/viem": { - "version": "2.23.4", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.4.tgz", - "integrity": "sha512-UQquuolKlS1w5H5e0Fd1KKoUlIPJryIEBzY5AUhGyV1ka+9O6+3uYVhUzj6RbvGK0PtsMKn2ddwPZFwjNDVU/A==", + "version": "2.23.5", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.5.tgz", + "integrity": "sha512-cUfBHdFQHmBlPW0loFXda0uZcoU+uJw3NRYQRwYgkrpH6PgovH8iuVqDn6t1jZk82zny4wQL54c9dCX2W9kLMg==", "funding": [ { "type": "github", @@ -10879,16 +10498,6 @@ "node": ">=18" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/web-streams-polyfill": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", @@ -10945,9 +10554,9 @@ } }, "node_modules/whatwg-url": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.0.tgz", - "integrity": "sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.1.tgz", + "integrity": "sha512-mDGf9diDad/giZ/Sm9Xi2YcyzaFpbdLpJPr+E9fSkyQ7KpQD4SdFcugkRQYzhmfI4KeV4Qpnn2sKPdo+kmsgRQ==", "devOptional": true, "license": "MIT", "dependencies": { @@ -11104,135 +10713,137 @@ "license": "ISC" }, "node_modules/windows-release": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-5.1.1.tgz", - "integrity": "sha512-NMD00arvqcq2nwqc5Q6KtrSRHK+fVD31erE5FEMahAw5PmVCgD7MUXodq3pdZSUkqA9Cda2iWx6s1XYwiJWRmw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-6.0.1.tgz", + "integrity": "sha512-MS3BzG8QK33dAyqwxfYJCJ03arkwKaddUOvvnnlFdXLudflsQF6I8yAxrLBeQk4yO8wjdH/+ax0YzxJEDrOftg==", "dev": true, "license": "MIT", "dependencies": { - "execa": "^5.1.1" + "execa": "^8.0.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/windows-release/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/windows-release/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/windows-release/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=10.17.0" + "node": ">=16.17.0" } }, "node_modules/windows-release/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/windows-release/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/windows-release/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/windows-release/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/windows-release/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/windows-release/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "license": "ISC" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/windows-release/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/word-wrap": { @@ -11284,6 +10895,16 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -11306,6 +10927,28 @@ "node": ">=8" } }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -11326,6 +10969,18 @@ "node": ">=8" } }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -11419,6 +11074,15 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -11439,6 +11103,18 @@ "node": ">=8" } }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -11461,6 +11137,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yoctocolors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", + "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yoctocolors-cjs": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", From 9b115e11fa53df7a59966d5f0ce71937e54102e2 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Mon, 24 Feb 2025 17:08:59 -0300 Subject: [PATCH 30/40] fix: package lock --- package-lock.json | 357 ++++++++++++++++++++-------------------------- 1 file changed, 151 insertions(+), 206 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a3e9609..e79a148b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "chalk": "^5.4.1", "commander": "^13.1.0", "dockerode": "^4.0.2", "dotenv": "^16.4.5", @@ -18,6 +19,7 @@ "inquirer": "^12.0.0", "node-fetch": "^3.0.0", "open": "^10.1.0", + "ora": "^8.2.0", "update-check": "^1.5.4", "uuid": "^11.0.0", "viem": "^2.21.54", @@ -212,9 +214,9 @@ } }, "node_modules/@csstools/color-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.1.tgz", - "integrity": "sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz", + "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==", "devOptional": true, "funding": [ { @@ -232,9 +234,9 @@ } }, "node_modules/@csstools/css-calc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.1.tgz", - "integrity": "sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.2.tgz", + "integrity": "sha512-TklMyb3uBB28b5uQdxjReG4L80NxAqgrECqLZFQbyLekwwlcDDS8r3f07DKqeo8C4926Br0gf/ZDe17Zv4wIuw==", "devOptional": true, "funding": [ { @@ -256,9 +258,9 @@ } }, "node_modules/@csstools/css-color-parser": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.7.tgz", - "integrity": "sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.8.tgz", + "integrity": "sha512-pdwotQjCCnRPuNi06jFuP68cykU1f3ZWExLe/8MQ1LOs8Xq+fTkYgd+2V8mWUWMrOn9iS2HftPVaMZDaXzGbhQ==", "devOptional": true, "funding": [ { @@ -272,8 +274,8 @@ ], "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^5.0.1", - "@csstools/css-calc": "^2.1.1" + "@csstools/color-helpers": "^5.0.2", + "@csstools/css-calc": "^2.1.2" }, "engines": { "node": ">=18" @@ -815,9 +817,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", - "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.15" @@ -827,9 +829,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", + "integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -872,9 +874,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.20.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", - "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", + "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -902,18 +904,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", - "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@grpc/grpc-js": { "version": "1.12.6", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", @@ -1611,9 +1601,9 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.4.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz", - "integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==", + "version": "11.4.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.3.tgz", + "integrity": "sha512-tBXaAbXkqVJlRoA/zQVe9mUdb8rScmivqtpv3ovsC5xhje/a+NOCivs7eUhWBwCApJVsR4G5HMeaLbq7PxqZGA==", "dev": true, "license": "MIT", "dependencies": { @@ -1999,9 +1989,9 @@ } }, "node_modules/@types/dockerode": { - "version": "3.3.34", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.34.tgz", - "integrity": "sha512-mH9SuIb8NuTDsMus5epcbTzSbEo52fKLBMo0zapzYIAIyfDqoIFn7L3trekHLKC8qmxGV++pPUP4YqQ9n5v2Zg==", + "version": "3.3.35", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.35.tgz", + "integrity": "sha512-P+DCMASlsH+QaKkDpekKrP5pLls767PPs+/LrlVbKnEnY5tMpEUa2C6U4gRsdFZengOqxdCIqy16R22Q3pLB6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2040,9 +2030,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", - "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -2070,9 +2060,9 @@ "license": "MIT" }, "node_modules/@types/sinon": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", - "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", + "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", "dev": true, "license": "MIT", "dependencies": { @@ -2131,17 +2121,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.1.tgz", - "integrity": "sha512-ll1StnKtBigWIGqvYDVuDmXJHVH4zLVot1yQ4fJtLpL7qacwkxJc1T0bptqw+miBQ/QfUbhl1TcQ4accW5KUyA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.25.0.tgz", + "integrity": "sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.24.1", - "@typescript-eslint/type-utils": "8.24.1", - "@typescript-eslint/utils": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1", + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/type-utils": "8.25.0", + "@typescript-eslint/utils": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2161,16 +2151,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.1.tgz", - "integrity": "sha512-Tqoa05bu+t5s8CTZFaGpCH2ub3QeT9YDkXbPd3uQ4SfsLoh1/vv2GEYAioPoxCWJJNsenXlC88tRjwoHNts1oQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.25.0.tgz", + "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.24.1", - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/typescript-estree": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1", + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/typescript-estree": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "debug": "^4.3.4" }, "engines": { @@ -2186,14 +2176,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.1.tgz", - "integrity": "sha512-OdQr6BNBzwRjNEXMQyaGyZzgg7wzjYKfX2ZBV3E04hUCBDv3GQCHiz9RpqdUIiVrMgJGkXm3tcEh4vFSHreS2Q==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz", + "integrity": "sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1" + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2204,14 +2194,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.1.tgz", - "integrity": "sha512-/Do9fmNgCsQ+K4rCz0STI7lYB4phTtEXqqCAs3gZW0pnK7lWNkvWd5iW545GSmApm4AzmQXmSqXPO565B4WVrw==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.25.0.tgz", + "integrity": "sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.24.1", - "@typescript-eslint/utils": "8.24.1", + "@typescript-eslint/typescript-estree": "8.25.0", + "@typescript-eslint/utils": "8.25.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -2228,9 +2218,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.1.tgz", - "integrity": "sha512-9kqJ+2DkUXiuhoiYIUvIYjGcwle8pcPpdlfkemGvTObzgmYfJ5d0Qm6jwb4NBXP9W1I5tss0VIAnWFumz3mC5A==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.25.0.tgz", + "integrity": "sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==", "dev": true, "license": "MIT", "engines": { @@ -2242,14 +2232,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.1.tgz", - "integrity": "sha512-UPyy4MJ/0RE648DSKQe9g0VDSehPINiejjA6ElqnFaFIhI6ZEiZAkUI0D5MCk0bQcTf/LVqZStvQ6K4lPn/BRg==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.25.0.tgz", + "integrity": "sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/visitor-keys": "8.24.1", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/visitor-keys": "8.25.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2269,16 +2259,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.1.tgz", - "integrity": "sha512-OOcg3PMMQx9EXspId5iktsI3eMaXVwlhC8BvNnX6B5w9a4dVgpkQZuU8Hy67TolKcl+iFWq0XX+jbDGN4xWxjQ==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.25.0.tgz", + "integrity": "sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.24.1", - "@typescript-eslint/types": "8.24.1", - "@typescript-eslint/typescript-estree": "8.24.1" + "@typescript-eslint/scope-manager": "8.25.0", + "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/typescript-estree": "8.25.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2293,13 +2283,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.24.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.1.tgz", - "integrity": "sha512-EwVHlp5l+2vp8CoqJm9KikPZgi3gbdZAtabKT9KPShGeOcJhsv4Zdo3oc8T8I0uKEmYoU4ItyxbptjF08enaxg==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz", + "integrity": "sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.24.1", + "@typescript-eslint/types": "8.25.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2630,7 +2620,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -2968,19 +2957,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/boxen/node_modules/type-fest": { "version": "4.35.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", @@ -3185,16 +3161,12 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -3254,7 +3226,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^5.0.0" @@ -3270,7 +3241,6 @@ "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -4164,7 +4134,6 @@ "version": "10.4.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, "license": "MIT" }, "node_modules/end-of-stream": { @@ -4466,21 +4435,21 @@ } }, "node_modules/eslint": { - "version": "9.20.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", - "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", + "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.11.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.20.0", - "@eslint/plugin-kit": "^0.2.5", + "@eslint/config-array": "^0.19.2", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "9.21.0", + "@eslint/plugin-kit": "^0.2.7", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", + "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -4729,6 +4698,22 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", @@ -5149,13 +5134,13 @@ } }, "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "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.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -5282,7 +5267,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -5292,17 +5276,17 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", + "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "get-proto": "^1.0.0", + "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", @@ -6251,7 +6235,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -6474,7 +6457,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -6912,7 +6894,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", - "dev": true, "license": "MIT", "dependencies": { "chalk": "^5.3.0", @@ -6925,24 +6906,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/log-symbols/node_modules/is-unicode-supported": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -7120,7 +7087,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -7468,7 +7434,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, "license": "MIT", "dependencies": { "mimic-function": "^5.0.0" @@ -7516,10 +7481,9 @@ } }, "node_modules/ora": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz", - "integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==", - "dev": true, + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", "license": "MIT", "dependencies": { "chalk": "^5.3.0", @@ -7539,19 +7503,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/os-name": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/os-name/-/os-name-6.0.0.tgz", @@ -8008,9 +7959,9 @@ } }, "node_modules/prettier": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.1.tgz", - "integrity": "sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz", + "integrity": "sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==", "dev": true, "license": "MIT", "bin": { @@ -8398,19 +8349,6 @@ "node": "^20.9.0 || >=22.0.0" } }, - "node_modules/release-it/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/release-it/node_modules/inquirer": { "version": "12.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.3.0.tgz", @@ -8433,6 +8371,30 @@ "@types/node": ">=18" } }, + "node_modules/release-it/node_modules/ora": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz", + "integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/release-it/node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -8498,7 +8460,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", - "dev": true, "license": "MIT", "dependencies": { "onetime": "^7.0.0", @@ -8605,9 +8566,9 @@ } }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -9054,7 +9015,6 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -9076,7 +9036,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", @@ -9196,7 +9155,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -9841,19 +9799,6 @@ "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -9911,9 +9856,9 @@ } }, "node_modules/viem": { - "version": "2.23.4", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.4.tgz", - "integrity": "sha512-UQquuolKlS1w5H5e0Fd1KKoUlIPJryIEBzY5AUhGyV1ka+9O6+3uYVhUzj6RbvGK0PtsMKn2ddwPZFwjNDVU/A==", + "version": "2.23.5", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.5.tgz", + "integrity": "sha512-cUfBHdFQHmBlPW0loFXda0uZcoU+uJw3NRYQRwYgkrpH6PgovH8iuVqDn6t1jZk82zny4wQL54c9dCX2W9kLMg==", "funding": [ { "type": "github", From 157c74a5f804a7b5a481fa3e90ed2d7e26eb5448 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Mon, 24 Feb 2025 17:13:36 -0300 Subject: [PATCH 31/40] chore: ollama hint message --- src/commands/general/init.ts | 1 - src/lib/config/simulator.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/general/init.ts b/src/commands/general/init.ts index 0b65e5e3..94c29ccc 100644 --- a/src/commands/general/init.ts +++ b/src/commands/general/init.ts @@ -94,7 +94,6 @@ export class InitAction extends BaseAction { const selectedLlmProviders = llmProvidersAnswer.selectedLlmProviders as AiProviders[]; let defaultOllamaModel = this.getConfig().defaultOllamaModel; - AI_PROVIDERS_CONFIG.ollama.hint = `(This will download and run a local instance of ${defaultOllamaModel})`; const aiProvidersEnvVars: Record = {}; const configurableAiProviders = selectedLlmProviders.filter( (provider: AiProviders) => AI_PROVIDERS_CONFIG[provider].envVar diff --git a/src/lib/config/simulator.ts b/src/lib/config/simulator.ts index bb06abad..8dd2d732 100644 --- a/src/lib/config/simulator.ts +++ b/src/lib/config/simulator.ts @@ -32,7 +32,7 @@ export type AiProvidersConfigType = { export const AI_PROVIDERS_CONFIG: AiProvidersConfigType = { ollama: { name: "Ollama", - hint: "(This will download and run a local instance of Llama 3)", + hint: "(By default, this will download and run a local instance of Llama 3)", cliOptionValue: "ollama", }, openai: { From 257f3b28e860311557ddcff8b8d04c117fb8ba03 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Wed, 26 Feb 2025 23:47:31 -0300 Subject: [PATCH 32/40] feat: new deploy script command --- esbuild.config.dev.js | 2 +- esbuild.config.prod.js | 2 +- src/commands/contracts/deploy.ts | 132 +++++++++++++++++++++++++------ src/commands/contracts/index.ts | 6 +- 4 files changed, 114 insertions(+), 28 deletions(-) diff --git a/esbuild.config.dev.js b/esbuild.config.dev.js index c0c30730..120dce33 100644 --- a/esbuild.config.dev.js +++ b/esbuild.config.dev.js @@ -11,7 +11,7 @@ export default { banner: { js: `const _importMetaUrl = new URL(import.meta.url).pathname;`, }, - external: ["commander", "dockerode", "dotenv", "ethers", "inquirer", "update-check", "ssh2"] + external: ["commander", "dockerode", "dotenv", "ethers", "inquirer", "update-check", "ssh2", "esbuild"] }, watch: true, diff --git a/esbuild.config.prod.js b/esbuild.config.prod.js index 69e8e550..0f9fd393 100644 --- a/esbuild.config.prod.js +++ b/esbuild.config.prod.js @@ -10,7 +10,7 @@ export default { banner: { js: `const _importMetaUrl = new URL(import.meta.url).pathname;`, }, - external: ["commander", "dockerode", "dotenv", "ethers", "inquirer", "update-check", "ssh2"] + external: ["commander", "dockerode", "dotenv", "ethers", "inquirer", "update-check", "ssh2", "esbuild"] }, watch: false, }; diff --git a/src/commands/contracts/deploy.ts b/src/commands/contracts/deploy.ts index 57cc093d..654f92ba 100644 --- a/src/commands/contracts/deploy.ts +++ b/src/commands/contracts/deploy.ts @@ -1,20 +1,25 @@ import fs from "fs"; +import path from "path"; import { createClient, createAccount } from "genlayer-js"; import { simulator } from "genlayer-js/chains"; import type { GenLayerClient } from "genlayer-js/types"; import { getPrivateKey } from "../../lib/accounts/getPrivateKey"; +import { BaseAction } from "../../lib/actions/BaseAction"; +import { pathToFileURL } from "url"; +import { TransactionStatus } from "genlayer-js/types"; +import { buildSync } from "esbuild"; export interface DeployOptions { contract?: string; - // network: string; args?: any[]; - kwargs?: string; } -export class DeployAction { +export class DeployAction extends BaseAction { private genlayerClient: GenLayerClient; + private readonly deployDir = path.resolve(process.cwd(), "deploy"); constructor() { + super(); this.genlayerClient = createClient({ chain: simulator, endpoint: process.env.VITE_JSON_RPC_SERVER_URL, @@ -29,44 +34,121 @@ export class DeployAction { return fs.readFileSync(contractPath, "utf-8"); } - async deploy(options: DeployOptions): Promise { - - const argsUsed = options.args && options.args.length > 0; - const kwargsUsed = options.kwargs && options.kwargs.trim() !== ""; + private async executeTsScript(filePath: string): Promise { + const outFile = filePath.replace(/\.ts$/, ".compiled.js"); + this.startSpinner(`Transpiling TypeScript file: ${filePath}`); + try { + buildSync({ + entryPoints: [filePath], + outfile: outFile, + bundle: false, + platform: "node", + format: "esm", + target: "es2020", + sourcemap: false, + }); + await this.executeJsScript(filePath, outFile); + } catch (error) { + this.failSpinner(`Error executing: ${filePath}`, error); + } finally { + fs.unlinkSync(outFile); + } + } - if (argsUsed && kwargsUsed) { - throw new Error("Invalid usage: Please specify either `args` or `kwargs`, but not both."); + private async executeJsScript(filePath: string, transpiledFilePath?: string): Promise { + this.startSpinner(`Executing file: ${filePath}`); + try { + const module = await import(pathToFileURL(transpiledFilePath || filePath).href); + if (!module.default || typeof module.default !== "function") { + this.failSpinner(`No "default" function found in: ${filePath}`); + return + } + await module.default(this.genlayerClient); + this.succeedSpinner(`Successfully executed: ${filePath}`); + } catch (error) { + this.failSpinner(`Error executing: ${filePath}`, error); } + } - if (!options.contract) { - console.error("No contract specified for deployment."); + async deployScripts() { + this.startSpinner("Searching for deploy scripts..."); + if (!fs.existsSync(this.deployDir)) { + this.failSpinner("No deploy folder found."); return; } + const files = fs.readdirSync(this.deployDir) + .filter(file => file.endsWith(".ts") || file.endsWith(".js")) + .sort((a, b) => { + const numA = parseInt(a.split("_")[0]); + const numB = parseInt(b.split("_")[0]); - const contractCode = this.readContractCode(options.contract); + if (!isNaN(numA) && !isNaN(numB)) return numA - numB; + if (!isNaN(numA)) return -1; + if (!isNaN(numB)) return 1; + return a.localeCompare(b); + }); - if (!contractCode) { - console.error("Contract code is empty."); + if (files.length === 0) { + this.failSpinner("No deploy scripts found."); return; } - const leaderOnly = false; - let deployParams: any = { code: contractCode, args: options.args, leaderOnly }; + this.setSpinnerText(`Found ${files.length} deploy scripts. Executing...`); - console.log("Starting contract deployment..."); - console.log("Deployment Parameters:", deployParams); + for (const file of files) { + const filePath = path.resolve(this.deployDir, file); + this.setSpinnerText(`Executing script: ${filePath}`); + try { + if (file.endsWith(".ts")) { + await this.executeTsScript(filePath); + } else { + await this.executeJsScript(filePath); + } + } catch (error) { + this.failSpinner(`Error executing script: ${filePath}`, error); + process.exit(1); + } + } + this.succeedSpinner("All deploy scripts executed successfully."); + } + async deploy(options: DeployOptions): Promise { try { - const hash = await this.genlayerClient.deployContract(deployParams) as any; + this.startSpinner("Setting up the deployment environment..."); + await this.genlayerClient.initializeConsensusSmartContract(); + + if (!options.contract) { + this.failSpinner("No contract specified for deployment."); + return; + } + this.setSpinnerText("Reading contract code..."); + const contractCode = this.readContractCode(options.contract); + + if (!contractCode) { + this.failSpinner("Contract code is empty."); + return; + } + + const leaderOnly = false; + const deployParams: any = { code: contractCode, args: options.args, leaderOnly }; + + this.setSpinnerText("Starting contract deployment..."); + this.log("Deployment Parameters:", deployParams); - const result = await this.genlayerClient.waitForTransactionReceipt({hash, retries: 15, interval: 2000}) + const hash = (await this.genlayerClient.deployContract(deployParams)) as any; + const result = await this.genlayerClient.waitForTransactionReceipt({ + hash, + retries: 15, + interval: 2000, + status: TransactionStatus.ACCEPTED, + }); - console.log("Contract deployed successfully."); - console.log("Transaction Hash:", hash); - console.log("Contract Address:", result.data?.contract_address); + this.succeedSpinner("Contract deployed successfully.", { + "Transaction Hash": hash, + "Contract Address": result.data?.contract_address, + }); } catch (error) { - console.error("Error deploying contract:", error); - throw new Error("Contract deployment failed."); + this.failSpinner("Error deploying contract", error); } } } diff --git a/src/commands/contracts/index.ts b/src/commands/contracts/index.ts index 8a2dcd4a..062bf68f 100644 --- a/src/commands/contracts/index.ts +++ b/src/commands/contracts/index.ts @@ -12,7 +12,11 @@ export function initializeContractsCommands(program: Command) { .option("--args ", "Positional arguments for the contract (space-separated, use quotes for multi-word arguments)", []) .action(async (options: DeployOptions) => { const deployer = new DeployAction(); - await deployer.deploy(options); + if(options.contract){ + await deployer.deploy(options); + }else { + await deployer.deployScripts(); + } }); program From 554f959483bf44af42f47694ba7a88c782be7c73 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 27 Feb 2025 00:44:59 -0300 Subject: [PATCH 33/40] tests: including new tests --- src/commands/contracts/deploy.ts | 2 - tests/actions/deploy.test.ts | 230 +++++++++++++++++++++++++++---- tests/commands/call.test.ts | 3 + tests/commands/deploy.test.ts | 11 ++ 4 files changed, 214 insertions(+), 32 deletions(-) diff --git a/src/commands/contracts/deploy.ts b/src/commands/contracts/deploy.ts index 654f92ba..8e61c094 100644 --- a/src/commands/contracts/deploy.ts +++ b/src/commands/contracts/deploy.ts @@ -106,10 +106,8 @@ export class DeployAction extends BaseAction { } } catch (error) { this.failSpinner(`Error executing script: ${filePath}`, error); - process.exit(1); } } - this.succeedSpinner("All deploy scripts executed successfully."); } async deploy(options: DeployOptions): Promise { diff --git a/tests/actions/deploy.test.ts b/tests/actions/deploy.test.ts index f548da8a..8e8dfbdd 100644 --- a/tests/actions/deploy.test.ts +++ b/tests/actions/deploy.test.ts @@ -3,16 +3,22 @@ import fs from "fs"; import { createClient, createAccount } from "genlayer-js"; import { DeployAction, DeployOptions } from "../../src/commands/contracts/deploy"; import { getPrivateKey } from "../../src/lib/accounts/getPrivateKey"; +import { buildSync } from "esbuild"; +import { pathToFileURL } from "url"; vi.mock("fs"); vi.mock("genlayer-js"); +vi.mock("esbuild", () => ({ + buildSync: vi.fn(), +})); vi.mock("../../src/lib/accounts/getPrivateKey"); -describe("Deploy Action", () => { +describe("DeployAction", () => { let deployer: DeployAction; const mockClient = { deployContract: vi.fn(), - waitForTransactionReceipt: vi.fn() + waitForTransactionReceipt: vi.fn(), + initializeConsensusSmartContract: vi.fn(), }; const mockPrivateKey = "mocked_private_key"; @@ -23,6 +29,12 @@ describe("Deploy Action", () => { vi.mocked(createAccount).mockReturnValue({ privateKey: mockPrivateKey } as any); vi.mocked(getPrivateKey).mockReturnValue(mockPrivateKey); deployer = new DeployAction(); + + vi.spyOn(deployer as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(deployer as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(deployer as any, "failSpinner").mockImplementation(() => {}); + vi.spyOn(deployer as any, "setSpinnerText").mockImplementation(() => {}); + vi.spyOn(deployer as any, "log").mockImplementation(() => {}); }); afterEach(() => { @@ -52,7 +64,6 @@ describe("Deploy Action", () => { expect(fs.existsSync).toHaveBeenCalledWith(contractPath); }); - test("deploys contract with args", async () => { const options: DeployOptions = { contract: "/mocked/contract/path", @@ -63,7 +74,9 @@ describe("Deploy Action", () => { vi.mocked(fs.existsSync).mockReturnValue(true); vi.mocked(fs.readFileSync).mockReturnValue(contractContent); vi.mocked(mockClient.deployContract).mockResolvedValue("mocked_tx_hash"); - vi.mocked(mockClient.waitForTransactionReceipt).mockResolvedValue({data: {contractAddress: '0xdasdsadasdasdada'}}); + vi.mocked(mockClient.waitForTransactionReceipt).mockResolvedValue({ + data: { contract_address: "0xdasdsadasdasdada" }, + }); await deployer.deploy(options); @@ -73,31 +86,15 @@ describe("Deploy Action", () => { args: [1, 2, 3], leaderOnly: false, }); - expect(mockClient.deployContract).toHaveResolvedWith("mocked_tx_hash"); - }); - - test("throws error for both args and kwargs", async () => { - const options: DeployOptions = { - contract: "/mocked/contract/path", - args: [1, 2, 3], - kwargs: "key1=value1,key2=42", - }; - - await expect(deployer.deploy(options)).rejects.toThrowError( - "Invalid usage: Please specify either `args` or `kwargs`, but not both." - ); - - expect(fs.readFileSync).not.toHaveBeenCalled(); - expect(mockClient.deployContract).not.toHaveBeenCalled(); + expect(mockClient.deployContract).toHaveReturnedWith(Promise.resolve("mocked_tx_hash")); }); test("throws error for missing contract", async () => { - const options: DeployOptions = { - }; + const options: DeployOptions = {}; await deployer.deploy(options); - expect(fs.readFileSync).not.toHaveBeenCalled(); + expect(deployer["failSpinner"]).toHaveBeenCalledWith("No contract specified for deployment."); expect(mockClient.deployContract).not.toHaveBeenCalled(); }); @@ -114,15 +111,13 @@ describe("Deploy Action", () => { new Error("Mocked deployment error") ); - await expect(deployer.deploy(options)).rejects.toThrowError( - "Contract deployment failed." - ); + await deployer.deploy(options); - expect(fs.readFileSync).toHaveBeenCalledWith(options.contract, "utf-8"); + expect(deployer["failSpinner"]).toHaveBeenCalledWith("Error deploying contract", expect.any(Error)); expect(mockClient.deployContract).toHaveBeenCalled(); }); - test("throws error if contract code is empty", async () => { + test("handles empty contract code", async () => { const options: DeployOptions = { contract: "/mocked/contract/path", }; @@ -132,8 +127,183 @@ describe("Deploy Action", () => { await deployer.deploy(options); - expect(fs.existsSync).toHaveBeenCalledWith(options.contract); - expect(fs.readFileSync).toHaveBeenCalledWith(options.contract, "utf-8"); + expect(deployer["failSpinner"]).toHaveBeenCalledWith("Contract code is empty."); expect(mockClient.deployContract).not.toHaveBeenCalled(); }); + + test("deployScripts executes scripts in order", async () => { + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.readdirSync).mockReturnValue([ + "1_first.ts", + "2_second.js", + "10_last.ts", + ] as any); + + vi.spyOn(deployer as any, "executeTsScript").mockResolvedValue(undefined); + vi.spyOn(deployer as any, "executeJsScript").mockResolvedValue(undefined); + + await deployer.deployScripts(); + + expect(deployer["setSpinnerText"]).toHaveBeenCalledWith("Found 3 deploy scripts. Executing..."); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringMatching(/1_first.ts/)); + expect(deployer["executeJsScript"]).toHaveBeenCalledWith(expect.stringMatching(/2_second.js/)); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringMatching(/10_last.ts/)); + }); + + test("executeTsScript transpiles and executes TypeScript", async () => { + const filePath = "/mocked/script.ts"; + const outFile = "/mocked/script.compiled.js"; + + vi.spyOn(deployer as any, "executeJsScript").mockResolvedValue(undefined); + vi.mocked(buildSync).mockImplementation((() => {}) as any); + + await deployer["executeTsScript"](filePath); + + expect(deployer["startSpinner"]).toHaveBeenCalledWith(`Transpiling TypeScript file: ${filePath}`); + expect(buildSync).toHaveBeenCalledWith({ + entryPoints: [filePath], + outfile: outFile, + bundle: false, + platform: "node", + format: "esm", + target: "es2020", + sourcemap: false, + }); + + expect(deployer["executeJsScript"]).toHaveBeenCalledWith(filePath, outFile); + expect(fs.unlinkSync).toHaveBeenCalledWith(outFile); + }); + + test("deployScripts fails when deploy folder is missing", async () => { + vi.mocked(fs.existsSync).mockReturnValue(false); + + await deployer.deployScripts(); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith("No deploy folder found."); + }); + + test("deployScripts sorts and executes scripts correctly", async () => { + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.readdirSync).mockReturnValue([ + "10_last.ts", + "2_second.js", + "1_first.ts" + ] as any); + + vi.spyOn(deployer as any, "executeTsScript").mockResolvedValue(undefined); + vi.spyOn(deployer as any, "executeJsScript").mockResolvedValue(undefined); + + await deployer.deployScripts(); + + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("1_first.ts")); + expect(deployer["executeJsScript"]).toHaveBeenCalledWith(expect.stringContaining("2_second.js")); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("10_last.ts")); + }); + + test("deployScripts fails when no scripts are found", async () => { + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.readdirSync).mockReturnValue([]); + + await deployer.deployScripts(); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith("No deploy scripts found."); + }); + + test("deployScripts handles script execution errors", async () => { + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.readdirSync).mockReturnValue(["1_failing.ts"] as any); + vi.spyOn(deployer as any, "executeTsScript").mockRejectedValue(new Error("Script error")); + + await deployer.deployScripts(); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith( + expect.stringContaining("Error executing script:"), + expect.any(Error) + ); + }); + + test("executeJsScript fails gracefully", async () => { + const filePath = "/mocked/script.js"; + + await deployer["executeJsScript"](filePath); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith( + expect.stringContaining("Error executing:"), + expect.any(Error) + ); + }); + + test("deploy fails when contract code is empty", async () => { + const options: DeployOptions = { contract: "/mocked/contract/path" }; + + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.readFileSync).mockReturnValue(""); + + await deployer.deploy(options); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith("Contract code is empty."); + }); + + test("deployScripts correctly sorts mixed numbered and non-numbered scripts", async () => { + vi.mocked(fs.existsSync).mockReturnValue(true); + vi.mocked(fs.readdirSync).mockReturnValue([ + "script.ts", + "2alpha_script.ts", + "3alpha_script.ts", + "blpha_script.ts", + "clpha_script.ts" + ] as any); + + vi.spyOn(deployer as any, "executeTsScript").mockResolvedValue(undefined); + vi.spyOn(deployer as any, "executeJsScript").mockResolvedValue(undefined); + + await deployer.deployScripts(); + + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("script.ts")); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("2alpha_script.ts")); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("3alpha_script.ts")); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("blpha_script.ts")); + expect(deployer["executeTsScript"]).toHaveBeenCalledWith(expect.stringContaining("clpha_script.ts")); + }); + + test("executeJsScript fails if module has no default export", async () => { + const filePath = "/mocked/script.js"; + + vi.doMock(pathToFileURL(filePath).href, () => ({ default: "Not a function" })); + + await deployer["executeJsScript"](filePath); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith( + expect.stringContaining("No \"default\" function found in:"), + ); + }); + + test("executeJsScript successfully executes a script", async () => { + const filePath = "/mocked/script.js"; + const mockFn = vi.fn(); // This mock function simulates the script execution + + vi.doMock(pathToFileURL(filePath).href, () => ({ default: mockFn })); + + await deployer["executeJsScript"](filePath); + + expect(mockFn).toHaveBeenCalledWith(deployer["genlayerClient"]); + + expect(deployer["succeedSpinner"]).toHaveBeenCalledWith(`Successfully executed: ${filePath}`); + }); + + test("executeTsScript fails when buildSync throws an error", async () => { + const filePath = "/mocked/script.ts"; + const error = new Error("Build failed"); + + vi.mocked(buildSync).mockImplementation(() => { + throw error; // Simulate an error during transpilation + }); + + await deployer["executeTsScript"](filePath); + + expect(deployer["failSpinner"]).toHaveBeenCalledWith( + `Error executing: ${filePath}`, + error + ); + }); }); diff --git a/tests/commands/call.test.ts b/tests/commands/call.test.ts index 7fd2d48e..e3ed3ee9 100644 --- a/tests/commands/call.test.ts +++ b/tests/commands/call.test.ts @@ -4,6 +4,9 @@ import { vi, describe, beforeEach, afterEach, test, expect } from "vitest"; import { initializeContractsCommands } from "../../src/commands/contracts"; vi.mock("../../src/commands/contracts/call"); +vi.mock("esbuild", () => ({ + buildSync: vi.fn(), +})); describe("call command", () => { let program: Command; diff --git a/tests/commands/deploy.test.ts b/tests/commands/deploy.test.ts index 80bf286b..a8145ff1 100644 --- a/tests/commands/deploy.test.ts +++ b/tests/commands/deploy.test.ts @@ -4,6 +4,9 @@ import { initializeContractsCommands } from "../../src/commands/contracts"; import { DeployAction } from "../../src/commands/contracts/deploy"; vi.mock("../../src/commands/contracts/deploy"); +vi.mock("esbuild", () => ({ + buildSync: vi.fn(), +})); describe("deploy command", () => { let program: Command; @@ -66,4 +69,12 @@ describe("deploy command", () => { program.parse(["node", "test", "deploy", "--contract", "./path/to/contract"]) ).not.toThrow(); }); + + test("DeployAction.deployScripts is called without throwing errors", async () => { + program.parse(["node", "test", "deploy"]); + vi.mocked(DeployAction.prototype.deployScripts).mockResolvedValueOnce(undefined); + expect(() => + program.parse(["node", "test", "deploy"]) + ).not.toThrow(); + }); }); From 84d8aa00eec402607866ef22081e3f62ab52d801 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 27 Feb 2025 00:48:50 -0300 Subject: [PATCH 34/40] fix: esbuild version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e79a148b..0d12fb96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "@typescript-eslint/parser": "^8.0.0", "@vitest/coverage-v8": "^2.1.4", "cross-env": "^7.0.3", - "esbuild": "^0.25.0", + "esbuild": ">=0.25.0", "eslint": "^9.0.0", "eslint-config-prettier": "^10.0.0", "eslint-import-resolver-typescript": "^3.6.1", diff --git a/package.json b/package.json index dfb392cc..de3f455b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@typescript-eslint/parser": "^8.0.0", "@vitest/coverage-v8": "^2.1.4", "cross-env": "^7.0.3", - "esbuild": "^0.25.0", + "esbuild": ">=0.25.0", "eslint": "^9.0.0", "eslint-config-prettier": "^10.0.0", "eslint-import-resolver-typescript": "^3.6.1", From 14a1195ab34aa83d8d6dba3f95f0ffd4ff07733f Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 27 Feb 2025 21:33:33 -0300 Subject: [PATCH 35/40] fix: esbuild prod --- esbuild.config.prod.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esbuild.config.prod.js b/esbuild.config.prod.js index 0f9fd393..7420cd3c 100644 --- a/esbuild.config.prod.js +++ b/esbuild.config.prod.js @@ -6,7 +6,8 @@ export default { outfile: "dist/index.js", platform: "node", target: "es2020", - define: { "import.meta.url": "_importMetaUrl" }, + format: "esm", + define: { "import.meta.url": "import.meta.url" }, banner: { js: `const _importMetaUrl = new URL(import.meta.url).pathname;`, }, From 6629cba610c39db29dae075ec744ba6d2f89e383 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Tue, 4 Mar 2025 10:35:36 -0300 Subject: [PATCH 36/40] feat: call command using base action --- src/commands/contracts/call.ts | 36 +++++------ tests/actions/call.test.ts | 112 +++++++++++---------------------- 2 files changed, 53 insertions(+), 95 deletions(-) diff --git a/src/commands/contracts/call.ts b/src/commands/contracts/call.ts index a9a58b6e..5b00cdd3 100644 --- a/src/commands/contracts/call.ts +++ b/src/commands/contracts/call.ts @@ -2,15 +2,17 @@ import { createClient, createAccount } from "genlayer-js"; import { simulator } from "genlayer-js/chains"; import type { GenLayerClient } from "genlayer-js/types"; import { getPrivateKey } from "../../lib/accounts/getPrivateKey"; +import { BaseAction } from "../../lib/actions/BaseAction"; export interface CallOptions { args: any[]; } -export class CallAction { +export class CallAction extends BaseAction{ private genlayerClient: GenLayerClient; constructor() { + super(); this.genlayerClient = createClient({ chain: simulator, endpoint: process.env.VITE_JSON_RPC_SERVER_URL, @@ -27,27 +29,23 @@ export class CallAction { method: string; args: any[]; }): Promise { - console.log(`Calling method ${method} on contract at ${contractAddress}...`); + this.startSpinner(`Calling method ${method} on contract at ${contractAddress}...`); const contractSchema = await this.genlayerClient.getContractSchema(contractAddress); if(!contractSchema.methods.hasOwnProperty(method)){ - console.error(`method ${method} not found.`); - process.exit(1); + this.failSpinner(`method ${method} not found.`); + return } const readonly = contractSchema.methods[method as any].readonly; - try { - if (readonly) { - await this.executeRead(contractAddress, method, args); - } else { - await this.executeWrite(contractAddress, method, args); - } - } catch (error) { - console.error("Error calling contract method:", error); - throw error; + if (readonly) { + await this.executeRead(contractAddress, method, args); + return } + + await this.executeWrite(contractAddress, method, args); } private async executeRead(contractAddress: string, method: string, args: any[]): Promise { @@ -57,10 +55,9 @@ export class CallAction { functionName: method, args, }); - console.log("Read result:", result); + this.succeedSpinner("Read operation successfully executed", result); } catch (error) { - console.error("Error during read operation:", error); - throw error; + this.failSpinner("Error during read operation", error); } } @@ -77,11 +74,10 @@ export class CallAction { retries: 15, interval: 2000, }); - console.log("Write transaction hash:", hash); - console.log("Result:", result); + this.log("Write transaction hash:", hash); + this.succeedSpinner("Write operation successfully executed", result); } catch (error) { - console.error("Error during write operation:", error); - throw error; + this.failSpinner("Error during write operation", error); } } } diff --git a/tests/actions/call.test.ts b/tests/actions/call.test.ts index 34880b4b..7847ae35 100644 --- a/tests/actions/call.test.ts +++ b/tests/actions/call.test.ts @@ -1,18 +1,18 @@ import { describe, test, vi, beforeEach, afterEach, expect } from "vitest"; import { createClient, createAccount } from "genlayer-js"; -import { CallAction, CallOptions } from "../../src/commands/contracts/call"; +import { CallAction } from "../../src/commands/contracts/call"; import { getPrivateKey } from "../../src/lib/accounts/getPrivateKey"; vi.mock("genlayer-js"); vi.mock("../../src/lib/accounts/getPrivateKey"); -describe("Call Action", () => { - let caller: CallAction; +describe("CallAction", () => { + let callActions: CallAction; const mockClient = { readContract: vi.fn(), writeContract: vi.fn(), waitForTransactionReceipt: vi.fn(), - getContractSchema: vi.fn() + getContractSchema: vi.fn(), }; const mockPrivateKey = "mocked_private_key"; @@ -22,7 +22,12 @@ describe("Call Action", () => { vi.mocked(createClient).mockReturnValue(mockClient as any); vi.mocked(createAccount).mockReturnValue({ privateKey: mockPrivateKey } as any); vi.mocked(getPrivateKey).mockReturnValue(mockPrivateKey); - caller = new CallAction(); + callActions = new CallAction(); + + vi.spyOn(callActions as any, "startSpinner").mockImplementation(() => {}); + vi.spyOn(callActions as any, "succeedSpinner").mockImplementation(() => {}); + vi.spyOn(callActions as any, "failSpinner").mockImplementation(() => {}); + vi.spyOn(callActions as any, "log").mockImplementation(() => {}); }); afterEach(() => { @@ -30,15 +35,13 @@ describe("Call Action", () => { }); test("calls readContract successfully", async () => { - const options: CallOptions = { - args: [1, 2, "Hello"] - }; + const options = { args: [1, 2, "Hello"] }; const mockResult = "mocked_result"; + vi.mocked(mockClient.getContractSchema).mockResolvedValue({ methods: { getData: { readonly: true } } }); vi.mocked(mockClient.readContract).mockResolvedValue(mockResult); - vi.mocked(mockClient.getContractSchema).mockResolvedValue({methods: {getData: {readonly: true}}}); - await caller.call({ + await callActions.call({ contractAddress: "0xMockedContract", method: "getData", ...options, @@ -49,21 +52,19 @@ describe("Call Action", () => { functionName: "getData", args: [1, 2, "Hello"], }); - expect(mockClient.readContract).toHaveResolvedWith(mockResult); + expect(callActions["succeedSpinner"]).toHaveBeenCalledWith("Read operation successfully executed", "mocked_result"); }); test("calls writeContract successfully", async () => { - const options: CallOptions = { - args: [42, "Update"] - }; + const options = { args: [42, "Update"] }; const mockHash = "0xMockedTransactionHash"; const mockReceipt = { status: "success" }; + vi.mocked(mockClient.getContractSchema).mockResolvedValue({ methods: { updateData: { readonly: false } } }); vi.mocked(mockClient.writeContract).mockResolvedValue(mockHash); vi.mocked(mockClient.waitForTransactionReceipt).mockResolvedValue(mockReceipt); - vi.mocked(mockClient.getContractSchema).mockResolvedValue({methods: {updateData: {readonly: false}}}); - await caller.call({ + await callActions.call({ contractAddress: "0xMockedContract", method: "updateData", ...options, @@ -75,72 +76,33 @@ describe("Call Action", () => { args: [42, "Update"], value: 0n, }); - expect(mockClient.waitForTransactionReceipt).toHaveBeenCalledWith({ - hash: mockHash, - retries: 15, - interval: 2000, - }); - expect(mockClient.writeContract).toHaveResolvedWith(mockHash); + expect(callActions["log"]).toHaveBeenCalledWith("Write transaction hash:", mockHash); + expect(callActions["succeedSpinner"]).toHaveBeenCalledWith("Write operation successfully executed", mockReceipt); }); - test("throws error when method is not found", async () => { - const options: CallOptions = { - args: [] - }; + test("fails when method is not found", async () => { + vi.mocked(mockClient.getContractSchema).mockResolvedValue({ methods: { updateData: { readonly: false } } }); - vi.mocked(mockClient.getContractSchema).mockResolvedValue({methods: {updateData: {readonly: false}}}); + await callActions.call({ contractAddress: "0xMockedContract", method: "getData", args: [] }); - await expect( - caller.call({ - contractAddress: "0xMockedContract", - method: "getData", - ...options, - }) - ).rejects.toThrowError('process.exit unexpectedly called with "1"'); - - expect(mockClient.readContract).not.toHaveBeenCalled(); - expect(mockClient.writeContract).not.toHaveBeenCalled(); + expect(callActions["failSpinner"]).toHaveBeenCalledWith("method getData not found."); }); - test("handles errors during readContract", async () => { - const options: CallOptions = { - args: [1] - }; - - vi.mocked(mockClient.getContractSchema).mockResolvedValue({methods: {getData: {readonly: true}}}); - vi.mocked(mockClient.readContract).mockRejectedValue( - new Error("Mocked read error") - ); - - await expect( - caller.call({ - contractAddress: "0xMockedContract", - method: "getData", - ...options, - }) - ).rejects.toThrowError("Mocked read error"); - - expect(mockClient.readContract).toHaveBeenCalled(); + test("handles readContract errors", async () => { + vi.mocked(mockClient.getContractSchema).mockResolvedValue({ methods: { getData: { readonly: true } } }); + vi.mocked(mockClient.readContract).mockRejectedValue(new Error("Mocked read error")); + + await callActions.call({ contractAddress: "0xMockedContract", method: "getData", args: [1] }); + + expect(callActions["failSpinner"]).toHaveBeenCalledWith("Error during read operation", expect.any(Error)); }); - test("handles errors during writeContract", async () => { - const options: CallOptions = { - args: [1] - }; - - vi.mocked(mockClient.getContractSchema).mockResolvedValue({methods: {updateData: {readonly: false}}}); - vi.mocked(mockClient.writeContract).mockRejectedValue( - new Error("Mocked write error") - ); - - await expect( - caller.call({ - contractAddress: "0xMockedContract", - method: "updateData", - ...options, - }) - ).rejects.toThrowError("Mocked write error"); - - expect(mockClient.writeContract).toHaveBeenCalled(); + test("handles writeContract errors", async () => { + vi.mocked(mockClient.getContractSchema).mockResolvedValue({ methods: { updateData: { readonly: false } } }); + vi.mocked(mockClient.writeContract).mockRejectedValue(new Error("Mocked write error")); + + await callActions.call({ contractAddress: "0xMockedContract", method: "updateData", args: [1] }); + + expect(callActions["failSpinner"]).toHaveBeenCalledWith("Error during write operation", expect.any(Error)); }); }); From a61f131af3e00f525455fb239fd4b555141cf5d6 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Wed, 5 Mar 2025 06:01:47 -0300 Subject: [PATCH 37/40] fix: merge --- tests/actions/call.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/actions/call.test.ts b/tests/actions/call.test.ts index 7847ae35..6386e05e 100644 --- a/tests/actions/call.test.ts +++ b/tests/actions/call.test.ts @@ -105,4 +105,4 @@ describe("CallAction", () => { expect(callActions["failSpinner"]).toHaveBeenCalledWith("Error during write operation", expect.any(Error)); }); -}); +}); \ No newline at end of file From d84f1d3533be852889f1a28aedb3a204cac9950a Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 6 Mar 2025 19:14:11 -0300 Subject: [PATCH 38/40] fix: package lock --- package-lock.json | 244 +++++++++++++++++++++++----------------------- 1 file changed, 122 insertions(+), 122 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d12fb96..2d8b341f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2030,9 +2030,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "version": "22.13.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.9.tgz", + "integrity": "sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -2087,9 +2087,9 @@ } }, "node_modules/@types/ssh2/node_modules/@types/node": { - "version": "18.19.76", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.76.tgz", - "integrity": "sha512-yvR7Q9LdPz2vGpmpJX5LolrgRdWvB67MJKDPSgIIzpFbaf9a1j/f5DnLp5VDyHGMR0QZHlTr1afsD87QCXFHKw==", + "version": "18.19.79", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.79.tgz", + "integrity": "sha512-90K8Oayimbctc5zTPHPfZloc/lGVs7f3phUAAMcTgEPtg8kKquGZDERC8K4vkBYkQQh48msiYUslYtxTWvqcAg==", "dev": true, "license": "MIT", "dependencies": { @@ -2121,17 +2121,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.25.0.tgz", - "integrity": "sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.0.tgz", + "integrity": "sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/type-utils": "8.25.0", - "@typescript-eslint/utils": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/type-utils": "8.26.0", + "@typescript-eslint/utils": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2147,20 +2147,20 @@ "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.25.0.tgz", - "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.26.0.tgz", + "integrity": "sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/typescript-estree": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4" }, "engines": { @@ -2172,18 +2172,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz", - "integrity": "sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.26.0.tgz", + "integrity": "sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0" + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2194,14 +2194,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.25.0.tgz", - "integrity": "sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.26.0.tgz", + "integrity": "sha512-ruk0RNChLKz3zKGn2LwXuVoeBcUMh+jaqzN461uMMdxy5H9epZqIBtYj7UiPXRuOpaALXGbmRuZQhmwHhaS04Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.25.0", - "@typescript-eslint/utils": "8.25.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/utils": "8.26.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -2214,13 +2214,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.25.0.tgz", - "integrity": "sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", "dev": true, "license": "MIT", "engines": { @@ -2232,14 +2232,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.25.0.tgz", - "integrity": "sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.26.0.tgz", + "integrity": "sha512-tiJ1Hvy/V/oMVRTbEOIeemA2XoylimlDQ03CgPPNaHYZbpsc78Hmngnt+WXZfJX1pjQ711V7g0H7cSJThGYfPQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2255,20 +2255,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.25.0.tgz", - "integrity": "sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.26.0.tgz", + "integrity": "sha512-2L2tU3FVwhvU14LndnQCA2frYC8JnPDVKyQtWFPf8IYFMt/ykEN1bPolNhNbCVgOmdzTlWdusCTKA/9nKrf8Ig==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/typescript-estree": "8.25.0" + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2279,17 +2279,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz", - "integrity": "sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/types": "8.26.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2474,9 +2474,9 @@ } }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -2958,9 +2958,9 @@ } }, "node_modules/boxen/node_modules/type-fest": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", - "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "version": "4.37.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.37.0.tgz", + "integrity": "sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -3107,13 +3107,13 @@ } }, "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -3450,9 +3450,9 @@ } }, "node_modules/configstore/node_modules/type-fest": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", - "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "version": "4.37.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.37.0.tgz", + "integrity": "sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -4494,9 +4494,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", - "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.2.tgz", + "integrity": "sha512-1105/17ZIMjmCOJOPNfVdbXafLCLj3hPmkmB7dLgt7XsQ/zkxSuDerE/xgO3RxoHysR1N1whmquY0lSn2O0VLg==", "dev": true, "license": "MIT", "bin": { @@ -4909,9 +4909,9 @@ } }, "node_modules/expect-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", - "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.0.tgz", + "integrity": "sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==", "license": "Apache-2.0", "engines": { "node": ">=12.0.0" @@ -4997,9 +4997,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", - "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", "dependencies": { @@ -5087,9 +5087,9 @@ } }, "node_modules/find-up-simple": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", - "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", + "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", "dev": true, "license": "MIT", "engines": { @@ -7152,9 +7152,9 @@ } }, "node_modules/nan": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.1.tgz", - "integrity": "sha512-pfRR4ZcNTSm2ZFHaztuvbICf+hyiG6ecA06SfAxoPmuHjvMu0KUIae7Y8GyVkbBqeEIidsmXeYooWIX9+qjfRQ==", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.2.tgz", + "integrity": "sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ==", "license": "MIT", "optional": true }, @@ -7324,9 +7324,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.16", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.16.tgz", - "integrity": "sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==", + "version": "2.2.18", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.18.tgz", + "integrity": "sha512-p1TRH/edngVEHVbwqWnxUViEmq5znDvyB+Sik5cmuLpGOIfDf/39zLiq3swPF8Vakqn+gvNiOQAZu8djYlQILA==", "devOptional": true, "license": "MIT" }, @@ -7752,9 +7752,9 @@ } }, "node_modules/parse-json/node_modules/type-fest": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", - "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "version": "4.37.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.37.0.tgz", + "integrity": "sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -7959,9 +7959,9 @@ } }, "node_modules/prettier": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz", - "integrity": "sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, "license": "MIT", "bin": { @@ -8164,9 +8164,9 @@ } }, "node_modules/read-package-up/node_modules/type-fest": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", - "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "version": "4.37.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.37.0.tgz", + "integrity": "sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -8197,9 +8197,9 @@ } }, "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", - "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "version": "4.37.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.37.0.tgz", + "integrity": "sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -8483,9 +8483,9 @@ } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -8495,9 +8495,9 @@ }, "node_modules/rollup": { "name": "@rollup/wasm-node", - "version": "4.34.8", - "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.34.8.tgz", - "integrity": "sha512-+bu9Ce1VDob+hfEQYPwC03Lds+ACDlGVwuWeLZE2fN+O52O74RZ0F5engVpv7i2YDyTyj4oU/NKO4pjSXMdn6g==", + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.34.9.tgz", + "integrity": "sha512-DP0PulB23rUUC6uxNV4BVm6pqh77LASzeEggSnnNkBkXKxfpJiLe6UW/fsVfsFv2dWZ3r5EQVeYo2q/hg09SZg==", "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -9006,9 +9006,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", - "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.1.tgz", + "integrity": "sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==", "license": "MIT" }, "node_modules/stdin-discarder": { @@ -9420,22 +9420,22 @@ } }, "node_modules/tldts": { - "version": "6.1.78", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.78.tgz", - "integrity": "sha512-fSgYrW0ITH0SR/CqKMXIruYIPpNu5aDgUp22UhYoSrnUQwc7SBqifEBFNce7AAcygUPBo6a/gbtcguWdmko4RQ==", + "version": "6.1.83", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.83.tgz", + "integrity": "sha512-FHxxNJJ0WNsEBPHyC1oesQb3rRoxpuho/z2g3zIIAhw1WHJeQsUzK1jYK8TI1/iClaa4fS3Z2TCA9mtxXsENSg==", "devOptional": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.78" + "tldts-core": "^6.1.83" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.78", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.78.tgz", - "integrity": "sha512-jS0svNsB99jR6AJBmfmEWuKIgz91Haya91Z43PATaeHJ24BkMoNRb/jlaD37VYjb0mYf6gRL/HOnvS1zEnYBiw==", + "version": "6.1.83", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.83.tgz", + "integrity": "sha512-I2wb9OJc6rXyh9d4aInhSNWChNI+ra6qDnFEGEwe9OoA68lE4Temw29bOkf1Uvwt8VZS079t1BFZdXVBmmB4dw==", "devOptional": true, "license": "MIT" }, @@ -9465,9 +9465,9 @@ } }, "node_modules/tough-cookie": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.1.tgz", - "integrity": "sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", "devOptional": true, "license": "BSD-3-Clause", "dependencies": { @@ -9677,9 +9677,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "devOptional": true, "license": "Apache-2.0", "bin": { @@ -9856,9 +9856,9 @@ } }, "node_modules/viem": { - "version": "2.23.5", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.5.tgz", - "integrity": "sha512-cUfBHdFQHmBlPW0loFXda0uZcoU+uJw3NRYQRwYgkrpH6PgovH8iuVqDn6t1jZk82zny4wQL54c9dCX2W9kLMg==", + "version": "2.23.6", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.6.tgz", + "integrity": "sha512-+yUeK8rktbGFQaLIvY4Tki22HUjian9Z4eKGAUT72RF9bcfkYgK8CJZz9P83tgoeLpiTyX3xcBM4xJZrJyKmsA==", "funding": [ { "type": "github", From 6bd5d5510d9d9eb6c535f0bc8414e1806b8c1780 Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Thu, 6 Mar 2025 23:29:31 -0300 Subject: [PATCH 39/40] fix: 1- not logging 'false' and not sending the expected type to rpc --- src/commands/contracts/index.ts | 11 +++++++++-- src/lib/actions/BaseAction.ts | 12 ++++++------ tests/commands/call.test.ts | 4 +++- tests/commands/deploy.test.ts | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/commands/contracts/index.ts b/src/commands/contracts/index.ts index 062bf68f..776b3a36 100644 --- a/src/commands/contracts/index.ts +++ b/src/commands/contracts/index.ts @@ -2,6 +2,13 @@ import { Command } from "commander"; import { DeployAction, DeployOptions } from "./deploy"; import { CallAction, CallOptions } from "./call"; +function parseArg(value: string, previous: any[] = []): any[] { + if (value === "true") return [...previous, true]; + if (value === "false") return [...previous, false]; + if (!isNaN(Number(value))) return [...previous, Number(value)]; + return [...previous, value]; +} + export function initializeContractsCommands(program: Command) { program @@ -9,7 +16,7 @@ export function initializeContractsCommands(program: Command) { .description("Deploy intelligent contracts") .option("--contract ", "Path to the smart contract to deploy") // .option("--network ", "Specify the network (e.g., testnet)", "localnet") - .option("--args ", "Positional arguments for the contract (space-separated, use quotes for multi-word arguments)", []) + .option("--args ", "Positional arguments for the contract (space-separated, use quotes for multi-word arguments)", parseArg, []) .action(async (options: DeployOptions) => { const deployer = new DeployAction(); if(options.contract){ @@ -22,7 +29,7 @@ export function initializeContractsCommands(program: Command) { program .command("call ") .description("Call a contract method") - .option("--args ", "Positional arguments for the method (space-separated, use quotes for multi-word arguments)", []) + .option("--args ", "Positional arguments for the method (space-separated, use quotes for multi-word arguments)", parseArg, []) .action(async (contractAddress: string, method: string, options: CallOptions) => { const caller = new CallAction(); await caller.call({ contractAddress, method, ...options }); diff --git a/src/lib/actions/BaseAction.ts b/src/lib/actions/BaseAction.ts index 32dd96db..25086e88 100644 --- a/src/lib/actions/BaseAction.ts +++ b/src/lib/actions/BaseAction.ts @@ -42,27 +42,27 @@ export class BaseAction extends ConfigFileManager { protected log(message: string, data?: any): void { console.log(chalk.white(`\n${message}`)); - if (data) console.log(this.formatOutput(data)); + if (data !== undefined) console.log(this.formatOutput(data)); } protected logSuccess(message: string, data?: any): void { console.log(chalk.green(`\n✔ ${message}`)); - if (data) console.log(chalk.green(this.formatOutput(data))); + if (data !== undefined) console.log(chalk.green(this.formatOutput(data))); } protected logInfo(message: string, data?: any): void { console.log(chalk.blue(`\nℹ ${message}`)); - if (data) console.log(chalk.blue(this.formatOutput(data))); + if (data !== undefined) console.log(chalk.blue(this.formatOutput(data))); } protected logWarning(message: string, data?: any): void { console.log(chalk.yellow(`\n⚠ ${message}`)); - if (data) console.log(chalk.yellow(this.formatOutput(data))); + if (data !== undefined) console.log(chalk.yellow(this.formatOutput(data))); } protected logError(message: string, error?: any): void { console.error(chalk.red(`\n✖ ${message}`)); - if (error) console.error(chalk.red(this.formatOutput(error))); + if (error !== undefined) console.error(chalk.red(this.formatOutput(error))); } protected startSpinner(message: string) { @@ -71,7 +71,7 @@ export class BaseAction extends ConfigFileManager { } protected succeedSpinner(message: string, data?: any): void { - if (data) this.log('Result:', data); + if (data !== undefined) this.log('Result:', data); this.spinner.succeed(chalk.green(message)); } diff --git a/tests/commands/call.test.ts b/tests/commands/call.test.ts index e3ed3ee9..e3f135c5 100644 --- a/tests/commands/call.test.ts +++ b/tests/commands/call.test.ts @@ -42,12 +42,14 @@ describe("call command", () => { "1", "2", "Hello", + "false", + "true" ]); expect(CallAction).toHaveBeenCalledTimes(1); expect(CallAction.prototype.call).toHaveBeenCalledWith({ contractAddress: "0xMockedContract", method: "updateData", - args: ["1", "2", "Hello"] + args: [1, 2, "Hello", false, true] }); }); diff --git a/tests/commands/deploy.test.ts b/tests/commands/deploy.test.ts index a8145ff1..b33ebd1d 100644 --- a/tests/commands/deploy.test.ts +++ b/tests/commands/deploy.test.ts @@ -45,7 +45,7 @@ describe("deploy command", () => { expect(DeployAction).toHaveBeenCalledTimes(1); expect(DeployAction.prototype.deploy).toHaveBeenCalledWith({ contract: "./path/to/contract", - args: ["1", "2", "3"] + args: [1, 2, 3] }); }); From c192bc4f3b51e806a6b84b2a8a4a0599a1e7374c Mon Sep 17 00:00:00 2001 From: Edinaldo Junior Date: Fri, 7 Mar 2025 00:58:57 -0300 Subject: [PATCH 40/40] chore: adding important log --- src/commands/contracts/deploy.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/contracts/deploy.ts b/src/commands/contracts/deploy.ts index 8e61c094..66e3aef3 100644 --- a/src/commands/contracts/deploy.ts +++ b/src/commands/contracts/deploy.ts @@ -141,6 +141,8 @@ export class DeployAction extends BaseAction { status: TransactionStatus.ACCEPTED, }); + this.log("Deployment Receipt:", result); + this.succeedSpinner("Contract deployed successfully.", { "Transaction Hash": hash, "Contract Address": result.data?.contract_address,