@athenna/http 3.5.0 → 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.5.0",
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,10 +61,10 @@
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.4.0",
67
+ "@athenna/artisan": "^3.6.0",
68
68
  "@athenna/common": "^3.5.0",
69
69
  "@athenna/config": "^3.3.0",
70
70
  "@athenna/ioc": "^3.2.0",
@@ -225,13 +225,6 @@
225
225
  "preloads": [],
226
226
  "services": [],
227
227
  "providers": [],
228
- "commands": [
229
- "#src/Commands/MakeControllerCommand",
230
- "#src/Commands/MakeInterceptorCommand",
231
- "#src/Commands/MakeMiddlewareCommand",
232
- "#src/Commands/MakeTerminatorCommand",
233
- "#src/Commands/RouteListCommand"
234
- ],
235
228
  "controllers": [
236
229
  "#tests/Stubs/controllers/HelloController",
237
230
  "#tests/Stubs/controllers/DecoratedController"
@@ -259,7 +252,7 @@
259
252
  "#tests/Stubs/middlewares/DecoratedGlobalInterceptor",
260
253
  "#tests/Stubs/middlewares/DecoratedGlobalTerminator"
261
254
  ],
262
- "commandsManifest": {
255
+ "commands": {
263
256
  "route:list": {
264
257
  "path": "#src/Commands/RouteListCommand",
265
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
  }