diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bb109e..b2ad10b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: node-version: - - 20.x + - 21.x steps: - uses: actions/checkout@v2 with: @@ -43,7 +43,7 @@ jobs: strategy: matrix: node-version: - - 20.x + - 21.x steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/package-lock.json b/package-lock.json index a6c7eec..1c8d632 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "@athenna/logger", - "version": "4.8.0", + "version": "4.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/logger", - "version": "4.8.0", + "version": "4.9.0", "license": "MIT", "dependencies": { "cls-rtracer": "^2.6.3", - "telegraf": "^4.13.1" + "telegraf": "^4.15.0" }, "devDependencies": { - "@athenna/common": "^4.18.0", - "@athenna/config": "^4.7.0", - "@athenna/ioc": "^4.7.0", - "@athenna/test": "^4.12.0", + "@athenna/common": "^4.21.0", + "@athenna/config": "^4.8.0", + "@athenna/ioc": "^4.8.0", + "@athenna/test": "^4.13.0", "@athenna/tsconfig": "^4.9.1", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", @@ -92,9 +92,9 @@ "dev": true }, "node_modules/@athenna/common": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.18.0.tgz", - "integrity": "sha512-vYUEcQu80V5zjFf0WjKJ7f9XmhmtziFUL1l6VfH+h6ZHnNWvcjlIYoHU1pONTnVC9b8vFElrJHWz7xo5IDFvIA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.21.0.tgz", + "integrity": "sha512-1FCgoWxFzKHyC72UMa49VRaQMxbZS6PpagBE4pxAN0YqQ3hYQM8XDToVHc9NP/4geVyb2p5Qz3N06M/GpJn3jA==", "dev": true, "dependencies": { "@fastify/formbody": "^7.4.0", @@ -104,10 +104,11 @@ "change-case": "^4.1.2", "collect.js": "^4.36.1", "execa": "^8.0.1", - "fastify": "^4.23.2", + "fastify": "^4.24.0", "got": "^12.6.1", "http-status-codes": "^2.2.0", "is-wsl": "^2.2.0", + "js-yaml": "^4.1.0", "kind-of": "^6.0.3", "lodash": "^4.17.21", "mime-types": "^2.1.35", @@ -118,21 +119,39 @@ "prepend-file": "^2.0.1", "uuid": "^8.3.2", "validator-brazil": "^1.2.2", - "youch": "^3.3.1", + "youch": "^3.3.3", "youch-terminal": "^2.2.2" }, "engines": { - "node": ">=20.0.0" + "node": ">=21.0.0" + } + }, + "node_modules/@athenna/common/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@athenna/common/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@athenna/config": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.7.0.tgz", - "integrity": "sha512-WXx5Tsx6BBVq+QlX5Tm+HMUp+b/ft15YC4oFvdRi3Gj6HBXIcEPpw2zsdLS+Qa/TDDuwa2bYLrToBtLd8EpXpw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.8.0.tgz", + "integrity": "sha512-pTRNivg1fmViJ45237qhBiVAQU2R7iWTA28MPsJgePt0Jve0z6unhwPSBAaH/oI1KO/Ki9N3jKkwICehyT62sg==", "dev": true, "dependencies": { "dotenv": "^16.3.1", - "magicast": "^0.2.11", + "magicast": "^0.3.0", "syntax-error": "^1.4.0" }, "engines": { @@ -140,9 +159,9 @@ } }, "node_modules/@athenna/ioc": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.7.0.tgz", - "integrity": "sha512-TTyNLjtNPk+P5DHmKT/IuMiNFdXKI7yMsiJyA6DSlLTZSSt8tPzbSPQYY0EvfQX19EFihiaSXX5/I+De8MUnpQ==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.9.0.tgz", + "integrity": "sha512-oJPWF6u0INBwuW4rAEVN5hHXIgKCA6ywvTnuWhRJnUPDU1T+4yWAxbENesydbhJpiP7ID9JSoEDA/NV9+V5wOg==", "dev": true, "dependencies": { "awilix": "^7.0.3" @@ -152,16 +171,16 @@ } }, "node_modules/@athenna/test": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.12.0.tgz", - "integrity": "sha512-rBEOCVXomQtVR9568L7icSQHOE+PmkVbsDjb4Ac0icICR/Nji0O4l9O7DfizSpaAttH4bB9SLhVaFBsrBQNjAw==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.14.0.tgz", + "integrity": "sha512-Gha600d82tROu3MNUmqHZKX913cInOc1VONiq2Z6G1ZwoWgGv32bFdTyNLsqgwPNWeWrjTN6AWI8XD/6cxkShA==", "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", - "@types/sinon": "^10.0.16", + "@types/sinon": "^10.0.20", "c8": "^8.0.1", "sinon": "^15.1.0" }, @@ -254,9 +273,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -342,9 +361,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -354,12 +373,12 @@ } }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -749,9 +768,9 @@ "dev": true }, "node_modules/@fastify/error": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.0.tgz", - "integrity": "sha512-e/mafFwbK3MNqxUcFBLgHhgxsF8UT1m8aj0dAlqEa2nJEgPsRtpHTZ3ObgrgkZ2M1eJHPTwgyUl/tXkvabsZdQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.1.tgz", + "integrity": "sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==", "dev": true }, "node_modules/@fastify/fast-json-stringify-compiler": { @@ -1377,18 +1396,18 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.18", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.18.tgz", - "integrity": "sha512-OpQC9ug8BcnNxue2WF5aTruMaDRFn6NyfaE4DmAKOlQMn54b7CnCvDFV3wj5fk/HbSSTYmOYs2bTb5ShANjyQg==", + "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/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/yargs": { @@ -2067,19 +2086,6 @@ "printable-characters": "^1.0.42" } }, - "node_modules/assert": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", - "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-nan": "^1.3.2", - "object-is": "^1.1.5", - "object.assign": "^4.1.4", - "util": "^0.12.5" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2089,18 +2095,6 @@ "node": "*" } }, - "node_modules/ast-types": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", - "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -4280,9 +4274,9 @@ "dev": true }, "node_modules/fast-json-stringify": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.8.0.tgz", - "integrity": "sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.9.1.tgz", + "integrity": "sha512-NMrf+uU9UJnTzfxaumMDXK1NWqtPCfGoM9DYIE+ESlaTQqjlANFBy0VAbsm6FB88Mx0nceyi18zTo5kIEUlzxg==", "dev": true, "dependencies": { "@fastify/deepmerge": "^1.0.0", @@ -4290,6 +4284,7 @@ "ajv-formats": "^2.1.1", "fast-deep-equal": "^3.1.3", "fast-uri": "^2.1.0", + "json-schema-ref-resolver": "^1.0.1", "rfdc": "^1.2.0" } }, @@ -4340,33 +4335,33 @@ } }, "node_modules/fast-uri": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.2.0.tgz", - "integrity": "sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.3.0.tgz", + "integrity": "sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==", "dev": true }, "node_modules/fastify": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.23.2.tgz", - "integrity": "sha512-WFSxsHES115svC7NrerNqZwwM0UOxbC/P6toT9LRHgAAFvG7o2AN5W+H4ihCtOGuYXjZf4z+2jXC89rVEoPWOA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.24.3.tgz", + "integrity": "sha512-6HHJ+R2x2LS3y1PqxnwEIjOTZxFl+8h4kSC/TuDPXtA+v2JnV9yEtOsNSKK1RMD7sIR2y1ZsA4BEFaid/cK5pg==", "dev": true, "dependencies": { "@fastify/ajv-compiler": "^3.5.0", - "@fastify/error": "^3.2.0", + "@fastify/error": "^3.4.0", "@fastify/fast-json-stringify-compiler": "^4.3.0", "abstract-logging": "^2.0.1", "avvio": "^8.2.1", - "fast-content-type-parse": "^1.0.0", - "fast-json-stringify": "^5.7.0", - "find-my-way": "^7.6.0", - "light-my-request": "^5.9.1", - "pino": "^8.12.0", + "fast-content-type-parse": "^1.1.0", + "fast-json-stringify": "^5.8.0", + "find-my-way": "^7.7.0", + "light-my-request": "^5.11.0", + "pino": "^8.16.0", "process-warning": "^2.2.0", "proxy-addr": "^2.0.7", "rfdc": "^1.3.0", - "secure-json-parse": "^2.5.0", - "semver": "^7.5.0", - "toad-cache": "^3.2.0" + "secure-json-parse": "^2.7.0", + "semver": "^7.5.4", + "toad-cache": "^3.3.0" } }, "node_modules/fastify-plugin": { @@ -4450,9 +4445,9 @@ } }, "node_modules/find-my-way": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-7.6.2.tgz", - "integrity": "sha512-0OjHn1b1nCX3eVbm9ByeEHiscPYiHLfhei1wOUU9qffQkk98wE0Lo8VrVYfSGMgnSnDh86DxedduAnBf4nwUEw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-7.7.0.tgz", + "integrity": "sha512-+SrHpvQ52Q6W9f3wJoJBbAQULJuNEEQwBvlvYwACDhBTLOTMiQ0HYWh4+vC3OivGP2ENcTI1oKlFA2OepJNjhQ==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -5612,22 +5607,6 @@ "node": ">= 0.10" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -5766,21 +5745,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -5835,22 +5799,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-nan": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", - "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -6390,6 +6338,15 @@ "node": ">=6.0.0" } }, + "node_modules/json-schema-ref-resolver": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-schema-ref-resolver/-/json-schema-ref-resolver-1.0.1.tgz", + "integrity": "sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -7039,14 +6996,14 @@ "dev": true }, "node_modules/magicast": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.2.11.tgz", - "integrity": "sha512-6saXbRDA1HMkqbsvHOU6HBjCVgZT460qheRkLhJQHWAbhXoWESI3Kn/dGGXyKs15FFKR85jsUqFx2sMK0wy/5g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.2.tgz", + "integrity": "sha512-Fjwkl6a0syt9TFN0JSYpOybxiMCkYNEeOTnOTNRbjphirLakznZXAqrXgj/7GG3D1dvETONNwrBfinvAbpunDg==", "dev": true, "dependencies": { - "@babel/parser": "^7.22.16", - "@babel/types": "^7.22.17", - "recast": "^0.23.4" + "@babel/parser": "^7.23.3", + "@babel/types": "^7.23.3", + "source-map-js": "^1.0.2" } }, "node_modules/make-dir": { @@ -7397,22 +7354,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -7906,9 +7847,9 @@ } }, "node_modules/pino": { - "version": "8.15.6", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.15.6.tgz", - "integrity": "sha512-GuxHr61R0ZFD1npu58tB3a3FSVjuy21OwN/haw4OuKiZBL63Pg11Y51WWeD52RENS2mjwPZOwt+2OQOSkck6kQ==", + "version": "8.16.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.2.tgz", + "integrity": "sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0", @@ -7920,7 +7861,7 @@ "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", - "sonic-boom": "^3.1.0", + "sonic-boom": "^3.7.0", "thread-stream": "^2.0.0" }, "bin": { @@ -8167,9 +8108,9 @@ "dev": true }, "node_modules/process-warning": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz", - "integrity": "sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz", + "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==", "dev": true }, "node_modules/proxy-addr": { @@ -8293,22 +8234,6 @@ "node": ">= 12.13.0" } }, - "node_modules/recast": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.4.tgz", - "integrity": "sha512-qtEDqIZGVcSZCHniWwZWbRy79Dc6Wp3kT/UmDA2RJKBPg7+7k51aQBZirHmUGn5uvHf2rg8DkjizrN26k61ATw==", - "dev": true, - "dependencies": { - "assert": "^2.0.0", - "ast-types": "^0.16.1", - "esprima": "~4.0.0", - "source-map": "~0.6.1", - "tslib": "^2.0.1" - }, - "engines": { - "node": ">= 4" - } - }, "node_modules/reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -8918,9 +8843,9 @@ } }, "node_modules/sonic-boom": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.6.1.tgz", - "integrity": "sha512-QV+p5nXPiUiSMxn/k5bOL+hzCpafdj1voL+hywPZhheRSYyYp7CF15rNdz1evOXCUn/tFb7R62PDX1yJmtoTgg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.7.0.tgz", + "integrity": "sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0" @@ -8935,6 +8860,15 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -9242,11 +9176,11 @@ } }, "node_modules/telegraf": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.14.0.tgz", - "integrity": "sha512-Nn2EBsuar/Mf3SD6O9tHmJ0FyJWnwAi4rewkJMmzd/O1xWYKglEuzSnCuHHRY7oD5NJ6WNPsavta5DbED8tG3w==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.15.0.tgz", + "integrity": "sha512-jOQhpMZxZ7gTD1/pIQkXHv0BNVRMfn0xtRHnxHv6GQdeISMErzzAe82rMm78ZPSwwKCS4vVu3n/c2LMY8UFiKg==", "dependencies": { - "@telegraf/types": "^6.9.0", + "@telegraf/types": "^6.9.1", "abort-controller": "^3.0.0", "debug": "^4.3.4", "mri": "^1.2.0", @@ -9461,9 +9395,9 @@ } }, "node_modules/toad-cache": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.0.tgz", - "integrity": "sha512-3oDzcogWGHZdkwrHyvJVpPjA7oNzY6ENOV3PsWJY9XYPZ6INo94Yd47s5may1U+nleBPwDhrRiTPMIvKaa3MQg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.4.1.tgz", + "integrity": "sha512-T0m3MxP3wcqW0LaV3dF1mHBU294sgYSm4FOpa5eEJaYO7PqJZBOjZEQI1y4YaKNnih1FXCEYTWDS9osCoTUefg==", "dev": true, "engines": { "node": ">=12" @@ -9754,19 +9688,6 @@ "punycode": "^2.1.0" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -10120,9 +10041,9 @@ } }, "node_modules/youch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.2.tgz", - "integrity": "sha512-9cwz/z7abtcHOIuH45nzmUFCZbyJA1nLqlirKvyNRx4wDMhqsBaifAJzBej7L4fsVPjFxYq3NK3GAcfvZsydFw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", + "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", "dev": true, "dependencies": { "cookie": "^0.5.0", diff --git a/package.json b/package.json index 4d26afe..d7f20f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/logger", - "version": "4.8.0", + "version": "4.9.0", "description": "The Athenna logging solution. Log in stdout, files and buckets.", "license": "MIT", "author": "João Lenon ", @@ -61,14 +61,14 @@ "#tests": "./tests/index.js" }, "dependencies": { - "telegraf": "^4.13.1", + "telegraf": "^4.15.0", "cls-rtracer": "^2.6.3" }, "devDependencies": { - "@athenna/common": "^4.18.0", - "@athenna/config": "^4.7.0", - "@athenna/ioc": "^4.7.0", - "@athenna/test": "^4.12.0", + "@athenna/common": "^4.21.0", + "@athenna/config": "^4.8.0", + "@athenna/ioc": "^4.8.0", + "@athenna/test": "^4.13.0", "@athenna/tsconfig": "^4.9.1", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", diff --git a/tests/fixtures/config/logging.ts b/tests/fixtures/config/logging.ts index 162c718..0436084 100644 --- a/tests/fixtures/config/logging.ts +++ b/tests/fixtures/config/logging.ts @@ -1,3 +1,12 @@ +/** + * @athenna/logger + * + * (c) João Lenon + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + import { Env } from '@athenna/config' import { Color, Path } from '@athenna/common' diff --git a/tests/fixtures/transporters/console.ts b/tests/fixtures/transporters/console.ts index b758806..3580017 100644 --- a/tests/fixtures/transporters/console.ts +++ b/tests/fixtures/transporters/console.ts @@ -1,3 +1,12 @@ +/** + * @athenna/logger + * + * (c) João Lenon + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + import { Config } from '@athenna/config' import { Log, LoggerProvider } from '#src' import { Folder, Path } from '@athenna/common' diff --git a/tests/fixtures/transporters/vanillaLogger.ts b/tests/fixtures/transporters/vanillaLogger.ts index 5ca662f..0add42d 100644 --- a/tests/fixtures/transporters/vanillaLogger.ts +++ b/tests/fixtures/transporters/vanillaLogger.ts @@ -1,3 +1,12 @@ +/** + * @athenna/logger + * + * (c) João Lenon + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + import { Logger } from '#src' const vanillaLogger = new Logger().standalone() diff --git a/tests/unit/drivers/ConsoleDriverTest.ts b/tests/unit/drivers/ConsoleDriverTest.ts index 9aecd50..3a6f080 100644 --- a/tests/unit/drivers/ConsoleDriverTest.ts +++ b/tests/unit/drivers/ConsoleDriverTest.ts @@ -15,7 +15,9 @@ export default class ConsoleDriverTest { public async shouldBeAbleToLogInConsole({ assert }: Context) { const { stdout, stderr } = await Exec.node(Path.fixtures('transporters/console.ts')) - const logs = [...stdout.split('\n').filter(l => l !== ''), ...stderr.split('\n').filter(l => l !== '')] + const logs = [...stdout.split('\n').filter(l => l !== ''), ...stderr.split('\n').filter(l => l !== '')].filter( + v => !v.startsWith('(') + ) logs.forEach(log => { assert.isFalse(log.includes('TRACE')) diff --git a/tests/unit/logger/LoggerTest.ts b/tests/unit/logger/LoggerTest.ts index 764b234..c94469f 100644 --- a/tests/unit/logger/LoggerTest.ts +++ b/tests/unit/logger/LoggerTest.ts @@ -15,7 +15,9 @@ export default class LoggerTest { public async shouldBeAbleToLogInConsoleUsingVanillaLogger({ assert }: Context) { const { stdout, stderr } = await Exec.node(Path.fixtures('transporters/vanillaLogger.ts')) - const logs = [...stdout.split('\n').filter(l => l !== ''), ...stderr.split('\n').filter(l => l !== '')] + const logs = [...stdout.split('\n').filter(l => l !== ''), ...stderr.split('\n').filter(l => l !== '')].filter( + v => !v.startsWith('(') + ) logs.forEach(log => { assert.isFalse(log.includes('TRACE'))