@athenna/http 3.4.4 → 3.7.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": "3.4.4",
3
+ "version": "3.7.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>",
@@ -61,16 +61,16 @@
61
61
  "#tests": "./tests/index.js"
62
62
  },
63
63
  "dependencies": {
64
- "fastify": "^4.13.0"
64
+ "fastify": "^4.14.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@athenna/artisan": "^3.3.8",
68
- "@athenna/common": "^3.4.6",
69
- "@athenna/config": "^3.2.5",
70
- "@athenna/ioc": "^3.1.8",
71
- "@athenna/logger": "^3.1.7",
72
- "@athenna/test": "^3.2.3",
73
- "@athenna/view": "^3.0.7",
67
+ "@athenna/artisan": "^3.6.0",
68
+ "@athenna/common": "^3.5.0",
69
+ "@athenna/config": "^3.3.0",
70
+ "@athenna/ioc": "^3.2.0",
71
+ "@athenna/logger": "^3.2.0",
72
+ "@athenna/test": "^3.3.0",
73
+ "@athenna/view": "^3.1.0",
74
74
  "@fastify/cors": "^8.1.1",
75
75
  "@fastify/helmet": "^10.0.2",
76
76
  "@fastify/rate-limit": "^7.5.0",
@@ -93,15 +93,15 @@
93
93
  "@types/pluralize": "^0.0.29",
94
94
  "@types/sinon": "^10.0.13",
95
95
  "@types/uuid": "^9.0.0",
96
- "@typescript-eslint/eslint-plugin": "^5.48.1",
97
- "@typescript-eslint/parser": "^5.48.1",
96
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
97
+ "@typescript-eslint/parser": "^5.56.0",
98
98
  "c8": "^7.12.0",
99
99
  "cls-rtracer": "^2.6.2",
100
100
  "commitizen": "^4.2.6",
101
101
  "cross-env": "^7.0.3",
102
102
  "cz-conventional-changelog": "^3.3.0",
103
- "eslint": "^8.32.0",
104
- "eslint-config-prettier": "^8.6.0",
103
+ "eslint": "^8.36.0",
104
+ "eslint-config-prettier": "^8.8.0",
105
105
  "eslint-config-standard": "^17.0.0",
106
106
  "eslint-plugin-import": "^2.27.5",
107
107
  "eslint-plugin-n": "^15.6.1",
@@ -111,12 +111,11 @@
111
111
  "js-yaml": "^4.1.0",
112
112
  "lint-staged": "^12.5.0",
113
113
  "minimist": "^1.2.7",
114
- "prettier": "^2.8.3",
114
+ "prettier": "^2.8.7",
115
115
  "reflect-metadata": "^0.1.13",
116
- "rimraf": "^3.0.2",
117
116
  "sinon": "^15.0.2",
118
117
  "ts-node": "^10.9.1",
119
- "typescript": "^4.9.4"
118
+ "typescript": "^5.0.2"
120
119
  },
121
120
  "c8": {
122
121
  "all": true,
@@ -226,13 +225,6 @@
226
225
  "preloads": [],
227
226
  "services": [],
228
227
  "providers": [],
229
- "commands": [
230
- "#src/Commands/MakeControllerCommand",
231
- "#src/Commands/MakeInterceptorCommand",
232
- "#src/Commands/MakeMiddlewareCommand",
233
- "#src/Commands/MakeTerminatorCommand",
234
- "#src/Commands/RouteListCommand"
235
- ],
236
228
  "controllers": [
237
229
  "#tests/Stubs/controllers/HelloController",
238
230
  "#tests/Stubs/controllers/DecoratedController"
@@ -260,7 +252,7 @@
260
252
  "#tests/Stubs/middlewares/DecoratedGlobalInterceptor",
261
253
  "#tests/Stubs/middlewares/DecoratedGlobalTerminator"
262
254
  ],
263
- "commandsManifest": {
255
+ "commands": {
264
256
  "route:list": {
265
257
  "path": "#src/Commands/RouteListCommand",
266
258
  "route": "./tests/Stubs/routes/http.js",
@@ -45,7 +45,7 @@ export class MakeControllerCommand extends BaseCommand {
45
45
  * Get the destination path for the file that will be generated.
46
46
  */
47
47
  getDestinationPath() {
48
- let destination = Config.get('rc.commandsManifest.make:controller.destination', Path.http('Controllers'));
48
+ let destination = Config.get('rc.commands.make:controller.destination', Path.http('Controllers'));
49
49
  if (!isAbsolute(destination)) {
50
50
  destination = resolve(Path.pwd(), destination);
51
51
  }
@@ -45,7 +45,7 @@ export class MakeInterceptorCommand extends BaseCommand {
45
45
  * Get the destination path for the file that will be generated.
46
46
  */
47
47
  getDestinationPath() {
48
- let destination = Config.get('rc.commandsManifest.make:interceptor.destination', Path.http('Interceptors'));
48
+ let destination = Config.get('rc.commands.make:interceptor.destination', Path.http('Interceptors'));
49
49
  if (!isAbsolute(destination)) {
50
50
  destination = resolve(Path.pwd(), destination);
51
51
  }
@@ -45,7 +45,7 @@ export class MakeMiddlewareCommand extends BaseCommand {
45
45
  * Get the destination path for the file that will be generated.
46
46
  */
47
47
  getDestinationPath() {
48
- let destination = Config.get('rc.commandsManifest.make:middleware.destination', Path.http('Middlewares'));
48
+ let destination = Config.get('rc.commands.make:middleware.destination', Path.http('Middlewares'));
49
49
  if (!isAbsolute(destination)) {
50
50
  destination = resolve(Path.pwd(), destination);
51
51
  }
@@ -45,7 +45,7 @@ export class MakeTerminatorCommand extends BaseCommand {
45
45
  * Get the destination path for the file that will be generated.
46
46
  */
47
47
  getDestinationPath() {
48
- let destination = Config.get('rc.commandsManifest.make:terminator.destination', Path.http('Terminators'));
48
+ let destination = Config.get('rc.commands.make:terminator.destination', Path.http('Terminators'));
49
49
  if (!isAbsolute(destination)) {
50
50
  destination = resolve(Path.pwd(), destination);
51
51
  }
@@ -45,15 +45,15 @@ export class RouteListCommand extends BaseCommand {
45
45
  * Resolve the http routes file.
46
46
  */
47
47
  async resolveRoute() {
48
- await Module.resolve(Config.get('rc.commandsManifest.route:list.route', '#routes/http'), Config.get('rc.meta'));
48
+ await Module.resolve(Config.get('rc.commands.route:list.route', '#routes/http'), Config.get('rc.meta'));
49
49
  }
50
50
  /**
51
51
  * Get the http kernel module from RC file or resolve the default one.
52
52
  */
53
53
  async getHttpKernel() {
54
- if (!Config.exists('rc.commandsManifest.route:list.kernel')) {
54
+ if (!Config.exists('rc.commands.route:list.kernel')) {
55
55
  return HttpKernel;
56
56
  }
57
- return Module.resolve(Config.get('rc.commandsManifest.route:list.kernel'), Config.get('rc.meta'));
57
+ return Module.resolve(Config.get('rc.commands.route:list.kernel'), Config.get('rc.meta'));
58
58
  }
59
59
  }
@@ -6,9 +6,6 @@
6
6
  * For the full copyright and license information, please view the LICENSE
7
7
  * file that was distributed with this source code.
8
8
  */
9
- /// <reference types="node" resolution-mode="require"/>
10
- /// <reference types="node/http.js" />
11
- /// <reference types="node_modules/got/dist/source/core/timed-out.js" />
12
9
  import { InterceptHandler, TerminateHandler } from '#src/Types/Middlewares/MiddlewareHandler';
13
10
  import { RequestHandler } from '#src/Types/Contexts/Context';
14
11
  import { ErrorHandler } from '#src/Types/Contexts/ErrorContext';
@@ -22,7 +19,7 @@ export declare class FastifyHandler {
22
19
  /**
23
20
  * Just and alises for the request handler.
24
21
  */
25
- static handle(handler: RequestHandler): RouteHandlerMethod<import("http").Server, import("http").IncomingMessage, import("http").ServerResponse, import("fastify").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, import("fastify").FastifyBaseLogger>;
22
+ static handle(handler: RequestHandler): RouteHandlerMethod;
26
23
  /**
27
24
  * Parse the fastify onSend hook to an Athenna intercept handler.
28
25
  */