This repository has been archived by the owner on Aug 20, 2023. It is now read-only.
-
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 #26 from KenJoelTL/develop
Develop
- Loading branch information
Showing
47 changed files
with
8,008 additions
and
1,212 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"typescript": true, | ||
"commands": [ | ||
"./commands", | ||
"@adonisjs/core/build/commands/index.js", | ||
"@adonisjs/repl/build/commands" | ||
], | ||
"exceptionHandlerNamespace": "App/Exceptions/Handler", | ||
"aliases": { | ||
"App": "app", | ||
"Config": "config", | ||
"Database": "database", | ||
"Contracts": "contracts" | ||
}, | ||
"preloads": [ | ||
"./start/routes", | ||
"./start/kernel" | ||
], | ||
"providers": [ | ||
"./providers/AppProvider", | ||
"@adonisjs/core" | ||
], | ||
"aceProviders": [ | ||
"@adonisjs/repl" | ||
], | ||
"tests": { | ||
"suites": [ | ||
{ | ||
"name": "functional", | ||
"files": [ | ||
"tests/functional/**/*.spec(.ts|.js)" | ||
], | ||
"timeout": 60000 | ||
} | ||
] | ||
}, | ||
"testProviders": [ | ||
"@japa/preset-adonis/TestsProvider" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
insert_final_newline = false | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PORT=3333 | ||
HOST=0.0.0.0 | ||
NODE_ENV=development | ||
APP_KEY=K6caNzl6Cvhb1R_0QjiKYfCn2aHT8qsJ | ||
DRIVE_DISK=local |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
build | ||
coverage | ||
.vscode | ||
.DS_STORE | ||
.env | ||
tmp |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Ace Commands | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This file is the entry point for running ace commands. | ||
| | ||
*/ | ||
|
||
require('reflect-metadata') | ||
require('source-map-support').install({ handleUncaughtExceptions: false }) | ||
|
||
const { Ignitor } = require('@adonisjs/core/build/standalone') | ||
new Ignitor(__dirname) | ||
.ace() | ||
.handle(process.argv.slice(2)) |
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"commands": { | ||
"dump:rcfile": { | ||
"settings": {}, | ||
"commandPath": "@adonisjs/core/build/commands/DumpRc", | ||
"commandName": "dump:rcfile", | ||
"description": "Dump contents of .adonisrc.json file along with defaults", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [] | ||
}, | ||
"list:routes": { | ||
"settings": { | ||
"loadApp": true, | ||
"stayAlive": true | ||
}, | ||
"commandPath": "@adonisjs/core/build/commands/ListRoutes/index", | ||
"commandName": "list:routes", | ||
"description": "List application routes", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [ | ||
{ | ||
"name": "verbose", | ||
"propertyName": "verbose", | ||
"type": "boolean", | ||
"description": "Display more information" | ||
}, | ||
{ | ||
"name": "reverse", | ||
"propertyName": "reverse", | ||
"type": "boolean", | ||
"alias": "r", | ||
"description": "Reverse routes display" | ||
}, | ||
{ | ||
"name": "methods", | ||
"propertyName": "methodsFilter", | ||
"type": "array", | ||
"alias": "m", | ||
"description": "Filter routes by method" | ||
}, | ||
{ | ||
"name": "patterns", | ||
"propertyName": "patternsFilter", | ||
"type": "array", | ||
"alias": "p", | ||
"description": "Filter routes by the route pattern" | ||
}, | ||
{ | ||
"name": "names", | ||
"propertyName": "namesFilter", | ||
"type": "array", | ||
"alias": "n", | ||
"description": "Filter routes by route name" | ||
}, | ||
{ | ||
"name": "json", | ||
"propertyName": "json", | ||
"type": "boolean", | ||
"description": "Output as JSON" | ||
}, | ||
{ | ||
"name": "table", | ||
"propertyName": "table", | ||
"type": "boolean", | ||
"description": "Output as Table" | ||
}, | ||
{ | ||
"name": "max-width", | ||
"propertyName": "maxWidth", | ||
"type": "number", | ||
"description": "Specify maximum rendering width. Ignored for JSON Output" | ||
} | ||
] | ||
}, | ||
"generate:key": { | ||
"settings": {}, | ||
"commandPath": "@adonisjs/core/build/commands/GenerateKey", | ||
"commandName": "generate:key", | ||
"description": "Generate a new APP_KEY secret", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [] | ||
}, | ||
"repl": { | ||
"settings": { | ||
"loadApp": true, | ||
"environment": "repl", | ||
"stayAlive": true | ||
}, | ||
"commandPath": "@adonisjs/repl/build/commands/AdonisRepl", | ||
"commandName": "repl", | ||
"description": "Start a new REPL session", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [] | ||
} | ||
}, | ||
"aliases": {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Http Exception Handler | ||
|-------------------------------------------------------------------------- | ||
| | ||
| AdonisJs will forward all exceptions occurred during an HTTP request to | ||
| the following class. You can learn more about exception handling by | ||
| reading docs. | ||
| | ||
| The exception handler extends a base `HttpExceptionHandler` which is not | ||
| mandatory, however it can do lot of heavy lifting to handle the errors | ||
| properly. | ||
| | ||
*/ | ||
|
||
import Logger from '@ioc:Adonis/Core/Logger' | ||
import HttpExceptionHandler from '@ioc:Adonis/Core/HttpExceptionHandler' | ||
|
||
export default class ExceptionHandler extends HttpExceptionHandler { | ||
constructor () { | ||
super(Logger) | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { listDirectoryFiles } from '@adonisjs/core/build/standalone' | ||
import Application from '@ioc:Adonis/Core/Application' | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Exporting an array of commands | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Instead of manually exporting each file from this directory, we use the | ||
| helper `listDirectoryFiles` to recursively collect and export an array | ||
| of filenames. | ||
| | ||
| Couple of things to note: | ||
| | ||
| 1. The file path must be relative from the project root and not this directory. | ||
| 2. We must ignore this file to avoid getting into an infinite loop | ||
| | ||
*/ | ||
export default listDirectoryFiles(__dirname, Application.appRoot, ['./commands/index']) |
Oops, something went wrong.