Skip to content

Commit

Permalink
Changes after merge of HummingbirdFoundation (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jan 21, 2024
1 parent e261e5a commit 05cc7ea
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ let package = Package(
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-events"),
.product(name: "ExtrasBase64", package: "swift-extras-base64"),
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "HummingbirdFoundation", package: "hummingbird"),
]),
.executableTarget(name: "HBLambdaTest", dependencies: [
.byName(name: "HummingbirdLambda"),
.product(name: "HummingbirdFoundation", package: "hummingbird"),
]),
.testTarget(name: "HummingbirdLambdaTests", dependencies: [
.byName(name: "HummingbirdLambda"),
Expand Down
7 changes: 1 addition & 6 deletions Sources/HBLambdaTest/maths.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import AWSLambdaEvents
import AWSLambdaRuntime
import Hummingbird
import HummingbirdFoundation
import HummingbirdLambda
import Logging

Expand All @@ -35,11 +34,7 @@ struct DebugMiddleware: HBMiddlewareProtocol {
}

@main
struct MathsHandler: HBLambda {
typealias Event = APIGatewayRequest
typealias Output = APIGatewayResponse
typealias Context = HBBasicLambdaRequestContext<Event>

struct MathsHandler: HBAPIGatewayLambda {
struct Operands: Decodable {
let lhs: Double
let rhs: Double
Expand Down
3 changes: 0 additions & 3 deletions Sources/HummingbirdLambda/HBBasicLambdaRequestContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import AWSLambdaRuntimeCore
import Foundation
import Hummingbird
import HummingbirdFoundation
import Logging
import NIOCore

Expand All @@ -27,8 +26,6 @@ public struct HBBasicLambdaRequestContext<Event: Sendable>: HBLambdaRequestConte
public let event: Event

public var coreContext: HBCoreRequestContext
public var requestDecoder: JSONDecoder { .init() }
public var responseEncoder: JSONEncoder { .init() }

/// Initialize Lambda request context
public init(_ event: Event, lambdaContext: LambdaContext) {
Expand Down
1 change: 0 additions & 1 deletion Sources/HummingbirdLambda/Lambda.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import AWSLambdaEvents
import AWSLambdaRuntimeCore
import Hummingbird
import HummingbirdFoundation
import Logging
import NIOCore
import NIOPosix
Expand Down

0 comments on commit 05cc7ea

Please sign in to comment.