From a6670684114c49f12991abd504e023daaf9bd553 Mon Sep 17 00:00:00 2001 From: Jorge del Casar <948953+jorgecasar@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:48:01 +0100 Subject: [PATCH] refactor: reduce named export complexity --- package-lock.json | 2259 +++++++++-------- package.json | 5 +- src/errors/mock-runner-error.js | 6 +- src/errors/openapi-schema-not-found-error.js | 1 + src/helpers/colours.js | 4 +- src/helpers/verify-remote-origin.js | 4 +- src/index.js | 2 +- src/main.js | 19 +- src/services/check-string-in-file.js | 7 +- src/services/clone-git-repository.js | 4 +- src/services/find-oas-from-dir.js | 25 +- src/services/gitignore.js | 8 +- src/services/inquirer-validators.js | 10 +- src/services/start-mock-server.js | 8 +- src/services/user-flow-steps.js | 171 -- src/services/user-flow-steps/helpers.js | 95 + .../user-flow-steps/init-with-config-file.js | 29 + .../user-flow-steps/init-with-schema-paths.js | 29 + src/services/user-flow-steps/init.js | 55 + test/helpers/file-content-iterator.js | 14 + test/helpers/global-mocks-factory.js | 23 + test/unit/errors/mock-runner-error.test.js | 62 +- test/unit/helpers/colours.test.js | 8 +- test/unit/main.test.js | 189 +- .../services/check-string-in-file.test.js | 35 +- .../services/clone-git-repository.test.js | 56 +- test/unit/services/find-oas-from-dir.test.js | 305 +-- test/unit/services/gitignore.test.js | 118 +- .../unit/services/inquirer-validators.test.js | 77 +- test/unit/services/logger.test.js | 15 +- test/unit/services/start-mock-server.test.js | 90 +- test/unit/services/user-flow-steps.test.js | 196 -- .../services/user-flow-steps/helpers.test.js | 164 ++ .../init-with-config-file.test.js | 59 + .../init-with-schema-paths.test.js | 76 + .../services/user-flow-steps/init.test.js | 95 + tsconfig.json | 4 +- 37 files changed, 2380 insertions(+), 1947 deletions(-) delete mode 100644 src/services/user-flow-steps.js create mode 100644 src/services/user-flow-steps/helpers.js create mode 100644 src/services/user-flow-steps/init-with-config-file.js create mode 100644 src/services/user-flow-steps/init-with-schema-paths.js create mode 100644 src/services/user-flow-steps/init.js create mode 100644 test/helpers/file-content-iterator.js create mode 100644 test/helpers/global-mocks-factory.js delete mode 100644 test/unit/services/user-flow-steps.test.js create mode 100644 test/unit/services/user-flow-steps/helpers.test.js create mode 100644 test/unit/services/user-flow-steps/init-with-config-file.test.js create mode 100644 test/unit/services/user-flow-steps/init-with-schema-paths.test.js create mode 100644 test/unit/services/user-flow-steps/init.test.js diff --git a/package-lock.json b/package-lock.json index 3ee1722..cfe9417 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,8 +28,9 @@ "@types/sinon": "^10.0.19", "@types/sinon-chai": "^3.2.10", "c8": "^8.0.1", + "chai-as-promised": "^7.1.1", "eslint-config-prettier": "^9.0.0", - "esmock": "^2.6.0", + "esmock": "^2.6.3", "husky": "^8.0.0", "mocha": "^10.2.0", "mock-fs": "^5.2.0", @@ -108,12 +109,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.13", + "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" }, "engines": { @@ -201,9 +202,9 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", @@ -303,17 +304,17 @@ } }, "node_modules/@commitlint/cli": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.8.0.tgz", - "integrity": "sha512-D3LdyZYbiRyAChfJMNlAd9f2P9vNQ7GWbI9gN2o7L5hF07QJDqj4z/pcJF3PjDbJWOaUUXla287RdDmmKqH2WQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.8.1.tgz", + "integrity": "sha512-ay+WbzQesE0Rv4EQKfNbSMiJJ12KdKTDzIt0tcK4k11FdsWmtwP0Kp1NWMOUswfIWo6Eb7p7Ln721Nx9FLNBjg==", "dev": true, "peer": true, "dependencies": { - "@commitlint/format": "^17.4.4", - "@commitlint/lint": "^17.8.0", - "@commitlint/load": "^17.8.0", - "@commitlint/read": "^17.5.1", - "@commitlint/types": "^17.4.4", + "@commitlint/format": "^17.8.1", + "@commitlint/lint": "^17.8.1", + "@commitlint/load": "^17.8.1", + "@commitlint/read": "^17.8.1", + "@commitlint/types": "^17.8.1", "execa": "^5.0.0", "lodash.isfunction": "^3.0.9", "resolve-from": "5.0.0", @@ -328,9 +329,9 @@ } }, "node_modules/@commitlint/config-conventional": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.8.0.tgz", - "integrity": "sha512-MgiFXujmqAvi7M33C7OSMTznwrVkckrbXe/aZWQ/+KFGLLF6IE50XIcjGrW0/uiDGb/im5qbqF2dh1dCFNa+sQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.8.1.tgz", + "integrity": "sha512-NxCOHx1kgneig3VLauWJcDWS40DVjg7nKOpBEEK9E5fjJpQqLCilcnKkIIjdBH98kEO1q3NpE5NSrZ2kl/QGJg==", "dev": true, "dependencies": { "conventional-changelog-conventionalcommits": "^6.1.0" @@ -340,13 +341,13 @@ } }, "node_modules/@commitlint/config-validator": { - "version": "17.6.7", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.6.7.tgz", - "integrity": "sha512-vJSncmnzwMvpr3lIcm0I8YVVDJTzyjy7NZAeXbTXy+MPUdAr9pKyyg7Tx/ebOQ9kqzE6O9WT6jg2164br5UdsQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.8.1.tgz", + "integrity": "sha512-UUgUC+sNiiMwkyiuIFR7JG2cfd9t/7MV8VB4TZ+q02ZFkHoduUS4tJGsCBWvBOGD9Btev6IecPMvlWUfJorkEA==", "dev": true, "peer": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^17.8.1", "ajv": "^8.11.0" }, "engines": { @@ -354,13 +355,13 @@ } }, "node_modules/@commitlint/ensure": { - "version": "17.6.7", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.6.7.tgz", - "integrity": "sha512-mfDJOd1/O/eIb/h4qwXzUxkmskXDL9vNPnZ4AKYKiZALz4vHzwMxBSYtyL2mUIDeU9DRSpEUins8SeKtFkYHSw==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.8.1.tgz", + "integrity": "sha512-xjafwKxid8s1K23NFpL8JNo6JnY/ysetKo8kegVM7c8vs+kWLP8VrQq+NbhgVlmCojhEDbzQKp4eRXSjVOGsow==", "dev": true, "peer": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^17.8.1", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", "lodash.snakecase": "^4.1.1", @@ -372,9 +373,9 @@ } }, "node_modules/@commitlint/execute-rule": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz", - "integrity": "sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.8.1.tgz", + "integrity": "sha512-JHVupQeSdNI6xzA9SqMF+p/JjrHTcrJdI02PwesQIDCIGUrv04hicJgCcws5nzaoZbROapPs0s6zeVHoxpMwFQ==", "dev": true, "peer": true, "engines": { @@ -382,13 +383,13 @@ } }, "node_modules/@commitlint/format": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.4.4.tgz", - "integrity": "sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.8.1.tgz", + "integrity": "sha512-f3oMTyZ84M9ht7fb93wbCKmWxO5/kKSbwuYvS867duVomoOsgrgljkGGIztmT/srZnaiGbaK8+Wf8Ik2tSr5eg==", "dev": true, "peer": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^17.8.1", "chalk": "^4.1.0" }, "engines": { @@ -396,13 +397,13 @@ } }, "node_modules/@commitlint/is-ignored": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.8.0.tgz", - "integrity": "sha512-8bR6rxNcWaNprPBdE4ePIOwbxutTQGOsRPYWssX+zjGxnEljzaZSGzFUOMxapYILlf8Tts/O1wPQgG549Rdvdg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.8.1.tgz", + "integrity": "sha512-UshMi4Ltb4ZlNn4F7WtSEugFDZmctzFpmbqvpyxD3la510J+PLcnyhf9chs7EryaRFJMdAKwsEKfNK0jL/QM4g==", "dev": true, "peer": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^17.8.1", "semver": "7.5.4" }, "engines": { @@ -410,32 +411,32 @@ } }, "node_modules/@commitlint/lint": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.8.0.tgz", - "integrity": "sha512-4ihwnqOY4TcJN6iz5Jv1LeYavvBllONwFyGxOIWmCT5s4PNMb43cws2TUdbXTZL1Vq59etGKd5LWYDFPVbs5EA==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.8.1.tgz", + "integrity": "sha512-aQUlwIR1/VMv2D4GXSk7PfL5hIaFSfy6hSHV94O8Y27T5q+DlDEgd/cZ4KmVI+MWKzFfCTiTuWqjfRSfdRllCA==", "dev": true, "peer": true, "dependencies": { - "@commitlint/is-ignored": "^17.8.0", - "@commitlint/parse": "^17.7.0", - "@commitlint/rules": "^17.7.0", - "@commitlint/types": "^17.4.4" + "@commitlint/is-ignored": "^17.8.1", + "@commitlint/parse": "^17.8.1", + "@commitlint/rules": "^17.8.1", + "@commitlint/types": "^17.8.1" }, "engines": { "node": ">=v14" } }, "node_modules/@commitlint/load": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.8.0.tgz", - "integrity": "sha512-9VnGXYJCP4tXmR4YrwP8n5oX6T5ZsHfPQq6WuUQOvAI+QsDQMaTGgTRXr7us+xsjz+b+mMBSagogqfUx2aixyw==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.8.1.tgz", + "integrity": "sha512-iF4CL7KDFstP1kpVUkT8K2Wl17h2yx9VaR1ztTc8vzByWWcbO/WaKwxsnCOqow9tVAlzPfo1ywk9m2oJ9ucMqA==", "dev": true, "peer": true, "dependencies": { - "@commitlint/config-validator": "^17.6.7", - "@commitlint/execute-rule": "^17.4.0", - "@commitlint/resolve-extends": "^17.6.7", - "@commitlint/types": "^17.4.4", + "@commitlint/config-validator": "^17.8.1", + "@commitlint/execute-rule": "^17.8.1", + "@commitlint/resolve-extends": "^17.8.1", + "@commitlint/types": "^17.8.1", "@types/node": "20.5.1", "chalk": "^4.1.0", "cosmiconfig": "^8.0.0", @@ -445,16 +446,16 @@ "lodash.uniq": "^4.5.0", "resolve-from": "^5.0.0", "ts-node": "^10.8.1", - "typescript": "^4.6.4 || ^5.0.0" + "typescript": "^4.6.4 || ^5.2.2" }, "engines": { "node": ">=v14" } }, "node_modules/@commitlint/message": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.4.2.tgz", - "integrity": "sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.8.1.tgz", + "integrity": "sha512-6bYL1GUQsD6bLhTH3QQty8pVFoETfFQlMn2Nzmz3AOLqRVfNNtXBaSY0dhZ0dM6A2MEq4+2d7L/2LP8TjqGRkA==", "dev": true, "peer": true, "engines": { @@ -462,13 +463,13 @@ } }, "node_modules/@commitlint/parse": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.7.0.tgz", - "integrity": "sha512-dIvFNUMCUHqq5Abv80mIEjLVfw8QNuA4DS7OWip4pcK/3h5wggmjVnlwGCDvDChkw2TjK1K6O+tAEV78oxjxag==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.8.1.tgz", + "integrity": "sha512-/wLUickTo0rNpQgWwLPavTm7WbwkZoBy3X8PpkUmlSmQJyWQTj0m6bDjiykMaDt41qcUbfeFfaCvXfiR4EGnfw==", "dev": true, "peer": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^17.8.1", "conventional-changelog-angular": "^6.0.0", "conventional-commits-parser": "^4.0.0" }, @@ -477,15 +478,15 @@ } }, "node_modules/@commitlint/prompt": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/prompt/-/prompt-17.8.0.tgz", - "integrity": "sha512-tj4WotkHvSe95to1nDyOfVUl7+U3ThyrjNvAG7HEkBeGV8U8Oi9COGuVwMDUcfN+QRfheCyKnnJqoUhbkyG0DA==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/prompt/-/prompt-17.8.1.tgz", + "integrity": "sha512-adK+6oaR/8SSSa/Lnp7KU+lu28j/jWfR2sX/5qRDFc2WTTMM59yJ+33k8FMHKZAZIU1FdyCGr11yP3btL6VdLA==", "dev": true, "peer": true, "dependencies": { - "@commitlint/ensure": "^17.6.7", - "@commitlint/load": "^17.8.0", - "@commitlint/types": "^17.4.4", + "@commitlint/ensure": "^17.8.1", + "@commitlint/load": "^17.8.1", + "@commitlint/types": "^17.8.1", "chalk": "^4.1.0", "inquirer": "^6.5.2" }, @@ -494,13 +495,13 @@ } }, "node_modules/@commitlint/prompt-cli": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@commitlint/prompt-cli/-/prompt-cli-17.8.0.tgz", - "integrity": "sha512-pbLsRpTSZ5W0SQnLyOb8TugMG0cNoF8zGAkfz2F2qbWy7va57aZtkyE5NXKjzLGNLWu8oVkssXesTX5pqOWWCg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/prompt-cli/-/prompt-cli-17.8.1.tgz", + "integrity": "sha512-dkjxr0ah2R9P/vsz/s128kNEar/5zjr3TN3LOvA8kBiSrrbfF560gnoxAh+KgQ5sAc8lMrG+z4dVYvzSkXyfDQ==", "dev": true, "peer": true, "dependencies": { - "@commitlint/prompt": "^17.8.0", + "@commitlint/prompt": "^17.8.1", "execa": "^5.0.0", "inquirer": "^6.5.2" }, @@ -512,14 +513,14 @@ } }, "node_modules/@commitlint/read": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.5.1.tgz", - "integrity": "sha512-7IhfvEvB//p9aYW09YVclHbdf1u7g7QhxeYW9ZHSO8Huzp8Rz7m05aCO1mFG7G8M+7yfFnXB5xOmG18brqQIBg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.8.1.tgz", + "integrity": "sha512-Fd55Oaz9irzBESPCdMd8vWWgxsW3OWR99wOntBDHgf9h7Y6OOHjWEdS9Xzen1GFndqgyoaFplQS5y7KZe0kO2w==", "dev": true, "peer": true, "dependencies": { - "@commitlint/top-level": "^17.4.0", - "@commitlint/types": "^17.4.4", + "@commitlint/top-level": "^17.8.1", + "@commitlint/types": "^17.8.1", "fs-extra": "^11.0.0", "git-raw-commits": "^2.0.11", "minimist": "^1.2.6" @@ -529,14 +530,14 @@ } }, "node_modules/@commitlint/resolve-extends": { - "version": "17.6.7", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.6.7.tgz", - "integrity": "sha512-PfeoAwLHtbOaC9bGn/FADN156CqkFz6ZKiVDMjuC2N5N0740Ke56rKU7Wxdwya8R8xzLK9vZzHgNbuGhaOVKIg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.8.1.tgz", + "integrity": "sha512-W/ryRoQ0TSVXqJrx5SGkaYuAaE/BUontL1j1HsKckvM6e5ZaG0M9126zcwL6peKSuIetJi7E87PRQF8O86EW0Q==", "dev": true, "peer": true, "dependencies": { - "@commitlint/config-validator": "^17.6.7", - "@commitlint/types": "^17.4.4", + "@commitlint/config-validator": "^17.8.1", + "@commitlint/types": "^17.8.1", "import-fresh": "^3.0.0", "lodash.mergewith": "^4.6.2", "resolve-from": "^5.0.0", @@ -547,16 +548,16 @@ } }, "node_modules/@commitlint/rules": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.7.0.tgz", - "integrity": "sha512-J3qTh0+ilUE5folSaoK91ByOb8XeQjiGcdIdiB/8UT1/Rd1itKo0ju/eQVGyFzgTMYt8HrDJnGTmNWwcMR1rmA==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.8.1.tgz", + "integrity": "sha512-2b7OdVbN7MTAt9U0vKOYKCDsOvESVXxQmrvuVUZ0rGFMCrCPJWWP1GJ7f0lAypbDAhaGb8zqtdOr47192LBrIA==", "dev": true, "peer": true, "dependencies": { - "@commitlint/ensure": "^17.6.7", - "@commitlint/message": "^17.4.2", - "@commitlint/to-lines": "^17.4.0", - "@commitlint/types": "^17.4.4", + "@commitlint/ensure": "^17.8.1", + "@commitlint/message": "^17.8.1", + "@commitlint/to-lines": "^17.8.1", + "@commitlint/types": "^17.8.1", "execa": "^5.0.0" }, "engines": { @@ -564,9 +565,9 @@ } }, "node_modules/@commitlint/to-lines": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.4.0.tgz", - "integrity": "sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.8.1.tgz", + "integrity": "sha512-LE0jb8CuR/mj6xJyrIk8VLz03OEzXFgLdivBytoooKO5xLt5yalc8Ma5guTWobw998sbR3ogDd+2jed03CFmJA==", "dev": true, "peer": true, "engines": { @@ -574,9 +575,9 @@ } }, "node_modules/@commitlint/top-level": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.4.0.tgz", - "integrity": "sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.8.1.tgz", + "integrity": "sha512-l6+Z6rrNf5p333SHfEte6r+WkOxGlWK4bLuZKbtf/2TXRN+qhrvn1XE63VhD8Oe9oIHQ7F7W1nG2k/TJFhx2yA==", "dev": true, "peer": true, "dependencies": { @@ -587,9 +588,9 @@ } }, "node_modules/@commitlint/types": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.4.4.tgz", - "integrity": "sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.8.1.tgz", + "integrity": "sha512-PXDQXkAmiMEG162Bqdh9ChML/GJZo6vU+7F03ALKDK8zYc6SuAr47LjG7hGYRqUOz+WK0dU7bQ0xzuqFMdxzeQ==", "dev": true, "peer": true, "dependencies": { @@ -613,13 +614,13 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.40.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz", - "integrity": "sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", "dev": true, "peer": true, "dependencies": { - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, @@ -644,9 +645,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", - "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "peer": true, "engines": { @@ -654,9 +655,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "peer": true, "dependencies": { @@ -694,6 +695,17 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -701,10 +713,23 @@ "dev": true, "peer": true }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/js": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz", - "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "peer": true, "engines": { @@ -721,9 +746,9 @@ } }, "node_modules/@faker-js/faker": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.2.0.tgz", - "integrity": "sha512-VacmzZqVxdWdf9y64lDOMZNDMM/FQdtM9IsaOPKOm2suYwEatb8VkdHqOzXcDnZbk7YDE2BmsJmy/2Hmkn563g==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.0.tgz", + "integrity": "sha512-htW87352wzUCdX1jyUQocUcmAaFqcR/w082EC8iP/gtkF0K+aKcBp0hR5Arb7dzR8tQ1TrhE9DNa5EbJELm84w==", "funding": [ { "type": "opencollective", @@ -736,20 +761,44 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "peer": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.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==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -765,19 +814,19 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true, "peer": true }, "node_modules/@inquirer/checkbox": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-1.5.0.tgz", - "integrity": "sha512-3cKJkW1vIZAs4NaS0reFsnpAjP0azffYII4I2R7PTI7ZTMg5Y1at4vzXccOH3762b2c2L4drBhpJpf9uiaGNxA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-1.5.2.tgz", + "integrity": "sha512-CifrkgQjDkUkWexmgYYNyB5603HhTHI91vLFeQXh6qrTKiCMVASol01Rs1cv6LP/A2WccZSRlJKZhbaBIs/9ZA==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "figures": "^3.2.0" @@ -787,12 +836,12 @@ } }, "node_modules/@inquirer/confirm": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-2.0.15.tgz", - "integrity": "sha512-hj8Q/z7sQXsF0DSpLQZVDhWYGN6KLM/gNjjqGkpKwBzljbQofGjn0ueHADy4HUY+OqDHmXuwk/bY+tZyIuuB0w==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-2.0.17.tgz", + "integrity": "sha512-EqzhGryzmGpy2aJf6LxJVhndxYmFs+m8cxXzf8nejb1DE3sabf6mUgBcp4J0jAUEiAcYzqmkqRr7LPFh/WdnXA==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "chalk": "^4.1.2" }, "engines": { @@ -800,17 +849,17 @@ } }, "node_modules/@inquirer/core": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-5.1.1.tgz", - "integrity": "sha512-IuJyZQUg75+L5AmopgnzxYrgcU6PJKL0hoIs332G1Gv55CnmZrhG6BzNOeZ5sOsTi1YCGOopw4rYICv74ejMFg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-6.0.0.tgz", + "integrity": "sha512-fKi63Khkisgda3ohnskNf5uZJj+zXOaBvOllHsOkdsXRA/ubQLJQrZchFFi57NKbZzkTunXiBMdvWOv71alonw==", "dependencies": { - "@inquirer/type": "^1.1.5", + "@inquirer/type": "^1.1.6", "@types/mute-stream": "^0.0.4", - "@types/node": "^20.9.0", + "@types/node": "^20.10.7", "@types/wrap-ansi": "^3.0.0", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", - "cli-spinners": "^2.9.1", + "cli-spinners": "^2.9.2", "cli-width": "^4.1.0", "figures": "^3.2.0", "mute-stream": "^1.0.0", @@ -824,20 +873,20 @@ } }, "node_modules/@inquirer/core/node_modules/@types/node": { - "version": "20.9.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.2.tgz", - "integrity": "sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==", + "version": "20.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.10.tgz", + "integrity": "sha512-rZEfe/hJSGYmdfX9tvcPMYeYPW2sNl50nsw4jZmRcaG0HIAb0WYEpsB05GOb53vjqpyE9GUhlDQ4jLSoB5q9kg==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@inquirer/editor": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-1.2.13.tgz", - "integrity": "sha512-gBxjqt0B9GLN0j6M/tkEcmcIvB2fo9Cw0f5NRqDTkYyB9AaCzj7qvgG0onQ3GVPbMyMbbP4tWYxrBOaOdKpzNA==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-1.2.15.tgz", + "integrity": "sha512-gQ77Ls09x5vKLVNMH9q/7xvYPT6sIs5f7URksw+a2iJZ0j48tVS6crLqm2ugG33tgXHIwiEqkytY60Zyh5GkJQ==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "chalk": "^4.1.2", "external-editor": "^3.1.0" }, @@ -846,12 +895,12 @@ } }, "node_modules/@inquirer/expand": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-1.1.14.tgz", - "integrity": "sha512-yS6fJ8jZYAsxdxuw2c8XTFMTvMR1NxZAw3LxDaFnqh7BZ++wTQ6rSp/2gGJhMacdZ85osb+tHxjVgx7F+ilv5g==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-1.1.16.tgz", + "integrity": "sha512-TGLU9egcuo+s7PxphKUCnJnpCIVY32/EwPCLLuu+gTvYiD8hZgx8Z2niNQD36sa6xcfpdLY6xXDBiL/+g1r2XQ==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "chalk": "^4.1.2", "figures": "^3.2.0" }, @@ -860,12 +909,12 @@ } }, "node_modules/@inquirer/input": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-1.2.14.tgz", - "integrity": "sha512-tISLGpUKXixIQue7jypNEShrdzJoLvEvZOJ4QRsw5XTfrIYfoWFqAjMQLerGs9CzR86yAI89JR6snHmKwnNddw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-1.2.16.tgz", + "integrity": "sha512-Ou0LaSWvj1ni+egnyQ+NBtfM1885UwhRCMtsRt2bBO47DoC1dwtCa+ZUNgrxlnCHHF0IXsbQHYtIIjFGAavI4g==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "chalk": "^4.1.2" }, "engines": { @@ -873,12 +922,12 @@ } }, "node_modules/@inquirer/password": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-1.1.14.tgz", - "integrity": "sha512-vL2BFxfMo8EvuGuZYlryiyAB3XsgtbxOcFs4H9WI9szAS/VZCAwdVqs8rqEeaAf/GV/eZOghIOYxvD91IsRWSg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-1.1.16.tgz", + "integrity": "sha512-aZYZVHLUXZ2gbBot+i+zOJrks1WaiI95lvZCn1sKfcw6MtSSlYC8uDX8sTzQvAsQ8epHoP84UNvAIT0KVGOGqw==", "dependencies": { - "@inquirer/input": "^1.2.14", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2" }, @@ -887,31 +936,31 @@ } }, "node_modules/@inquirer/prompts": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-3.3.0.tgz", - "integrity": "sha512-BBCqdSnhNs+WziSIo4f/RNDu6HAj4R/Q5nMgJb5MNPFX8sJGCvj9BoALdmR0HTWXyDS7TO8euKj6W6vtqCQG7A==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-3.3.2.tgz", + "integrity": "sha512-k52mOMRvTUejrqyF1h8Z07chC+sbaoaUYzzr1KrJXyj7yaX7Nrh0a9vktv8TuocRwIJOQMaj5oZEmkspEcJFYQ==", "dependencies": { - "@inquirer/checkbox": "^1.5.0", - "@inquirer/confirm": "^2.0.15", - "@inquirer/core": "^5.1.1", - "@inquirer/editor": "^1.2.13", - "@inquirer/expand": "^1.1.14", - "@inquirer/input": "^1.2.14", - "@inquirer/password": "^1.1.14", - "@inquirer/rawlist": "^1.2.14", - "@inquirer/select": "^1.3.1" + "@inquirer/checkbox": "^1.5.2", + "@inquirer/confirm": "^2.0.17", + "@inquirer/core": "^6.0.0", + "@inquirer/editor": "^1.2.15", + "@inquirer/expand": "^1.1.16", + "@inquirer/input": "^1.2.16", + "@inquirer/password": "^1.1.16", + "@inquirer/rawlist": "^1.2.16", + "@inquirer/select": "^1.3.3" }, "engines": { "node": ">=14.18.0" } }, "node_modules/@inquirer/rawlist": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-1.2.14.tgz", - "integrity": "sha512-xIYmDpYgfz2XGCKubSDLKEvadkIZAKbehHdWF082AyC2I4eHK44RUfXaoOAqnbqItZq4KHXS6jDJ78F2BmQvxg==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-1.2.16.tgz", + "integrity": "sha512-pZ6TRg2qMwZAOZAV6TvghCtkr53dGnK29GMNQ3vMZXSNguvGqtOVc4j/h1T8kqGJFagjyfBZhUPGwNS55O5qPQ==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "chalk": "^4.1.2" }, "engines": { @@ -919,12 +968,12 @@ } }, "node_modules/@inquirer/select": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-1.3.1.tgz", - "integrity": "sha512-EgOPHv7XOHEqiBwBJTyiMg9r57ySyW4oyYCumGp+pGyOaXQaLb2kTnccWI6NFd9HSi5kDJhF7YjA+3RfMQJ2JQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-1.3.3.tgz", + "integrity": "sha512-RzlRISXWqIKEf83FDC9ZtJ3JvuK1l7aGpretf41BCWYrvla2wU8W8MTRNMiPrPJ+1SIqrRC1nZdZ60hD9hRXLg==", "dependencies": { - "@inquirer/core": "^5.1.1", - "@inquirer/type": "^1.1.5", + "@inquirer/core": "^6.0.0", + "@inquirer/type": "^1.1.6", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "figures": "^3.2.0" @@ -934,9 +983,9 @@ } }, "node_modules/@inquirer/type": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.1.5.tgz", - "integrity": "sha512-wmwHvHozpPo4IZkkNtbYenem/0wnfI6hvOcGKmPEa0DwuaH5XUQzFqy6OpEpjEegZMhYIk8HDYITI16BPLtrRA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.1.6.tgz", + "integrity": "sha512-OCKOpn0CrFDslR8s3who7hlr823zXTb1iShGCaaWgEJFfkIV0T9aLZV2QGnOuU78IrsPYLkr3oKx9dZwwCH3Rw==", "engines": { "node": ">=14.18.0" } @@ -1027,9 +1076,9 @@ } }, "node_modules/@octokit/core": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.1.tgz", - "integrity": "sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz", + "integrity": "sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==", "dev": true, "peer": true, "dependencies": { @@ -1046,14 +1095,13 @@ } }, "node_modules/@octokit/endpoint": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz", - "integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", + "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", "dev": true, "peer": true, "dependencies": { "@octokit/types": "^12.0.0", - "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" }, "engines": { @@ -1076,20 +1124,20 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz", - "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz", + "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==", "dev": true, "peer": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.0.0.tgz", - "integrity": "sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==", + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", + "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", "dev": true, "peer": true, "dependencies": { - "@octokit/types": "^12.0.0" + "@octokit/types": "^12.4.0" }, "engines": { "node": ">= 18" @@ -1117,13 +1165,13 @@ } }, "node_modules/@octokit/plugin-throttling": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-8.0.0.tgz", - "integrity": "sha512-OkMbHYUidj81q92YRkPzWmwXkEtsI3KOcSkNm763aqUOh9IEplyX05XjKAdZFANAvaYH0Q4JBZwu4h2VnPVXZA==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-8.1.3.tgz", + "integrity": "sha512-pfyqaqpc0EXh5Cn4HX9lWYsZ4gGbjnSmUILeu4u2gnuM50K/wIk9s1Pxt3lVeVwekmITgN/nJdoh43Ka+vye8A==", "dev": true, "peer": true, "dependencies": { - "@octokit/types": "^12.0.0", + "@octokit/types": "^12.2.0", "bottleneck": "^2.15.3" }, "engines": { @@ -1134,16 +1182,15 @@ } }, "node_modules/@octokit/request": { - "version": "8.1.4", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz", - "integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==", + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", + "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", "dev": true, "peer": true, "dependencies": { "@octokit/endpoint": "^9.0.0", "@octokit/request-error": "^5.0.0", "@octokit/types": "^12.0.0", - "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" }, "engines": { @@ -1166,13 +1213,13 @@ } }, "node_modules/@octokit/types": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz", - "integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz", + "integrity": "sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==", "dev": true, "peer": true, "dependencies": { - "@octokit/openapi-types": "^19.0.0" + "@octokit/openapi-types": "^19.1.0" } }, "node_modules/@pnpm/config.env-replace": { @@ -1350,9 +1397,9 @@ } }, "node_modules/@semantic-release/github": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-9.2.1.tgz", - "integrity": "sha512-fEn9uOe6jwWR6ro2Wh6YNBCBuZ5lRi8Myz+1j3KDTSt8OuUGlpVM4lFac/0bDrql2NOKrIEAMGCfWb9WMIdzIg==", + "version": "9.2.6", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-9.2.6.tgz", + "integrity": "sha512-shi+Lrf6exeNZF+sBhK+P011LSbhmIAoUEgEY6SsxF8irJ+J2stwI5jkyDQ+4gzYyDImzV6LCKdYB9FXnQRWKA==", "dev": true, "peer": true, "dependencies": { @@ -1364,13 +1411,13 @@ "aggregate-error": "^5.0.0", "debug": "^4.3.4", "dir-glob": "^3.0.1", - "globby": "^13.1.4", + "globby": "^14.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "issue-parser": "^6.0.0", "lodash-es": "^4.17.21", - "mime": "^3.0.0", - "p-filter": "^3.0.0", + "mime": "^4.0.0", + "p-filter": "^4.0.0", "url-join": "^5.0.0" }, "engines": { @@ -1423,26 +1470,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@semantic-release/github/node_modules/globby": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", - "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", - "dev": true, - "peer": true, - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@semantic-release/github/node_modules/indent-string": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", @@ -1456,19 +1483,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@semantic-release/github/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@semantic-release/github/node_modules/url-join": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz", @@ -1480,9 +1494,9 @@ } }, "node_modules/@semantic-release/gitlab": { - "version": "12.0.6", - "resolved": "https://registry.npmjs.org/@semantic-release/gitlab/-/gitlab-12.0.6.tgz", - "integrity": "sha512-NjGq+6cA64bQIyAjFSxzXxUJCS94fAtw8QMQSvuUycqhbQqXvjTKuknm9fS327leZURqslDMMKwEMuj0cHy31g==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@semantic-release/gitlab/-/gitlab-12.1.1.tgz", + "integrity": "sha512-vM8mqMmegRJB4+9MJCYeCt5Gn4C2rpF0bNOzKOHq1IaI4FleIV5sss0fn55jVCuVVztTnoPQylnti5Tkdg3uaw==", "dev": true, "dependencies": { "@semantic-release/error": "^4.0.0", @@ -1492,7 +1506,7 @@ "escape-string-regexp": "^5.0.0", "form-data": "^4.0.0", "fs-extra": "^11.0.0", - "globby": "^11.0.0", + "globby": "^14.0.0", "got": "^13.0.0", "hpagent": "^1.0.0", "lodash-es": "^4.17.21", @@ -1706,9 +1720,9 @@ } }, "node_modules/@semantic-release/npm/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", "dev": true, "dependencies": { "path-key": "^4.0.0" @@ -1867,10 +1881,22 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sindresorhus/merge-streams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz", + "integrity": "sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -1925,15 +1951,16 @@ } }, "node_modules/@sngular/eslint-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sngular/eslint-config/-/eslint-config-1.0.0.tgz", - "integrity": "sha512-6zSUtf1cMPYEm6Kwb7WmwgZq/tIq7sWDmfXg8IDQsLhcq7N2IuNtY0PNVhZQ6FUSx0LEON61LwC/pDCkq4LMbg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@sngular/eslint-config/-/eslint-config-1.0.1.tgz", + "integrity": "sha512-6RgmhtwDQ4b9GEpAZ5BGMGdip9jFgRqK2KUM4JEG8oNCLBpCzE9WcKmu/sZwhu+VO7z1Gvcz0e2xjefMcEfb6Q==", "dev": true, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^9.0.0", + "eslint-import-resolver-typescript": "^3.0.0", "eslint-plugin-html": "^7.0.0", "eslint-plugin-import": "^2.0.0", "eslint-plugin-jsdoc": "^46.0.0", @@ -1950,9 +1977,9 @@ } }, "node_modules/@sngular/open-api-mocker": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sngular/open-api-mocker/-/open-api-mocker-1.0.0.tgz", - "integrity": "sha512-rf/I47wqJI2XFQoA9hCKGoue05n8I78UDo6r61nY7R3ki00uJoPyE+eiyDoaw2Qw97wwWcQAfWTJu7sVKU/qxg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@sngular/open-api-mocker/-/open-api-mocker-1.0.1.tgz", + "integrity": "sha512-f1IGLTXi2EprtA1skq2gZPtaLYtlzfWQuPhAqt0Nkz626zub9q27skEDb0vT7cFuSXkPtBtEq0NRx2YPWvANZQ==", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", "@faker-js/faker": "^8.0.2", @@ -2072,27 +2099,27 @@ "peer": true }, "node_modules/@types/chai": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.8.tgz", - "integrity": "sha512-yW/qTM4mRBBcsA9Xw9FbcImYtFPY7sgr+G/O5RDYVmxiy9a+pE5FyoFUi8JYCZY5nicj8atrr1pcfPiYpeNGOA==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", "dev": true }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.2.tgz", - "integrity": "sha512-FD+nQWA2zJjh4L9+pFXqWOi0Hs1ryBCfI+985NjluQ1p8EYtoLvjLOKidXBtZ4/IcxDX4o8/E8qDS3540tNliw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", "dev": true }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", - "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, "peer": true }, @@ -2104,9 +2131,9 @@ "peer": true }, "node_modules/@types/mdast": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.13.tgz", - "integrity": "sha512-HjiGiWedR0DVFkeNljpa6Lv4/IZU1+30VY5d747K7lBudFc3R0Ibr6yJ9lN3BE28VnZyDfLF/VB1Ql1ZIbKrmg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "peer": true, "dependencies": { @@ -2114,15 +2141,15 @@ } }, "node_modules/@types/minimist": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.3.tgz", - "integrity": "sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, "node_modules/@types/mute-stream": { @@ -2139,31 +2166,31 @@ "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==" }, "node_modules/@types/normalize-package-data": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz", - "integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, "node_modules/@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true, "peer": true }, "node_modules/@types/sinon": { - "version": "10.0.19", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.19.tgz", - "integrity": "sha512-MWZNGPSchIdDfb5FL+VFi4zHsHbNOTQEgjqFQk7HazXSXwUU9PAX3z9XBqb3AJGYr9YwrtCtaSMsT3brYsN/jQ==", + "version": "10.0.20", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", + "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinon-chai": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.10.tgz", - "integrity": "sha512-D+VFqUjMqeku/FGl4Ioo+fDeWOaIfbZ6Oj+glgFUgz5m5RJ4kgCER3FdV1uvhmEt0A+FRz+juPdybFlg5Hxfow==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", + "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", "dev": true, "dependencies": { "@types/chai": "*", @@ -2171,15 +2198,15 @@ } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.3.tgz", - "integrity": "sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==", + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", + "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", "dev": true }, "node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true, "peer": true }, @@ -2189,17 +2216,17 @@ "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz", - "integrity": "sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz", + "integrity": "sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==", "dev": true, "peer": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.8.0", - "@typescript-eslint/type-utils": "6.8.0", - "@typescript-eslint/utils": "6.8.0", - "@typescript-eslint/visitor-keys": "6.8.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2225,16 +2252,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.8.0.tgz", - "integrity": "sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.20.0.tgz", + "integrity": "sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.8.0", - "@typescript-eslint/types": "6.8.0", - "@typescript-eslint/typescript-estree": "6.8.0", - "@typescript-eslint/visitor-keys": "6.8.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4" }, "engines": { @@ -2254,14 +2281,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz", - "integrity": "sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz", + "integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "6.8.0", - "@typescript-eslint/visitor-keys": "6.8.0" + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2272,14 +2299,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz", - "integrity": "sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz", + "integrity": "sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.8.0", - "@typescript-eslint/utils": "6.8.0", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2300,9 +2327,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.8.0.tgz", - "integrity": "sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz", + "integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==", "dev": true, "peer": true, "engines": { @@ -2314,17 +2341,18 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz", - "integrity": "sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz", + "integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "6.8.0", - "@typescript-eslint/visitor-keys": "6.8.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -2341,19 +2369,50 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "peer": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@typescript-eslint/utils": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.8.0.tgz", - "integrity": "sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz", + "integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==", "dev": true, "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.8.0", - "@typescript-eslint/types": "6.8.0", - "@typescript-eslint/typescript-estree": "6.8.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", "semver": "^7.5.4" }, "engines": { @@ -2368,13 +2427,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz", - "integrity": "sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz", + "integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/types": "6.20.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2385,6 +2444,13 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "peer": true + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2398,9 +2464,9 @@ } }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "peer": true, "bin": { @@ -2421,9 +2487,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, "peer": true, "engines": { @@ -2635,6 +2701,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -2822,13 +2889,12 @@ "peer": true }, "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==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { @@ -2895,15 +2961,6 @@ "node": ">=12" } }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -2944,12 +3001,13 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3020,9 +3078,9 @@ } }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, "peer": true, "dependencies": { @@ -3038,6 +3096,18 @@ "node": ">=4" } }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3096,7 +3166,6 @@ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, - "peer": true, "dependencies": { "get-func-name": "^2.0.2" }, @@ -3130,17 +3199,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -3164,9 +3222,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", - "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "engines": { "node": ">=6" }, @@ -3358,17 +3416,6 @@ "node": ">=0.10.0" } }, - "node_modules/clone-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3421,9 +3468,9 @@ } }, "node_modules/comment-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.0.tgz", - "integrity": "sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, "peer": true, "engines": { @@ -3836,8 +3883,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "dev": true, - "peer": true, "dependencies": { "get-intrinsic": "^1.2.1", "gopd": "^1.0.1", @@ -4038,6 +4083,20 @@ "node": ">= 0.8" } }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -4139,9 +4198,9 @@ } }, "node_modules/env-ci/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", "dev": true, "peer": true, "dependencies": { @@ -4213,27 +4272,27 @@ } }, "node_modules/es-abstract": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", - "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", "arraybuffer.prototype.slice": "^1.0.2", "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.1", + "get-intrinsic": "^1.2.2", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", "has-property-descriptors": "^1.0.0", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", + "hasown": "^2.0.0", "internal-slot": "^1.0.5", "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", @@ -4243,7 +4302,7 @@ "is-string": "^1.0.7", "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.5.1", @@ -4257,7 +4316,7 @@ "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -4267,28 +4326,28 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "peer": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "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==", "dev": true, "peer": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -4335,19 +4394,20 @@ } }, "node_modules/eslint": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz", - "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.51.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4423,6 +4483,32 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "dev": true, + "peer": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, "node_modules/eslint-module-utils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", @@ -4462,29 +4548,29 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", - "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, "peer": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.13.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", "semver": "^6.3.1", - "tsconfig-paths": "^3.14.2" + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" @@ -4493,6 +4579,17 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -4516,6 +4613,19 @@ "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", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-import/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -4527,27 +4637,27 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.8.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.8.2.tgz", - "integrity": "sha512-5TSnD018f3tUJNne4s4gDWQflbsgOycIKEUBoCLn6XtBMgNHxQFmV8vVxUtiPxAQq8lrX85OaSG/2gnctxw9uQ==", + "version": "46.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", + "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", "dev": true, "peer": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.40.1", + "@es-joy/jsdoccomment": "~0.41.0", "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", "is-builtin-module": "^3.2.1", "semver": "^7.5.4", - "spdx-expression-parse": "^3.0.1" + "spdx-expression-parse": "^4.0.0" }, "engines": { "node": ">=16" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-plugin-jsdoc/node_modules/escape-string-regexp": { @@ -4626,6 +4736,17 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -4639,6 +4760,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4646,10 +4780,23 @@ "dev": true, "peer": true }, + "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==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/esmock": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/esmock/-/esmock-2.6.0.tgz", - "integrity": "sha512-PFcxAm5bzPckh9V6s78FW+WaR/J+1R9K6vlItFOIFqNn+3w1pgo/HEEOJ2HBwVdrEnO7xXBgGUcFoNsdTU599A==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/esmock/-/esmock-2.6.3.tgz", + "integrity": "sha512-1gtVLLHyB742JNWkIFfiKwB8rXgJZO/X717ua4yzT0hIqsDFjtnrpAKHO+HlIMSIhMExCWJzpk9lDsh2XuKAKw==", "dev": true, "engines": { "node": ">=14.16.0" @@ -4905,9 +5052,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -4920,18 +5067,6 @@ "node": ">=8.6.0" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -4945,9 +5080,9 @@ "peer": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.0.tgz", + "integrity": "sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -5071,9 +5206,9 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "peer": true, "dependencies": { @@ -5082,7 +5217,7 @@ "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { @@ -5190,9 +5325,9 @@ } }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -5272,20 +5407,19 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, - "peer": true, "engines": { "node": "*" } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5320,6 +5454,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "peer": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/git-log-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz", @@ -5397,16 +5544,36 @@ } }, "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "peer": true, "dependencies": { - "is-glob": "^4.0.3" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10.13.0" + "node": "*" } }, "node_modules/global-dirs": { @@ -5423,9 +5590,9 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "peer": true, "dependencies": { @@ -5468,20 +5635,32 @@ } }, "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.0.tgz", + "integrity": "sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==", "dev": true, "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "@sindresorhus/merge-streams": "^1.0.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "dev": true, + "engines": { + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5491,8 +5670,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "peer": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -5580,14 +5757,6 @@ "node": ">=6" } }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -5607,13 +5776,11 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "peer": true, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5657,6 +5824,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -5762,9 +5940,9 @@ } }, "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", "dev": true, "dependencies": { "quick-lru": "^5.1.1", @@ -5824,9 +6002,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -6085,14 +6263,14 @@ } }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, "peer": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -6241,12 +6419,12 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6396,11 +6574,12 @@ } }, "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true, - "peer": true, + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } @@ -6571,9 +6750,9 @@ } }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" @@ -6731,9 +6910,9 @@ } }, "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", "dev": true }, "node_modules/keyv": { @@ -6908,9 +7087,9 @@ } }, "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", "dev": true, "peer": true, "dependencies": { @@ -7790,6 +7969,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/meow/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -7858,16 +8046,19 @@ } }, "node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.1.tgz", + "integrity": "sha512-5lZ5tyrIfliMXzFtkYyekWbtRXObT9OWa8IwQ5uxTBDHucNNwniRqo0yInflj+iYi5CBa6qxadGzGarDfuEOxA==", "dev": true, + "funding": [ + "https://github.com/sponsors/broofa" + ], "peer": true, "bin": { - "mime": "cli.js" + "mime": "bin/cli.js" }, "engines": { - "node": ">=10.0.0" + "node": ">=16" } }, "node_modules/mime-db": { @@ -7920,15 +8111,19 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, + "peer": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -8014,15 +8209,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -8218,41 +8404,32 @@ "dev": true }, "node_modules/nise": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", - "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.7.tgz", + "integrity": "sha512-wWtNUhkT7k58uvWTB/Gy26eA/EJKtPZFVAhEilN5UYVmmGRYOURbejRUyKm0Uu9XVEW7K5nBOZfR8VMB4QR2RQ==", "dev": true, "dependencies": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^10.0.2", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/text-encoding": "^0.7.2", + "just-extend": "^6.2.0", + "path-to-regexp": "^6.2.1" } }, - "node_modules/nise/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "node_modules/nise/node_modules/@sinonjs/fake-timers": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", + "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, "dependencies": { - "type-detect": "4.0.8" + "@sinonjs/commons": "^3.0.0" } }, - "node_modules/nise/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, "node_modules/nise/node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dev": true }, "node_modules/node-emoji": { "version": "1.11.0", @@ -8300,9 +8477,9 @@ } }, "node_modules/npm": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-9.9.0.tgz", - "integrity": "sha512-wkd7sjz4KmdmddYQcd0aTP73P1cEuPlekeulz4jTDeMVx/Zo5XZ5KQ1z3eUzV3Q/WZpEO0NJXTrD5FNFe6fhCA==", + "version": "9.9.2", + "resolved": "https://registry.npmjs.org/npm/-/npm-9.9.2.tgz", + "integrity": "sha512-D3tV+W0PzJOlwo8YmO6fNzaB1CrMVYd1V+2TURF6lbCbmZKqMsYgeQfPVvqiM3zbNSJPhFEnmlEXIogH2Vq7PQ==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -8409,7 +8586,7 @@ "libnpmhook": "^9.0.3", "libnpmorg": "^5.0.4", "libnpmpack": "^5.0.20", - "libnpmpublish": "^7.5.0", + "libnpmpublish": "^7.5.1", "libnpmsearch": "^6.0.2", "libnpmteam": "^5.0.3", "libnpmversion": "^4.0.2", @@ -8470,16 +8647,17 @@ }, "node_modules/npm/node_modules/@colors/colors": { "version": "1.5.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "engines": { "node": ">=0.1.90" } }, "node_modules/npm/node_modules/@isaacs/cliui": { "version": "8.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8496,7 +8674,7 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8508,13 +8686,13 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8531,7 +8709,7 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8546,13 +8724,13 @@ }, "node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/@npmcli/arborist": { "version": "6.5.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8599,7 +8777,7 @@ }, "node_modules/npm/node_modules/@npmcli/config": { "version": "6.4.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8618,7 +8796,7 @@ }, "node_modules/npm/node_modules/@npmcli/disparity-colors": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8630,7 +8808,7 @@ }, "node_modules/npm/node_modules/@npmcli/fs": { "version": "3.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8642,7 +8820,7 @@ }, "node_modules/npm/node_modules/@npmcli/git": { "version": "4.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8661,7 +8839,7 @@ }, "node_modules/npm/node_modules/@npmcli/installed-package-contents": { "version": "2.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8677,7 +8855,7 @@ }, "node_modules/npm/node_modules/@npmcli/map-workspaces": { "version": "3.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8692,7 +8870,7 @@ }, "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8707,7 +8885,7 @@ }, "node_modules/npm/node_modules/@npmcli/name-from-folder": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8716,7 +8894,7 @@ }, "node_modules/npm/node_modules/@npmcli/node-gyp": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8725,7 +8903,7 @@ }, "node_modules/npm/node_modules/@npmcli/package-json": { "version": "4.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8743,7 +8921,7 @@ }, "node_modules/npm/node_modules/@npmcli/promise-spawn": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8755,7 +8933,7 @@ }, "node_modules/npm/node_modules/@npmcli/query": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8767,7 +8945,7 @@ }, "node_modules/npm/node_modules/@npmcli/run-script": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8783,16 +8961,17 @@ }, "node_modules/npm/node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "engines": { "node": ">=14" } }, "node_modules/npm/node_modules/@sigstore/bundle": { "version": "1.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -8804,7 +8983,7 @@ }, "node_modules/npm/node_modules/@sigstore/protobuf-specs": { "version": "0.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "engines": { @@ -8813,7 +8992,7 @@ }, "node_modules/npm/node_modules/@sigstore/sign": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -8827,7 +9006,7 @@ }, "node_modules/npm/node_modules/@sigstore/tuf": { "version": "1.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -8840,7 +9019,7 @@ }, "node_modules/npm/node_modules/@tootallnate/once": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8849,7 +9028,7 @@ }, "node_modules/npm/node_modules/@tufjs/canonical-json": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8858,7 +9037,7 @@ }, "node_modules/npm/node_modules/@tufjs/models": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8871,7 +9050,7 @@ }, "node_modules/npm/node_modules/abbrev": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8880,7 +9059,7 @@ }, "node_modules/npm/node_modules/abort-controller": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8892,7 +9071,7 @@ }, "node_modules/npm/node_modules/agent-base": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8904,7 +9083,7 @@ }, "node_modules/npm/node_modules/agentkeepalive": { "version": "4.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8918,7 +9097,7 @@ }, "node_modules/npm/node_modules/aggregate-error": { "version": "3.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8931,7 +9110,7 @@ }, "node_modules/npm/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8940,7 +9119,7 @@ }, "node_modules/npm/node_modules/ansi-styles": { "version": "4.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8955,19 +9134,19 @@ }, "node_modules/npm/node_modules/aproba": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/archy": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/are-we-there-yet": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8980,13 +9159,13 @@ }, "node_modules/npm/node_modules/balanced-match": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/base64-js": { "version": "1.5.1", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -9006,7 +9185,7 @@ }, "node_modules/npm/node_modules/bin-links": { "version": "4.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9021,7 +9200,7 @@ }, "node_modules/npm/node_modules/binary-extensions": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9030,7 +9209,7 @@ }, "node_modules/npm/node_modules/brace-expansion": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9039,7 +9218,7 @@ }, "node_modules/npm/node_modules/buffer": { "version": "6.0.3", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -9063,7 +9242,7 @@ }, "node_modules/npm/node_modules/builtins": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9072,7 +9251,7 @@ }, "node_modules/npm/node_modules/cacache": { "version": "17.1.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9095,7 +9274,7 @@ }, "node_modules/npm/node_modules/chalk": { "version": "5.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9107,7 +9286,7 @@ }, "node_modules/npm/node_modules/chownr": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9116,7 +9295,7 @@ }, "node_modules/npm/node_modules/ci-info": { "version": "3.8.0", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -9131,7 +9310,7 @@ }, "node_modules/npm/node_modules/cidr-regex": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -9143,7 +9322,7 @@ }, "node_modules/npm/node_modules/clean-stack": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9152,7 +9331,7 @@ }, "node_modules/npm/node_modules/cli-columns": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9165,7 +9344,7 @@ }, "node_modules/npm/node_modules/cli-table3": { "version": "0.6.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9180,7 +9359,7 @@ }, "node_modules/npm/node_modules/clone": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9189,7 +9368,7 @@ }, "node_modules/npm/node_modules/cmd-shim": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9198,7 +9377,7 @@ }, "node_modules/npm/node_modules/color-convert": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9210,13 +9389,13 @@ }, "node_modules/npm/node_modules/color-name": { "version": "1.1.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/color-support": { "version": "1.1.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "bin": { @@ -9225,7 +9404,7 @@ }, "node_modules/npm/node_modules/columnify": { "version": "1.6.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9238,25 +9417,25 @@ }, "node_modules/npm/node_modules/common-ancestor-path": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/concat-map": { "version": "0.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/console-control-strings": { "version": "1.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/cross-spawn": { "version": "7.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9270,7 +9449,7 @@ }, "node_modules/npm/node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9285,7 +9464,7 @@ }, "node_modules/npm/node_modules/cssesc": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -9297,7 +9476,7 @@ }, "node_modules/npm/node_modules/debug": { "version": "4.3.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9314,13 +9493,13 @@ }, "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/defaults": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9332,13 +9511,13 @@ }, "node_modules/npm/node_modules/delegates": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/depd": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9347,7 +9526,7 @@ }, "node_modules/npm/node_modules/diff": { "version": "5.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-3-Clause", "engines": { @@ -9356,28 +9535,29 @@ }, "node_modules/npm/node_modules/eastasianwidth": { "version": "0.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/emoji-regex": { "version": "8.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/encoding": { "version": "0.1.13", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "dependencies": { "iconv-lite": "^0.6.2" } }, "node_modules/npm/node_modules/env-paths": { "version": "2.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9386,13 +9566,13 @@ }, "node_modules/npm/node_modules/err-code": { "version": "2.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/event-target-shim": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9401,7 +9581,7 @@ }, "node_modules/npm/node_modules/events": { "version": "3.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9410,13 +9590,13 @@ }, "node_modules/npm/node_modules/exponential-backoff": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0" }, "node_modules/npm/node_modules/fastest-levenshtein": { "version": "1.0.16", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9425,7 +9605,7 @@ }, "node_modules/npm/node_modules/foreground-child": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9441,7 +9621,7 @@ }, "node_modules/npm/node_modules/fs-minipass": { "version": "3.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9453,19 +9633,19 @@ }, "node_modules/npm/node_modules/fs.realpath": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/function-bind": { "version": "1.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/gauge": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9484,7 +9664,7 @@ }, "node_modules/npm/node_modules/glob": { "version": "10.2.7", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9506,13 +9686,13 @@ }, "node_modules/npm/node_modules/graceful-fs": { "version": "4.2.11", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/has": { "version": "1.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9524,13 +9704,13 @@ }, "node_modules/npm/node_modules/has-unicode": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/hosted-git-info": { "version": "6.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9542,13 +9722,13 @@ }, "node_modules/npm/node_modules/http-cache-semantics": { "version": "4.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause" }, "node_modules/npm/node_modules/http-proxy-agent": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9562,7 +9742,7 @@ }, "node_modules/npm/node_modules/https-proxy-agent": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9575,7 +9755,7 @@ }, "node_modules/npm/node_modules/humanize-ms": { "version": "1.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9584,9 +9764,10 @@ }, "node_modules/npm/node_modules/iconv-lite": { "version": "0.6.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -9596,7 +9777,7 @@ }, "node_modules/npm/node_modules/ieee754": { "version": "1.2.1", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -9616,7 +9797,7 @@ }, "node_modules/npm/node_modules/ignore-walk": { "version": "6.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9628,7 +9809,7 @@ }, "node_modules/npm/node_modules/imurmurhash": { "version": "0.1.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9637,7 +9818,7 @@ }, "node_modules/npm/node_modules/indent-string": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9646,7 +9827,7 @@ }, "node_modules/npm/node_modules/inflight": { "version": "1.0.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9656,13 +9837,13 @@ }, "node_modules/npm/node_modules/inherits": { "version": "2.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/ini": { "version": "4.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9671,7 +9852,7 @@ }, "node_modules/npm/node_modules/init-package-json": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9689,13 +9870,13 @@ }, "node_modules/npm/node_modules/ip": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/ip-regex": { "version": "4.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9704,7 +9885,7 @@ }, "node_modules/npm/node_modules/is-cidr": { "version": "4.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -9715,8 +9896,8 @@ } }, "node_modules/npm/node_modules/is-core-module": { - "version": "2.12.1", - "extraneous": true, + "version": "2.13.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9728,7 +9909,7 @@ }, "node_modules/npm/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9737,19 +9918,19 @@ }, "node_modules/npm/node_modules/is-lambda": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/isexe": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/jackspeak": { "version": "2.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -9767,7 +9948,7 @@ }, "node_modules/npm/node_modules/json-parse-even-better-errors": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9776,7 +9957,7 @@ }, "node_modules/npm/node_modules/json-stringify-nice": { "version": "1.1.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -9785,28 +9966,28 @@ }, "node_modules/npm/node_modules/jsonparse": { "version": "1.3.1", + "dev": true, "engines": [ "node >= 0.2.0" ], - "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/just-diff": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/just-diff-apply": { "version": "5.5.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { "version": "7.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9819,7 +10000,7 @@ }, "node_modules/npm/node_modules/libnpmdiff": { "version": "5.0.20", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9839,7 +10020,7 @@ }, "node_modules/npm/node_modules/libnpmexec": { "version": "6.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9861,7 +10042,7 @@ }, "node_modules/npm/node_modules/libnpmfund": { "version": "4.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9873,7 +10054,7 @@ }, "node_modules/npm/node_modules/libnpmhook": { "version": "9.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9886,7 +10067,7 @@ }, "node_modules/npm/node_modules/libnpmorg": { "version": "5.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9899,7 +10080,7 @@ }, "node_modules/npm/node_modules/libnpmpack": { "version": "5.0.20", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9913,8 +10094,8 @@ } }, "node_modules/npm/node_modules/libnpmpublish": { - "version": "7.5.0", - "extraneous": true, + "version": "7.5.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9933,7 +10114,7 @@ }, "node_modules/npm/node_modules/libnpmsearch": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9945,7 +10126,7 @@ }, "node_modules/npm/node_modules/libnpmteam": { "version": "5.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9958,7 +10139,7 @@ }, "node_modules/npm/node_modules/libnpmversion": { "version": "4.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9974,7 +10155,7 @@ }, "node_modules/npm/node_modules/lru-cache": { "version": "7.18.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9983,7 +10164,7 @@ }, "node_modules/npm/node_modules/make-fetch-happen": { "version": "11.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10009,7 +10190,7 @@ }, "node_modules/npm/node_modules/minimatch": { "version": "9.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10024,7 +10205,7 @@ }, "node_modules/npm/node_modules/minipass": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10033,7 +10214,7 @@ }, "node_modules/npm/node_modules/minipass-collect": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10045,7 +10226,7 @@ }, "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10057,7 +10238,7 @@ }, "node_modules/npm/node_modules/minipass-fetch": { "version": "3.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10074,7 +10255,7 @@ }, "node_modules/npm/node_modules/minipass-flush": { "version": "1.0.5", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10086,7 +10267,7 @@ }, "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10098,7 +10279,7 @@ }, "node_modules/npm/node_modules/minipass-json-stream": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10108,7 +10289,7 @@ }, "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10120,7 +10301,7 @@ }, "node_modules/npm/node_modules/minipass-pipeline": { "version": "1.2.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10132,7 +10313,7 @@ }, "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10144,7 +10325,7 @@ }, "node_modules/npm/node_modules/minipass-sized": { "version": "1.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10156,7 +10337,7 @@ }, "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10168,7 +10349,7 @@ }, "node_modules/npm/node_modules/minizlib": { "version": "2.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10181,7 +10362,7 @@ }, "node_modules/npm/node_modules/minizlib/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10193,7 +10374,7 @@ }, "node_modules/npm/node_modules/mkdirp": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -10205,13 +10386,13 @@ }, "node_modules/npm/node_modules/ms": { "version": "2.1.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/mute-stream": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10220,7 +10401,7 @@ }, "node_modules/npm/node_modules/negotiator": { "version": "0.6.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10229,7 +10410,7 @@ }, "node_modules/npm/node_modules/node-gyp": { "version": "9.4.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10254,13 +10435,13 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { "version": "1.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/node-gyp/node_modules/are-we-there-yet": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10273,7 +10454,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": { "version": "1.1.11", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10283,7 +10464,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/gauge": { "version": "4.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10302,7 +10483,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/glob": { "version": "7.2.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10322,7 +10503,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/minimatch": { "version": "3.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10334,7 +10515,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { "version": "6.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10349,7 +10530,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/npmlog": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10364,7 +10545,7 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/readable-stream": { "version": "3.6.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10378,13 +10559,13 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/signal-exit": { "version": "3.0.7", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/node-gyp/node_modules/which": { "version": "2.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10399,7 +10580,7 @@ }, "node_modules/npm/node_modules/nopt": { "version": "7.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10414,7 +10595,7 @@ }, "node_modules/npm/node_modules/normalize-package-data": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -10429,7 +10610,7 @@ }, "node_modules/npm/node_modules/npm-audit-report": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10438,7 +10619,7 @@ }, "node_modules/npm/node_modules/npm-bundled": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10450,7 +10631,7 @@ }, "node_modules/npm/node_modules/npm-install-checks": { "version": "6.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -10462,7 +10643,7 @@ }, "node_modules/npm/node_modules/npm-normalize-package-bin": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10471,7 +10652,7 @@ }, "node_modules/npm/node_modules/npm-package-arg": { "version": "10.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10486,7 +10667,7 @@ }, "node_modules/npm/node_modules/npm-packlist": { "version": "7.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10498,7 +10679,7 @@ }, "node_modules/npm/node_modules/npm-pick-manifest": { "version": "8.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10513,7 +10694,7 @@ }, "node_modules/npm/node_modules/npm-profile": { "version": "7.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10526,7 +10707,7 @@ }, "node_modules/npm/node_modules/npm-registry-fetch": { "version": "14.0.5", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10544,7 +10725,7 @@ }, "node_modules/npm/node_modules/npm-user-validate": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "engines": { @@ -10553,7 +10734,7 @@ }, "node_modules/npm/node_modules/npmlog": { "version": "7.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10568,7 +10749,7 @@ }, "node_modules/npm/node_modules/once": { "version": "1.4.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10577,7 +10758,7 @@ }, "node_modules/npm/node_modules/p-map": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10592,7 +10773,7 @@ }, "node_modules/npm/node_modules/pacote": { "version": "15.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10624,7 +10805,7 @@ }, "node_modules/npm/node_modules/parse-conflict-json": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10638,7 +10819,7 @@ }, "node_modules/npm/node_modules/path-is-absolute": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10647,7 +10828,7 @@ }, "node_modules/npm/node_modules/path-key": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10656,7 +10837,7 @@ }, "node_modules/npm/node_modules/path-scurry": { "version": "1.9.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -10672,7 +10853,7 @@ }, "node_modules/npm/node_modules/path-scurry/node_modules/lru-cache": { "version": "9.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10681,7 +10862,7 @@ }, "node_modules/npm/node_modules/postcss-selector-parser": { "version": "6.0.13", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10694,7 +10875,7 @@ }, "node_modules/npm/node_modules/proc-log": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10703,7 +10884,7 @@ }, "node_modules/npm/node_modules/process": { "version": "0.11.10", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10712,7 +10893,7 @@ }, "node_modules/npm/node_modules/promise-all-reject-late": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -10721,7 +10902,7 @@ }, "node_modules/npm/node_modules/promise-call-limit": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -10730,13 +10911,13 @@ }, "node_modules/npm/node_modules/promise-inflight": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/promise-retry": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10749,7 +10930,7 @@ }, "node_modules/npm/node_modules/promzard": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10761,7 +10942,7 @@ }, "node_modules/npm/node_modules/qrcode-terminal": { "version": "0.12.0", - "extraneous": true, + "dev": true, "inBundle": true, "bin": { "qrcode-terminal": "bin/qrcode-terminal.js" @@ -10769,7 +10950,7 @@ }, "node_modules/npm/node_modules/read": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10781,7 +10962,7 @@ }, "node_modules/npm/node_modules/read-cmd-shim": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10790,7 +10971,7 @@ }, "node_modules/npm/node_modules/read-package-json": { "version": "6.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10805,7 +10986,7 @@ }, "node_modules/npm/node_modules/read-package-json-fast": { "version": "3.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10818,7 +10999,7 @@ }, "node_modules/npm/node_modules/readable-stream": { "version": "4.4.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10833,7 +11014,7 @@ }, "node_modules/npm/node_modules/retry": { "version": "0.12.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10842,7 +11023,7 @@ }, "node_modules/npm/node_modules/rimraf": { "version": "3.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10857,7 +11038,7 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": { "version": "1.1.11", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10867,7 +11048,7 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/glob": { "version": "7.2.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10887,7 +11068,7 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/minimatch": { "version": "3.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10899,7 +11080,7 @@ }, "node_modules/npm/node_modules/safe-buffer": { "version": "5.2.1", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -10919,13 +11100,14 @@ }, "node_modules/npm/node_modules/safer-buffer": { "version": "2.1.2", - "extraneous": true, + "dev": true, "inBundle": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/npm/node_modules/semver": { "version": "7.5.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10940,7 +11122,7 @@ }, "node_modules/npm/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10952,13 +11134,13 @@ }, "node_modules/npm/node_modules/set-blocking": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/shebang-command": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10970,7 +11152,7 @@ }, "node_modules/npm/node_modules/shebang-regex": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10979,7 +11161,7 @@ }, "node_modules/npm/node_modules/signal-exit": { "version": "4.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -10991,7 +11173,7 @@ }, "node_modules/npm/node_modules/sigstore": { "version": "1.9.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -11010,7 +11192,7 @@ }, "node_modules/npm/node_modules/smart-buffer": { "version": "4.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -11020,7 +11202,7 @@ }, "node_modules/npm/node_modules/socks": { "version": "2.7.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11034,7 +11216,7 @@ }, "node_modules/npm/node_modules/socks-proxy-agent": { "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11048,7 +11230,7 @@ }, "node_modules/npm/node_modules/spdx-correct": { "version": "3.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -11058,13 +11240,13 @@ }, "node_modules/npm/node_modules/spdx-exceptions": { "version": "2.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "CC-BY-3.0" }, "node_modules/npm/node_modules/spdx-expression-parse": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11074,13 +11256,13 @@ }, "node_modules/npm/node_modules/spdx-license-ids": { "version": "3.0.13", - "extraneous": true, + "dev": true, "inBundle": true, "license": "CC0-1.0" }, "node_modules/npm/node_modules/ssri": { "version": "10.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11092,7 +11274,7 @@ }, "node_modules/npm/node_modules/string_decoder": { "version": "1.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11101,7 +11283,7 @@ }, "node_modules/npm/node_modules/string-width": { "version": "4.2.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11116,7 +11298,7 @@ "node_modules/npm/node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11130,7 +11312,7 @@ }, "node_modules/npm/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11143,7 +11325,7 @@ "node_modules/npm/node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11155,7 +11337,7 @@ }, "node_modules/npm/node_modules/supports-color": { "version": "9.4.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -11167,7 +11349,7 @@ }, "node_modules/npm/node_modules/tar": { "version": "6.1.15", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11184,7 +11366,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11196,7 +11378,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11208,19 +11390,19 @@ }, "node_modules/npm/node_modules/text-table": { "version": "0.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/tiny-relative-date": { "version": "1.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/treeverse": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -11229,7 +11411,7 @@ }, "node_modules/npm/node_modules/tuf-js": { "version": "1.1.7", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11243,7 +11425,7 @@ }, "node_modules/npm/node_modules/unique-filename": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11255,7 +11437,7 @@ }, "node_modules/npm/node_modules/unique-slug": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11267,13 +11449,13 @@ }, "node_modules/npm/node_modules/util-deprecate": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/validate-npm-package-license": { "version": "3.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -11283,7 +11465,7 @@ }, "node_modules/npm/node_modules/validate-npm-package-name": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11295,13 +11477,13 @@ }, "node_modules/npm/node_modules/walk-up-path": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/wcwidth": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11310,7 +11492,7 @@ }, "node_modules/npm/node_modules/which": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11325,7 +11507,7 @@ }, "node_modules/npm/node_modules/wide-align": { "version": "1.1.5", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11334,7 +11516,7 @@ }, "node_modules/npm/node_modules/wrap-ansi": { "version": "8.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11352,7 +11534,7 @@ "node_modules/npm/node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11369,7 +11551,7 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -11381,7 +11563,7 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "6.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -11393,13 +11575,13 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11416,7 +11598,7 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "7.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11431,13 +11613,13 @@ }, "node_modules/npm/node_modules/wrappy": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/write-file-atomic": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11450,7 +11632,7 @@ }, "node_modules/npm/node_modules/yallist": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, @@ -11463,9 +11645,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", - "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11481,14 +11663,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -11638,16 +11820,16 @@ } }, "node_modules/p-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-3.0.0.tgz", - "integrity": "sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-4.1.0.tgz", + "integrity": "sha512-37/tPdZ3oJwHaS3gNJdenCDB3Tz26i9sjhnguBtvN0vYlRIiDNnvTWkuh+0hETV9rLPdJ3rlL3yVOYPIAnM8rw==", "dev": true, "peer": true, "dependencies": { - "p-map": "^5.1.0" + "p-map": "^7.0.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -11693,62 +11875,13 @@ } }, "node_modules/p-map": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", - "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", - "dev": true, - "peer": true, - "dependencies": { - "aggregate-error": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map/node_modules/aggregate-error": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", - "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", - "dev": true, - "peer": true, - "dependencies": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map/node_modules/clean-stack": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", - "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", - "dev": true, - "peer": true, - "dependencies": { - "escape-string-regexp": "5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map/node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.1.tgz", + "integrity": "sha512-2wnaR0XL/FDOj+TgpDuRb2KTjLnu3Fma6b1ZUwGY7LcqenMcvP/YFpjpbPKY6WVGsbuJZRuoUz8iPrt8ORnAFw==", "dev": true, "peer": true, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12045,9 +12178,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", + "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", "dev": true, "peer": true, "bin": { @@ -12091,9 +12224,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -12305,9 +12438,9 @@ } }, "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.4.0.tgz", - "integrity": "sha512-HT3RRs7sTfY22KuPQJkD/XjbTbxgP2Je5HPt6H6JEGvcjHd5Lqru75EbrP3tb4FYjNJ+DjLp+MNQTFQU0mhXNw==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.1.tgz", + "integrity": "sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==", "dev": true, "engines": { "node": ">=16" @@ -12341,27 +12474,27 @@ } }, "node_modules/read-pkg/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-pkg/node_modules/lines-and-columns": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz", - "integrity": "sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/read-pkg/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -12383,9 +12516,9 @@ } }, "node_modules/read-pkg/node_modules/parse-json": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.0.tgz", - "integrity": "sha512-ihtdrgbqdONYD156Ap6qTcaGcGdkdAxodO1wLqQ/j7HP1u2sFYppINiq4jyC8F+Nm+4fVufylCV00QmkTHkSUg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", + "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.21.4", @@ -12414,9 +12547,9 @@ } }, "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.4.0.tgz", - "integrity": "sha512-HT3RRs7sTfY22KuPQJkD/XjbTbxgP2Je5HPt6H6JEGvcjHd5Lqru75EbrP3tb4FYjNJ+DjLp+MNQTFQU0mhXNw==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.1.tgz", + "integrity": "sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==", "dev": true, "engines": { "node": ">=16" @@ -12580,6 +12713,16 @@ "node": ">=8" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", @@ -12650,9 +12793,9 @@ } }, "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", "dev": true, "peer": true }, @@ -12716,14 +12859,14 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -12761,16 +12904,19 @@ ] }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", + "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -12996,9 +13142,9 @@ } }, "node_modules/semantic-release/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "peer": true, "engines": { @@ -13019,9 +13165,9 @@ } }, "node_modules/semantic-release/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", "dev": true, "peer": true, "dependencies": { @@ -13208,6 +13354,21 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", + "dependencies": { + "define-data-property": "^1.1.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-function-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", @@ -13401,9 +13562,9 @@ } }, "node_modules/sinon": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.1.0.tgz", - "integrity": "sha512-ZSgzF0vwmoa8pq0GEynqfdnpEDyP1PkYmEChnkjW0Vyh8IDlyFEJ+fkMhCP0il6d5cJjPl2PUsnUSAuP5sttOQ==", + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.1.3.tgz", + "integrity": "sha512-mjnWWeyxcAf9nC0bXcPmiDut+oE8HYridTNzBbF98AYVLmWwGRp2ISEpyhYflG1ifILT+eNn3BmKUJPxjXUPlA==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", @@ -13438,12 +13599,15 @@ } }, "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/slice-ansi": { @@ -13502,17 +13666,28 @@ "spdx-license-ids": "^3.0.0" } }, + "node_modules/spdx-correct/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz", + "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==", "dev": true }, "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "dev": true, + "peer": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -13805,6 +13980,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/temp-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz", @@ -13870,6 +14055,28 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -13949,11 +14156,14 @@ } }, "node_modules/traverse": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", - "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", + "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==", "dev": true, "peer": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -13981,9 +14191,9 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "peer": true, "dependencies": { @@ -14035,9 +14245,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "peer": true, "dependencies": { @@ -14169,9 +14379,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -14215,6 +14425,18 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unique-string": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", @@ -14245,16 +14467,16 @@ } }, "node_modules/universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "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==", "dev": true, "peer": true }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "engines": { "node": ">= 10.0.0" @@ -14304,9 +14526,9 @@ "peer": true }, "node_modules/v8-to-istanbul": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", - "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -14318,9 +14540,9 @@ } }, "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", + "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -14337,6 +14559,16 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -14378,14 +14610,14 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" @@ -14501,12 +14733,11 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-unparser": { @@ -14578,14 +14809,6 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index 3798bcc..6088e41 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ ], "scripts": { "start": "node .", - "test": "mocha --loader=esmock -- test --reporter spec", + "test": "mocha -- test --reporter spec", "test:coverage": "c8 --all --include=src --exclude=src/types --exclude=src/index.js --reporter=cobertura --reporter=text npm run test", "test:coverage:html": "c8 --all --include=src --exclude=src/types --exclude=src/index.js --reporter=html --reporter=text npm run test", "lint": "npm run lint:check", @@ -57,8 +57,9 @@ "@types/sinon": "^10.0.19", "@types/sinon-chai": "^3.2.10", "c8": "^8.0.1", + "chai-as-promised": "^7.1.1", "eslint-config-prettier": "^9.0.0", - "esmock": "^2.6.0", + "esmock": "^2.6.3", "husky": "^8.0.0", "mocha": "^10.2.0", "mock-fs": "^5.2.0", diff --git a/src/errors/mock-runner-error.js b/src/errors/mock-runner-error.js index 8cbf41c..18d24bd 100644 --- a/src/errors/mock-runner-error.js +++ b/src/errors/mock-runner-error.js @@ -1,4 +1,4 @@ -import { colourHelper, colourCodes } from '../helpers/colours.js'; +import { paintText, colourCodes } from '../helpers/colours.js'; import { Logger } from '../helpers/logger.js'; export class MockRunnerError extends Error { @@ -38,10 +38,10 @@ export class MockRunnerError extends Error { type = colourCodes.fg.cyan; } Logger.error( - `Error of level ${colourHelper.paintText(this.level.toString(), type)}, type ${colourHelper.paintText( + `Error of level ${paintText(this.level.toString(), type)}, type ${paintText( this.code.toString(), colourCodes.fg.gray - )} over ${colourHelper.paintText(this.emitter, colourCodes.fg.blue)}` + )} over ${paintText(this.emitter, colourCodes.fg.blue)}` ); Logger.info(`${this.stack}`); } diff --git a/src/errors/openapi-schema-not-found-error.js b/src/errors/openapi-schema-not-found-error.js index 277e447..0c52d14 100644 --- a/src/errors/openapi-schema-not-found-error.js +++ b/src/errors/openapi-schema-not-found-error.js @@ -1,4 +1,5 @@ import { messages } from '../helpers/messages.js'; + export class OpenApiSchemaNotFoundError extends Error { constructor() { super(messages.OPENAPI_SCHEMA_NOT_FOUND_ERROR_MSG); diff --git a/src/helpers/colours.js b/src/helpers/colours.js index bf25d57..10d4117 100644 --- a/src/helpers/colours.js +++ b/src/helpers/colours.js @@ -38,8 +38,6 @@ export const colourCodes = Object.freeze({ * @param {string} color - The desired color to paint the text. * @returns {string} - The painted text. */ -function paintText(text, color) { +export function paintText(text, color) { return `${color}${text}${colourCodes.reset}`; } - -export const colourHelper = { paintText }; diff --git a/src/helpers/verify-remote-origin.js b/src/helpers/verify-remote-origin.js index 0295225..7d5c331 100644 --- a/src/helpers/verify-remote-origin.js +++ b/src/helpers/verify-remote-origin.js @@ -4,7 +4,7 @@ * @param {string} origin - The origin to verify. * @returns {boolean} True if the origin is remote, false otherwise. */ -function verifyRemoteOrigin(origin) { +export function verifyRemoteOrigin(origin) { /* * NOTE: Regex explanation * - /^(git@|https:\/\/)/: This part of the regex specifies that the string must start with either "git@" or "https://". @@ -16,5 +16,3 @@ function verifyRemoteOrigin(origin) { const isOriginRemote = isOriginRemoteRegex.test(origin); return isOriginRemote; } - -export const verifyHelper = { verifyRemoteOrigin }; diff --git a/src/index.js b/src/index.js index ace7f3f..12bc801 100755 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,7 @@ import { MockRunnerError } from './errors/mock-runner-error.js'; import { main } from './main.js'; try { - await main.run(); + await main(); } catch (e) { if (e instanceof Error) { const err = new MockRunnerError(e.message, 500, 1, 'Entry point'); diff --git a/src/main.js b/src/main.js index 8335147..9a30168 100644 --- a/src/main.js +++ b/src/main.js @@ -6,7 +6,10 @@ import { RC_FILE_NAME } from './helpers/constants.js'; import { Logger } from './helpers/logger.js'; import { messages } from './helpers/messages.js'; import { startMockServer } from './services/start-mock-server.js'; -import { userFlowSteps } from './services/user-flow-steps.js'; +import { initWithConfigFile } from './services/user-flow-steps/init-with-config-file.js'; +import { initWithSchemaPaths } from './services/user-flow-steps/init-with-schema-paths.js'; +import { init } from './services/user-flow-steps/init.js'; + /** * @typedef {import('./types/types.d.js').Config} Config * @typedef {import('./types/types.d.js').Options} Options @@ -19,7 +22,7 @@ import { userFlowSteps } from './services/user-flow-steps.js'; * @function run * @returns {Promise} */ -const run = async () => { +export const main = async () => { program .option('-o, --origin ', 'path or repo containing schemas') .option('-s, --schema [schemaPaths...]', 'path to schemas') @@ -36,23 +39,23 @@ const run = async () => { Logger.warn(messages.CONFIG_FILE_NOT_FOUND, RC_FILE_NAME); } } else if (options?.origin) { - config = await userFlowSteps.init({ + config = await init({ origin: options.origin, schemaPaths: options.schema, ports: options.port, }); } else if (options?.schema?.length) { - config = await userFlowSteps.initWithSchemaPaths({ + config = await initWithSchemaPaths({ schemaPaths: options.schema, ports: options.port, }); } else if (configFileExists) { - config = await userFlowSteps.initWithConfigFile(); + config = await initWithConfigFile(); } if (!config) { - config = await userFlowSteps.init(); + config = await init(); } - return startMockServer.run(config.selectedSchemas); + return startMockServer(config.selectedSchemas); }; /** @@ -63,5 +66,3 @@ const run = async () => { function getConfigFromFile() { return /** @type {Config} */ (JSON.parse(fs.readFileSync(path.join(process.cwd(), RC_FILE_NAME), 'utf-8'))) || {}; } - -export const main = { run }; diff --git a/src/services/check-string-in-file.js b/src/services/check-string-in-file.js index 32dd5d1..4b7c8d7 100644 --- a/src/services/check-string-in-file.js +++ b/src/services/check-string-in-file.js @@ -9,8 +9,9 @@ import readline from 'node:readline'; * @param {string} filePath - The path to the file. * @returns {Promise} True if the string is in the file, false otherwise. */ -async function check(stringToCheck, filePath) { - const reader = readline.createInterface({ input: fs.createReadStream(filePath) }); +export async function check(stringToCheck, filePath) { + const input = fs.createReadStream(filePath); + const reader = readline.createInterface({ input }); for await (const line of reader) { if (line === stringToCheck) { return true; @@ -18,5 +19,3 @@ async function check(stringToCheck, filePath) { } return false; } - -export const checkStringInFile = { check }; diff --git a/src/services/clone-git-repository.js b/src/services/clone-git-repository.js index a67209a..b0e9bf4 100644 --- a/src/services/clone-git-repository.js +++ b/src/services/clone-git-repository.js @@ -9,7 +9,7 @@ import process from 'node:process'; * @param {string} repositoryURL - The URL of the git repository. * @param {string} dirName - The name of the directory where the repository will be cloned. */ -function cloneRepository(repositoryURL, dirName) { +export function cloneRepository(repositoryURL, dirName) { resetDirectory(dirName); clone(repositoryURL, dirName); } @@ -46,5 +46,3 @@ function clone(repositoryURL, dirName) { cwd: path.resolve(process.cwd(), dirName), // path to where you want to save the file }); } - -export const git = { cloneRepository }; diff --git a/src/services/find-oas-from-dir.js b/src/services/find-oas-from-dir.js index c171964..5282216 100644 --- a/src/services/find-oas-from-dir.js +++ b/src/services/find-oas-from-dir.js @@ -14,11 +14,12 @@ import { messages } from '../helpers/messages.js'; * @param {string} filePath - The path to the file. * @returns {Promise} The first line of the file. */ -async function getFirstLine(filePath) { - const reader = readline.createInterface({ input: fs.createReadStream(filePath) }); - const it = reader[Symbol.asyncIterator](); +export async function getFirstLine(filePath) { + const input = fs.createReadStream(filePath); + const reader = readline.createInterface({ input }); + const iterator = reader[Symbol.asyncIterator](); /** @type {IteratorResult} */ - const line = await it.next(); + const line = await iterator.next(); return line.value; } @@ -27,8 +28,8 @@ async function getFirstLine(filePath) { * @param {string} filePath - The path to the file. * @returns {Promise} True if the file is an OpenAPI specification, false otherwise. */ -async function isOas(filePath) { - const firstLine = await oas.getFirstLine(filePath); +export async function isOas(filePath) { + const firstLine = await getFirstLine(filePath); const oasRegEx = /^openapi/i; return oasRegEx.test(firstLine); } @@ -40,7 +41,7 @@ async function isOas(filePath) { * @param {string} startPath - The path to the directory. * @returns {Promise} An array of OpenAPI specifications. */ -const findOasFromDir = async (startPath) => { +export const findOasFromDir = async (startPath) => { if (!fs.existsSync(startPath)) { Logger.warn(messages.DIRECTORY_NOT_FOUND, startPath); return []; @@ -52,7 +53,7 @@ const findOasFromDir = async (startPath) => { for (const file of files) { const filePath = path.join(startPath, file); - if ((file.endsWith('.yaml') || file.endsWith('.yml')) && (await oas.isOas(filePath))) { + if ((file.endsWith('.yaml') || file.endsWith('.yml')) && (await isOas(filePath))) { oasFiles.push({ fileName: file, path: startPath, @@ -71,7 +72,7 @@ const findOasFromDir = async (startPath) => { * @param {OasFile[]} [oasFiles] - An array of OpenAPI specifications. * @returns {Promise} An array of OpenAPI specifications. */ -const findOasFromDirRecursive = async (startPath, oasFiles = []) => { +export const findOasFromDirRecursive = async (startPath, oasFiles = []) => { if (!fs.existsSync(startPath)) { Logger.warn(messages.DIRECTORY_NOT_FOUND, startPath); return []; @@ -84,8 +85,8 @@ const findOasFromDirRecursive = async (startPath, oasFiles = []) => { const filePath = path.join(startPath, file); const stat = fs.lstatSync(filePath); if (stat.isDirectory()) { - await oas.findOasFromDirRecursive(filePath, oasFiles); - } else if ((file.endsWith('.yaml') || file.endsWith('.yml')) && (await oas.isOas(filePath))) { + await findOasFromDirRecursive(filePath, oasFiles); + } else if ((file.endsWith('.yaml') || file.endsWith('.yml')) && (await isOas(filePath))) { oasFiles.push({ fileName: file, path: startPath, @@ -95,5 +96,3 @@ const findOasFromDirRecursive = async (startPath, oasFiles = []) => { } return oasFiles; }; - -export const oas = { isOas, getFirstLine, findOasFromDir, findOasFromDirRecursive }; diff --git a/src/services/gitignore.js b/src/services/gitignore.js index 942bdc7..1a195bc 100644 --- a/src/services/gitignore.js +++ b/src/services/gitignore.js @@ -2,7 +2,7 @@ import { confirm } from '@inquirer/prompts'; import fs from 'node:fs'; import path from 'node:path'; -import { checkStringInFile } from './check-string-in-file.js'; +import { check } from './check-string-in-file.js'; import { messages } from '../helpers/messages.js'; export const GITIGNORE_PATH = path.join(process.cwd(), '.gitignore'); @@ -17,7 +17,7 @@ export const GITIGNORE_PATH = path.join(process.cwd(), '.gitignore'); * @param {string} fileName - The file or folder name to append to .gitignore. * @returns {Promise} */ -async function addToGitignore(fileName) { +export async function addToGitignore(fileName) { const existsGitignoreFile = fs.existsSync(GITIGNORE_PATH); const isInGitignoreFile = existsGitignoreFile && (await isInGitignore(fileName)); const shouldAddToGitignore = !existsGitignoreFile || !isInGitignoreFile; @@ -36,7 +36,7 @@ async function addToGitignore(fileName) { * @returns {Promise} True if the text is in .gitignore, false otherwise. */ async function isInGitignore(textToCheck) { - const result = await checkStringInFile.check(textToCheck, GITIGNORE_PATH); + const result = await check(textToCheck, GITIGNORE_PATH); return result; } @@ -49,5 +49,3 @@ function getLeadingCharacter() { const lastFileCharacter = fs.readFileSync(GITIGNORE_PATH, 'utf8').slice(-1); return lastFileCharacter === '\n' ? '' : '\n'; } - -export const gitignore = { addToGitignore }; diff --git a/src/services/inquirer-validators.js b/src/services/inquirer-validators.js index f9567f0..f2f1cf1 100644 --- a/src/services/inquirer-validators.js +++ b/src/services/inquirer-validators.js @@ -1,7 +1,7 @@ import fs from 'node:fs'; import { validationErrorMessages } from '../helpers/messages.js'; -import { verifyHelper } from '../helpers/verify-remote-origin.js'; +import { verifyRemoteOrigin } from '../helpers/verify-remote-origin.js'; /** * @typedef {import('../types/types.d.js').Schema} Schema @@ -13,9 +13,9 @@ import { verifyHelper } from '../helpers/verify-remote-origin.js'; * @param {string} value - The value to validate. * @returns {boolean|string} True if the value is valid, otherwise a string with the error message. */ -function originValidator(value) { +export function originValidator(value) { const isLocalPath = fs.existsSync(value); - const isRemoteOrigin = verifyHelper.verifyRemoteOrigin(value); + const isRemoteOrigin = verifyRemoteOrigin(value); const result = isLocalPath || isRemoteOrigin || validationErrorMessages.origin.INVALID; return result; } @@ -27,7 +27,7 @@ function originValidator(value) { * @param {Schema[]} selectedSchemas - The current schema. * @returns {boolean|string} True if the value is valid, otherwise a string with the error message. */ -function portValidator(input, selectedSchemas) { +export function portValidator(input, selectedSchemas) { const numericInput = Number(input); const isInteger = Number.isInteger(numericInput); if (!isInteger || numericInput < 0 || numericInput > 65535) { @@ -39,5 +39,3 @@ function portValidator(input, selectedSchemas) { } return true; } - -export const inquirerValidators = { originValidator, portValidator }; diff --git a/src/services/start-mock-server.js b/src/services/start-mock-server.js index 8dc8492..c135c02 100644 --- a/src/services/start-mock-server.js +++ b/src/services/start-mock-server.js @@ -1,7 +1,7 @@ import OpenApiMocker from '@sngular/open-api-mocker'; import fs from 'node:fs'; -import { userFlowSteps } from './user-flow-steps.js'; +import { init } from './user-flow-steps/init.js'; import { Logger } from '../helpers/logger.js'; import { messages } from '../helpers/messages.js'; @@ -17,7 +17,7 @@ import { messages } from '../helpers/messages.js'; * @param {Schema[]} schemas - An array of schemas. * @returns {Promise} */ -async function run(schemas) { +export async function startMockServer(schemas) { const validatedSchemas = await validateSchemas(schemas); for (const schema of validatedSchemas) { // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment @@ -48,10 +48,8 @@ async function validateSchemas(schemas) { if (!allSchemasExists) { Logger.warn(messages.SOME_SCHEMA_DOES_NOT_EXIST); - const config = await userFlowSteps.init(); + const config = await init(); return config.selectedSchemas; } return schemas; } - -export const startMockServer = { run }; diff --git a/src/services/user-flow-steps.js b/src/services/user-flow-steps.js deleted file mode 100644 index 201f1ff..0000000 --- a/src/services/user-flow-steps.js +++ /dev/null @@ -1,171 +0,0 @@ -import { checkbox, confirm, input } from '@inquirer/prompts'; -import fs from 'node:fs'; -import path from 'node:path'; - -import { gitignore } from './gitignore.js'; -import { inquirerValidators } from './inquirer-validators.js'; -import { OpenApiSchemaNotFoundError } from '../errors/openapi-schema-not-found-error.js'; -import { RC_FILE_NAME, TEMP_FOLDER_NAME } from '../helpers/constants.js'; -import { Logger } from '../helpers/logger.js'; -import { messages } from '../helpers/messages.js'; -import { verifyHelper } from '../helpers/verify-remote-origin.js'; -import { git } from '../services/clone-git-repository.js'; -import { oas } from '../services/find-oas-from-dir.js'; - -/** - * @typedef {import('../types/types.d.js').Config} Config - * @typedef {import('../types/types.d.js').Options} Options - * @typedef {import('../types/types.d.js').Schema} Schema - * @typedef {import('../types/types.d.js').OasFile} OasFile - */ - -/** - * User flow when the config file already exists. - * @async - * @function initWithConfigFile - * @returns {Promise} An object with the initial values from the user. - */ -async function initWithConfigFile() { - const configFilePath = path.join(process.cwd(), RC_FILE_NAME); - const fileContent = fs.readFileSync(configFilePath, 'utf-8'); - const existingConfig = /** @type {Config} */ (JSON.parse(fileContent)) || {}; - Logger.info(messages.CURRENT_CONFIG, existingConfig); - const useExistingConfig = await confirm({ - message: messages.CONFIRM_EXISTING_CONFIG, - }); - return useExistingConfig ? existingConfig : userFlowSteps.init(); -} - -/** - * Get the schemas from the origin. - * @async - * @function getSchemas - * @param {string} origin - The origin of the schemas (local or remote). - * @returns {Promise} An array of schemas. - */ -async function getSchemas(origin) { - const isOriginRemote = verifyHelper.verifyRemoteOrigin(origin); - - if (isOriginRemote) { - git.cloneRepository(origin, TEMP_FOLDER_NAME); - await gitignore.addToGitignore(TEMP_FOLDER_NAME); - } - - const schemas = isOriginRemote - ? await oas.findOasFromDirRecursive(TEMP_FOLDER_NAME) - : await oas.findOasFromDir(origin); - return schemas; -} - -/** - * Get the schemas origin from the user. - * @async - * @function getOrigin - * @returns {Promise} The origin of the schemas (local absolute path or remote origin). - */ -async function getOrigin() { - const schemasOrigin = await input({ - message: messages.INPUT_ORIGIN, - validate: inquirerValidators.originValidator, - }); - - return verifyHelper.verifyRemoteOrigin(schemasOrigin) ? schemasOrigin : path.resolve(schemasOrigin); -} - -/** - * Start flow without config. - * @async - * @function init - * @param {Options} [options] - Cli options. - * @returns {Promise} A object with the complete config. - * @throws {OpenApiSchemaNotFoundError} When no schemas are found in the given directory. - */ -async function init({ origin, schemaPaths, ports } = { schemaPaths: [], ports: [] }) { - const schemasOrigin = origin || (await getOrigin()); - const schemas = await getSchemas(schemasOrigin); - if (!schemas.length) { - throw new OpenApiSchemaNotFoundError(); - } - - const schemasFilePaths = schemas.map((s) => s.filePath); - const schemaPathsAreAvailable = - Boolean(schemaPaths.length) && schemaPaths.every((path) => schemasFilePaths.includes(path)); - - const schemasToMock = schemaPathsAreAvailable - ? schemaPaths - : await checkbox({ - message: messages.CHOOSE_FILES, - choices: schemas.map((schema) => { - return { value: schema.filePath }; - }), - required: true, - }); - - const selectedSchemas = ports?.length ? assignPorts(schemasToMock, ports) : await askForPorts(schemasToMock); - /** @type {Config} */ - const config = { schemasOrigin, selectedSchemas }; - - fs.writeFileSync(path.join(process.cwd(), RC_FILE_NAME), JSON.stringify(config, null, '\t')); - Logger.info(messages.SAVED_CONFIG(RC_FILE_NAME), config); - await gitignore.addToGitignore(RC_FILE_NAME); - - return config; -} - -/** - * Start flow without config. - * @async - * @function init - * @param {Options} options - Cli options. - * @returns {Promise} A object with the complete config. - */ -async function initWithSchemaPaths({ schemaPaths, ports } = { schemaPaths: [], ports: [] }) { - const selectedSchemas = ports?.length ? assignPorts(schemaPaths, ports) : await askForPorts(schemaPaths); - const config = { selectedSchemas }; - - fs.writeFileSync(path.join(process.cwd(), RC_FILE_NAME), JSON.stringify(config, null, '\t')); - Logger.info(messages.USING_PROVIDED_CONFIG, config); - - return config; -} - -/** - * Ask for ports for each schema. - * @async - * @function askForPorts - * @param {string[]} schemaPaths - An array of schemas. - * @returns {Promise} An array of selected Schemas. - */ -async function askForPorts(schemaPaths) { - /** @type {Schema[]} */ - const selectedSchemas = []; - let suggestedPort = 1234; - for (const schemaPath of schemaPaths) { - const port = await input({ - message: messages.INPUT_PORT(schemaPath), - default: suggestedPort.toString(), - validate: (input) => inquirerValidators.portValidator(input, selectedSchemas), - }); - const portNumber = parseInt(port); - const schema = { path: schemaPath, port: portNumber }; - selectedSchemas.push(schema); - suggestedPort++; - } - return selectedSchemas; -} - -/** - * Assigns ports for each schema. - * @function assignPorts - * @param {string[]} schemaPaths - An array of schemas. - * @param {string[]} ports - An array of ports. - * @returns {Schema[]} An array of selected Schemas. - */ -function assignPorts(schemaPaths, ports) { - return schemaPaths.map((schemaPath, i) => { - const portNumber = Number.parseInt(ports[i]) || Number.parseInt(ports[ports.length - 1]) + (i + 1 - ports.length); - return { path: schemaPath, port: portNumber }; - }); -} - -export const userFlowSteps = { initWithConfigFile, initWithSchemaPaths, init }; diff --git a/src/services/user-flow-steps/helpers.js b/src/services/user-flow-steps/helpers.js new file mode 100644 index 0000000..cf01df7 --- /dev/null +++ b/src/services/user-flow-steps/helpers.js @@ -0,0 +1,95 @@ +import { input } from '@inquirer/prompts'; +import { resolve } from 'node:path'; + +import { TEMP_FOLDER_NAME } from '../../helpers/constants.js'; +import { messages } from '../../helpers/messages.js'; +import { verifyRemoteOrigin } from '../../helpers/verify-remote-origin.js'; +import { cloneRepository } from '../clone-git-repository.js'; +import { findOasFromDir, findOasFromDirRecursive } from '../find-oas-from-dir.js'; +import { addToGitignore } from '../gitignore.js'; +import { portValidator, originValidator } from '../inquirer-validators.js'; + +/** + * @typedef {import('../../types/types.d.js').Config} Config + * @typedef {import('../../types/types.d.js').Options} Options + * @typedef {import('../../types/types.d.js').Schema} Schema + * @typedef {import('../../types/types.d.js').OasFile} OasFile + */ + +const DEFAULT_PORT = 1234; + +/** + * Get the schemas from the origin. + * @async + * @function getSchemas + * @param {string} origin - The origin of the schemas (local or remote). + * @returns {Promise} An array of schemas. + */ +export async function getSchemas(origin) { + const isOriginRemote = verifyRemoteOrigin(origin); + + if (isOriginRemote) { + cloneRepository(origin, TEMP_FOLDER_NAME); + await addToGitignore(TEMP_FOLDER_NAME); + } + + const schemas = isOriginRemote ? await findOasFromDirRecursive(TEMP_FOLDER_NAME) : await findOasFromDir(origin); + return schemas; +} + +/** + * Get the schemas origin from the user. + * @async + * @function getOrigin + * @returns {Promise} The origin of the schemas (local absolute path or remote origin). + */ +export async function getOrigin() { + const schemasOrigin = await input({ + message: messages.INPUT_ORIGIN, + validate: originValidator, + }); + + return verifyRemoteOrigin(schemasOrigin) ? schemasOrigin : resolve(schemasOrigin); +} + +/** + * Ask for ports for each schema. + * @async + * @function askForPorts + * @param {string[]} schemaPaths - An array of schemas. + * @returns {Promise} An array of selected Schemas. + */ +export async function askForPorts(schemaPaths) { + /** @type {Schema[]} */ + const selectedSchemas = []; + let suggestedPort = DEFAULT_PORT; + for (const schemaPath of schemaPaths) { + const port = await input({ + message: messages.INPUT_PORT(schemaPath), + default: suggestedPort.toString(), + validate: (input) => portValidator(input, selectedSchemas), + }); + const portNumber = parseInt(port); + const schema = { path: schemaPath, port: portNumber }; + selectedSchemas.push(schema); + suggestedPort = portNumber + 1; + } + return selectedSchemas; +} + +/** + * Assigns ports for each schema. + * @function assignPorts + * @param {string[]} schemaPaths - An array of schemas. + * @param {string[]} [ports] - An array of ports, if not provided starts with default 1234. + * @returns {Schema[]} An array of selected Schemas. + */ +export function assignPorts(schemaPaths, ports) { + const portsToAssign = ports?.length ? ports : [DEFAULT_PORT.toString()]; + return schemaPaths.map((schemaPath, i) => { + const portNumber = + Number.parseInt(portsToAssign[i]) || + Number.parseInt(portsToAssign[portsToAssign.length - 1]) + (i + 1 - portsToAssign.length); + return { path: schemaPath, port: portNumber }; + }); +} diff --git a/src/services/user-flow-steps/init-with-config-file.js b/src/services/user-flow-steps/init-with-config-file.js new file mode 100644 index 0000000..b46fbfc --- /dev/null +++ b/src/services/user-flow-steps/init-with-config-file.js @@ -0,0 +1,29 @@ +import { confirm } from '@inquirer/prompts'; +import fs from 'node:fs'; +import path from 'node:path'; + +import { init } from './init.js'; +import { RC_FILE_NAME } from '../../helpers/constants.js'; +import { Logger } from '../../helpers/logger.js'; +import { messages } from '../../helpers/messages.js'; + +/** + * @typedef {import('../../types/types.d.js').Config} Config + */ + +/** + * User flow when the config file already exists. + * @async + * @function initWithConfigFile + * @returns {Promise} An object with the initial values from the user. + */ +export async function initWithConfigFile() { + const configFilePath = path.join(process.cwd(), RC_FILE_NAME); + const fileContent = fs.readFileSync(configFilePath, 'utf-8'); + const existingConfig = /** @type {Config} */ (JSON.parse(fileContent)) || {}; + Logger.info(messages.CURRENT_CONFIG, existingConfig); + const useExistingConfig = await confirm({ + message: messages.CONFIRM_EXISTING_CONFIG, + }); + return useExistingConfig ? existingConfig : init(); +} diff --git a/src/services/user-flow-steps/init-with-schema-paths.js b/src/services/user-flow-steps/init-with-schema-paths.js new file mode 100644 index 0000000..9a28951 --- /dev/null +++ b/src/services/user-flow-steps/init-with-schema-paths.js @@ -0,0 +1,29 @@ +import fs from 'node:fs'; +import path from 'node:path'; + +import { askForPorts, assignPorts } from './helpers.js'; +import { RC_FILE_NAME } from '../../helpers/constants.js'; +import { Logger } from '../../helpers/logger.js'; +import { messages } from '../../helpers/messages.js'; + +/** + * @typedef {import('../../types/types.d.js').Config} Config + * @typedef {import('../../types/types.d.js').Options} Options + */ + +/** + * Start flow without config. + * @async + * @function init + * @param {Options} options - Cli options. + * @returns {Promise} A object with the complete config. + */ +export async function initWithSchemaPaths({ schemaPaths, ports } = { schemaPaths: [], ports: [] }) { + const selectedSchemas = ports?.length ? assignPorts(schemaPaths, ports) : await askForPorts(schemaPaths); + const config = { selectedSchemas }; + + fs.writeFileSync(path.join(process.cwd(), RC_FILE_NAME), JSON.stringify(config, null, '\t')); + Logger.info(messages.USING_PROVIDED_CONFIG, config); + + return config; +} diff --git a/src/services/user-flow-steps/init.js b/src/services/user-flow-steps/init.js new file mode 100644 index 0000000..238debb --- /dev/null +++ b/src/services/user-flow-steps/init.js @@ -0,0 +1,55 @@ +import { checkbox } from '@inquirer/prompts'; +import fs from 'node:fs'; +import path from 'node:path'; + +import { askForPorts, assignPorts, getOrigin, getSchemas } from './helpers.js'; +import { OpenApiSchemaNotFoundError } from '../../errors/openapi-schema-not-found-error.js'; +import { RC_FILE_NAME } from '../../helpers/constants.js'; +import { Logger } from '../../helpers/logger.js'; +import { messages } from '../../helpers/messages.js'; +import { addToGitignore } from '../gitignore.js'; + +/** + * @typedef {import('../../types/types.d.js').Config} Config + * @typedef {import('../../types/types.d.js').Options} Options + */ + +/** + * Start flow without config. + * @async + * @function init + * @param {Options} [options] - Cli options. + * @returns {Promise} A object with the complete config. + * @throws {OpenApiSchemaNotFoundError} When no schemas are found in the given directory. + */ +export async function init({ origin, schemaPaths, ports } = { schemaPaths: [], ports: [] }) { + const schemasOrigin = origin || (await getOrigin()); + const schemas = await getSchemas(schemasOrigin); + if (!schemas.length) { + throw new OpenApiSchemaNotFoundError(); + } + + const schemasFilePaths = schemas.map((s) => s.filePath); + const schemaPathsAreAvailable = + Boolean(schemaPaths.length) && schemaPaths.every((path) => schemasFilePaths.includes(path)); + + const schemasToMock = schemaPathsAreAvailable + ? schemaPaths + : await checkbox({ + message: messages.CHOOSE_FILES, + choices: schemas.map((schema) => { + return { value: schema.filePath }; + }), + required: true, + }); + + const selectedSchemas = ports?.length ? assignPorts(schemasToMock, ports) : await askForPorts(schemasToMock); + /** @type {Config} */ + const config = { schemasOrigin, selectedSchemas }; + + fs.writeFileSync(path.join(process.cwd(), RC_FILE_NAME), JSON.stringify(config, null, '\t')); + Logger.info(messages.SAVED_CONFIG(RC_FILE_NAME), config); + await addToGitignore(RC_FILE_NAME); + + return config; +} diff --git a/test/helpers/file-content-iterator.js b/test/helpers/file-content-iterator.js new file mode 100644 index 0000000..91e8925 --- /dev/null +++ b/test/helpers/file-content-iterator.js @@ -0,0 +1,14 @@ +/** + * Iterator for readline interface. + * @param {string} [str] The file content to yield line by line. + * @yields {string} The read line of the file. + */ +export async function* fileContentIterator(str) { + if (!str) { + yield str; + } + const lines = str.split('\n'); + for (const objChild of lines) { + yield objChild; + } +} diff --git a/test/helpers/global-mocks-factory.js b/test/helpers/global-mocks-factory.js new file mode 100644 index 0000000..d5554c0 --- /dev/null +++ b/test/helpers/global-mocks-factory.js @@ -0,0 +1,23 @@ +export const globalMocksFactory = (sandbox) => ({ + child_process: { + execSync: sandbox.stub(), + }, + fs: { + createReadStream: sandbox.stub(), + existsSync: sandbox.stub(), + mkdirSync: sandbox.stub(), + rmSync: sandbox.stub(), + readdirSync: sandbox.stub(), + lstatSync: sandbox.stub(), + appendFileSync: sandbox.stub(), + readFileSync: sandbox.stub(), + writeFileSync: sandbox.stub(), + }, + readline: { + createInterface: sandbox.stub(), + }, + path: { + join: sandbox.stub(), + resolve: sandbox.stub(), + }, +}); diff --git a/test/unit/errors/mock-runner-error.test.js b/test/unit/errors/mock-runner-error.test.js index 6409494..daca896 100644 --- a/test/unit/errors/mock-runner-error.test.js +++ b/test/unit/errors/mock-runner-error.test.js @@ -1,23 +1,35 @@ import { expect, use } from 'chai'; -import { stub, match } from 'sinon'; +import esmock from 'esmock'; +import { createSandbox, match } from 'sinon'; import sinonChai from 'sinon-chai'; -import { MockRunnerError } from '../../../src/errors/mock-runner-error.js'; import { colourCodes } from '../../../src/helpers/colours.js'; -import { Logger } from '../../../src/helpers/logger.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; + +use(sinonChai); +const sandbox = createSandbox(); +class Logger { + static error = sandbox.stub(); + static info = sandbox.stub(); +} + +const mocks = { + '../../../src/helpers/logger.js': { Logger }, +}; +const globalMocks = globalMocksFactory(sandbox); +const fileToTest = '../../../src/errors/mock-runner-error.js'; +const { MockRunnerError } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); // Use Sinon-Chai assertions use(sinonChai); describe('unit: MockRunnerError', () => { - let error; - - beforeEach(() => {}); - - afterEach(() => {}); + afterEach(() => { + sandbox.reset(); + }); it('should have the correct properties', () => { - error = new MockRunnerError('Test error', 500, 2, 'testEmitter'); + const error = new MockRunnerError('Test error', 500, 2, 'testEmitter'); expect(error).to.be.an.instanceOf(Error); expect(error).to.have.property('name', 'MockRunnerError'); expect(error).to.have.property('message', 'Test error'); @@ -28,45 +40,33 @@ describe('unit: MockRunnerError', () => { }); it('should capture stack trace', () => { - error = new MockRunnerError('Test error', 500, 2, 'testEmitter'); + const error = new MockRunnerError('Test error', 500, 2, 'testEmitter'); expect(error.stack).to.be.a('string'); }); describe('showError', () => { - let loggerErrorStub, loggerInfoStub; - - beforeEach(() => { - loggerErrorStub = stub(Logger, 'error'); - loggerInfoStub = stub(Logger, 'info'); - }); - - afterEach(() => { - loggerErrorStub.restore(); - loggerInfoStub.restore(); - }); - it('should log the error information and use red color with a type 2', () => { - error = new MockRunnerError('Test error', 500, 2, 'testEmitter'); + const error = new MockRunnerError('Test error', 500, 2, 'testEmitter'); error.showError(); - expect(loggerErrorStub).to.have.been.calledWith(match((value) => value.includes(colourCodes.fg.red))); - expect(loggerInfoStub).to.have.been.calledOnceWithExactly(error.stack); + expect(Logger.error).to.have.been.calledWith(match((value) => value.includes(colourCodes.fg.red))); + expect(Logger.info).to.have.been.calledOnceWithExactly(error.stack); }); it('should log the error information and use crimson color with a type 2', () => { - error = new MockRunnerError('Test error', 500, 1, 'testEmitter'); + const error = new MockRunnerError('Test error', 500, 1, 'testEmitter'); error.showError(); - expect(loggerErrorStub).to.have.been.calledWith(match((value) => value.includes(colourCodes.fg.crimson))); - expect(loggerInfoStub).to.have.been.calledOnceWithExactly(error.stack); + expect(Logger.error).to.have.been.calledWith(match((value) => value.includes(colourCodes.fg.crimson))); + expect(Logger.info).to.have.been.calledOnceWithExactly(error.stack); }); it('should log the error information and use cyan color with a type undefined', () => { - error = new MockRunnerError('Test error', 500, undefined, 'testEmitter'); + const error = new MockRunnerError('Test error', 500, undefined, 'testEmitter'); error.showError(); - expect(loggerErrorStub).to.have.been.calledWith(match((value) => value.includes(colourCodes.fg.cyan))); - expect(loggerInfoStub).to.have.been.calledOnceWithExactly(error.stack); + expect(Logger.error).to.have.been.calledWith(match((value) => value.includes(colourCodes.fg.cyan))); + expect(Logger.info).to.have.been.calledOnceWithExactly(error.stack); }); }); }); diff --git a/test/unit/helpers/colours.test.js b/test/unit/helpers/colours.test.js index 52b66d6..9afeb56 100644 --- a/test/unit/helpers/colours.test.js +++ b/test/unit/helpers/colours.test.js @@ -1,15 +1,11 @@ import { expect, use } from 'chai'; import sinonChai from 'sinon-chai'; -import { colourHelper, colourCodes } from '../../../src/helpers/colours.js'; +import { paintText, colourCodes } from '../../../src/helpers/colours.js'; use(sinonChai); describe('unit: colours', () => { - beforeEach(() => {}); - - afterEach(() => {}); - it('should have the correct colours', () => { expect(colourCodes).to.deep.equal({ reset: '\x1b[0m', @@ -51,7 +47,7 @@ describe('unit: colours', () => { const text = 'Hello, World!'; const color = colourCodes.fg.red; const expected = `${color}${text}${colourCodes.reset}`; - const result = colourHelper.paintText(text, color); + const result = paintText(text, color); expect(result).to.equal(expected); }); }); diff --git a/test/unit/main.test.js b/test/unit/main.test.js index e7b452f..fed520f 100644 --- a/test/unit/main.test.js +++ b/test/unit/main.test.js @@ -1,29 +1,43 @@ import { expect, use } from 'chai'; import { program } from 'commander'; -import fs from 'node:fs'; -import { stub } from 'sinon'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; import sinonChai from 'sinon-chai'; import { RC_FILE_NAME } from '../../src/helpers/constants.js'; -import { Logger } from '../../src/helpers/logger.js'; import { messages } from '../../src/helpers/messages.js'; -import { main } from '../../src/main.js'; -import { startMockServer } from '../../src/services/start-mock-server.js'; -import { userFlowSteps } from '../../src/services/user-flow-steps.js'; +import { globalMocksFactory } from '../helpers/global-mocks-factory.js'; use(sinonChai); +const sandbox = createSandbox(); -describe('unit: main', () => { - let commanderOptsStub; - let commanderParseStub; - let fsExistsSyncStub; - let fsReadFileSyncStub; - let loggerWarnStub; - let userFlowStepsInitStub; - let userFlowStepsInitWithSchemaPathsStub; - let userFlowStepsInitWithConfigFileStub; - let startMockServerRunStub; +class Logger { + static warn = sandbox.stub(); +} +const cloneRepository = sandbox.stub(); +const findOasFromDir = sandbox.stub(); +const findOasFromDirRecursive = sandbox.stub(); +const addToGitignore = sandbox.stub(); +const init = sandbox.stub(); +const initWithSchemaPaths = sandbox.stub(); +const initWithConfigFile = sandbox.stub(); +const startMockServer = sandbox.stub(); +const mocks = { + '../../src/helpers/logger.js': { Logger }, + '../../src/services/user-flow-steps/init.js': { init }, + '../../src/services/user-flow-steps/init-with-schema-paths.js': { initWithSchemaPaths }, + '../../src/services/user-flow-steps/init-with-config-file.js': { initWithConfigFile }, + '../../src/services/start-mock-server.js': { startMockServer }, + '../../src/services/clone-git-repository.js': { cloneRepository }, + '../../src/services/find-oas-from-dir.js': { findOasFromDir, findOasFromDirRecursive }, + '../../src/services/gitignore.js': { addToGitignore }, +}; +const globalMocks = globalMocksFactory(sandbox); +const { fs } = globalMocks; +const fileToTest = '../../src/main.js'; +const { main } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); +describe('unit: main', () => { const expectedConfigMock = { schemasOrigin: '/path/to/', selectedSchemas: [{ path: '/path/to/oas.yml', port: 1234 }], @@ -31,110 +45,99 @@ describe('unit: main', () => { const origin = '/path/to/'; const schema = '/path/to/oas.yml'; - beforeEach(() => { - commanderOptsStub = stub(program, 'opts'); - commanderParseStub = stub(program, 'parse'); - fsExistsSyncStub = stub(fs, 'existsSync'); - fsReadFileSyncStub = stub(fs, 'readFileSync'); - loggerWarnStub = stub(Logger, 'warn'); - userFlowStepsInitStub = stub(userFlowSteps, 'init'); - userFlowStepsInitWithSchemaPathsStub = stub(userFlowSteps, 'initWithSchemaPaths'); - userFlowStepsInitWithConfigFileStub = stub(userFlowSteps, 'initWithConfigFile'); - startMockServerRunStub = stub(startMockServer, 'run'); + before(() => { + sandbox.stub(program, 'opts'); + sandbox.stub(program, 'parse'); + }); + + after(() => { + sandbox.restore(); }); afterEach(() => { - commanderOptsStub.restore(); - commanderParseStub.restore(); - fsExistsSyncStub.restore(); - fsReadFileSyncStub.restore(); - loggerWarnStub.restore(); - userFlowStepsInitStub.restore(); - userFlowStepsInitWithSchemaPathsStub.restore(); - userFlowStepsInitWithConfigFileStub.restore(); - startMockServerRunStub.restore(); + sandbox.reset(); }); it('should init user flow and start the mock server using runConfig flag and config file does not exist', async () => { - commanderOptsStub.returns({ runConfig: true }); - fsExistsSyncStub.returns(false); - userFlowStepsInitStub.resolves(expectedConfigMock); - await main.run(); - expect(commanderParseStub).to.have.been.calledOnce; - expect(commanderOptsStub).to.have.been.calledOnce; - expect(fsExistsSyncStub).to.have.been.calledOnce; - expect(loggerWarnStub).to.have.been.calledWith(messages.CONFIG_FILE_NOT_FOUND, RC_FILE_NAME); - expect(userFlowStepsInitStub).to.have.been.calledOnceWithExactly(); - expect(startMockServerRunStub).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); + program.opts.returns({ runConfig: true }); + fs.existsSync.returns(false); + init.resolves(expectedConfigMock); + await main(); + expect(program.parse).to.have.been.calledOnce; + expect(program.opts).to.have.been.calledOnce; + expect(fs.existsSync).to.have.been.calledOnce; + expect(Logger.warn).to.have.been.calledWith(messages.CONFIG_FILE_NOT_FOUND, RC_FILE_NAME); + expect(init).to.have.been.calledOnceWithExactly(); + expect(startMockServer).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); }); it('should start the mock server using runConfig flag and config file exist', async () => { - commanderOptsStub.returns({ runConfig: true }); - fsExistsSyncStub.returns(true); - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - await main.run(); - expect(commanderParseStub).to.have.been.calledOnce; - expect(commanderOptsStub).to.have.been.calledOnce; - expect(fsExistsSyncStub).to.have.been.calledOnce; - expect(startMockServerRunStub).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); + program.opts.returns({ runConfig: true }); + fs.existsSync.returns(true); + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + await main(); + expect(program.parse).to.have.been.calledOnce; + expect(program.opts).to.have.been.calledOnce; + expect(fs.existsSync).to.have.been.calledOnce; + expect(startMockServer).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); }); it('should init user flow using origin flag and start the mock server', async () => { - commanderOptsStub.returns({ origin }); - fsExistsSyncStub.returns(true); - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - userFlowStepsInitStub.resolves(expectedConfigMock); - await main.run(); - expect(commanderParseStub).to.have.been.calledOnce; - expect(commanderOptsStub).to.have.been.calledOnce; - expect(fsExistsSyncStub).to.have.been.calledOnce; - expect(userFlowStepsInitStub).to.have.been.calledOnceWithExactly({ + program.opts.returns({ origin }); + fs.existsSync.returns(true); + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + init.resolves(expectedConfigMock); + await main(); + expect(program.parse).to.have.been.calledOnce; + expect(program.opts).to.have.been.calledOnce; + expect(fs.existsSync).to.have.been.calledOnce; + expect(init).to.have.been.calledOnceWithExactly({ origin, ports: undefined, schemaPaths: undefined, }); - expect(startMockServerRunStub).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); + expect(startMockServer).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); }); it('should init user flow using schema flag and start the mock server', async () => { - commanderOptsStub.returns({ schema }); - fsExistsSyncStub.returns(true); - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - userFlowStepsInitWithSchemaPathsStub.resolves(expectedConfigMock); - await main.run(); - expect(commanderParseStub).to.have.been.calledOnce; - expect(commanderOptsStub).to.have.been.calledOnce; - expect(fsExistsSyncStub).to.have.been.calledOnce; - expect(userFlowStepsInitWithSchemaPathsStub).to.have.been.calledOnceWithExactly({ + program.opts.returns({ schema }); + fs.existsSync.returns(true); + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + initWithSchemaPaths.resolves(expectedConfigMock); + await main(); + expect(program.parse).to.have.been.calledOnce; + expect(program.opts).to.have.been.calledOnce; + expect(fs.existsSync).to.have.been.calledOnce; + expect(initWithSchemaPaths).to.have.been.calledOnceWithExactly({ schemaPaths: schema, ports: undefined, }); - expect(startMockServerRunStub).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); + expect(startMockServer).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); }); it('should init user flow using config file only', async () => { - commanderOptsStub.returns({}); - fsExistsSyncStub.returns(true); - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - userFlowStepsInitWithConfigFileStub.resolves(expectedConfigMock); - await main.run(); - expect(commanderParseStub).to.have.been.calledOnce; - expect(commanderOptsStub).to.have.been.calledOnce; - expect(fsExistsSyncStub).to.have.been.calledOnce; - expect(userFlowStepsInitWithConfigFileStub).to.have.been.calledOnceWithExactly(); - expect(startMockServerRunStub).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); + program.opts.returns({}); + fs.existsSync.returns(true); + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + initWithConfigFile.resolves(expectedConfigMock); + await main(); + expect(program.parse).to.have.been.calledOnce; + expect(program.opts).to.have.been.calledOnce; + expect(fs.existsSync).to.have.been.calledOnce; + expect(initWithConfigFile).to.have.been.calledOnceWithExactly(); + expect(startMockServer).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); }); it('should init user flow on no config file and no flags', async () => { - commanderOptsStub.returns({}); - fsExistsSyncStub.returns(false); - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - userFlowStepsInitStub.resolves(expectedConfigMock); - await main.run(); - expect(commanderParseStub).to.have.been.calledOnce; - expect(commanderOptsStub).to.have.been.calledOnce; - expect(fsExistsSyncStub).to.have.been.calledOnce; - expect(userFlowStepsInitStub).to.have.been.calledOnceWithExactly(); - expect(startMockServerRunStub).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); + program.opts.returns({}); + fs.existsSync.returns(false); + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + init.resolves(expectedConfigMock); + await main(); + expect(program.parse).to.have.been.calledOnce; + expect(program.opts).to.have.been.calledOnce; + expect(fs.existsSync).to.have.been.calledOnce; + expect(init).to.have.been.calledOnceWithExactly(); + expect(startMockServer).to.have.been.calledOnceWithExactly(expectedConfigMock.selectedSchemas); }); }); diff --git a/test/unit/services/check-string-in-file.test.js b/test/unit/services/check-string-in-file.test.js index a795950..af4d8dc 100644 --- a/test/unit/services/check-string-in-file.test.js +++ b/test/unit/services/check-string-in-file.test.js @@ -1,41 +1,44 @@ import { expect, use } from 'chai'; -import mockFs from 'mock-fs'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; import sinonChai from 'sinon-chai'; -import { checkStringInFile } from '../../../src/services/check-string-in-file.js'; +import { fileContentIterator } from '../../helpers/file-content-iterator.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; use(sinonChai); +const sandbox = createSandbox(); + +const mocks = {}; +const globalMocks = globalMocksFactory(sandbox); +const { readline } = globalMocks; +const fileToTest = '../../../src/services/check-string-in-file.js'; +const { check } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); describe('unit: check-string-in-file', () => { const filePath = 'path/to/file.txt'; const emptyFilePath = 'path/to/empty-file.txt'; let stringToCheck = 'Hello, World!'; - before(() => { - mockFs({ - [filePath]: `Text\n${stringToCheck}\nSome other line`, - [emptyFilePath]: '', - }); - }); - - afterEach(() => {}); - - after(() => { - mockFs.restore(); + afterEach(() => { + sandbox.reset(); }); it('should return true if the string exists in the file', async () => { - const result = await checkStringInFile.check(stringToCheck, filePath); + readline.createInterface.returns(fileContentIterator(`Text\n${stringToCheck}\nSome other line`)); + const result = await check(stringToCheck, filePath); expect(result).to.be.true; }); it('should return false if the string does not exist in the file', async () => { - const result = await checkStringInFile.check('wrongStringToCheck', filePath); + readline.createInterface.returns(fileContentIterator(`Text\n${stringToCheck}\nSome other line`)); + const result = await check('wrongStringToCheck', filePath); expect(result).to.be.false; }); it('should return false if the file is empty', async () => { - const result = await checkStringInFile.check(stringToCheck, emptyFilePath); + readline.createInterface.returns(fileContentIterator('')); + const result = await check(stringToCheck, emptyFilePath); expect(result).to.be.false; }); }); diff --git a/test/unit/services/clone-git-repository.test.js b/test/unit/services/clone-git-repository.test.js index a0f426f..8eaece5 100644 --- a/test/unit/services/clone-git-repository.test.js +++ b/test/unit/services/clone-git-repository.test.js @@ -1,50 +1,44 @@ import { expect, use } from 'chai'; -import child_process from 'node:child_process'; -import fs from 'node:fs'; -import { stub } from 'sinon'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; import sinonChai from 'sinon-chai'; -import { git } from '../../../src/services/clone-git-repository.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; + +use(sinonChai); +const sandbox = createSandbox(); + +const mocks = {}; +const globalMocks = globalMocksFactory(sandbox); +const { fs, child_process } = globalMocks; +const fileToTest = '../../../src/services/clone-git-repository.js'; +const { cloneRepository } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); use(sinonChai); describe('unit: clone-git-repository mocking git clone and fs I/O', () => { const dirName = ''; const repositoryURL = ''; - let execSyncStub; - let existsSyncStub; - let mkdirSyncStub; - let rmSync; - - beforeEach(() => { - execSyncStub = stub(child_process, 'execSync'); - existsSyncStub = stub(fs, 'existsSync'); - mkdirSyncStub = stub(fs, 'mkdirSync'); - rmSync = stub(fs, 'rmSync'); - }); afterEach(() => { - execSyncStub.restore(); - existsSyncStub.restore(); - mkdirSyncStub.restore(); - rmSync.restore(); + sandbox.reset(); }); it('should reset temp dir and clone repository', () => { - existsSyncStub.returns(true); - git.cloneRepository(repositoryURL, dirName); - expect(existsSyncStub).to.have.been.called; - expect(rmSync).to.have.been.called; - expect(mkdirSyncStub).to.have.been.called; - expect(execSyncStub).to.have.been.called; + fs.existsSync.returns(true); + cloneRepository(repositoryURL, dirName); + expect(fs.existsSync).to.have.been.called; + expect(fs.rmSync).to.have.been.called; + expect(fs.mkdirSync).to.have.been.called; + expect(child_process.execSync).to.have.been.called; }); it('should create temp dir and clone repository', () => { - existsSyncStub.returns(false); - git.cloneRepository(repositoryURL, dirName); - expect(existsSyncStub).to.have.been.called; - expect(rmSync).to.not.have.been.called; // not called - expect(mkdirSyncStub).to.have.been.called; - expect(execSyncStub).to.have.been.called; + fs.existsSync.returns(false); + cloneRepository(repositoryURL, dirName); + expect(fs.existsSync).to.have.been.called; + expect(fs.rmSync).to.not.have.been.called; + expect(fs.mkdirSync).to.have.been.called; + expect(child_process.execSync).to.have.been.called; }); }); diff --git a/test/unit/services/find-oas-from-dir.test.js b/test/unit/services/find-oas-from-dir.test.js index 862089e..880d545 100644 --- a/test/unit/services/find-oas-from-dir.test.js +++ b/test/unit/services/find-oas-from-dir.test.js @@ -1,137 +1,183 @@ -import { expect } from 'chai'; -import mockFs from 'mock-fs'; -import fs from 'node:fs'; -import path from 'node:path'; -import readline from 'node:readline'; -import { stub, spy, restore } from 'sinon'; - -import { oas } from '../../../src/services/find-oas-from-dir.js'; +import { expect, use } from 'chai'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; +import sinonChai from 'sinon-chai'; + +import { fileContentIterator } from '../../helpers/file-content-iterator.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; + +use(sinonChai); +const sandbox = createSandbox(); + +class Logger { + static warn = sandbox.stub(); +} +const mocks = { + '../../../src/helpers/logger.js': { Logger }, +}; +const globalMocks = globalMocksFactory(sandbox); +const { fs, readline, path } = globalMocks; +const fileToTest = '../../../src/services/find-oas-from-dir.js'; +const { getFirstLine, isOas, findOasFromDir, findOasFromDirRecursive } = await esmock( + fileToTest, + import.meta.url, + mocks, + globalMocks +); describe('unit: find-oas-from-dir', () => { - describe('findOasFromDir', () => { - let existsSyncStub; - let readdirSyncStub; - let isOasStub; - let joinStub; - beforeEach(() => { - existsSyncStub = stub(fs, 'existsSync'); - readdirSyncStub = stub(fs, 'readdirSync'); - isOasStub = stub(oas, 'isOas'); - joinStub = stub(path, 'join'); + afterEach(() => { + sandbox.reset(); + }); + + describe('getFirstLine', () => { + const firstLine = 'This is the first line'; + const filePath = 'path/to/file.txt'; + const emptyFilePath = 'path/to/empty-file.txt'; + + it('should return the first line of the file', async () => { + readline.createInterface.returns(fileContentIterator(firstLine)); + const result = await getFirstLine(filePath); + expect(result).to.equal(firstLine); + expect(fs.createReadStream).to.have.been.calledOnceWithExactly(filePath); + expect(readline.createInterface).to.have.been.calledOnce; + }); + + it('should return undefined if the file is empty', async () => { + readline.createInterface.returns(fileContentIterator()); + const result = await getFirstLine(emptyFilePath); + expect(result).to.be.undefined; + expect(fs.createReadStream).to.have.been.calledOnceWithExactly(emptyFilePath); + expect(readline.createInterface).to.have.been.calledOnce; + }); + }); + + describe('isOas', () => { + const filePath = 'path/to/file.yaml'; + + it('should return true if the first line starts with "openapi"', async () => { + readline.createInterface.returns(fileContentIterator('openapi 3.0.0')); + const result = await isOas(filePath); + expect(result).to.be.true; }); - afterEach(() => { - restore(); + it('should return false if the first line does not start with "openapi"', async () => { + readline.createInterface.returns(fileContentIterator('swagger: "2.0"')); + const result = await isOas(filePath); + expect(result).to.be.false; }); + it('should return false if the first line is empty', async () => { + readline.createInterface.returns(fileContentIterator('')); + const result = await isOas(filePath); + expect(result).to.be.false; + }); + }); + + describe('findOasFromDir', () => { it('should return empty array if no dir', async () => { - const logStub = stub(console, 'log'); - logStub.returns(); - existsSyncStub.returns(false); - const result = await oas.findOasFromDir('foo'); + fs.existsSync.returns(false); + const result = await findOasFromDir('foo'); expect(result).to.be.an('array').that.is.empty; }); it('should return an array of oas files', async () => { - existsSyncStub.returns(true); - readdirSyncStub.returns(['foo.yaml', 'bar.yaml']); - isOasStub.returns(true); - joinStub.returns('foo/bar.yaml'); - const result = await oas.findOasFromDir('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.returns(['foo.yaml', 'bar.yaml']); + readline.createInterface + .onCall(0) + .returns(fileContentIterator('openapi 3.0.0')) + .onCall(1) + .returns(fileContentIterator('openapi 3.0.0')); + path.join.returns('foo/bar.yaml'); + const result = await findOasFromDir('path/to/dir'); expect(result).to.be.an('array').that.has.lengthOf(2); }); + it('should return an empty array if no oas files', async () => { - existsSyncStub.returns(true); - readdirSyncStub.returns(['foo.yaml', 'bar.yaml']); - isOasStub.returns(false); - joinStub.returns('foo/bar.yaml'); - const result = await oas.findOasFromDir('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.returns(['foo.yaml', 'bar.yaml']); + readline.createInterface + .onCall(0) + .returns(fileContentIterator('swagger: "2.0"')) + .onCall(1) + .returns(fileContentIterator('swagger: "2.0"')); + path.join.returns('foo/bar.yaml'); + const result = await findOasFromDir('path/to/dir'); expect(result).to.be.an('array').that.is.empty; }); it('should return only yaml files', async () => { - existsSyncStub.returns(true); - readdirSyncStub.returns(['foo.txt', 'bar.yaml']); - isOasStub.returns(true); - joinStub.returns('foo/bar.yaml'); - const result = await oas.findOasFromDir('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.returns(['foo.txt', 'bar.yaml']); + readline.createInterface.onCall(0).returns(fileContentIterator('openapi 3.0.0')); + path.join.returns('foo/bar.yaml'); + const result = await findOasFromDir('path/to/dir'); expect(result).to.be.an('array').that.has.lengthOf(1); }); }); describe('findOasFromDirRecursive', () => { - let existsSyncStub; - let readdirSyncStub; - let isOasStub; - let joinStub; - let lstatSyncStub; - beforeEach(() => { - existsSyncStub = stub(fs, 'existsSync'); - readdirSyncStub = stub(fs, 'readdirSync'); - isOasStub = stub(oas, 'isOas'); - joinStub = stub(path, 'join'); - lstatSyncStub = stub(fs, 'lstatSync'); - }); - - afterEach(() => { - restore(); - }); - it('should return empty array if no dir', async () => { - const logStub = stub(console, 'log'); - logStub.returns(); - existsSyncStub.returns(false); - const result = await oas.findOasFromDirRecursive('foo'); + fs.existsSync.returns(false); + const result = await findOasFromDirRecursive('foo'); expect(result).to.be.an('array').that.is.empty; }); it('should search on subdirectories', async () => { - existsSyncStub.returns(true); - readdirSyncStub.onCall(0).returns(['subdir']); - readdirSyncStub.onCall(1).returns(['foo.yaml', 'bar.yaml']); - lstatSyncStub.onCall(0).returns({ isDirectory: () => true }); - lstatSyncStub.onCall(1).returns({ isDirectory: () => false }); - lstatSyncStub.onCall(2).returns({ isDirectory: () => false }); - isOasStub.returns(true); - joinStub.returns('foo/bar.yaml'); - const result = await oas.findOasFromDirRecursive('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.onCall(0).returns(['subdir']); + fs.readdirSync.onCall(1).returns(['foo.yaml', 'bar.yaml']); + fs.lstatSync.onCall(0).returns({ isDirectory: () => true }); + fs.lstatSync.onCall(1).returns({ isDirectory: () => false }); + fs.lstatSync.onCall(2).returns({ isDirectory: () => false }); + readline.createInterface + .onCall(0) + .returns(fileContentIterator('openapi 3.0.0')) + .onCall(1) + .returns(fileContentIterator('openapi 3.0.0')); + path.join.returns('foo/bar.yaml'); + const result = await findOasFromDirRecursive('path/to/dir'); expect(result).to.be.an('array').that.has.lengthOf(2); }); it('should return only oas files', async () => { - existsSyncStub.returns(true); - readdirSyncStub.onCall(0).returns(['subdir']); - readdirSyncStub.onCall(1).returns(['foo.yaml', 'bar.yaml']); - lstatSyncStub.onCall(0).returns({ isDirectory: () => true }); - lstatSyncStub.onCall(1).returns({ isDirectory: () => false }); - lstatSyncStub.onCall(2).returns({ isDirectory: () => false }); - isOasStub.onCall(0).returns(true); - isOasStub.onCall(1).returns(false); - joinStub.returns('foo/bar.yaml'); - const result = await oas.findOasFromDirRecursive('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.onCall(0).returns(['subdir']); + fs.readdirSync.onCall(1).returns(['foo.yaml', 'bar.yaml']); + fs.lstatSync.onCall(0).returns({ isDirectory: () => true }); + fs.lstatSync.onCall(1).returns({ isDirectory: () => false }); + fs.lstatSync.onCall(2).returns({ isDirectory: () => false }); + readline.createInterface + .onCall(0) + .returns(fileContentIterator('openapi 3.0.0')) + .onCall(1) + .returns(fileContentIterator('swagger: "2.0"')); + path.join.returns('foo/bar.yaml'); + const result = await findOasFromDirRecursive('path/to/dir'); expect(result).to.be.an('array').that.has.lengthOf(1); }); it('should return only yaml files', async () => { - existsSyncStub.returns(true); - readdirSyncStub.onCall(0).returns(['subdir']); - readdirSyncStub.onCall(1).returns(['foo.txt', 'bar.yaml']); - lstatSyncStub.onCall(0).returns({ isDirectory: () => true }); - lstatSyncStub.onCall(1).returns({ isDirectory: () => false }); - lstatSyncStub.onCall(2).returns({ isDirectory: () => false }); - isOasStub.returns(true); - joinStub.returns('foo/bar.yaml'); - const result = await oas.findOasFromDirRecursive('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.onCall(0).returns(['subdir']); + fs.readdirSync.onCall(1).returns(['foo.txt', 'bar.yaml']); + fs.lstatSync.onCall(0).returns({ isDirectory: () => true }); + fs.lstatSync.onCall(1).returns({ isDirectory: () => false }); + fs.lstatSync.onCall(2).returns({ isDirectory: () => false }); + readline.createInterface.onCall(0).returns(fileContentIterator('openapi 3.0.0')); + path.join.returns('foo/bar.yaml'); + const result = await findOasFromDirRecursive('path/to/dir'); expect(result).to.be.an('array').that.has.lengthOf(1); }); it('should skip files starting with dot', async () => { - existsSyncStub.returns(true); - readdirSyncStub.returns(['.hidden.yaml', 'valid.yaml']); - lstatSyncStub.returns({ isDirectory: () => false }); - isOasStub.returns(true); - joinStub.returns('path/to/valid.yaml'); - const result = await oas.findOasFromDirRecursive('path/to/dir'); + fs.existsSync.returns(true); + fs.readdirSync.returns(['.hidden.yaml', 'valid.yaml']); + fs.lstatSync.returns({ isDirectory: () => false }); + readline.createInterface.onCall(0).returns(fileContentIterator('openapi 3.0.0')); + path.join.returns('path/to/valid.yaml'); + const result = await findOasFromDirRecursive('path/to/dir'); expect(result).to.be.an('array').that.has.lengthOf(1); expect(result[0]).to.deep.equal({ fileName: 'valid.yaml', @@ -140,75 +186,4 @@ describe('unit: find-oas-from-dir', () => { }); }); }); - - describe('isOas', () => { - let getFirstLineStub; - const filePath = 'path/to/file.yaml'; - - beforeEach(() => { - getFirstLineStub = stub(oas, 'getFirstLine'); - }); - - afterEach(() => { - restore(); - }); - - it('should return true if the first line starts with "openapi"', async () => { - getFirstLineStub.resolves('openapi 3.0.0'); - const result = await oas.isOas(filePath); - expect(result).to.be.true; - }); - - it('should return false if the first line does not start with "openapi"', async () => { - getFirstLineStub.resolves('swagger: "2.0"'); - const result = await oas.isOas(filePath); - expect(result).to.be.false; - }); - - it('should return false if the first line is empty', async () => { - getFirstLineStub.resolves(''); - const result = await oas.isOas(filePath); - expect(result).to.be.false; - }); - }); - - describe('getFirstLine', () => { - const firstLine = 'This is the first line'; - const filePath = 'path/to/file.txt'; - const emptyFilePath = 'path/to/empty-file.txt'; - let createInterfaceStub; - let createReadStreamStub; - before(() => { - mockFs({ - [filePath]: `${firstLine}\nSome other line`, - [emptyFilePath]: '', - }); - createInterfaceStub = spy(readline, 'createInterface'); - createReadStreamStub = spy(fs, 'createReadStream'); - }); - after(() => { - mockFs.restore(); - createInterfaceStub.restore(); - createReadStreamStub.restore(); - }); - - afterEach(() => { - createReadStreamStub.resetHistory(); - createInterfaceStub.resetHistory(); - }); - - it('should return the first line of the file', async () => { - const result = await oas.getFirstLine(filePath); - expect(result).to.equal(firstLine); - expect(createReadStreamStub).to.have.been.calledOnceWithExactly(filePath); - expect(createInterfaceStub).to.have.been.calledOnce; - }); - - it('should return undefined if the file is empty', async () => { - const result = await oas.getFirstLine(emptyFilePath); - expect(result).to.be.undefined; - expect(createReadStreamStub).to.have.been.calledOnceWithExactly(emptyFilePath); - expect(createInterfaceStub).to.have.been.calledOnce; - }); - }); }); diff --git a/test/unit/services/gitignore.test.js b/test/unit/services/gitignore.test.js index 1fd1795..ba9bc88 100644 --- a/test/unit/services/gitignore.test.js +++ b/test/unit/services/gitignore.test.js @@ -1,98 +1,84 @@ import { expect, use } from 'chai'; import esmock from 'esmock'; -import fs from 'node:fs'; -import { restore, stub, match } from 'sinon'; +import { createSandbox, match } from 'sinon'; import sinonChai from 'sinon-chai'; import { messages } from '../../../src/helpers/messages.js'; -import { checkStringInFile } from '../../../src/services/check-string-in-file.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; use(sinonChai); +const sandbox = createSandbox(); +const confirm = sandbox.stub(); +const check = sandbox.stub(); -let confirmStub = stub(); -const { gitignore, GITIGNORE_PATH } = await esmock('../../../src/services/gitignore.js', import.meta.url, { - '@inquirer/prompts': { - confirm: (...args) => confirmStub(...args), - }, -}); +const mocks = { + '@inquirer/prompts': { confirm }, + '../../../src/services/check-string-in-file.js': { check }, +}; +const globalMocks = globalMocksFactory(sandbox); +const { fs } = globalMocks; +const fileToTest = '../../../src/services/gitignore.js'; +const { addToGitignore, GITIGNORE_PATH } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); describe('unit: addToGitignore', () => { const gitignoreContentNoNewline = 'fileContentTest'; const fileNameTest = 'fileNameTest'; const lineToAdd = `${fileNameTest}\n`; - let appendFileSyncStub; - let checkStringInFileStub; - let existsSyncStub; - let readFileSyncStub; - - beforeEach(() => { - appendFileSyncStub = stub(fs, 'appendFileSync'); - checkStringInFileStub = stub(checkStringInFile, 'check'); - confirmStub = stub(); - existsSyncStub = stub(fs, 'existsSync'); - readFileSyncStub = stub(fs, 'readFileSync'); - }); afterEach(() => { - restore(); + sandbox.reset(); }); it('should not add filename when already is in it', async () => { - existsSyncStub.returns(true); - checkStringInFileStub.returns(true); - await gitignore.addToGitignore(fileNameTest); - expect(existsSyncStub).to.have.been.calledWith(GITIGNORE_PATH); - expect(checkStringInFileStub).to.have.been.calledWith(fileNameTest, GITIGNORE_PATH); - expect(confirmStub).to.not.have.been.called; - expect(readFileSyncStub).to.not.have.been.called; - expect(appendFileSyncStub).to.not.have.been.called; + fs.existsSync.returns(true); + check.returns(true); + await addToGitignore(fileNameTest); + expect(fs.existsSync).to.have.been.calledWith(GITIGNORE_PATH); + expect(check).to.have.been.calledWith(fileNameTest, GITIGNORE_PATH); + expect(confirm).to.not.have.been.called; + expect(fs.readFileSync).to.not.have.been.called; + expect(fs.appendFileSync).to.not.have.been.called; }); it('should not add filename when user refuses', async () => { - existsSyncStub.returns(false); - confirmStub.resolves(false); - await gitignore.addToGitignore(fileNameTest); - expect(existsSyncStub).to.have.been.called; - expect(confirmStub).to.have.been.called; - expect(readFileSyncStub).to.not.have.been.called; - expect(appendFileSyncStub).to.not.have.been.called; + fs.existsSync.returns(false); + confirm.resolves(false); + await addToGitignore(fileNameTest); + expect(fs.existsSync).to.have.been.called; + expect(confirm).to.have.been.called; + expect(fs.readFileSync).to.not.have.been.called; + expect(fs.appendFileSync).to.not.have.been.called; }); it('should add newline and filename to existing .gitignore when user accepts', async () => { - existsSyncStub.returns(true); - confirmStub.resolves(true); - readFileSyncStub.returns(gitignoreContentNoNewline); - await gitignore.addToGitignore(fileNameTest); - expect(existsSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH); - expect(confirmStub).to.have.been.calledOnceWith( - match({ message: messages.CONFIRM_ADD_TO_GITIGNORE(fileNameTest) }) - ); - expect(readFileSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH, 'utf8'); - expect(appendFileSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH, `\n${lineToAdd}`); + fs.existsSync.returns(true); + confirm.resolves(true); + fs.readFileSync.returns(gitignoreContentNoNewline); + await addToGitignore(fileNameTest); + expect(fs.existsSync).to.have.been.calledOnceWith(GITIGNORE_PATH); + expect(confirm).to.have.been.calledOnceWith(match({ message: messages.CONFIRM_ADD_TO_GITIGNORE(fileNameTest) })); + expect(fs.readFileSync).to.have.been.calledOnceWith(GITIGNORE_PATH, 'utf8'); + expect(fs.appendFileSync).to.have.been.calledOnceWith(GITIGNORE_PATH, `\n${lineToAdd}`); }); it('should add filename to existing .gitignore when user accepts', async () => { - existsSyncStub.returns(true); - confirmStub.returns(true); - readFileSyncStub.returns(`${gitignoreContentNoNewline}\n`); - await gitignore.addToGitignore(fileNameTest); - expect(existsSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH); - expect(confirmStub).to.have.been.calledOnceWith( - match({ message: messages.CONFIRM_ADD_TO_GITIGNORE(fileNameTest) }) - ); - expect(readFileSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH, 'utf8'); - expect(appendFileSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH, `${lineToAdd}`); + fs.existsSync.returns(true); + confirm.returns(true); + fs.readFileSync.returns(`${gitignoreContentNoNewline}\n`); + await addToGitignore(fileNameTest); + expect(fs.existsSync).to.have.been.calledOnceWith(GITIGNORE_PATH); + expect(confirm).to.have.been.calledOnceWith(match({ message: messages.CONFIRM_ADD_TO_GITIGNORE(fileNameTest) })); + expect(fs.readFileSync).to.have.been.calledOnceWith(GITIGNORE_PATH, 'utf8'); + expect(fs.appendFileSync).to.have.been.calledOnceWith(GITIGNORE_PATH, `${lineToAdd}`); }); it('should add filename to missing .gitignore when user accepts', async () => { - existsSyncStub.returns(false); - confirmStub.returns(true); - await gitignore.addToGitignore(fileNameTest); - expect(existsSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH); - expect(confirmStub).to.have.been.calledOnceWith( - match({ message: messages.CONFIRM_ADD_TO_GITIGNORE(fileNameTest) }) - ); - expect(readFileSyncStub).to.not.have.been.called; - expect(appendFileSyncStub).to.have.been.calledOnceWith(GITIGNORE_PATH, `${lineToAdd}`); + fs.existsSync.returns(false); + confirm.returns(true); + await addToGitignore(fileNameTest); + expect(fs.existsSync).to.have.been.calledOnceWith(GITIGNORE_PATH); + expect(confirm).to.have.been.calledOnceWith(match({ message: messages.CONFIRM_ADD_TO_GITIGNORE(fileNameTest) })); + expect(fs.readFileSync).to.not.have.been.called; + expect(fs.appendFileSync).to.have.been.calledOnceWith(GITIGNORE_PATH, `${lineToAdd}`); }); }); diff --git a/test/unit/services/inquirer-validators.test.js b/test/unit/services/inquirer-validators.test.js index e6bbc4c..00cb2a6 100644 --- a/test/unit/services/inquirer-validators.test.js +++ b/test/unit/services/inquirer-validators.test.js @@ -1,12 +1,19 @@ import { expect, use } from 'chai'; -import fs from 'node:fs'; -import { stub } from 'sinon'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; import sinonChai from 'sinon-chai'; import { validationErrorMessages } from '../../../src/helpers/messages.js'; -import { inquirerValidators } from '../../../src/services/inquirer-validators.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; use(sinonChai); +const sandbox = createSandbox(); + +const mocks = {}; +const globalMocks = globalMocksFactory(sandbox); +const { fs } = globalMocks; +const fileToTest = '../../../src/services/inquirer-validators.js'; +const { originValidator, portValidator } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); describe('unit: inquirer-validators', () => { describe('originValidator', () => { @@ -14,59 +21,49 @@ describe('unit: inquirer-validators', () => { const validRemoteGitOrigin = 'git@github.com:user/repo.git'; const validLocalPath = '/path/to/local'; + afterEach(() => { + sandbox.reset(); + }); + it('should return true if the value is a valid local path', () => { - let existsSyncStub = stub(fs, 'existsSync'); - existsSyncStub.withArgs(validLocalPath).returns(true); - expect(inquirerValidators.originValidator(validLocalPath)).to.be.true; - existsSyncStub.restore(); + fs.existsSync.withArgs(validLocalPath).returns(true); + expect(originValidator(validLocalPath)).to.be.true; }); it('should return true if the value is a valid remote origin with https', () => { - expect(inquirerValidators.originValidator(validRemoteHttpsOrigin)).to.be.true; + expect(originValidator(validRemoteHttpsOrigin)).to.be.true; }); it('should return true if the value is a valid remote origin with git@', () => { - expect(inquirerValidators.originValidator(validRemoteGitOrigin)).to.be.true; + expect(originValidator(validRemoteGitOrigin)).to.be.true; }); it('should return an error message if the value is not a valid local path nor remote origin', () => { - expect(inquirerValidators.originValidator('invalid-value')).to.equal(validationErrorMessages.origin.INVALID); + expect(originValidator('invalid-value')).to.equal(validationErrorMessages.origin.INVALID); }); it('should return an error message if the value is a valid remote origin with a starting space', () => { - expect(inquirerValidators.originValidator(` ${validRemoteGitOrigin}`)).to.equal( - validationErrorMessages.origin.INVALID - ); + expect(originValidator(` ${validRemoteGitOrigin}`)).to.equal(validationErrorMessages.origin.INVALID); }); it('should return an error message if the value is a valid remote origin with a starting tab', () => { - expect(inquirerValidators.originValidator(`\t${validRemoteGitOrigin}`)).to.equal( - validationErrorMessages.origin.INVALID - ); + expect(originValidator(`\t${validRemoteGitOrigin}`)).to.equal(validationErrorMessages.origin.INVALID); }); it('should return an error message if the value is a valid remote origin with a starting newline character', () => { - expect(inquirerValidators.originValidator(`\n${validRemoteGitOrigin}`)).to.equal( - validationErrorMessages.origin.INVALID - ); + expect(originValidator(`\n${validRemoteGitOrigin}`)).to.equal(validationErrorMessages.origin.INVALID); }); it('should return an error message if the value is a valid remote origin with an ending space', () => { - expect(inquirerValidators.originValidator(`${validRemoteGitOrigin} `)).to.equal( - validationErrorMessages.origin.INVALID - ); + expect(originValidator(`${validRemoteGitOrigin} `)).to.equal(validationErrorMessages.origin.INVALID); }); it('should return an error message if the value is a valid remote origin with an ending tab', () => { - expect(inquirerValidators.originValidator(`${validRemoteGitOrigin}\t`)).to.equal( - validationErrorMessages.origin.INVALID - ); + expect(originValidator(`${validRemoteGitOrigin}\t`)).to.equal(validationErrorMessages.origin.INVALID); }); it('should return an error message if the value is a valid remote origin with an ending newline character', () => { - expect(inquirerValidators.originValidator(`${validRemoteGitOrigin}\n`)).to.equal( - validationErrorMessages.origin.INVALID - ); + expect(originValidator(`${validRemoteGitOrigin}\n`)).to.equal(validationErrorMessages.origin.INVALID); }); }); @@ -77,32 +74,28 @@ describe('unit: inquirer-validators', () => { ]; it('should return true if the value is an integer between 0 and 65535 and not already selected', () => { - expect(inquirerValidators.portValidator('0', selectedSchemas)).to.be.true; - expect(inquirerValidators.portValidator('65535', selectedSchemas)).to.be.true; - expect(inquirerValidators.portValidator('5002', selectedSchemas)).to.be.true; + expect(portValidator('0', selectedSchemas)).to.be.true; + expect(portValidator('65535', selectedSchemas)).to.be.true; + expect(portValidator('5002', selectedSchemas)).to.be.true; }); it('should return an error message if the value is not an integer', () => { - expect(inquirerValidators.portValidator('not an integer', selectedSchemas)).to.equal( - validationErrorMessages.port.INVALID - ); - expect(inquirerValidators.portValidator('3.14', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); + expect(portValidator('not an integer', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); + expect(portValidator('3.14', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); }); it('should return an error message if the value is less than 0', () => { - expect(inquirerValidators.portValidator('-1', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); - expect(inquirerValidators.portValidator('-100', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); + expect(portValidator('-1', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); + expect(portValidator('-100', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); }); it('should return an error message if the value is greater than 65535', () => { - expect(inquirerValidators.portValidator('65536', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); - expect(inquirerValidators.portValidator('100000', selectedSchemas)).to.equal( - validationErrorMessages.port.INVALID - ); + expect(portValidator('65536', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); + expect(portValidator('100000', selectedSchemas)).to.equal(validationErrorMessages.port.INVALID); }); it('should return an error message if the value is already selected', () => { - expect(inquirerValidators.portValidator('5000', selectedSchemas)).to.equal(validationErrorMessages.port.IN_USE); + expect(portValidator('5000', selectedSchemas)).to.equal(validationErrorMessages.port.IN_USE); }); }); }); diff --git a/test/unit/services/logger.test.js b/test/unit/services/logger.test.js index ad905ed..6c04119 100644 --- a/test/unit/services/logger.test.js +++ b/test/unit/services/logger.test.js @@ -1,20 +1,27 @@ import { expect, use } from 'chai'; -import { stub } from 'sinon'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; import sinonChai from 'sinon-chai'; -import { Logger } from '../../../src/helpers/logger.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; use(sinonChai); +const sandbox = createSandbox(); + +const mocks = {}; +const globalMocks = globalMocksFactory(sandbox); +const fileToTest = '../../../src/helpers/logger.js'; +const { Logger } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); describe('unit: logger', () => { let consoleSpy; beforeEach(() => { - consoleSpy = stub(console, 'log'); + consoleSpy = sandbox.stub(console, 'log'); }); afterEach(() => { - consoleSpy.restore(); + sandbox.restore(); }); it('should log an informational message to the console with no extra', () => { diff --git a/test/unit/services/start-mock-server.test.js b/test/unit/services/start-mock-server.test.js index b3ed042..a342ade 100644 --- a/test/unit/services/start-mock-server.test.js +++ b/test/unit/services/start-mock-server.test.js @@ -1,52 +1,44 @@ import { expect, use } from 'chai'; import esmock from 'esmock'; -import fs from 'node:fs'; -import { stub, spy, match } from 'sinon'; +import { createSandbox, match } from 'sinon'; import sinonChai from 'sinon-chai'; -import { Logger } from '../../../src/helpers/logger.js'; import { messages } from '../../../src/helpers/messages.js'; -import { userFlowSteps } from '../../../src/services/user-flow-steps.js'; +import { globalMocksFactory } from '../../helpers/global-mocks-factory.js'; use(sinonChai); +const sandbox = createSandbox(); -let validateStub = stub(); -let mockStub = stub(); -class FakeOpenApiMocker { - constructor(options) { - this.options = options; - this.validate = validateStub; - this.mock = mockStub; - } +const init = sandbox.stub(); +const validateStub = sandbox.stub(); +const mockStub = sandbox.stub(); +class Logger { + static warn = sandbox.stub(); + static emptyLine = sandbox.stub(); } -let fakeOpenApiMockerSpy = spy(FakeOpenApiMocker); -const { startMockServer } = await esmock('../../../src/services/start-mock-server.js', import.meta.url, { - '@sngular/open-api-mocker': { - default: fakeOpenApiMockerSpy, - }, -}); - -describe('unit: start-mock-server', () => { - let fsExistsSyncStub; - let initStub; - let loggerEmptyLineStub; - let loggerWarnStub; +const opeApiMocker = sandbox.spy( + class { + constructor(options) { + this.options = options; + this.validate = validateStub; + this.mock = mockStub; + } + } +); - beforeEach(() => { - fsExistsSyncStub = stub(fs, 'existsSync'); - initStub = stub(userFlowSteps, 'init'); - loggerEmptyLineStub = stub(Logger, 'emptyLine'); - loggerWarnStub = stub(Logger, 'warn'); - }); +const mocks = { + '@sngular/open-api-mocker': { default: opeApiMocker }, + '../../../src/helpers/logger.js': { Logger }, + '../../../src/services/user-flow-steps/init.js': { init }, +}; +const globalMocks = globalMocksFactory(sandbox); +const { fs } = globalMocks; +const fileToTest = '../../../src/services/start-mock-server.js'; +const { startMockServer } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); +describe('unit: start-mock-server', () => { afterEach(() => { - fakeOpenApiMockerSpy.resetHistory(); - validateStub.resetHistory(); - mockStub.resetHistory(); - fsExistsSyncStub.restore(); - initStub.restore(); - loggerEmptyLineStub.restore(); - loggerWarnStub.restore(); + sandbox.reset(); }); it('should start a mock server with valid schemas', async () => { @@ -54,15 +46,15 @@ describe('unit: start-mock-server', () => { { port: 3000, path: '/path/to/schema' }, { port: 4000, path: '/anotherpath/to/schema' }, ]; - fsExistsSyncStub.returns(true); - await startMockServer.run(schemas); - expect(fakeOpenApiMockerSpy).to.have.been.calledWith( + fs.existsSync.returns(true); + await startMockServer(schemas); + expect(opeApiMocker).to.have.been.calledWith( match({ port: 3000, schema: '/path/to/schema', }) ); - expect(fakeOpenApiMockerSpy).to.have.been.calledWith( + expect(opeApiMocker).to.have.been.calledWith( match({ port: 4000, schema: '/anotherpath/to/schema', @@ -70,24 +62,24 @@ describe('unit: start-mock-server', () => { ); expect(validateStub).to.have.been.calledTwice; expect(mockStub).to.have.been.calledTwice; - expect(loggerEmptyLineStub).to.have.been.calledTwice; + expect(Logger.emptyLine).to.have.been.calledTwice; }); it('should init user flow when some schemas do not exist', async () => { const schemas = [{ port: 3000, path: '/path/to/schema' }]; - fsExistsSyncStub.returns(false); - initStub.resolves({ selectedSchemas: schemas }); - await startMockServer.run(schemas); - expect(fakeOpenApiMockerSpy).to.have.been.calledWith( + fs.existsSync.returns(false); + init.resolves({ selectedSchemas: schemas }); + await startMockServer(schemas); + expect(opeApiMocker).to.have.been.calledWith( match({ port: 3000, schema: '/path/to/schema', }) ); - expect(initStub).to.have.been.calledOnce; + expect(init).to.have.been.calledOnce; expect(validateStub).to.have.been.calledOnce; expect(mockStub).to.have.been.calledOnce; - expect(loggerEmptyLineStub).to.have.been.calledOnce; - expect(loggerWarnStub).to.have.been.calledOnceWithExactly(messages.SOME_SCHEMA_DOES_NOT_EXIST); + expect(Logger.emptyLine).to.have.been.calledOnce; + expect(Logger.warn).to.have.been.calledOnceWithExactly(messages.SOME_SCHEMA_DOES_NOT_EXIST); }); }); diff --git a/test/unit/services/user-flow-steps.test.js b/test/unit/services/user-flow-steps.test.js deleted file mode 100644 index 6bb44d0..0000000 --- a/test/unit/services/user-flow-steps.test.js +++ /dev/null @@ -1,196 +0,0 @@ -import { expect, use } from 'chai'; -import esmock from 'esmock'; -import fs from 'node:fs'; -import path from 'node:path'; -import { match, stub } from 'sinon'; -import sinonChai from 'sinon-chai'; - -import { OpenApiSchemaNotFoundError } from '../../../src/errors/openapi-schema-not-found-error.js'; -import { Logger } from '../../../src/helpers/logger.js'; -import { git } from '../../../src/services/clone-git-repository.js'; -import { oas } from '../../../src/services/find-oas-from-dir.js'; -import { gitignore } from '../../../src/services/gitignore.js'; - -use(sinonChai); - -let inquirerInputStub = stub(); -let inquirerCheckboxStub = stub(); -let inquirerConfirmStub = stub(); -const { userFlowSteps } = await esmock('../../../src/services/user-flow-steps.js', import.meta.url, { - '@inquirer/prompts': { - input: (...args) => inquirerInputStub(...args), - checkbox: (...args) => inquirerCheckboxStub(...args), - confirm: (...args) => inquirerConfirmStub(...args), - }, -}); - -describe('unit: user-flow-steps', () => { - const remoteOrigin = 'git@example.git'; - const localSchema = { - filename: 'oas.yml', - path: '/path/to/', - filePath: '/path/to/oas.yml', - port: 1234, - nextPort: 1235, - }; - const expectedConfigMock = { - schemasOrigin: '/path/to/', - selectedSchemas: [{ path: '/path/to/oas.yml', port: 1234 }], - }; - - let cloneGitRepositoryStub; - let findOasFromDirStub; - let findOasFromDirRecursiveStub; - let fsReadFileSyncStub; - let fsWriteFileSyncStub; - let addToGitignoreStub; - let loggerInfoStub; - let pathResolveStub; - - beforeEach(() => { - cloneGitRepositoryStub = stub(git, 'cloneRepository'); - findOasFromDirStub = stub(oas, 'findOasFromDir'); - findOasFromDirRecursiveStub = stub(oas, 'findOasFromDirRecursive'); - fsReadFileSyncStub = stub(fs, 'readFileSync'); - fsWriteFileSyncStub = stub(fs, 'writeFileSync'); - addToGitignoreStub = stub(gitignore, 'addToGitignore'); - loggerInfoStub = stub(Logger, 'info'); - pathResolveStub = stub(path, 'resolve'); - }); - - afterEach(() => { - cloneGitRepositoryStub.restore(); - findOasFromDirStub.restore(); - findOasFromDirRecursiveStub.restore(); - fsReadFileSyncStub.restore(); - fsWriteFileSyncStub.restore(); - addToGitignoreStub.restore(); - inquirerCheckboxStub.reset(); - inquirerConfirmStub.reset(); - inquirerInputStub.reset(); - loggerInfoStub.restore(); - pathResolveStub.restore(); - }); - - describe('init', () => { - it('should throw OpenApiSchemaNotFoundError if no schemas are found with remote origin', async () => { - inquirerInputStub.resolves(remoteOrigin); - findOasFromDirRecursiveStub.resolves([]); - try { - await userFlowSteps.init(); - } catch (error) { - expect(error).to.be.an.instanceOf(OpenApiSchemaNotFoundError); - } - }); - - it('should throw OpenApiSchemaNotFoundError if no schemas are found with local origin', async () => { - inquirerInputStub.resolves(localSchema.filePath); - pathResolveStub.returns(localSchema.filePath); - findOasFromDirStub.resolves([]); - try { - await userFlowSteps.init(); - } catch (error) { - expect(error).to.be.an.instanceOf(OpenApiSchemaNotFoundError); - } - }); - - it('should return the config using local available paths', async () => { - findOasFromDirStub.resolves([localSchema]); - const config = await userFlowSteps.init({ - origin: localSchema.path, - schemaPaths: [localSchema.filePath], - ports: [1234], - }); - expect(findOasFromDirStub).to.have.been.calledWith(localSchema.path); - expect(fsWriteFileSyncStub).to.have.been.calledWith(match.string, match.string); - expect(loggerInfoStub).to.have.been.calledWith(match.string, match.object); - expect(addToGitignoreStub).to.have.been.calledWith(match.string); - expect(config).to.deep.equal(expectedConfigMock); - }); - - it('should return the config using local origin only', async () => { - findOasFromDirStub.resolves([localSchema]); - inquirerCheckboxStub.resolves([localSchema.filePath]); - inquirerInputStub.resolves(localSchema.port); - const config = await userFlowSteps.init({ - origin: localSchema.path, - port: [], - schemaPaths: [], - }); - expect(findOasFromDirStub).to.have.been.calledWith(localSchema.path); - expect(inquirerCheckboxStub).to.have.been.calledWith(match.object); - expect(inquirerInputStub).to.have.been.calledWith(match.object); - expect(config).to.deep.equal(expectedConfigMock); - }); - }); - - describe('initWithConfigFile', () => { - let initStub; - - beforeEach(() => { - initStub = stub(userFlowSteps, 'init'); - }); - - afterEach(() => { - initStub.restore(); - }); - - it('should init with config file', async () => { - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - inquirerConfirmStub.resolves(true); - const config = await userFlowSteps.initWithConfigFile(); - expect(fsReadFileSyncStub).to.have.been.calledWith(match.string); - expect(config).to.deep.equal(expectedConfigMock); - }); - - it('should not init with config file and start a new user flow', async () => { - fsReadFileSyncStub.returns(JSON.stringify(expectedConfigMock)); - inquirerConfirmStub.resolves(false); - await userFlowSteps.initWithConfigFile(); - expect(fsReadFileSyncStub).to.have.been.calledWith(match.string); - expect(initStub).to.have.been.called; - }); - }); - - describe('initWithSchemaPaths', () => { - const schemaPaths = [localSchema.filePath]; - const ports = [localSchema.port]; - const expectedConfigMockWithoutOrigin = { ...expectedConfigMock }; - delete expectedConfigMockWithoutOrigin.schemasOrigin; - - it('should init with schema paths and same length of schemas and ports', async () => { - const config = await userFlowSteps.initWithSchemaPaths({ - schemaPaths, - ports, - }); - expect(config).to.deep.equal(expectedConfigMockWithoutOrigin); - expect(fsWriteFileSyncStub).to.have.been.calledWith(match.string, match.string); - }); - - it('should init with two schema paths and one port', async () => { - const config = await userFlowSteps.initWithSchemaPaths({ - schemaPaths: [localSchema.filePath, localSchema.filePath], - ports: [localSchema.port], - }); - - expect(config).to.deep.equal({ - selectedSchemas: [ - { path: localSchema.filePath, port: localSchema.port }, - { path: localSchema.filePath, port: localSchema.nextPort }, - ], - }); - expect(fsWriteFileSyncStub).to.have.been.calledWith(match.string, match.string); - }); - - it('should init with schema paths but no ports', async () => { - inquirerInputStub.resolves(localSchema.port); - const config = await userFlowSteps.initWithSchemaPaths({ - schemaPaths: [localSchema.filePath], - }); - expect(config).to.deep.equal(expectedConfigMockWithoutOrigin); - expect(fsWriteFileSyncStub).to.have.been.calledWith(match.string, match.string); - }); - - inquirerInputStub.resolves(localSchema.port); - }); -}); diff --git a/test/unit/services/user-flow-steps/helpers.test.js b/test/unit/services/user-flow-steps/helpers.test.js new file mode 100644 index 0000000..c0c21ac --- /dev/null +++ b/test/unit/services/user-flow-steps/helpers.test.js @@ -0,0 +1,164 @@ +import { expect, use } from 'chai'; +import esmock from 'esmock'; +import { URL } from 'node:url'; +import { createSandbox } from 'sinon'; +import sinonChai from 'sinon-chai'; + +import { TEMP_FOLDER_NAME } from '../../../../src/helpers/constants.js'; +import { messages } from '../../../../src/helpers/messages.js'; +import { globalMocksFactory } from '../../../helpers/global-mocks-factory.js'; + +use(sinonChai); +const sandbox = createSandbox(); + +const input = sandbox.stub(); +const verifyRemoteOrigin = sandbox.stub(); +const cloneRepository = sandbox.stub(); +const findOasFromDir = sandbox.stub(); +const findOasFromDirRecursive = sandbox.stub(); +const addToGitignore = sandbox.stub(); +const portValidator = sandbox.stub(); +const originValidator = sandbox.stub(); + +const mocks = { + '@inquirer/prompts': { input }, + '../../helpers/verify-remote-origin.js': { verifyRemoteOrigin }, + '../clone-git-repository.js': { cloneRepository }, + '../find-oas-from-dir.js': { findOasFromDir, findOasFromDirRecursive }, + '../gitignore.js': { addToGitignore }, + '../inquirer-validators.js': { portValidator, originValidator }, +}; +const globalMocks = globalMocksFactory(sandbox); +const { path } = globalMocks; +const fileToTest = '../../../../src/services/user-flow-steps/helpers.js'; +const absolutePath = new URL(fileToTest, import.meta.url).pathname; +const { getSchemas, getOrigin, askForPorts, assignPorts } = await esmock( + absolutePath, + absolutePath, + mocks, + globalMocks +); + +describe('unit: user-flow-steps', () => { + afterEach(() => { + sandbox.reset(); + }); + + describe('helpers', () => { + describe('getSchemas', () => { + const expectedSchemas = [{ path: 'test', port: 3000 }]; + it('should find schemas from the local origin', async () => { + verifyRemoteOrigin.returns(false); + findOasFromDir.returns(expectedSchemas); + const schemas = await getSchemas('localOrigin'); + expect(cloneRepository).to.not.have.been.called; + expect(addToGitignore).to.not.have.been.called; + expect(findOasFromDir).to.have.been.calledOnce; + expect(schemas).to.deep.equal(expectedSchemas); + }); + + it('should clone the repository if the origin is remote', async () => { + verifyRemoteOrigin.returns(true); + findOasFromDirRecursive.returns(expectedSchemas); + const schemas = await getSchemas('remoteOrigin'); + expect(cloneRepository).to.have.been.calledOnce; + expect(addToGitignore).to.have.been.calledOnce; + expect(findOasFromDirRecursive).to.have.been.calledOnce; + expect(schemas).to.deep.equal(expectedSchemas); + }); + + it('should clone repository in the temp folder', async () => { + verifyRemoteOrigin.returns(true); + await getSchemas('remoteOrigin'); + expect(cloneRepository).to.have.been.calledWith('remoteOrigin', TEMP_FOLDER_NAME); + }); + }); + + describe('getOrigin', () => { + it('should return the local origin provided by the user', async () => { + const userInput = 'localOrigin'; + const expectedOrigin = '/absolutePath/localOrigin'; + input.resolves(userInput); + verifyRemoteOrigin.returns(false); + path.resolve.returns(expectedOrigin); + const origin = await getOrigin(); + expect(origin).to.equal(expectedOrigin); + }); + + it('should return the remote origin provided by the user', async () => { + const userInput = 'remoteOrigin'; + const expectedOrigin = 'remoteOrigin'; + input.resolves(userInput); + verifyRemoteOrigin.returns(true); + const origin = await getOrigin(); + expect(origin).to.equal(expectedOrigin); + }); + }); + + describe('askForPorts', () => { + it('should return the schemas with the assigned ports', async () => { + const schemas = ['test1', 'test2']; + const expectedSchemas = [ + { path: 'test1', port: 1111 }, + { path: 'test2', port: 2222 }, + ]; + input.onCall(0).resolves('1111').onCall(1).resolves('2222'); + portValidator.returns(true); + const result = await askForPorts(schemas); + expect(result).to.deep.equal(expectedSchemas); + }); + it('should suggest default port on input request', async () => { + const schemas = ['test1', 'test2']; + portValidator.returns(true); + await askForPorts(schemas); + expect(input).to.have.been.calledWithMatch({ default: '1234' }); + }); + it('should suggest next port number of previous enter one', async () => { + const schemas = ['test1', 'test2']; + portValidator.returns(true); + input.onCall(0).resolves('1111'); + await askForPorts(schemas); + expect(input.firstCall).to.have.been.calledWithMatch({ default: '1234' }); + expect(input.secondCall).to.have.been.calledWithMatch({ default: '1112' }); + }); + it('should use global message', async () => { + const schemas = ['test1']; + portValidator.returns(true); + await askForPorts(schemas); + expect(input).to.have.been.calledWithMatch({ message: messages.INPUT_PORT('test1') }); + }); + }); + describe('assignPorts', () => { + it('should use the provided ports if length match', async () => { + const schemas = ['test1', 'test2']; + const ports = ['1111', '2222']; + const expectedSchemas = [ + { path: 'test1', port: 1111 }, + { path: 'test2', port: 2222 }, + ]; + const result = await assignPorts(schemas, ports); + expect(result).to.deep.equal(expectedSchemas); + }); + it('should autocomplete ports if length mismatch', async () => { + const schemas = ['test1', 'test2']; + const ports = ['1111']; + const expectedSchemas = [ + { path: 'test1', port: 1111 }, + { path: 'test2', port: 1112 }, + ]; + const result = await assignPorts(schemas, ports); + expect(result).to.deep.equal(expectedSchemas); + }); + it('should autocomplete ports if no port provided', async () => { + const schemas = ['test1', 'test2']; + const ports = undefined; + const expectedSchemas = [ + { path: 'test1', port: 1234 }, + { path: 'test2', port: 1235 }, + ]; + const result = await assignPorts(schemas, ports); + expect(result).to.deep.equal(expectedSchemas); + }); + }); + }); +}); diff --git a/test/unit/services/user-flow-steps/init-with-config-file.test.js b/test/unit/services/user-flow-steps/init-with-config-file.test.js new file mode 100644 index 0000000..7798af6 --- /dev/null +++ b/test/unit/services/user-flow-steps/init-with-config-file.test.js @@ -0,0 +1,59 @@ +import { expect, use } from 'chai'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; +import sinonChai from 'sinon-chai'; + +import { globalMocksFactory } from '../../../helpers/global-mocks-factory.js'; + +use(sinonChai); +const sandbox = createSandbox(); + +const init = sandbox.stub(); +const confirm = sandbox.stub(); +class Logger { + static info = sandbox.stub(); +} + +const mocks = { + '@inquirer/prompts': { confirm }, + '../../../../src/helpers/logger.js': { Logger }, + '../../../../src/services/user-flow-steps/init.js': { init }, +}; +const globalMocks = globalMocksFactory(sandbox); +const { fs } = globalMocks; +const fileToTest = '../../../../src/services/user-flow-steps/init-with-config-file.js'; +const { initWithConfigFile } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); + +describe('unit: user-flow-steps', () => { + let consoleLogStub; + const expectedConfigMock = { + schemasOrigin: '/path/to/', + selectedSchemas: [{ path: '/path/to/oas.yml', port: 1234 }], + }; + + before(() => { + consoleLogStub = sandbox.stub(console, 'log'); + }); + after(() => { + consoleLogStub.restore(); + }); + afterEach(() => { + sandbox.reset(); + }); + + describe('initWithConfigFile', () => { + it('should init with config file', async () => { + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + confirm.resolves(true); + const config = await initWithConfigFile(); + expect(config).to.deep.equal(expectedConfigMock); + }); + + it('should not init with config file and start a new user flow', async () => { + fs.readFileSync.returns(JSON.stringify(expectedConfigMock)); + confirm.resolves(false); + await initWithConfigFile(); + expect(init).to.have.been.calledOnceWithExactly(); + }); + }); +}); diff --git a/test/unit/services/user-flow-steps/init-with-schema-paths.test.js b/test/unit/services/user-flow-steps/init-with-schema-paths.test.js new file mode 100644 index 0000000..0b93ab7 --- /dev/null +++ b/test/unit/services/user-flow-steps/init-with-schema-paths.test.js @@ -0,0 +1,76 @@ +import { expect, use } from 'chai'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; +import sinonChai from 'sinon-chai'; + +import { globalMocksFactory } from '../../../helpers/global-mocks-factory.js'; + +use(sinonChai); +const sandbox = createSandbox(); + +const askForPorts = sandbox.stub(); +class Logger { + static info = sandbox.stub(); +} +const mocks = { + '../../../../src/helpers/logger.js': { Logger }, + '../../../../src/services/user-flow-steps/helpers.js': { askForPorts }, +}; +const globalMocks = globalMocksFactory(sandbox); +const fileToTest = '../../../../src/services/user-flow-steps/init-with-schema-paths.js'; +const { initWithSchemaPaths } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); + +describe('unit: user-flow-steps', () => { + const localSchema = { + filename: 'oas.yml', + path: '/path/to/', + filePath: '/path/to/oas.yml', + port: 1234, + nextPort: 1235, + }; + const expectedConfigMock = { + schemasOrigin: '/path/to/', + selectedSchemas: [{ path: '/path/to/oas.yml', port: 1234 }], + }; + + afterEach(() => { + sandbox.reset(); + }); + + describe('initWithSchemaPaths', () => { + const schemaPaths = [localSchema.filePath]; + const ports = [localSchema.port]; + const expectedConfigMockWithoutOrigin = { ...expectedConfigMock }; + delete expectedConfigMockWithoutOrigin.schemasOrigin; + + it('should init with schema paths and same length of schemas and ports', async () => { + const config = await initWithSchemaPaths({ + schemaPaths, + ports, + }); + expect(config).to.deep.equal(expectedConfigMockWithoutOrigin); + }); + + it('should init with two schema paths and one port', async () => { + const config = await initWithSchemaPaths({ + schemaPaths: [localSchema.filePath, localSchema.filePath], + ports: [localSchema.port], + }); + + expect(config).to.deep.equal({ + selectedSchemas: [ + { path: localSchema.filePath, port: localSchema.port }, + { path: localSchema.filePath, port: localSchema.nextPort }, + ], + }); + }); + + it('should init with schema paths but no ports', async () => { + askForPorts.resolves([{ path: localSchema.filePath, port: localSchema.port }]); + const config = await initWithSchemaPaths({ + schemaPaths: [localSchema.filePath], + }); + expect(config).to.deep.equal(expectedConfigMockWithoutOrigin); + }); + }); +}); diff --git a/test/unit/services/user-flow-steps/init.test.js b/test/unit/services/user-flow-steps/init.test.js new file mode 100644 index 0000000..3b0e1fc --- /dev/null +++ b/test/unit/services/user-flow-steps/init.test.js @@ -0,0 +1,95 @@ +import { expect, use } from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import esmock from 'esmock'; +import { createSandbox } from 'sinon'; +import sinonChai from 'sinon-chai'; + +import { globalMocksFactory } from '../../../helpers/global-mocks-factory.js'; + +use(chaiAsPromised); +use(sinonChai); +const sandbox = createSandbox(); + +const getOrigin = sandbox.stub(); +const getSchemas = sandbox.stub(); +const askForPorts = sandbox.stub(); +const checkbox = sandbox.stub(); +class Logger { + static error = sandbox.stub(); + static info = sandbox.stub(); +} +class OpenApiSchemaNotFoundError extends Error {} +const addToGitignore = sandbox.stub(); + +const mocks = { + '@inquirer/prompts': { checkbox }, + '../../../../src/helpers/logger.js': { Logger }, + '../../../../src/errors/openapi-schema-not-found-error.js': { OpenApiSchemaNotFoundError }, + '../../../../src/services/user-flow-steps/helpers.js': { getOrigin, getSchemas, askForPorts }, + '../../../../src/services/gitignore.js': { addToGitignore }, +}; +const globalMocks = globalMocksFactory(sandbox); +const fileToTest = '../../../../src/services/user-flow-steps/init.js'; +const { init } = await esmock(fileToTest, import.meta.url, mocks, globalMocks); + +describe('unit: user-flow-steps', () => { + let consoleLogStub; + const remoteOrigin = 'git@example.git'; + const localSchema = { + filename: 'oas.yml', + path: '/path/to/', + filePath: '/path/to/oas.yml', + port: 1234, + nextPort: 1235, + }; + const expectedConfigMock = { + schemasOrigin: '/path/to/', + selectedSchemas: [{ path: '/path/to/oas.yml', port: 1234 }], + }; + + before(() => { + consoleLogStub = sandbox.stub(console, 'log'); + }); + after(() => { + consoleLogStub.restore(); + }); + afterEach(() => { + sandbox.reset(); + }); + + describe('init', () => { + it('should throw OpenApiSchemaNotFoundError if no schemas are found with remote origin', async () => { + getOrigin.resolves(remoteOrigin); + getSchemas.resolves([]); + await expect(init()).to.be.rejectedWith(OpenApiSchemaNotFoundError); + }); + + it('should throw OpenApiSchemaNotFoundError if no schemas are found with local origin', async () => { + getOrigin.resolves(localSchema.filePath); + getSchemas.resolves([]); + await expect(init()).to.be.rejectedWith(OpenApiSchemaNotFoundError); + }); + + it('should return the config using local available paths', async () => { + getSchemas.resolves([localSchema]); + const config = await init({ + origin: localSchema.path, + schemaPaths: [localSchema.filePath], + ports: [1234], + }); + expect(config).to.deep.equal(expectedConfigMock); + }); + + it('should return the config using local origin only', async () => { + getSchemas.resolves([localSchema]); + checkbox.resolves([localSchema.filePath]); + askForPorts.resolves([{ path: localSchema.filePath, port: localSchema.port }]); + const config = await init({ + origin: localSchema.path, + port: [], + schemaPaths: [], + }); + expect(config).to.deep.equal(expectedConfigMock); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index c9a0bbc..d5f1fdf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,8 @@ "extends": "@sngular/tsconfig", "compilerOptions": { "outDir": "./dist-types", - "rootDir": "./src" + "rootDir": "./src", }, "include": ["src"], - "exclude": ["dist-types", "node_modules", "test"] + "exclude": ["dist-types", "node_modules", "test"], }