@@ -15,7 +15,7 @@ import { Log } from '@athenna/logger'
1515import { Config } from '@athenna/config'
1616import { sep , isAbsolute , resolve } from 'node:path'
1717import { Annotation , type ServiceMeta } from '@athenna/ioc'
18- import { File , Path , Exec , Module , String } from '@athenna/common'
18+ import { File , Path , Module , String } from '@athenna/common'
1919import { HttpExceptionHandler } from '#src/handlers/HttpExceptionHandler'
2020
2121const corsPlugin = await Module . safeImport ( '@fastify/cors' )
@@ -256,7 +256,7 @@ export class HttpKernel {
256256 public async registerControllers ( ) : Promise < void > {
257257 const controllers = Config . get < string [ ] > ( 'rc.controllers' , [ ] )
258258
259- await Exec . concurrently ( controllers , async path => {
259+ await controllers . athenna . concurrently ( async path => {
260260 const Controller = await Module . resolve ( path , this . getMeta ( ) )
261261
262262 if ( Annotation . isAnnotated ( Controller ) ) {
@@ -277,7 +277,7 @@ export class HttpKernel {
277277 public async registerMiddlewares ( ) : Promise < void > {
278278 const middlewares = Config . get < string [ ] > ( 'rc.middlewares' , [ ] )
279279
280- await Exec . concurrently ( middlewares , async path => {
280+ await middlewares . athenna . concurrently ( async path => {
281281 const Middleware = await Module . resolve ( path , this . getMeta ( ) )
282282
283283 if ( Annotation . isAnnotated ( Middleware ) ) {
@@ -308,7 +308,7 @@ export class HttpKernel {
308308 { }
309309 )
310310
311- await Exec . concurrently ( Object . keys ( namedMiddlewares ) , async key => {
311+ await Object . keys ( namedMiddlewares ) . athenna . concurrently ( async key => {
312312 const Middleware = await Module . resolve (
313313 namedMiddlewares [ key ] ,
314314 this . getMeta ( )
@@ -336,7 +336,7 @@ export class HttpKernel {
336336 public async registerGlobalMiddlewares ( ) : Promise < void > {
337337 const globalMiddlewares = Config . get < string [ ] > ( 'rc.globalMiddlewares' , [ ] )
338338
339- await Exec . concurrently ( globalMiddlewares , async path => {
339+ await globalMiddlewares . athenna . concurrently ( async path => {
340340 const Middleware = await Module . resolve ( path , this . getMeta ( ) )
341341
342342 if ( Annotation . isAnnotated ( Middleware ) ) {
0 commit comments