diff --git a/package-lock.json b/package-lock.json index cca2632..c4d6f96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "@athenna/logger", - "version": "4.14.0", + "version": "4.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/logger", - "version": "4.14.0", + "version": "4.15.0", "license": "MIT", "dependencies": { "cls-rtracer": "^2.6.3", "telegraf": "^4.15.3" }, "devDependencies": { - "@athenna/common": "^4.27.0", - "@athenna/config": "^4.12.0", - "@athenna/ioc": "^4.13.0", - "@athenna/test": "^4.18.0", + "@athenna/common": "^4.32.0", + "@athenna/config": "^4.14.0", + "@athenna/ioc": "^4.14.0", + "@athenna/test": "^4.21.0", "@athenna/tsconfig": "^4.12.0", "@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.27.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.27.0.tgz", - "integrity": "sha512-/3nmLppFUj9qZiWgC2m60ctV677cSr1w1qsJDP7i8uMsaDUgobCa90+5odP7FUryIXGqgvriI1fUQMSaEcDuUw==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.32.0.tgz", + "integrity": "sha512-wfnkJVJjkHui5ifSGbWbcB7UiesBjsRNaxTy9xXJxR4yLtnkQoW51yr5rxwMtS4FmlgpbimBVI9+lcAdHzQj/Q==", "dev": true, "dependencies": { "@fastify/formbody": "^7.4.0", @@ -103,12 +103,14 @@ "chalk": "^5.3.0", "change-case": "^4.1.2", "collect.js": "^4.36.1", + "csv-parser": "^3.0.0", "execa": "^8.0.1", - "fastify": "^4.25.1", + "fastify": "^4.25.2", "got": "^12.6.1", "http-status-codes": "^2.2.0", "is-wsl": "^2.2.0", "js-yaml": "^4.1.0", + "json-2-csv": "^5.0.1", "kind-of": "^6.0.3", "lodash": "^4.17.21", "mime-types": "^2.1.35", @@ -145,13 +147,13 @@ } }, "node_modules/@athenna/config": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.12.0.tgz", - "integrity": "sha512-55eLPAIi3eoNsih5gRqqnR0Wr5WlYCEchOd9U8UZYe0LbbhVl1+sWuGqmhBI29KHrZ4g32KhwqAzXiB0dwkHsg==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.14.0.tgz", + "integrity": "sha512-X1zjQmlE/lNG6xoB3zJy/vvb9x3XeVtXYF7l1dugoUT4+Y4k7dHmYgBPIuKBDqbR2FG8XR6pTzwwSNsBTjc9YA==", "dev": true, "dependencies": { - "dotenv": "^16.3.1", - "magicast": "^0.3.2", + "dotenv": "^16.3.2", + "magicast": "^0.3.3", "syntax-error": "^1.4.0" }, "engines": { @@ -159,9 +161,9 @@ } }, "node_modules/@athenna/ioc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.13.0.tgz", - "integrity": "sha512-bLv8ZKXRdi7POFK9Ui1GqsA/AQsKuP2BSww1g7YUjfpunsSSKQXP/iRGWTBuDidWapaTNScwb5jTeFCPMh31pQ==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.14.0.tgz", + "integrity": "sha512-EnCk+CrMSZkbUUPKHZwjd0nzCIAQ1oDzws94imehk1jo/e0khPXhFhKJQQiQALrrzCpgyRwArkJv/BC5OGksew==", "dev": true, "dependencies": { "awilix": "^7.0.3" @@ -171,15 +173,15 @@ } }, "node_modules/@athenna/test": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.18.0.tgz", - "integrity": "sha512-HpW6XFZ5GqAd31mj2FB9H7eiBe+Wx/3DAEbiFcaf9JhGoi20GstbS2Bno4YAKv84NxsaLJgJxMZExjonu/uSuw==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.21.0.tgz", + "integrity": "sha512-TkBL6WcE3rOtnrw1+xQbXTUDE7s8daF3jMGlkxoC/9l4WLPfjFgMJYYFXvm/pEOy6536i02zpzIApma1K+0NYQ==", "dev": true, "dependencies": { "@japa/assert": "^2.1.0", "@japa/runner": "^3.1.1", "@types/sinon": "^10.0.20", - "c8": "^9.0.0", + "c8": "^9.1.0", "sinon": "^15.1.0" }, "engines": { @@ -359,9 +361,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", - "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", + "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -371,9 +373,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", - "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", + "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", @@ -2615,9 +2617,9 @@ } }, "node_modules/c8": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.0.0.tgz", - "integrity": "sha512-nFJhU2Cz6Frh2awk3IW7wwk3wx27/U2v8ojQCHGc1GWTCHS6aMu4lal327/ZnnYj7oSThGF1X3qUP1yzAJBcOQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -3404,6 +3406,21 @@ "node": "*" } }, + "node_modules/csv-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/csv-parser/-/csv-parser-3.0.0.tgz", + "integrity": "sha512-s6OYSXAK3IdKqYO33y09jhypG/bSDHPuyCme/IdEHfWpLf/jKcpitVFyOC6UemgGk8v7Q5u2XE0vvwmanxhGlQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "csv-parser": "bin/csv-parser" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/cz-conventional-changelog": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", @@ -3552,6 +3569,15 @@ "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, + "node_modules/deeks": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/deeks/-/deeks-3.0.2.tgz", + "integrity": "sha512-c6OmjIygIB/avwXwEQOiODS+nw6fEX4cvOdDMqdL7dt3dicV/xykAJ9AeVc/8/JTVQDuacjRc9KCMmXafL1Y4A==", + "dev": true, + "engines": { + "node": ">= 16" + } + }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -3679,6 +3705,15 @@ "node": ">=8" } }, + "node_modules/doc-path": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/doc-path/-/doc-path-4.0.2.tgz", + "integrity": "sha512-OqZEk7EM1aP3JpO+mq0pv1msEJWrzZVXu4q3YjEYJKc+Wt3/chac4KJdaGueK5IGemOwfptrLctG9I8xkb59qQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3702,9 +3737,9 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", + "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", "dev": true, "engines": { "node": ">=12" @@ -6645,6 +6680,19 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-2-csv": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-2-csv/-/json-2-csv-5.0.1.tgz", + "integrity": "sha512-rP9ChyMskS0angbvFdQ43SwEe72mEvqcY1/V2OeukQWxtlreUuZWhMlTdWjtd4L6kJxq+HPFTI06yqLvZiEVIA==", + "dev": true, + "dependencies": { + "deeks": "3.0.2", + "doc-path": "4.0.2" + }, + "engines": { + "node": ">= 16" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -7340,13 +7388,13 @@ } }, "node_modules/magicast": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.2.tgz", - "integrity": "sha512-Fjwkl6a0syt9TFN0JSYpOybxiMCkYNEeOTnOTNRbjphirLakznZXAqrXgj/7GG3D1dvETONNwrBfinvAbpunDg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.3.tgz", + "integrity": "sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==", "dev": true, "dependencies": { - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", "source-map-js": "^1.0.2" } }, @@ -10092,9 +10140,9 @@ } }, "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "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", diff --git a/package.json b/package.json index e355754..7aebec3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/logger", - "version": "4.14.0", + "version": "4.15.0", "description": "The Athenna logging solution. Log in stdout, files and buckets.", "license": "MIT", "author": "João Lenon ", @@ -65,10 +65,10 @@ "cls-rtracer": "^2.6.3" }, "devDependencies": { - "@athenna/common": "^4.27.0", - "@athenna/config": "^4.12.0", - "@athenna/ioc": "^4.13.0", - "@athenna/test": "^4.18.0", + "@athenna/common": "^4.32.0", + "@athenna/config": "^4.14.0", + "@athenna/ioc": "^4.14.0", + "@athenna/test": "^4.21.0", "@athenna/tsconfig": "^4.12.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", diff --git a/src/drivers/DiscordDriver.ts b/src/drivers/DiscordDriver.ts index 0394515..222f0c0 100644 --- a/src/drivers/DiscordDriver.ts +++ b/src/drivers/DiscordDriver.ts @@ -27,8 +27,10 @@ export class DiscordDriver extends Driver { ) return HttpClient.builder(true).post(this.configs.url, { - username: this.configs.username, - content: formatted + body: { + username: this.configs.username, + content: formatted + } }) } } diff --git a/src/drivers/SlackDriver.ts b/src/drivers/SlackDriver.ts index 43ed41b..838282e 100644 --- a/src/drivers/SlackDriver.ts +++ b/src/drivers/SlackDriver.ts @@ -25,6 +25,10 @@ export class SlackDriver extends Driver { this.configs.url ) - return HttpClient.builder(true).post(this.configs.url, { text: formatted }) + return HttpClient.builder(true).post(this.configs.url, { + body: { + text: formatted + } + }) } }