Skip to content

Commit 495a829

Browse files
authored
Merge pull request #209 from AthennaIO/develop
chore(npm): update dependencies
2 parents ba595e0 + 483e3bf commit 495a829

File tree

13 files changed

+1024
-718
lines changed

13 files changed

+1024
-718
lines changed

package-lock.json

Lines changed: 971 additions & 683 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/http",
3-
"version": "5.23.0",
3+
"version": "5.24.0",
44
"description": "The Athenna Http server. Built on top of fastify.",
55
"license": "MIT",
66
"author": "João Lenon <lenon@athenna.io>",
@@ -74,23 +74,23 @@
7474
"#tests": "./tests/index.js"
7575
},
7676
"devDependencies": {
77-
"@athenna/artisan": "^5.3.0",
78-
"@athenna/common": "^5.4.0",
79-
"@athenna/config": "^5.1.0",
80-
"@athenna/ioc": "^5.0.0",
81-
"@athenna/logger": "^5.1.0",
82-
"@athenna/test": "^5.2.0",
77+
"@athenna/artisan": "^5.6.0",
78+
"@athenna/common": "^5.7.0",
79+
"@athenna/config": "^5.3.0",
80+
"@athenna/ioc": "^5.1.0",
81+
"@athenna/logger": "^5.3.0",
82+
"@athenna/test": "^5.3.0",
8383
"@athenna/tsconfig": "^5.0.0",
84-
"@athenna/view": "^5.1.0",
85-
"@athenna/vite": "^5.10.0",
86-
"@fastify/cors": "^10.0.1",
87-
"@fastify/helmet": "^13.0.0",
88-
"@fastify/rate-limit": "^10.2.1",
89-
"@fastify/static": "^8.0.3",
90-
"@fastify/swagger": "^9.4.0",
91-
"@fastify/swagger-ui": "^5.2.0",
92-
"@typescript-eslint/eslint-plugin": "^7.18.0",
93-
"@typescript-eslint/parser": "^7.18.0",
84+
"@athenna/view": "^5.3.0",
85+
"@athenna/vite": "^5.12.0",
86+
"@fastify/cors": "^10.0.2",
87+
"@fastify/helmet": "^13.0.1",
88+
"@fastify/rate-limit": "^10.2.2",
89+
"@fastify/static": "^8.0.4",
90+
"@fastify/swagger": "^9.4.2",
91+
"@fastify/swagger-ui": "^5.2.1",
92+
"@typescript-eslint/eslint-plugin": "^8.21.0",
93+
"@typescript-eslint/parser": "^8.21.0",
9494
"autocannon": "^7.15.0",
9595
"commitizen": "^4.3.1",
9696
"cz-conventional-changelog": "^3.3.0",
@@ -106,7 +106,7 @@
106106
"lint-staged": "^12.5.0",
107107
"ora": "^8.1.1",
108108
"prettier": "^2.8.8",
109-
"vite": "^6.0.6",
109+
"vite": "^6.0.11",
110110
"vite-plugin-restart": "^0.4.2"
111111
},
112112
"c8": {

src/context/Request.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
* file that was distributed with this source code.
88
*/
99

10-
import { Is, Json } from '@athenna/common'
1110
import type { AddressInfo } from 'node:net'
1211
import type { FastifyRequest } from 'fastify'
12+
import { Is, Json, Macroable } from '@athenna/common'
1313

14-
export class Request {
14+
export class Request extends Macroable {
1515
/**
1616
* The fastify request object.
1717
*/
1818
private request: FastifyRequest
1919

2020
public constructor(request: FastifyRequest) {
21+
super()
22+
2123
this.request = request
2224
}
2325

src/context/Response.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
*/
99

1010
import { View } from '@athenna/view'
11+
import { Macroable } from '@athenna/common'
1112
import type { FastifyReply } from 'fastify'
1213
import type { SendOptions } from '@fastify/static'
1314
import type { Request } from '#src/context/Request'
1415
import type { FastifyHelmetOptions } from '@fastify/helmet'
1516

16-
export class Response {
17+
export class Response extends Macroable {
1718
/**
1819
* The fastify response object.
1920
*/
@@ -25,6 +26,8 @@ export class Response {
2526
private request: Request
2627

2728
public constructor(response: FastifyReply, request?: Request) {
29+
super()
30+
2831
this.response = response
2932
this.request = request
3033
}

src/handlers/FastifyHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { Response } from '#src/context/Response'
1313
import type { RequestHandler } from '#src/types/contexts/Context'
1414
import type { ErrorHandler } from '#src/types/contexts/ErrorContext'
1515
import type { InterceptHandler, TerminateHandler } from '#src/types'
16-
import type { FastifyReply, FastifyRequest, RouteHandlerMethod } from 'fastify'
1716
import { NotFoundException } from '#src/exceptions/NotFoundException'
17+
import type { FastifyReply, FastifyRequest, RouteHandlerMethod } from 'fastify'
1818

1919
export class FastifyHandler {
2020
/**

src/router/Route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ import type {
1717
InterceptorRouteType
1818
} from '#src/types'
1919

20-
import { Is, Options, Route as RouteHelper } from '@athenna/common'
2120
import type { HTTPMethods, FastifySchema, RouteOptions } from 'fastify'
21+
import { Is, Options, Macroable, Route as RouteHelper } from '@athenna/common'
2222
import { UndefinedMethodException } from '#src/exceptions/UndefinedMethodException'
2323
import { NotFoundValidatorException } from '#src/exceptions/NotFoundValidatorException'
2424
import { NotFoundMiddlewareException } from '#src/exceptions/NotFoundMiddlewareException'
2525

26-
export class Route {
26+
export class Route extends Macroable {
2727
/**
2828
* Holds all the route implementations to be registered in the Server.
2929
*/
@@ -43,6 +43,8 @@ export class Route {
4343
methods: HTTPMethods[],
4444
handler: RouteHandler
4545
) {
46+
super()
47+
4648
this.route = {
4749
url,
4850
methods,

src/router/RouteGroup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@ import type {
1414
} from '#src/types'
1515

1616
import { Route } from '#src/router/Route'
17+
import { Macroable } from '@athenna/common'
1718
import { RouteResource } from '#src/router/RouteResource'
1819

19-
export class RouteGroup {
20+
export class RouteGroup extends Macroable {
2021
/**
2122
* All routes registered in the group.
2223
*/
2324
// eslint-disable-next-line no-use-before-define
2425
public routes: (Route | RouteGroup | RouteResource)[]
2526

2627
public constructor(routes: (Route | RouteGroup | RouteResource)[]) {
28+
super()
29+
2730
this.routes = routes
2831
}
2932

src/router/RouteResource.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import type {
1616

1717
import type { HTTPMethods } from 'fastify'
1818
import { Route } from '#src/router/Route'
19-
import { Is, String } from '@athenna/common'
19+
import { Is, String, Macroable } from '@athenna/common'
2020

21-
export class RouteResource {
21+
export class RouteResource extends Macroable {
2222
/**
2323
* All routes registered in the resource.
2424
*/
@@ -35,6 +35,8 @@ export class RouteResource {
3535
public controller: any
3636

3737
public constructor(resource: string, controller: any) {
38+
super()
39+
3840
this.resource = resource
3941
this.controller = controller
4042

src/router/Router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
* file that was distributed with this source code.
88
*/
99

10-
import { Is } from '@athenna/common'
1110
import { Route } from '#src/router/Route'
1211
import { Server } from '#src/facades/Server'
12+
import { Is, Macroable } from '@athenna/common'
1313
import { RouteGroup } from '#src/router/RouteGroup'
1414
import { RouteResource } from '#src/router/RouteResource'
1515
import type { RouteJson, RequestHandler, RouteHandler } from '#src/types'
1616
import type { HTTPMethods, FastifyInstance, RouteOptions } from 'fastify'
1717
import { UndefinedMethodException } from '#src/exceptions/UndefinedMethodException'
1818

19-
export class Router {
19+
export class Router extends Macroable {
2020
/**
2121
* All routes registered.
2222
*/

src/server/ServerImpl.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ import type {
2929
SwaggerDocument
3030
} from '#src/types'
3131

32-
import { Options } from '@athenna/common'
33-
import type { FastifyVite } from '@athenna/vite'
3432
import type { AddressInfo } from 'node:net'
33+
import type { FastifyVite } from '@athenna/vite'
34+
import { Options, Macroable } from '@athenna/common'
3535
import { FastifyHandler } from '#src/handlers/FastifyHandler'
3636

37-
export class ServerImpl {
37+
export class ServerImpl extends Macroable {
3838
/**
3939
* Holds the fastify server instance.
4040
*/
@@ -46,6 +46,8 @@ export class ServerImpl {
4646
public isListening: boolean
4747

4848
public constructor(options?: FastifyServerOptions) {
49+
super()
50+
4951
this.fastify = fastify.fastify({ ...options, exposeHeadRoutes: false })
5052
this.isListening = false
5153

0 commit comments

Comments
 (0)