Skip to content

Commit f8b38e1

Browse files
author
Andrea Scuderi
committed
Update aws-lambda-runtime dependency to latest main version
1 parent 4565e3c commit f8b38e1

File tree

5 files changed

+19
-22
lines changed

5 files changed

+19
-22
lines changed

Package.resolved

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

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ let package = Package(
7272
.testTarget(
7373
name: "BreezeLambdaAPITests",
7474
dependencies: [
75-
.product(name: "AWSLambdaTesting", package: "swift-aws-lambda-runtime"),
75+
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
7676
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle"),
7777
.product(name: "ServiceLifecycleTestKit", package: "swift-service-lifecycle"),
7878
"BreezeLambdaAPI"

Sources/BreezeLambdaAPI/BreezeLambdaHandler.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct BreezeLambdaHandler<T: BreezeCodable>: LambdaHandler, Sendable {
4343
}
4444
}
4545

46-
func createLambdaHandler(context: AWSLambdaRuntimeCore.LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
46+
func createLambdaHandler(context: LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
4747
guard let item: T = try? event.bodyObject() else {
4848
let error = BreezeLambdaAPIError.invalidRequest
4949
return APIGatewayV2Response(with: error, statusCode: .forbidden)
@@ -56,7 +56,7 @@ struct BreezeLambdaHandler<T: BreezeCodable>: LambdaHandler, Sendable {
5656
}
5757
}
5858

59-
func readLambdaHandler(context: AWSLambdaRuntimeCore.LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
59+
func readLambdaHandler(context: LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
6060
guard let key = event.pathParameters?[keyName] else {
6161
let error = BreezeLambdaAPIError.invalidRequest
6262
return APIGatewayV2Response(with: error, statusCode: .forbidden)
@@ -69,7 +69,7 @@ struct BreezeLambdaHandler<T: BreezeCodable>: LambdaHandler, Sendable {
6969
}
7070
}
7171

72-
func updateLambdaHandler(context: AWSLambdaRuntimeCore.LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
72+
func updateLambdaHandler(context: LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
7373
guard let item: T = try? event.bodyObject() else {
7474
let error = BreezeLambdaAPIError.invalidRequest
7575
return APIGatewayV2Response(with: error, statusCode: .forbidden)
@@ -88,7 +88,7 @@ struct BreezeLambdaHandler<T: BreezeCodable>: LambdaHandler, Sendable {
8888
var updatedAt: String?
8989
}
9090

91-
func deleteLambdaHandler(context: AWSLambdaRuntimeCore.LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
91+
func deleteLambdaHandler(context: LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
9292
guard let key = event.pathParameters?[keyName],
9393
let createdAt = event.queryStringParameters?["createdAt"],
9494
let updatedAt = event.queryStringParameters?["updatedAt"] else {
@@ -104,7 +104,7 @@ struct BreezeLambdaHandler<T: BreezeCodable>: LambdaHandler, Sendable {
104104
}
105105
}
106106

107-
func listLambdaHandler(context: AWSLambdaRuntimeCore.LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
107+
func listLambdaHandler(context: LambdaContext, event: APIGatewayV2Request) async -> APIGatewayV2Response {
108108
do {
109109
let key = event.queryStringParameters?["exclusiveStartKey"]
110110
let limit: Int? = event.queryStringParameter("limit")

Tests/BreezeLambdaAPITests/BreezeLambdaHandlerTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
// limitations under the License.
1414

1515
import AWSLambdaEvents
16-
import AWSLambdaRuntime
16+
@testable import AWSLambdaRuntime
1717
import ServiceLifecycle
1818
import ServiceLifecycleTestKit
1919
import BreezeDynamoDBService
2020
import BreezeHTTPClientService
2121
@testable import BreezeLambdaAPI
22-
@testable import AWSLambdaRuntimeCore
2322
import Testing
2423
import Logging
2524
import AsyncHTTPClient

Tests/BreezeLambdaAPITests/Lambda.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313
// limitations under the License.
1414

1515
import AWSLambdaEvents
16-
import AWSLambdaRuntime
16+
@testable import AWSLambdaRuntime
1717
import BreezeDynamoDBService
1818
import BreezeHTTPClientService
1919
@testable import BreezeLambdaAPI
20-
@testable import AWSLambdaRuntimeCore
21-
import AWSLambdaTesting
2220
import Logging
2321
import NIO
2422
import ServiceLifecycle
@@ -29,7 +27,7 @@ import Testing
2927
import SotoDynamoDB
3028
import AsyncHTTPClient
3129

32-
extension Lambda {
30+
extension AWSLambdaRuntime.Lambda {
3331

3432
static func test<T: BreezeCodable>(
3533
_ handlerType: BreezeLambdaHandler<T>.Type,

0 commit comments

Comments
 (0)