Skip to content

Commit 7930a66

Browse files
committed
chore(event-handler): rename BaseRouter class to Router
1 parent 35a510d commit 7930a66

File tree

3 files changed

+64
-64
lines changed

3 files changed

+64
-64
lines changed

packages/event-handler/src/rest/BaseRouter.ts renamed to packages/event-handler/src/rest/Router.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
isHttpMethod,
4040
} from './utils.js';
4141

42-
abstract class BaseRouter {
42+
class Router {
4343
protected context: Record<string, unknown>;
4444

4545
protected readonly routeRegistry: RouteHandlerRegistry;
@@ -57,7 +57,7 @@ abstract class BaseRouter {
5757
*/
5858
protected readonly isDev: boolean = false;
5959

60-
protected constructor(options?: RouterOptions) {
60+
public constructor(options?: RouterOptions) {
6161
this.context = {};
6262
const alcLogLevel = getStringFromEnv({
6363
key: 'AWS_LAMBDA_LOG_LEVEL',
@@ -515,4 +515,4 @@ abstract class BaseRouter {
515515
}
516516
}
517517

518-
export { BaseRouter };
518+
export { Router };

packages/event-handler/src/types/rest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import type {
33
JSONObject,
44
} from '@aws-lambda-powertools/commons/types';
55
import type { APIGatewayProxyEvent, Context } from 'aws-lambda';
6-
import type { BaseRouter } from '../rest/BaseRouter.js';
76
import type { HttpErrorCodes, HttpVerbs } from '../rest/constants.js';
87
import type { Route } from '../rest/Route.js';
8+
import type { Router } from '../rest/Router.js';
99
import type { ResolveOptions } from './common.js';
1010

1111
type ErrorResponse = {
@@ -34,7 +34,7 @@ interface ErrorConstructor<T extends Error = Error> {
3434
}
3535

3636
/**
37-
* Options for the {@link BaseRouter} class
37+
* Options for the {@link Router} class
3838
*/
3939
type RouterOptions = {
4040
/**

0 commit comments

Comments
 (0)