@athenna/http 5.32.0 → 5.33.0
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": "5.
|
|
3
|
+
"version": "5.33.0",
|
|
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>",
|
|
@@ -74,40 +74,40 @@
|
|
|
74
74
|
"#tests": "./tests/index.js"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@athenna/artisan": "^5.
|
|
78
|
-
"@athenna/common": "^5.
|
|
79
|
-
"@athenna/config": "^5.
|
|
80
|
-
"@athenna/ioc": "^5.
|
|
81
|
-
"@athenna/logger": "^5.
|
|
82
|
-
"@athenna/test": "^5.
|
|
77
|
+
"@athenna/artisan": "^5.7.0",
|
|
78
|
+
"@athenna/common": "^5.14.0",
|
|
79
|
+
"@athenna/config": "^5.4.0",
|
|
80
|
+
"@athenna/ioc": "^5.2.0",
|
|
81
|
+
"@athenna/logger": "^5.7.0",
|
|
82
|
+
"@athenna/test": "^5.5.0",
|
|
83
83
|
"@athenna/tsconfig": "^5.0.0",
|
|
84
84
|
"@athenna/view": "^5.3.0",
|
|
85
85
|
"@athenna/vite": "^5.13.0",
|
|
86
|
-
"@fastify/cors": "^10.0
|
|
86
|
+
"@fastify/cors": "^10.1.0",
|
|
87
87
|
"@fastify/helmet": "^13.0.1",
|
|
88
88
|
"@fastify/multipart": "^9.0.3",
|
|
89
|
-
"@fastify/rate-limit": "^10.
|
|
90
|
-
"@fastify/static": "^8.0
|
|
91
|
-
"@fastify/swagger": "^9.
|
|
92
|
-
"@fastify/swagger-ui": "^5.2.
|
|
93
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
94
|
-
"@typescript-eslint/parser": "^8.
|
|
89
|
+
"@fastify/rate-limit": "^10.3.0",
|
|
90
|
+
"@fastify/static": "^8.2.0",
|
|
91
|
+
"@fastify/swagger": "^9.5.1",
|
|
92
|
+
"@fastify/swagger-ui": "^5.2.3",
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
94
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
95
95
|
"autocannon": "^7.15.0",
|
|
96
96
|
"commitizen": "^4.3.1",
|
|
97
97
|
"cz-conventional-changelog": "^3.3.0",
|
|
98
98
|
"eslint": "^8.57.1",
|
|
99
|
-
"eslint-config-prettier": "^8.10.
|
|
99
|
+
"eslint-config-prettier": "^8.10.2",
|
|
100
100
|
"eslint-config-standard": "^17.1.0",
|
|
101
|
-
"eslint-plugin-import": "^2.
|
|
101
|
+
"eslint-plugin-import": "^2.32.0",
|
|
102
102
|
"eslint-plugin-n": "^15.7.0",
|
|
103
|
-
"eslint-plugin-prettier": "^4.2.
|
|
103
|
+
"eslint-plugin-prettier": "^4.2.5",
|
|
104
104
|
"eslint-plugin-promise": "^6.6.0",
|
|
105
105
|
"foreground-child": "^2.0.0",
|
|
106
106
|
"husky": "^3.1.0",
|
|
107
107
|
"lint-staged": "^12.5.0",
|
|
108
|
-
"ora": "^8.
|
|
108
|
+
"ora": "^8.2.0",
|
|
109
109
|
"prettier": "^2.8.8",
|
|
110
|
-
"vite": "^6.
|
|
110
|
+
"vite": "^6.3.5",
|
|
111
111
|
"vite-plugin-restart": "^0.4.2"
|
|
112
112
|
},
|
|
113
113
|
"c8": {
|
|
@@ -61,17 +61,17 @@ export class RouteListCommand extends BaseCommand {
|
|
|
61
61
|
* Resolve the http routes file.
|
|
62
62
|
*/
|
|
63
63
|
async resolveRoute() {
|
|
64
|
-
const path = Config.get('rc.
|
|
64
|
+
const path = Config.get('rc.http.route', Path.routes(`http.${Path.ext()}`));
|
|
65
65
|
await Module.resolve(path, this.getParentURL());
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
68
|
* Get the http kernel module from RC file or resolve the default one.
|
|
69
69
|
*/
|
|
70
70
|
async getHttpKernel() {
|
|
71
|
-
if (!Config.exists('rc.
|
|
71
|
+
if (!Config.exists('rc.http.kernel')) {
|
|
72
72
|
return HttpKernel;
|
|
73
73
|
}
|
|
74
|
-
return Module.resolve(Config.get('rc.
|
|
74
|
+
return Module.resolve(Config.get('rc.http.kernel'), this.getParentURL());
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* Get the parent URL of the project.
|
|
@@ -56,21 +56,11 @@ export class HttpExceptionHandler {
|
|
|
56
56
|
if (!Is.Exception(error)) {
|
|
57
57
|
error = error.toAthennaException();
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Log.channelOrVanilla('exception').error({
|
|
62
|
-
name: error.name,
|
|
63
|
-
code: error.code,
|
|
64
|
-
status: error.status,
|
|
65
|
-
message: error.message,
|
|
66
|
-
help: error.help,
|
|
67
|
-
cause: error.cause,
|
|
68
|
-
details: error.details,
|
|
69
|
-
stack: error.stack
|
|
70
|
-
});
|
|
59
|
+
if (Config.is('http.logger.prettifyException', true)) {
|
|
60
|
+
Log.channelOrVanilla('exception').error(await error.prettify());
|
|
71
61
|
return;
|
|
72
62
|
}
|
|
73
|
-
Log.channelOrVanilla('exception').error(
|
|
63
|
+
Log.channelOrVanilla('exception').error(error);
|
|
74
64
|
}
|
|
75
65
|
/**
|
|
76
66
|
* Return a boolean indicating if the error can be logged or not.
|