diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index fba5787..33d0647 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -15,7 +15,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v1 with: - node-version: '14.x' + node-version: '18.x' registry-url: 'https://registry.npmjs.org' - name: Install dependencies @@ -25,10 +25,16 @@ jobs: run: npm run build - name: Copy README to build - run: cp README.md build/README.md + run: cp README.md build/README.md | true - name: Copy LICENSE to build - run: cp LICENSE.md build/LICENSE.md + run: cp LICENSE.md build/LICENSE.md | true + + - name: Copy templates to build + run: cp -r templates build/templates | true + + - name: Copy configurer to build + run: cp -r configurer build/configurer | true - name: Automatic GitHub Release uses: justincy/github-action-npm-release@2.0.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77b212c..9e75bfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,17 +9,6 @@ on: - develop jobs: - qodana: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@main - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} - linux: runs-on: ubuntu-latest strategy: diff --git a/.gitignore b/.gitignore index 4b6c558..d0a5509 100644 --- a/.gitignore +++ b/.gitignore @@ -115,14 +115,14 @@ out .pnp.* # Compiled code -./dist -./build +dist +build *.js *.d.ts *.js.map -!tests/Stubs/**/*.js -!tests/Stubs/**/*.d.ts -!tests/Stubs/**/*.js.map +!tests/stubs/**/*.js +!tests/stubs/**/*.d.ts +!tests/stubs/**/*.js.map # IDE .idea diff --git a/package-lock.json b/package-lock.json index 28fc639..3556864 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "@athenna/ioc", - "version": "4.0.0", + "version": "4.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@athenna/ioc", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "dependencies": { "awilix": "^7.0.3" }, "devDependencies": { - "@athenna/common": "^4.2.0", - "@athenna/test": "^4.2.0", + "@athenna/common": "^4.4.0", + "@athenna/test": "^4.3.0", "@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/parser": "^5.56.0", "c8": "^8.0.0", @@ -64,18 +64,18 @@ "dev": true }, "node_modules/@athenna/common": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.2.0.tgz", - "integrity": "sha512-NT7lrNpW2WqKT6TyXJAysfFT3w6IfyaRdivDRzsSk6/lz0nq8pjZhITP9EUK10mdhmjBYTBcMCVO1JR3j1GZ4w==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.5.0.tgz", + "integrity": "sha512-/Va3PtDRAR/FdfRuGYmuUXPGuOikqmXtGOENWVVbcHVu0PaXkZ8P9bqWngbyfBV+R2O0g2UVyzEXS7M6NP0JMg==", "dev": true, "dependencies": { "@fastify/formbody": "^7.4.0", "bytes": "^3.1.2", "callsite": "^1.0.0", - "chalk": "^5.2.0", + "chalk": "^5.3.0", "change-case": "^4.1.2", "collect.js": "^4.36.1", - "fastify": "^4.16.3", + "fastify": "^4.21.0", "got": "^12.6.1", "http-status-codes": "^2.2.0", "is-wsl": "^2.2.0", @@ -90,13 +90,13 @@ "uuid": "^8.3.2", "validator-brazil": "^1.2.2", "youch": "^3.2.3", - "youch-terminal": "^2.2.0" + "youch-terminal": "^2.2.1" } }, "node_modules/@athenna/test": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.2.0.tgz", - "integrity": "sha512-PgyXCK+sQ1ZwsgfzEGuQmuMmfN1GpLuHguSTUE/MbkiHgZFkbl30I+E1lheIJ7KwWMTwtG3/4k+1T7U9UFuOnA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.4.0.tgz", + "integrity": "sha512-cMWz2ws9YbHD0EUGgeQpivaOnQOUQa2vglNPHNPkWNaBJimPm1dpX2tq/af2hYybD2FGmEqND5BP21YSRjBxdw==", "dev": true, "dependencies": { "@japa/assert": "^1.4.1", @@ -542,9 +542,9 @@ "dev": true }, "node_modules/@fastify/error": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.2.1.tgz", - "integrity": "sha512-scZVbcpPNWw/yyFmzzO7cf1daTeJp53spN2n7dBTHZd+cV7791fcWJCPP1Tfhdbre+8vDiCyQyqqXfQnYMntYQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.3.0.tgz", + "integrity": "sha512-dj7vjIn1Ar8sVXj2yAXiMNCJDmS9MQ9XMlIecX2dIzzhjSHCyKo4DdXjXMs7wKW2kj6yvVRSpuQjOZ3YLrh56w==", "dev": true }, "node_modules/@fastify/fast-json-stringify-compiler": { @@ -2504,9 +2504,9 @@ } }, "node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -4105,9 +4105,9 @@ "dev": true }, "node_modules/fast-json-stringify": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.7.0.tgz", - "integrity": "sha512-sBVPTgnAZseLu1Qgj6lUbQ0HfjFhZWXAmpZ5AaSGkyLh5gAXBga/uPJjQPHpDFjC9adWIpdOcCLSDTgrZ7snoQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.8.0.tgz", + "integrity": "sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ==", "dev": true, "dependencies": { "@fastify/deepmerge": "^1.0.0", @@ -4156,9 +4156,9 @@ } }, "node_modules/fast-redact": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.2.0.tgz", - "integrity": "sha512-zaTadChr+NekyzallAMXATXLOR8MNx3zqpZ0MUF2aGf4EathnG0f32VLODNlY8IuGY3HoRO2L6/6fSzNsLaHIw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", "dev": true, "engines": { "node": ">=6" @@ -4171,9 +4171,9 @@ "dev": true }, "node_modules/fastify": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.18.0.tgz", - "integrity": "sha512-L5o/2GEkBastQ3HV0dtKo7SUZ497Z1+q4fcqAoPyq6JCQ/8zdk1JQEoTQwnBWCp+EmA7AQa6mxNqSAEhzP0RwQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.21.0.tgz", + "integrity": "sha512-tsu4bcwE4HetxqW8prA5fbC9bKHMYDp7jGEDWyzK1l90a3uOaLoIcQbdGcWeODNLVJviQnzh1wvIjTZE3MJFEg==", "dev": true, "dependencies": { "@fastify/ajv-compiler": "^3.5.0", @@ -4201,9 +4201,9 @@ "dev": true }, "node_modules/fastify/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -7374,9 +7374,9 @@ } }, "node_modules/pino": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.14.1.tgz", - "integrity": "sha512-8LYNv7BKWXSfS+k6oEc6occy5La+q2sPwU3q2ljTX5AZk7v+5kND2o5W794FyRaqha6DJajmkNRsWtPpFyMUdw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.15.0.tgz", + "integrity": "sha512-olUADJByk4twxccmAxb1RiGKOSvddHugCV3wkqjyv+3Sooa2KLrmXrKEWOKi0XPCLasRR5jBXxioE1jxUa4KzQ==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0", @@ -7430,24 +7430,25 @@ } }, "node_modules/pino-abstract-transport/node_modules/readable-stream": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.0.tgz", - "integrity": "sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz", + "integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==", "dev": true, "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", "events": "^3.3.0", - "process": "^0.11.10" + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/pino-std-serializers": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.1.tgz", - "integrity": "sha512-wHuWB+CvSVb2XqXM0W/WOYUkVSPbiJb9S5fNB7TBhd8s892Xq910bRxwHtC4l71hgztObTjXL6ZheZXFjhDrDQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==", "dev": true }, "node_modules/pkg-dir": { @@ -9259,9 +9260,9 @@ } }, "node_modules/youch-terminal": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/youch-terminal/-/youch-terminal-2.2.0.tgz", - "integrity": "sha512-LLYtvG/4XoRO/vhf2eBkzT6dI1hWliLSp7NuXRKsvBAITuIxODS61X7AQOHl5Aaf8oquS9JlHSpjTFjX140XKA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/youch-terminal/-/youch-terminal-2.2.2.tgz", + "integrity": "sha512-JfVAsD0r88+vWVz+Im6bMk+c7gErDp1lq6Z1Na5LAyPZTwhB3VgO6HUQsm83I217mRFSuwVwEpnvwkK/TDTNhQ==", "dev": true, "dependencies": { "kleur": "^4.1.5", @@ -9316,18 +9317,18 @@ "dev": true }, "@athenna/common": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.2.0.tgz", - "integrity": "sha512-NT7lrNpW2WqKT6TyXJAysfFT3w6IfyaRdivDRzsSk6/lz0nq8pjZhITP9EUK10mdhmjBYTBcMCVO1JR3j1GZ4w==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.5.0.tgz", + "integrity": "sha512-/Va3PtDRAR/FdfRuGYmuUXPGuOikqmXtGOENWVVbcHVu0PaXkZ8P9bqWngbyfBV+R2O0g2UVyzEXS7M6NP0JMg==", "dev": true, "requires": { "@fastify/formbody": "^7.4.0", "bytes": "^3.1.2", "callsite": "^1.0.0", - "chalk": "^5.2.0", + "chalk": "^5.3.0", "change-case": "^4.1.2", "collect.js": "^4.36.1", - "fastify": "^4.16.3", + "fastify": "^4.21.0", "got": "^12.6.1", "http-status-codes": "^2.2.0", "is-wsl": "^2.2.0", @@ -9342,13 +9343,13 @@ "uuid": "^8.3.2", "validator-brazil": "^1.2.2", "youch": "^3.2.3", - "youch-terminal": "^2.2.0" + "youch-terminal": "^2.2.1" } }, "@athenna/test": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.2.0.tgz", - "integrity": "sha512-PgyXCK+sQ1ZwsgfzEGuQmuMmfN1GpLuHguSTUE/MbkiHgZFkbl30I+E1lheIJ7KwWMTwtG3/4k+1T7U9UFuOnA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.4.0.tgz", + "integrity": "sha512-cMWz2ws9YbHD0EUGgeQpivaOnQOUQa2vglNPHNPkWNaBJimPm1dpX2tq/af2hYybD2FGmEqND5BP21YSRjBxdw==", "dev": true, "requires": { "@japa/assert": "^1.4.1", @@ -9697,9 +9698,9 @@ "dev": true }, "@fastify/error": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.2.1.tgz", - "integrity": "sha512-scZVbcpPNWw/yyFmzzO7cf1daTeJp53spN2n7dBTHZd+cV7791fcWJCPP1Tfhdbre+8vDiCyQyqqXfQnYMntYQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.3.0.tgz", + "integrity": "sha512-dj7vjIn1Ar8sVXj2yAXiMNCJDmS9MQ9XMlIecX2dIzzhjSHCyKo4DdXjXMs7wKW2kj6yvVRSpuQjOZ3YLrh56w==", "dev": true }, "@fastify/fast-json-stringify-compiler": { @@ -11157,9 +11158,9 @@ } }, "chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true }, "change-case": { @@ -12359,9 +12360,9 @@ "dev": true }, "fast-json-stringify": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.7.0.tgz", - "integrity": "sha512-sBVPTgnAZseLu1Qgj6lUbQ0HfjFhZWXAmpZ5AaSGkyLh5gAXBga/uPJjQPHpDFjC9adWIpdOcCLSDTgrZ7snoQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.8.0.tgz", + "integrity": "sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ==", "dev": true, "requires": { "@fastify/deepmerge": "^1.0.0", @@ -12408,9 +12409,9 @@ } }, "fast-redact": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.2.0.tgz", - "integrity": "sha512-zaTadChr+NekyzallAMXATXLOR8MNx3zqpZ0MUF2aGf4EathnG0f32VLODNlY8IuGY3HoRO2L6/6fSzNsLaHIw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", "dev": true }, "fast-uri": { @@ -12420,9 +12421,9 @@ "dev": true }, "fastify": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.18.0.tgz", - "integrity": "sha512-L5o/2GEkBastQ3HV0dtKo7SUZ497Z1+q4fcqAoPyq6JCQ/8zdk1JQEoTQwnBWCp+EmA7AQa6mxNqSAEhzP0RwQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.21.0.tgz", + "integrity": "sha512-tsu4bcwE4HetxqW8prA5fbC9bKHMYDp7jGEDWyzK1l90a3uOaLoIcQbdGcWeODNLVJviQnzh1wvIjTZE3MJFEg==", "dev": true, "requires": { "@fastify/ajv-compiler": "^3.5.0", @@ -12444,9 +12445,9 @@ }, "dependencies": { "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -14822,9 +14823,9 @@ "dev": true }, "pino": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.14.1.tgz", - "integrity": "sha512-8LYNv7BKWXSfS+k6oEc6occy5La+q2sPwU3q2ljTX5AZk7v+5kND2o5W794FyRaqha6DJajmkNRsWtPpFyMUdw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.15.0.tgz", + "integrity": "sha512-olUADJByk4twxccmAxb1RiGKOSvddHugCV3wkqjyv+3Sooa2KLrmXrKEWOKi0XPCLasRR5jBXxioE1jxUa4KzQ==", "dev": true, "requires": { "atomic-sleep": "^1.0.0", @@ -14861,23 +14862,24 @@ } }, "readable-stream": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.0.tgz", - "integrity": "sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz", + "integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==", "dev": true, "requires": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", "events": "^3.3.0", - "process": "^0.11.10" + "process": "^0.11.10", + "string_decoder": "^1.3.0" } } } }, "pino-std-serializers": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.1.tgz", - "integrity": "sha512-wHuWB+CvSVb2XqXM0W/WOYUkVSPbiJb9S5fNB7TBhd8s892Xq910bRxwHtC4l71hgztObTjXL6ZheZXFjhDrDQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==", "dev": true }, "pkg-dir": { @@ -16230,9 +16232,9 @@ } }, "youch-terminal": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/youch-terminal/-/youch-terminal-2.2.0.tgz", - "integrity": "sha512-LLYtvG/4XoRO/vhf2eBkzT6dI1hWliLSp7NuXRKsvBAITuIxODS61X7AQOHl5Aaf8oquS9JlHSpjTFjX140XKA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/youch-terminal/-/youch-terminal-2.2.2.tgz", + "integrity": "sha512-JfVAsD0r88+vWVz+Im6bMk+c7gErDp1lq6Z1Na5LAyPZTwhB3VgO6HUQsm83I217mRFSuwVwEpnvwkK/TDTNhQ==", "dev": true, "requires": { "kleur": "^4.1.5", diff --git a/package.json b/package.json index cf40277..39bd348 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/ioc", - "version": "4.0.0", + "version": "4.1.0", "description": "Global Ioc helper for Athenna ecosystem. Built on top of awilix.", "license": "MIT", "author": "João Lenon ", @@ -28,7 +28,8 @@ "src/*.d.ts", "src/**/*.js", "src/**/*.d.ts", - "templates" + "templates", + "configurer" ], "type": "module", "main": "./src/index.js", @@ -52,8 +53,8 @@ "awilix": "^7.0.3" }, "devDependencies": { - "@athenna/common": "^4.2.0", - "@athenna/test": "^4.2.0", + "@athenna/common": "^4.4.0", + "@athenna/test": "^4.3.0", "@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/parser": "^5.56.0", "c8": "^8.0.0", diff --git a/src/index.ts b/src/index.ts index 4f424aa..c5083f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +export * from './types/index.js' + export * from '#src/globals/Ioc' export * from '#src/container/Ioc' diff --git a/tests/unit/annotations/InjectAnnotationTest.ts b/tests/unit/annotations/InjectAnnotationTest.ts index eba5a9d..cdcb884 100644 --- a/tests/unit/annotations/InjectAnnotationTest.ts +++ b/tests/unit/annotations/InjectAnnotationTest.ts @@ -8,12 +8,11 @@ */ import { Inject } from '#src' -import { Test } from '@athenna/test' +import { Test, type Context } from '@athenna/test' import { BaseTest } from '#tests/helpers/BaseTest' -import type { Context } from '@athenna/test/types' import type { InjectService } from '#tests/stubs/InjectService' -import { MissingServiceAnnotationException } from '#src/exceptions/MissingServiceAnnotationException' import { NotFoundDependencyException } from '#src/exceptions/NotFoundDependencyException' +import { MissingServiceAnnotationException } from '#src/exceptions/MissingServiceAnnotationException' export default class InjectAnnotationTest extends BaseTest { @Test() diff --git a/tests/unit/annotations/MockInjectAnnotationTest.ts b/tests/unit/annotations/MockInjectAnnotationTest.ts index 5b49848..f4d3f90 100644 --- a/tests/unit/annotations/MockInjectAnnotationTest.ts +++ b/tests/unit/annotations/MockInjectAnnotationTest.ts @@ -7,13 +7,11 @@ * file that was distributed with this source code. */ -import { MockInject } from '#src' -import { Test } from '@athenna/test' -import type { Mock } from '#src/types' +import { MockInject, type Mock } from '#src' +import { Test, type Context } from '@athenna/test' import { BaseTest } from '#tests/helpers/BaseTest' import { SumService } from '#tests/stubs/SumService' import { OrderService } from '#tests/stubs/OrderService' -import type { Context } from '@athenna/test/types' import { MissingServiceAnnotationException } from '#src/exceptions/MissingServiceAnnotationException' export default class MockInjectAnnotationTest extends BaseTest { diff --git a/tests/unit/annotations/ServiceAnnotationTest.ts b/tests/unit/annotations/ServiceAnnotationTest.ts index 56254c5..9412171 100644 --- a/tests/unit/annotations/ServiceAnnotationTest.ts +++ b/tests/unit/annotations/ServiceAnnotationTest.ts @@ -7,9 +7,8 @@ * file that was distributed with this source code. */ -import { Test } from '@athenna/test' +import { Test, type Context } from '@athenna/test' import { BaseTest } from '#tests/helpers/BaseTest' -import type { Context } from '@athenna/test/types' import type { ProductService } from '#tests/stubs/ProductService' export default class ServiceAnnotationTest extends BaseTest { diff --git a/tests/unit/container/IocTest.ts b/tests/unit/container/IocTest.ts index 610941e..d1985f0 100644 --- a/tests/unit/container/IocTest.ts +++ b/tests/unit/container/IocTest.ts @@ -7,14 +7,13 @@ * file that was distributed with this source code. */ -import { Test } from '@athenna/test' +import { Exec, Module } from '@athenna/common' +import { Test, type Context } from '@athenna/test' import { BaseTest } from '#tests/helpers/BaseTest' -import type { Context } from '@athenna/test/types' import { UserService } from '#tests/stubs/UserService' import { ClientService } from '#tests/stubs/ClientService' import { ClientServiceMock } from '#tests/stubs/ClientServiceMock' import { NotFoundDependencyException } from '#src/exceptions/NotFoundDependencyException' -import { Exec, Module } from '@athenna/common' export default class IocTest extends BaseTest { @Test() diff --git a/tests/unit/container/ServiceProviderTest.ts b/tests/unit/container/ServiceProviderTest.ts index 21c7488..8c3a332 100644 --- a/tests/unit/container/ServiceProviderTest.ts +++ b/tests/unit/container/ServiceProviderTest.ts @@ -7,9 +7,8 @@ * file that was distributed with this source code. */ -import { Test } from '@athenna/test' import { BaseTest } from '#tests/helpers/BaseTest' -import type { Context } from '@athenna/test/types' +import { Test, type Context } from '@athenna/test' import { HelpersProvider } from '#tests/stubs/HelpersProvider' export default class ServiceProviderTest extends BaseTest { diff --git a/tests/unit/facades/FacadeTest.ts b/tests/unit/facades/FacadeTest.ts index dd5a13f..ffe9a17 100644 --- a/tests/unit/facades/FacadeTest.ts +++ b/tests/unit/facades/FacadeTest.ts @@ -8,11 +8,10 @@ */ import { Facade } from '#src' -import { Test, BeforeEach } from '@athenna/test' import { BaseTest } from '#tests/helpers/BaseTest' -import type { Context } from '@athenna/test/types' import { SumService } from '#tests/stubs/SumService' import { REAL_METHODS } from '#src/constants/RealMethods' +import { Test, BeforeEach, type Context } from '@athenna/test' export default class FacadeTest extends BaseTest { @BeforeEach()