@athenna/http 5.24.0 → 5.25.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.24.0",
3
+ "version": "5.25.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>",
@@ -82,7 +82,7 @@
82
82
  "@athenna/test": "^5.3.0",
83
83
  "@athenna/tsconfig": "^5.0.0",
84
84
  "@athenna/view": "^5.3.0",
85
- "@athenna/vite": "^5.12.0",
85
+ "@athenna/vite": "^5.13.0",
86
86
  "@fastify/cors": "^10.0.2",
87
87
  "@fastify/helmet": "^13.0.1",
88
88
  "@fastify/rate-limit": "^10.2.2",
@@ -13,7 +13,7 @@ import { Log } from '@athenna/logger';
13
13
  import { Config } from '@athenna/config';
14
14
  import { sep, isAbsolute, resolve } from 'node:path';
15
15
  import { Annotation } from '@athenna/ioc';
16
- import { File, Path, Exec, Module, String } from '@athenna/common';
16
+ import { File, Path, Module, String } from '@athenna/common';
17
17
  import { HttpExceptionHandler } from '#src/handlers/HttpExceptionHandler';
18
18
  const corsPlugin = await Module.safeImport('@fastify/cors');
19
19
  const helmetPlugin = await Module.safeImport('@fastify/helmet');
@@ -163,7 +163,7 @@ export class HttpKernel {
163
163
  */
164
164
  async registerControllers() {
165
165
  const controllers = Config.get('rc.controllers', []);
166
- await Exec.concurrently(controllers, async (path) => {
166
+ await controllers.athenna.concurrently(async (path) => {
167
167
  const Controller = await Module.resolve(path, this.getMeta());
168
168
  if (Annotation.isAnnotated(Controller)) {
169
169
  this.registerUsingMeta(Controller);
@@ -179,7 +179,7 @@ export class HttpKernel {
179
179
  */
180
180
  async registerMiddlewares() {
181
181
  const middlewares = Config.get('rc.middlewares', []);
182
- await Exec.concurrently(middlewares, async (path) => {
182
+ await middlewares.athenna.concurrently(async (path) => {
183
183
  const Middleware = await Module.resolve(path, this.getMeta());
184
184
  if (Annotation.isAnnotated(Middleware)) {
185
185
  this.registerUsingMeta(Middleware);
@@ -198,7 +198,7 @@ export class HttpKernel {
198
198
  */
199
199
  async registerNamedMiddlewares() {
200
200
  const namedMiddlewares = Config.get('rc.namedMiddlewares', {});
201
- await Exec.concurrently(Object.keys(namedMiddlewares), async (key) => {
201
+ await Object.keys(namedMiddlewares).athenna.concurrently(async (key) => {
202
202
  const Middleware = await Module.resolve(namedMiddlewares[key], this.getMeta());
203
203
  if (Annotation.isAnnotated(Middleware)) {
204
204
  this.registerUsingMeta(Middleware);
@@ -214,7 +214,7 @@ export class HttpKernel {
214
214
  */
215
215
  async registerGlobalMiddlewares() {
216
216
  const globalMiddlewares = Config.get('rc.globalMiddlewares', []);
217
- await Exec.concurrently(globalMiddlewares, async (path) => {
217
+ await globalMiddlewares.athenna.concurrently(async (path) => {
218
218
  const Middleware = await Module.resolve(path, this.getMeta());
219
219
  if (Annotation.isAnnotated(Middleware)) {
220
220
  this.registerUsingMeta(Middleware);