Skip to content

Commit

Permalink
Merge pull request #2 from swift-serverless/support-alpha.2
Browse files Browse the repository at this point in the history
Support alpha.2
  • Loading branch information
Andrea-Scuderi authored Aug 25, 2024
2 parents 5064df0 + 3285754 commit 7ba793f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/swift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
image:
- swift:5.7.3-amazonlinux2
- swift:5.10.1
container:
image: ${{ matrix.image }}
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
Expand All @@ -29,10 +29,10 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup
run: |
yum -y update && yum -y install git make curl
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && apt-get -q install -y make curl wget
- name: Test
run: |
make test
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.1"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.2"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "0.1.0"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.11.2"),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import struct AWSLambdaEvents.APIGatewayV2Response
import struct AWSLambdaEvents.HTTPResponseStatus
import HTTPTypes
import class Foundation.JSONEncoder

public extension APIGatewayV2Response {
Expand All @@ -31,7 +31,7 @@ public extension APIGatewayV2Response {
/// - Parameters:
/// - error: Error
/// - statusCode: HTTP Status Code
init(with error: Error, statusCode: AWSLambdaEvents.HTTPResponseStatus) {
init(with error: Error, statusCode: HTTPResponse.Status) {
let bodyError = BodyError(error: String(describing: error))
self.init(with: bodyError, statusCode: statusCode)
}
Expand All @@ -40,7 +40,7 @@ public extension APIGatewayV2Response {
/// - Parameters:
/// - object: Encodable Object
/// - statusCode: HTTP Status Code
init<Output: Encodable>(with object: Output, statusCode: AWSLambdaEvents.HTTPResponseStatus) {
init<Output: Encodable>(with object: Output, statusCode: HTTPResponse.Status) {
var body = "{}"
if let data = try? Self.encoder.encode(object) {
body = String(data: data, encoding: .utf8) ?? body
Expand Down

0 comments on commit 7ba793f

Please sign in to comment.