diff --git a/bin/test.ts b/bin/test.ts index 0e4d564..2369071 100644 --- a/bin/test.ts +++ b/bin/test.ts @@ -11,7 +11,6 @@ import { Runner } from '@athenna/test' await Runner.setTsEnv() .addAssertPlugin() - .addSpecReporter() .addPath('tests/unit/**/*.ts') .setCliArgs(process.argv.slice(2)) .setGlobalTimeout(5000) diff --git a/package-lock.json b/package-lock.json index 4ad6174..76ec19c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "@athenna/ioc", - "version": "4.9.0", + "version": "4.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/ioc", - "version": "4.9.0", + "version": "4.10.0", "license": "MIT", "dependencies": { "awilix": "^7.0.3" }, "devDependencies": { - "@athenna/common": "^4.21.0", - "@athenna/test": "^4.14.0", - "@athenna/tsconfig": "^4.9.1", + "@athenna/common": "^4.23.0", + "@athenna/test": "^4.15.0", + "@athenna/tsconfig": "^4.12.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "commitizen": "^4.3.0", @@ -89,9 +89,9 @@ "dev": true }, "node_modules/@athenna/common": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.21.0.tgz", - "integrity": "sha512-1FCgoWxFzKHyC72UMa49VRaQMxbZS6PpagBE4pxAN0YqQ3hYQM8XDToVHc9NP/4geVyb2p5Qz3N06M/GpJn3jA==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.23.0.tgz", + "integrity": "sha512-MS5d53x138Id5CY1Zj9kUHoSJzmZl8kkjaiHtXzR4LW3RFrD3Mpi2RoA078DdYlxhB0y3ch0d6i/saKpJdjHGw==", "dev": true, "dependencies": { "@fastify/formbody": "^7.4.0", @@ -101,7 +101,7 @@ "change-case": "^4.1.2", "collect.js": "^4.36.1", "execa": "^8.0.1", - "fastify": "^4.24.0", + "fastify": "^4.24.3", "got": "^12.6.1", "http-status-codes": "^2.2.0", "is-wsl": "^2.2.0", @@ -120,7 +120,7 @@ "youch-terminal": "^2.2.2" }, "engines": { - "node": ">=21.0.0" + "node": ">=20.0.0" } }, "node_modules/@athenna/common/node_modules/argparse": { @@ -142,15 +142,13 @@ } }, "node_modules/@athenna/test": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.14.0.tgz", - "integrity": "sha512-Gha600d82tROu3MNUmqHZKX913cInOc1VONiq2Z6G1ZwoWgGv32bFdTyNLsqgwPNWeWrjTN6AWI8XD/6cxkShA==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.15.0.tgz", + "integrity": "sha512-KfMNHESohXBrVjRkT+kROf1WuvvyhmfBNrchSpH3uN+a/oiqI9waelOhARFl6AVb45HzL9y5i6luV14ZucZwQw==", "dev": true, "dependencies": { - "@japa/assert": "^1.4.1", - "@japa/run-failed-tests": "^1.1.0", - "@japa/runner": "^2.2.2", - "@japa/spec-reporter": "^1.3.3", + "@japa/assert": "^2.1.0", + "@japa/runner": "^3.1.1", "@types/sinon": "^10.0.20", "c8": "^8.0.1", "sinon": "^15.1.0" @@ -160,9 +158,9 @@ } }, "node_modules/@athenna/tsconfig": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.9.1.tgz", - "integrity": "sha512-NHF/qDOXxsvSsMZ9+gFDlTcas7CzS7njcAnNq4Om8s5P0gUIb7dWvYtihAdrd5e3o3g2z6DlQqyRo3gvqtt1NA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.12.0.tgz", + "integrity": "sha512-LO4fQZhp19iRsQTKYv0rzg1FcftRhXwHWdPQH+svUtGiaIGe/3GWCadea4ER9AGVvBx5M/2lEm65RFQGZPl76A==", "dev": true, "dependencies": { "copyfiles": "^2.4.1", @@ -889,95 +887,137 @@ } }, "node_modules/@japa/assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@japa/assert/-/assert-1.4.1.tgz", - "integrity": "sha512-IyacnyaGzHqKTUbnOproPluHGWybt0ix0UsISAnjK62aTlDS4pOYPXkCDexk21/iReXNLtFgKM/RrDPDAUfrqA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@japa/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-klSa1nO6VFYJqW9oSeMRZQpTSw01+yZpBDoHNuUse7SqbScau9SvNIvBEYxbdDB2bj9hTXxt/z6cwVWf1UltZg==", "dev": true, "dependencies": { - "@types/chai": "^4.3.4", + "@poppinss/macroable": "^1.0.1", + "@types/chai": "^4.3.11", "api-contract-validator": "^2.2.8", - "chai": "^4.3.7", - "macroable": "^7.0.2" + "chai": "^4.3.10" + }, + "engines": { + "node": ">=18.16.0" }, "peerDependencies": { - "@japa/runner": "^2.1.1" + "@japa/runner": "^3.0.0" } }, - "node_modules/@japa/base-reporter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@japa/base-reporter/-/base-reporter-1.1.2.tgz", - "integrity": "sha512-6MYs/EsXjouFPNUQL3VGllryZ5enI5rqhvQbY2Dzh3Zmhu22DWw6v9d2pxucrFptDTtQ38MBPVL/BIeZAafmOw==", + "node_modules/@japa/core": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@japa/core/-/core-9.0.0.tgz", + "integrity": "sha512-BQiS8rd1qiSkz+uTsx+Bfsp+FVeoKpJXMtUse4XDt2cUfDdCnvYkvRnqmR/F/u8ttt71sZ4mHKizGa1Q5MG3DQ==", "dev": true, "dependencies": { - "@japa/errors-printer": "^2.1.0", - "@poppinss/cliui": "^3.0.5", - "ms": "^2.1.3" + "@poppinss/cliui": "^6.2.2", + "@poppinss/hooks": "^7.2.2", + "@poppinss/macroable": "^1.0.1", + "async-retry": "^1.3.3", + "emittery": "^1.0.1", + "string-width": "^7.0.0", + "time-span": "^5.1.0" + }, + "engines": { + "node": ">=18.16.0" } }, - "node_modules/@japa/core": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@japa/core/-/core-7.3.3.tgz", - "integrity": "sha512-3mkWlzWVALZANFfMK6Q6xtYGM3mpzZeeGGUVQGDt2OOxvL8FDADVxHrRn9BFc1V4fVJO4jR/QH5utrb+RfCF5g==", + "node_modules/@japa/core/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@japa/core/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/@japa/core/node_modules/string-width": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "dependencies": { - "@poppinss/hooks": "^6.0.2-0", - "async-retry": "^1.3.3", - "emittery": "^0.13.1", - "macroable": "^7.0.2", - "time-span": "^4.0.0" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@japa/errors-printer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@japa/errors-printer/-/errors-printer-2.1.0.tgz", - "integrity": "sha512-iZUrB58e29jbRxb7lxocz5uHt9mQ1q7iojs8Gh1kIKmvaPx0KMqce77JDtqYzu2+95WjmppAvM6au1l1WYJmpw==", + "node_modules/@japa/core/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { - "@poppinss/cliui": "^3.0.5", - "jest-diff": "^29.4.1", - "youch": "^3.2.3", - "youch-terminal": "^2.2.0" + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@japa/run-failed-tests": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@japa/run-failed-tests/-/run-failed-tests-1.1.1.tgz", - "integrity": "sha512-lMv1nAtKBpX7CH8K+HHRr2aaCTAJ9Q3i7DG12MmU2A/EDJFuP7e9ZASE8O0UTlk5Goc+DR6mzuFXG3R351J89w==", + "node_modules/@japa/errors-printer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@japa/errors-printer/-/errors-printer-3.0.2.tgz", + "integrity": "sha512-8U4d8umhyg3YNAzQaJoHSULjFdEp/c+xGBwZgpMgIIYvhy3NKU0KvE3TfVAjfKcO8zaLuvh72NlnLSfyP3ooqw==", "dev": true, "dependencies": { - "@poppinss/cliui": "^3.0.5", - "find-cache-dir": "^3.3.2", - "fs-extra": "^11.1.0" + "@poppinss/colors": "^4.1.2", + "jest-diff": "^29.7.0", + "youch": "^3.3.3", + "youch-terminal": "^2.2.3" }, - "peerDependencies": { - "@japa/runner": "^2.2.3" + "engines": { + "node": ">=18.16.0" } }, "node_modules/@japa/runner": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@japa/runner/-/runner-2.5.1.tgz", - "integrity": "sha512-p1zjniMCiGxRnZkUs5WtZjTQhbXcnK0aM2Wu4Qc+w+MBpmOrw5J2zJuge0FweepTUR9CT3r2x65uw4qIshy8XQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@japa/runner/-/runner-3.1.1.tgz", + "integrity": "sha512-DWy16uw2naDMitXGNN0ULURLaVIQY/VBVtxw7rpdA8QL1Q2nCaaqJXufHqS8kO1ZRd0bOtFHMgx2/eYvxkmapA==", "dev": true, "dependencies": { - "@japa/core": "^7.3.2", - "@japa/errors-printer": "^2.1.0", - "@poppinss/cliui": "^3.0.5", - "@poppinss/hooks": "^6.0.2-0", - "fast-glob": "^3.2.12", + "@japa/core": "^9.0.0", + "@japa/errors-printer": "^3.0.2", + "@poppinss/colors": "^4.1.2", + "@poppinss/hooks": "^7.2.2", + "fast-glob": "^3.3.2", + "find-cache-dir": "^5.0.0", "getopts": "^2.3.0", - "inclusion": "^1.0.1" + "ms": "^2.1.3", + "serialize-error": "^11.0.3", + "slash": "^5.1.0" + }, + "engines": { + "node": ">=18.16.0" } }, - "node_modules/@japa/spec-reporter": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@japa/spec-reporter/-/spec-reporter-1.3.3.tgz", - "integrity": "sha512-EOOjvQVmmWZDKxmO+f0v/BSNeKzKkeJSrNwEldkF40zZWdHX2J3Jb2MJowE5DgSOQCiG/OG2UFen0I+XLnPoxQ==", + "node_modules/@japa/runner/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, - "dependencies": { - "@japa/base-reporter": "^1.1.1", - "@japa/errors-printer": "^2.1.0", - "@poppinss/cliui": "^3.0.5", - "ms": "^2.1.3" + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@jest/schemas": { @@ -1127,35 +1167,300 @@ } }, "node_modules/@poppinss/cliui": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@poppinss/cliui/-/cliui-3.0.5.tgz", - "integrity": "sha512-9TCwhJ6hQDAv7LWredEQL7eSA97kQ/i5Td80T7InV9z9rOXT8keywAM0pSvTUS01bwCeiZQVoT4r/G67DRiPJA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@poppinss/cliui/-/cliui-6.2.2.tgz", + "integrity": "sha512-FBFNjeaOKF9AEOHERNq/XC+uiDXSx83MQGvxoW4kKzyEqAqoIKK6tNPPingC8/jPStagnqVOevQjlPtIO/95qA==", "dev": true, "dependencies": { - "@poppinss/colors": "^3.0.3", + "@poppinss/colors": "^4.1.2", "cli-boxes": "^3.0.0", "cli-table3": "^0.6.3", - "color-support": "^1.1.3", - "log-update": "^4.0.0", + "cli-truncate": "^4.0.0", + "log-update": "^6.0.0", "pretty-hrtime": "^1.0.3", - "string-width": "^4.2.2" + "string-width": "^7.0.0", + "supports-color": "^9.4.0", + "term-size": "^4.0.0", + "wordwrap": "^1.0.0" + }, + "engines": { + "node": ">=18.16.0" + } + }, + "node_modules/@poppinss/cliui/node_modules/ansi-escapes": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", + "dev": true, + "dependencies": { + "type-fest": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@poppinss/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@poppinss/cliui/node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/@poppinss/cliui/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/log-update": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/@poppinss/cliui/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@poppinss/cliui/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/@poppinss/cliui/node_modules/string-width": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@poppinss/cliui/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@poppinss/cliui/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@poppinss/cliui/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@poppinss/colors": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-3.0.3.tgz", - "integrity": "sha512-jiZcp91PvIs5s4Wz4gEVY9J2tqH6H1++mZmsrC3TmFam9gbVPUJPEubPM5j4BQYJre7bjs9nkIbYFcWMOFHIVQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.2.tgz", + "integrity": "sha512-+qLfhQrdLa7RqJNZmGIc1ERVz2JtMD3kLI41tNfKhQBZt0wiWoYMhP/Tv+eopPnMy3NwANWgDSbqsi+teY1oig==", "dev": true, "dependencies": { - "color-support": "^1.1.3", "kleur": "^4.1.5" + }, + "engines": { + "node": ">=18.16.0" } }, "node_modules/@poppinss/hooks": { - "version": "6.0.2-0", - "resolved": "https://registry.npmjs.org/@poppinss/hooks/-/hooks-6.0.2-0.tgz", - "integrity": "sha512-mG0hnQlxgflvxyM6t/XO8z/FwotsYRXPhtLZ3cz3iyk4t8xaNtOihSANBcvqdkxZCtGBvotNIf/GnES9hvlfSQ==", - "dev": true + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@poppinss/hooks/-/hooks-7.2.2.tgz", + "integrity": "sha512-EDivPMt9sAUV5kNhH2bvtVjuLvHhQ6SKVP19OjvvcyRalqAa6KqCItJ2qeU8A93s0cr1a28Sytu+KSwsmOY8pg==", + "dev": true, + "engines": { + "node": ">=18.16.0" + } + }, + "node_modules/@poppinss/macroable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@poppinss/macroable/-/macroable-1.0.1.tgz", + "integrity": "sha512-bO3+rnqGhE+gdx4DOyYjY9jCm2+c5Ncyl2Gmst0w271rIFnsB00btonpdmAqvFNzS8rcas+APGm+47fYMmkpQA==", + "dev": true, + "engines": { + "node": ">=18.16.0" + } }, "node_modules/@sinclair/typebox": { "version": "0.27.8", @@ -1256,9 +1561,9 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", + "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": { @@ -1274,9 +1579,9 @@ "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-gPQuzaPR5h/djlAv2apEG1HVOyj1IUs7GpfMZixU0/0KXT3pm64ylHuMUI1/Akh+sq/iikxg6Z2j+fcMDXaaTQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" @@ -1339,18 +1644,18 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "15.0.16", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.16.tgz", - "integrity": "sha512-2FeD5qezW3FvLpZ0JpfuaEWepgNLl9b2gQYiz/ce0NhoB1W/D+VZu98phITXkADYerfr/jb7JcDcVhITsc9bwg==", + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -2652,15 +2957,6 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "bin": { - "color-support": "bin.js" - } - }, "node_modules/colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", @@ -2734,10 +3030,10 @@ "node": ">=10" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, "node_modules/concat-map": { @@ -2764,12 +3060,15 @@ "dev": true }, "node_modules/convert-hrtime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/convert-hrtime/-/convert-hrtime-3.0.0.tgz", - "integrity": "sha512-7V+KqSvMiHp8yWDuwfww06XleMWVVB9b9tURBx+G7UTADuo5hYPuowKloz4OzOqbPezxgo+fdQ1522WzPG4OeA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/convert-hrtime/-/convert-hrtime-5.0.0.tgz", + "integrity": "sha512-lOETlkIeYSJWcbbcvjRKGxVMXJR+8+OQb/mTPbA4ObPMytYIsUbuOE0Jzy60hjARYszq1id0j8KgVhC+WGZVTg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/convert-source-map": { @@ -3288,12 +3587,12 @@ "dev": true }, "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz", + "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==", "dev": true, "engines": { - "node": ">=12" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -4092,9 +4391,9 @@ "dev": true }, "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==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -4276,20 +4575,116 @@ } }, "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-5.0.0.tgz", + "integrity": "sha512-OuWNfjfP05JcpAP3JPgAKUhWefjMRfI5iAoSsvE24ANYWJaepAtlSgWECSVEuRgSXpyNEc9DJwG/TZpgcOqyig==", "dev": true, "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/find-cache-dir/node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/find-my-way": { @@ -4434,20 +4829,6 @@ "node": ">= 0.6" } }, - "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==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4496,6 +4877,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -5296,36 +5689,6 @@ "node": ">=0.8.19" } }, - "node_modules/inclusion": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/inclusion/-/inclusion-1.0.1.tgz", - "integrity": "sha512-TRicJXpIfJN+a47xxjs5nfy2V5l413e4aAtsLYRG+OsDM3A3uloBd/+fDmj23RVuIL9VQfwtb37iIc0rtMw9KA==", - "dev": true, - "dependencies": { - "parent-module": "^2.0.0" - } - }, - "node_modules/inclusion/node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/inclusion/node_modules/parent-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", - "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", - "dev": true, - "dependencies": { - "callsites": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -6793,12 +7156,12 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/lower-case": { @@ -6833,12 +7196,6 @@ "node": ">=10" } }, - "node_modules/macroable": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/macroable/-/macroable-7.0.2.tgz", - "integrity": "sha512-QS9p+Q20YBxpE0dJBnF6CPURP7p1GUsxnhTxTWH5nG3A1F5w8Rg3T4Xyh5UlrFSbHp88oOciVP/0agsNLhkHdQ==", - "dev": true - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -8472,6 +8829,33 @@ "upper-case-first": "^2.0.2" } }, + "node_modules/serialize-error": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-11.0.3.tgz", + "integrity": "sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==", + "dev": true, + "dependencies": { + "type-fest": "^2.12.2" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serialize-error/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/set-cookie-parser": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", @@ -8978,6 +9362,19 @@ "uuid": "bin/uuid" } }, + "node_modules/term-size": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-4.0.0.tgz", + "integrity": "sha512-105zga8eUjLH0I+ffu2UXZLCHCEu6fbgpeKRnBmScUQuMbEXtR77DQkUS9XoaJhvxko6W/4ZiwcPETtzYUgYrw==", + "deprecated": "Renamed to terminal-size", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -9082,15 +9479,15 @@ } }, "node_modules/time-span": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/time-span/-/time-span-4.0.0.tgz", - "integrity": "sha512-MyqZCTGLDZ77u4k+jqg4UlrzPTPZ49NDlaekU6uuFaJLzPIN1woaRXCbGeqOfxwc3Y37ZROGAJ614Rdv7Olt+g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/time-span/-/time-span-5.1.0.tgz", + "integrity": "sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==", "dev": true, "dependencies": { - "convert-hrtime": "^3.0.0" + "convert-hrtime": "^5.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" diff --git a/package.json b/package.json index 5f32a0a..8543388 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/ioc", - "version": "4.9.0", + "version": "4.10.0", "description": "Global Ioc helper for Athenna ecosystem. Built on top of awilix.", "license": "MIT", "author": "João Lenon ", @@ -58,9 +58,9 @@ "awilix": "^7.0.3" }, "devDependencies": { - "@athenna/common": "^4.21.0", - "@athenna/test": "^4.14.0", - "@athenna/tsconfig": "^4.9.1", + "@athenna/common": "^4.23.0", + "@athenna/test": "^4.15.0", + "@athenna/tsconfig": "^4.12.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "commitizen": "^4.3.0", diff --git a/src/annotations/Inject.ts b/src/annotations/Inject.ts index 88cd8fb..76e9b3d 100644 --- a/src/annotations/Inject.ts +++ b/src/annotations/Inject.ts @@ -17,6 +17,12 @@ import { Facade } from '#src/facades/Facade' */ export function Inject(alias?: string): PropertyDecorator { return (target: any, key: string | symbol) => { + const injected = Reflect.getMetadata('design:type', target, key) + + if (!alias && injected) { + alias = Reflect.getMetadata('ioc:alias', injected) + } + alias = alias || (key as string) debug('injecting service %o', { diff --git a/src/container/Ioc.ts b/src/container/Ioc.ts index 2cc47c2..7cd908d 100644 --- a/src/container/Ioc.ts +++ b/src/container/Ioc.ts @@ -111,7 +111,7 @@ export class Ioc { } debug( - 'Registering sub alias %s to %s original alias.', + 'registering sub alias %s to %s original alias.', subAlias, originalAlias ) diff --git a/tests/fixtures/InjectService.ts b/tests/fixtures/InjectService.ts index 668067e..9d5e1ca 100644 --- a/tests/fixtures/InjectService.ts +++ b/tests/fixtures/InjectService.ts @@ -23,6 +23,9 @@ export class InjectService { @Inject() private clientService: ClientService + @Inject() + private noMetadataService: ClientService + public findOneUser(): User { return this.userService.find()[0] } diff --git a/tests/unit/annotations/InjectAnnotationTest.ts b/tests/unit/annotations/InjectAnnotationTest.ts index 33143cb..d1b38e9 100644 --- a/tests/unit/annotations/InjectAnnotationTest.ts +++ b/tests/unit/annotations/InjectAnnotationTest.ts @@ -13,15 +13,34 @@ import { NotFoundServiceException } from '#src/exceptions/NotFoundServiceExcepti export default class InjectAnnotationTest extends BaseTest { @Test() - public async shouldBeAbleToPreregisterServicesUsingInjectAnnotation({ assert }: Context) { + public async shouldBeAbleToPreregisterServicesUsingInjectAnnotationUsingPropertyType({ assert }: Context) { const InjectService = await this.import('#tests/fixtures/InjectService') const injectService = new InjectService() - assert.isDefined(injectService.userService) assert.isDefined(injectService.clientService) } + @Test() + public async shouldBeAbleToPreregisterServicesUsingInjectAnnotationUsingDefinedAlias({ assert }: Context) { + const InjectService = await this.import('#tests/fixtures/InjectService') + + const injectService = new InjectService() + + assert.isDefined(injectService.userService) + } + + @Test() + public async shouldBeAbleToPreregisterServicesUsingInjectAnnotationUsingPropertyKeyAsAlias({ assert }: Context) { + const InjectService = await this.import('#tests/fixtures/InjectService') + + const injectService = new InjectService() + + Reflect.defineMetadata('design:type', undefined, injectService) + + assert.isDefined(injectService.noMetadataService) + } + @Test() public async shouldThrowExceptionIfTryingToUseAServiceThatIsOnlyPreregistered({ assert }: Context) { const InjectService = await this.import('#tests/fixtures/InjectService')