Skip to content

Commit

Permalink
Merge pull request #31 from AthennaIO/develop
Browse files Browse the repository at this point in the history
chore(npm): update dependencies
  • Loading branch information
jlenon7 authored Sep 17, 2022
2 parents 5f826b5 + a87401f commit 6b58d46
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 316 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
HOST=localhost
PORT=(1335)
NODE_ENV=local

APP_NAME=Athenna
APP_DEBUG=(false)
APP_DEBUG=(true)
APP_URL=http://${HOST}:${PORT}
APP_DOMAIN=http://${HOST}:${PORT}
APP_SOURCE=https://github.com/AthennaIO

LOG_HTTP=(true)
LOG_CHANNEL=console
8 changes: 4 additions & 4 deletions app/Console/Commands/Install/DatabaseCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,19 @@ export class InstallTestCommand extends Command {
const consoleKernel = await new File(kernelPath).load()

await consoleKernel.prepend(
"import { DatabaseCommandsLoader } from '@athenna/database'\n",
"import { DatabaseLoader } from '@athenna/database'\n",
)

await FilePropertiesHelper.addContentToArrayProperty(
kernelPath,
'const internalCommands = ',
'...DatabaseCommandsLoader.loadCommands()',
'...DatabaseLoader.loadCommands()',
)

await FilePropertiesHelper.addContentToArrayGetter(
kernelPath,
'templates',
'...DatabaseCommandsLoader.loadTemplates()',
'...DatabaseLoader.loadTemplates()',
)

if (message) spinner.succeed(message)
Expand Down Expand Up @@ -223,7 +223,7 @@ export class InstallTestCommand extends Command {
'DB_DATABASE=database\n' +
'DB_USERNAME=root\n' +
'DB_PASSWORD=root\n' +
'DB_SYNCHRONIZE=(false)\n' +
'DB_SYNCHRONIZE=(true)\n' +
'DB_AUTO_CONNECT=(true)\n'

try {
Expand Down
11 changes: 5 additions & 6 deletions app/Console/Kernel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CoreLoader } from '@athenna/core'
import { TestLoader } from '@athenna/test'
import { Path, Folder } from '@secjs/utils'
import { TestCommandsLoader } from '@athenna/test'
import { ArtisanLoader, ConsoleKernel } from '@athenna/artisan'

export class Kernel extends ConsoleKernel {
Expand All @@ -10,7 +11,8 @@ export class Kernel extends ConsoleKernel {
*/
get commands() {
const internalCommands = [
...TestCommandsLoader.loadCommands(),
...CoreLoader.loadCommands(),
...TestLoader.loadCommands(),
...ArtisanLoader.loadCommands(),
]

Expand All @@ -32,9 +34,6 @@ export class Kernel extends ConsoleKernel {
* @return {any[]}
*/
get templates() {
return [
...TestCommandsLoader.loadTemplates(),
...ArtisanLoader.loadTemplates(),
]
return [...TestLoader.loadTemplates(), ...ArtisanLoader.loadTemplates()]
}
}
35 changes: 28 additions & 7 deletions config/logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,41 @@ export default {
| Here you may configure the log channels for your application.
|
| Available Drivers:
| "console", "discord", "file", "null", "slack", "telegram".
| "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',
},
console: {
driver: 'console',
level: 'trace',

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

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

formatter: 'request',
formatterConfig: {
asJson: false,
Expand All @@ -54,29 +67,37 @@ export default {
},
file: {
driver: 'file',
formatter: 'simple',
level: 'trace',
filePath: Path.logs('athenna.log'),

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

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

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

formatter: 'message',
formatterConfig: {},
},
},
Expand Down
Loading

0 comments on commit 6b58d46

Please sign in to comment.