diff --git a/package-lock.json b/package-lock.json index 49209c8..0497ce0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/core", - "version": "5.24.0", + "version": "5.25.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/core", - "version": "5.24.0", + "version": "5.25.0", "license": "MIT", "dependencies": { "pretty-repl": "^3.1.2", diff --git a/package.json b/package.json index 04b80f3..25bac91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/core", - "version": "5.24.0", + "version": "5.25.0", "description": "One foundation for multiple applications.", "license": "MIT", "author": "João Lenon ", diff --git a/src/applications/Http.ts b/src/applications/Http.ts index d6d0e8b..1ac162d 100644 --- a/src/applications/Http.ts +++ b/src/applications/Http.ts @@ -12,7 +12,7 @@ import { Log } from '@athenna/logger' import type { ServerImpl } from '@athenna/http' import type { HttpOptions } from '#src/types/HttpOptions' import { Is, Path, Module, Options } from '@athenna/common' -import type { Handler as AWSLambdaHandler } from 'aws-lambda' +import type { AWSLambdaHandler } from '#src/types/AWSLambdaHandler' export class Http { /** diff --git a/src/ignite/Ignite.ts b/src/ignite/Ignite.ts index cd1f3c1..f066d0b 100644 --- a/src/ignite/Ignite.ts +++ b/src/ignite/Ignite.ts @@ -27,7 +27,7 @@ import { CommanderHandler } from '@athenna/artisan' import { LoadHelper } from '#src/helpers/LoadHelper' import { Log, LoggerProvider } from '@athenna/logger' import { Repl as ReplApp } from '#src/applications/Repl' -import type { Handler as AWSLambdaHandler } from 'aws-lambda' +import type { AWSLambdaHandler } from '#src/types/AWSLambdaHandler' import { parse as semverParse, satisfies as semverSatisfies } from 'semver' import { Is, Path, File, Module, Options, Macroable } from '@athenna/common' import { NotSatisfiedNodeVersion } from '#src/exceptions/NotSatisfiedNodeVersion' @@ -136,13 +136,18 @@ export class Ignite extends Macroable { } } - public async httpServer(options: HttpOptions & { isAWSLambda: true }): Promise + public async httpServer( + options: HttpOptions & { isAWSLambda: true } + ): Promise + public async httpServer(options?: HttpOptions): Promise /** * Ignite the Http server application. */ - public async httpServer(options?: HttpOptions): Promise { + public async httpServer( + options?: HttpOptions + ): Promise { try { this.options.environments.push('http') diff --git a/src/types/AWSLambdaHandler.ts b/src/types/AWSLambdaHandler.ts new file mode 100644 index 0000000..19f4431 --- /dev/null +++ b/src/types/AWSLambdaHandler.ts @@ -0,0 +1,3 @@ +import type { Handler } from 'aws-lambda' + +export type AWSLambdaHandler = Handler diff --git a/src/types/index.ts b/src/types/index.ts index 25c8b4c..971030f 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -13,3 +13,4 @@ export * from '#src/types/CronOptions' export * from '#src/types/HttpOptions' export * from '#src/types/IgniteOptions' export * from '#src/types/ConsoleOptions' +export * from '#src/types/AWSLambdaHandler'