generated from AthennaIO/Template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from AthennaIO/develop
chore(npm): update dependencies
- Loading branch information
Showing
21 changed files
with
623 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { File, Path } from '@athenna/common' | ||
import { Command, FilePropertiesHelper } from '@athenna/artisan' | ||
import { NotFoundDatabaseException } from '#app/Exceptions/NotFoundDatabaseException' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { File, Path } from '@athenna/common' | ||
import { Command, FilePropertiesHelper } from '@athenna/artisan' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import chalk from 'chalk' | ||
|
||
import { basename, isAbsolute, sep } from 'node:path' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { ConsoleExceptionHandler } from '@athenna/artisan' | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { CoreLoader } from '@athenna/core' | ||
import { Folder, Path } from '@athenna/common' | ||
import { ArtisanLoader, ConsoleKernel } from '@athenna/artisan' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { Exception } from '@athenna/common' | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { Exception } from '@athenna/common' | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { Exception } from '@athenna/common' | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { Ignite } from '@athenna/core' | ||
import { install } from 'source-map-support' | ||
|
||
async function main() { | ||
install() | ||
|
||
process.env.BOOT_LOGS = 'false' | ||
process.env.IS_ARTISAN = 'true' | ||
process.env.CALL_PATH = process.cwd() | ||
|
||
const application = await new Ignite().fire() | ||
const application = await new Ignite().fire(import.meta.url, { | ||
bootLogs: false, | ||
}) | ||
const artisan = await application.bootArtisan() | ||
|
||
await artisan.main('Artisan') | ||
|
||
if (!Config.get('app.protectedCommands').includes(process.argv[2])) { | ||
process.exit() | ||
} | ||
} | ||
|
||
main().catch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { Ignite } from '@athenna/core' | ||
import { install } from 'source-map-support' | ||
|
||
async function main() { | ||
install() | ||
|
||
process.env.BOOT_LOGS = 'false' | ||
process.env.IS_ARTISAN = 'false' | ||
process.env.NODE_ENV = 'production' | ||
process.env.CALL_PATH = process.cwd() | ||
|
||
const application = await new Ignite().fire() | ||
const application = await new Ignite().fire(import.meta.url, { | ||
bootLogs: false, | ||
}) | ||
const artisan = await application.bootArtisan() | ||
|
||
await artisan.main('Athenna') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { File } from '@athenna/common' | ||
import { ProviderHelper } from '@athenna/core' | ||
|
||
|
@@ -129,8 +138,6 @@ export default { | |
|
||
gracefulShutdown: { | ||
SIGINT: async () => { | ||
await ProviderHelper.shutdownAll(false) | ||
|
||
process.exit() | ||
}, | ||
SIGTERM: async signal => { | ||
|
@@ -139,6 +146,38 @@ export default { | |
process.kill(process.pid, signal) | ||
}, | ||
}, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Trace Artisan commands | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Trace artisan commands. If this value is true, Athenna will use the | ||
| rTracer library to generate a unique uuid v1 for each command executed | ||
| by Artisan. | ||
| | ||
*/ | ||
|
||
traceArtisan: false, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Protected Artisan commands | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Protected commands are usually commands that will let the Node.js process | ||
| running for some reason. | ||
| | ||
| For example: "node artisan repl" | ||
| | ||
| This command will bootstrap a REPL session. The Node.js process needs to | ||
| stay running, so we cannot force shutdown the application after this command | ||
| is executed. | ||
| | ||
*/ | ||
|
||
protectedCommands: ['repl', 'test', 'serve'], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Application providers | ||
|
@@ -156,7 +195,6 @@ export default { | |
import('@athenna/core/providers/RepositoryProvider'), | ||
import('@athenna/artisan/providers/ArtisanProvider'), | ||
import('@athenna/artisan/providers/TemplateProvider'), | ||
import('#providers/AppServiceProvider'), | ||
], | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @athenna/cli | ||
* | ||
* (c) João Lenon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { Path } from '@athenna/common' | ||
|
||
export default { | ||
|
@@ -40,19 +49,22 @@ export default { | |
|
||
formatter: 'simple', | ||
}, | ||
|
||
console: { | ||
driver: 'console', | ||
level: 'trace', | ||
|
||
formatter: 'cli', | ||
}, | ||
|
||
exception: { | ||
driver: 'console', | ||
level: 'trace', | ||
streamType: 'stderr', | ||
|
||
formatter: 'none', | ||
}, | ||
|
||
request: { | ||
driver: 'console', | ||
level: 'trace', | ||
|
@@ -62,9 +74,11 @@ export default { | |
asJson: false, | ||
}, | ||
}, | ||
|
||
discard: { | ||
driver: 'null', | ||
}, | ||
|
||
file: { | ||
driver: 'file', | ||
level: 'trace', | ||
|
@@ -73,6 +87,7 @@ export default { | |
formatter: 'simple', | ||
formatterConfig: {}, | ||
}, | ||
|
||
slack: { | ||
driver: 'slack', | ||
level: 'fatal', | ||
|
@@ -81,6 +96,7 @@ export default { | |
formatter: 'message', | ||
formatterConfig: {}, | ||
}, | ||
|
||
discord: { | ||
driver: 'discord', | ||
level: 'fatal', | ||
|
@@ -90,6 +106,7 @@ export default { | |
formatter: 'message', | ||
formatterConfig: {}, | ||
}, | ||
|
||
telegram: { | ||
driver: 'telegram', | ||
level: 'fatal', | ||
|
Oops, something went wrong.