@athenna/http 1.8.6 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenna/http",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "The Athenna Http server. Built on top of fastify.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "João Lenon <lenon@athenna.io>",
|
|
@@ -54,11 +54,6 @@
|
|
|
54
54
|
"#tests/*": "./tests/*.js"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@athenna/artisan": "1.6.4",
|
|
58
|
-
"@athenna/common": "1.0.2",
|
|
59
|
-
"@athenna/config": "1.2.2",
|
|
60
|
-
"@athenna/ioc": "1.3.2",
|
|
61
|
-
"@athenna/logger": "1.4.1",
|
|
62
57
|
"@fastify/cors": "8.1.1",
|
|
63
58
|
"@fastify/helmet": "10.0.2",
|
|
64
59
|
"@fastify/rate-limit": "7.5.0",
|
|
@@ -67,6 +62,11 @@
|
|
|
67
62
|
"fastify": "4.9.2"
|
|
68
63
|
},
|
|
69
64
|
"devDependencies": {
|
|
65
|
+
"@athenna/artisan": "3.0.1",
|
|
66
|
+
"@athenna/common": "3.0.0",
|
|
67
|
+
"@athenna/config": "3.0.0",
|
|
68
|
+
"@athenna/ioc": "3.0.0",
|
|
69
|
+
"@athenna/logger": "3.0.1",
|
|
70
70
|
"@japa/assert": "1.3.4",
|
|
71
71
|
"@japa/run-failed-tests": "1.0.7",
|
|
72
72
|
"@japa/runner": "2.0.7",
|
|
@@ -53,7 +53,7 @@ export class MakeController extends Command {
|
|
|
53
53
|
*/
|
|
54
54
|
async handle(name, options) {
|
|
55
55
|
const resource = 'Controller'
|
|
56
|
-
const path = Path.http(`Controllers/${name}.
|
|
56
|
+
const path = Path.http(`Controllers/${name}.${Path.ext()}`)
|
|
57
57
|
|
|
58
58
|
this.title(`MAKING ${resource}\n`, 'bold', 'green')
|
|
59
59
|
|
|
@@ -55,7 +55,7 @@ export class MakeMiddleware extends Command {
|
|
|
55
55
|
*/
|
|
56
56
|
async handle(name, options) {
|
|
57
57
|
const resource = 'Middleware'
|
|
58
|
-
const path = Path.http(`Middlewares/${name}.
|
|
58
|
+
const path = Path.http(`Middlewares/${name}.${Path.ext()}`)
|
|
59
59
|
|
|
60
60
|
this.title(`MAKING ${resource}\n`, 'bold', 'green')
|
|
61
61
|
|
|
@@ -64,7 +64,7 @@ export class MakeMiddleware extends Command {
|
|
|
64
64
|
this.success(`${resource} ({yellow} "${file.name}") successfully created.`)
|
|
65
65
|
|
|
66
66
|
if (options.register) {
|
|
67
|
-
const path = Path.http(
|
|
67
|
+
const path = Path.http(`Kernel.${Path.ext()}`)
|
|
68
68
|
|
|
69
69
|
await FilePropertiesHelper.addContentToObjectGetter(
|
|
70
70
|
path,
|
|
@@ -55,7 +55,7 @@ export class RouteList extends Command {
|
|
|
55
55
|
async handle(options) {
|
|
56
56
|
this.title('ROUTE LISTING\n', 'bold', 'green')
|
|
57
57
|
|
|
58
|
-
const Kernel = await Module.getFrom(Path.http(
|
|
58
|
+
const Kernel = await Module.getFrom(Path.http(`Kernel.${Path.ext()}`))
|
|
59
59
|
|
|
60
60
|
const kernel = new Kernel()
|
|
61
61
|
|
|
@@ -66,7 +66,7 @@ export class RouteList extends Command {
|
|
|
66
66
|
await kernel.registerLogMiddleware()
|
|
67
67
|
await kernel.registerRequestIdMiddleware()
|
|
68
68
|
|
|
69
|
-
const routePath = Path.routes(
|
|
69
|
+
const routePath = Path.routes(`http.${Path.ext()}`)
|
|
70
70
|
|
|
71
71
|
await import(routePath)
|
|
72
72
|
const routes = Route.listRoutes()
|
|
@@ -149,7 +149,9 @@ export class HttpKernel {
|
|
|
149
149
|
return
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
const Handler = await Module.getFrom(
|
|
152
|
+
const Handler = await Module.getFrom(
|
|
153
|
+
Path.http(`Exceptions/Handler.${Path.ext()}`),
|
|
154
|
+
)
|
|
153
155
|
|
|
154
156
|
const handler = new Handler()
|
|
155
157
|
|