Skip to content

Commit

Permalink
Merge pull request #38 from AthennaIO/develop
Browse files Browse the repository at this point in the history
chore(npm): update dependencies
  • Loading branch information
jlenon7 authored Oct 26, 2022
2 parents c522b80 + 927df73 commit b124e67
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 23 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/test",
"version": "1.3.4",
"version": "1.3.5",
"description": "The Athenna test runner. Built on top of Japa.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down Expand Up @@ -42,7 +42,7 @@
"#tests/*": "./tests/*.js"
},
"dependencies": {
"@athenna/core": "2.0.1",
"@athenna/core": "2.0.2",
"@japa/assert": "1.3.4",
"@japa/runner": "2.0.7"
},
Expand Down
18 changes: 14 additions & 4 deletions tests/Stubs/config/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Log } from '@athenna/logger'
import { Server } from '@athenna/http'
import { ProviderHelper } from '@athenna/core'

export default {
/*
Expand Down Expand Up @@ -123,10 +123,19 @@ export default {
|
*/

gracefulShutdown: async () => {
Log.warn('Athenna application gracefully shutting down.')
gracefulShutdown: {
SIGINT: async () => {
await ProviderHelper.shutdownAll()

await Server.close()
process.exit()
},
SIGTERM: async signal => {
Log.warn('Athenna application gracefully shutting down.')

await ProviderHelper.shutdownAll()

process.kill(process.pid, signal)
},
},

/*
Expand All @@ -143,6 +152,7 @@ export default {
providers: [
import('@athenna/artisan/providers/ArtisanProvider'),
import('@athenna/artisan/providers/TemplateProvider'),
import('@athenna/artisan/providers/TemplateProvider'),
import('@athenna/http/providers/HttpServerProvider'),
import('@athenna/http/providers/HttpRouteProvider'),
import('@athenna/logger/providers/LoggerProvider'),
Expand Down
69 changes: 61 additions & 8 deletions tests/Stubs/config/logging.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Path } from '@athenna/common'

export default {
/*
|--------------------------------------------------------------------------
Expand All @@ -10,7 +12,7 @@ export default {
|
*/

default: 'application',
default: 'stack',

/*
|--------------------------------------------------------------------------
Expand All @@ -19,33 +21,84 @@ export default {
|
| Here you may configure the log channels for your application.
|
| Available Drivers:
| "stack", "console", "discord", "file", "null", "slack", "telegram".
| Available Formatters:
| "cli", "simple", "json", "request", "message".
|
*/

channels: {
stack: {
driver: 'stack',
channels: ['application'],
},

application: {
driver: 'console',
level: 'trace',

formatter: 'simple',
streamType: 'stdout',
formatterConfig: {},
},
console: {
driver: 'null',
driver: 'console',
level: 'trace',

formatter: 'cli',
streamType: 'stdout',
formatterConfig: {},
},
exception: {
driver: 'console',
level: 'trace',
streamType: 'stderr',

formatter: 'none',
streamType: 'stdout',
},
request: {
driver: 'console',
level: 'trace',

formatter: 'request',
streamType: 'stdout',
formatterConfig: {
asJson: false,
},
},
discard: {
driver: 'null',
},
file: {
driver: 'file',
level: 'trace',
filePath: Path.logs('athenna.log'),

formatter: 'simple',
formatterConfig: {},
},
slack: {
driver: 'slack',
level: 'fatal',
url: 'your-slack-webhook-url',

formatter: 'message',
formatterConfig: {},
},
discord: {
driver: 'discord',
level: 'fatal',
username: 'Athenna',
url: 'your-discord-webhook-url',

formatter: 'message',
formatterConfig: {},
},
telegram: {
driver: 'telegram',
level: 'fatal',
chatId: 0,
parseMode: 'HTML',
token: 'your-telegram-bot-token',

formatter: 'message',
formatterConfig: {},
},
},
}

0 comments on commit b124e67

Please sign in to comment.