Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 5a8b61f

Browse files
Merge pull request #1 from swift-sprinter/feature/swift-5.1
Update to support swift 5.1
2 parents 3d71ee8 + b46e6a4 commit 5a8b61f

9 files changed

+27
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# aws-lambda-swift-sprinter-core
22

3-
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0--alpha.1-red) ![](https://img.shields.io/badge/coverage-~99%25-brightgreeen)
3+
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1](https://img.shields.io/badge/Swift-5.1-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0--alpha.2-red) ![](https://img.shields.io/badge/coverage-~99%25-brightgreeen)
44

55
**LambdaSwiftSprinter** is a Swift framework allowing the development of AWS Lambdas based on the [AWS Lambda Custom Runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html) for Swift.
66

@@ -32,7 +32,7 @@ import PackageDescription
3232
let package = Package(
3333
name: "HelloWorld",
3434
dependencies: [
35-
.package(url: "https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core", from: "1.0.0-alpha.1")
35+
.package(url: "https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core", from: "1.0.0-alpha.2")
3636
],
3737
targets: [
3838
.target(

Sources/LambdaSwiftSprinter/LambdaAPI.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
#if canImport(FoundationNetworking)
17+
import FoundationNetworking
18+
#endif
1619

1720
public protocol LambdaAPI: AnyObject {
1821
init(awsLambdaRuntimeAPI: String) throws

Sources/LambdaSwiftSprinter/LambdaApiCURL.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
#if canImport(FoundationNetworking)
17+
import FoundationNetworking
18+
#endif
1619

1720
public class LambdaApiCURL: LambdaAPI {
1821
let urlSession: URLSession

Sources/LambdaSwiftSprinter/LambdaHandler.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
#if canImport(FoundationNetworking)
17+
import FoundationNetworking
18+
#endif
1619

1720
public typealias LambdaResult = Result<Data, Error>
1821
public typealias DictionaryResult = Result<[String: Any], Error>

Sources/LambdaSwiftSprinter/LambdaRuntimeAPIUrlBuilder.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
import Foundation
15+
#if canImport(FoundationNetworking)
16+
import FoundationNetworking
17+
#endif
1518

1619
public struct LambdaRuntimeAPIUrlBuilder {
1720
let awsLambdaRuntimeAPI: String

Tests/LambdaSwiftSprinterTests/LambdaAPIMock.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
#if canImport(FoundationNetworking)
17+
import FoundationNetworking
18+
#endif
1619
@testable import LambdaSwiftSprinter
1720

1821
class LambdaAPIMock: LambdaAPI {

Tests/LambdaSwiftSprinterTests/LambdaApiCURLTests.swift

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

1515
@testable import LambdaSwiftSprinter
16+
import Foundation
17+
#if canImport(FoundationNetworking)
18+
import FoundationNetworking
19+
#endif
1620
import XCTest
1721

1822
enum ErrorMock: Error {

Tests/LambdaSwiftSprinterTests/LambdaRuntimeAPIUrlBuilderTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
#if canImport(FoundationNetworking)
17+
import FoundationNetworking
18+
#endif
1619
import XCTest
1720

1821
@testable import LambdaSwiftSprinter

Tests/LambdaSwiftSprinterTests/URLProtocolMock.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
#if canImport(FoundationNetworking)
17+
import FoundationNetworking
18+
#endif
1619

1720
// References:
1821
// --: https://www.hackingwithswift.com/articles/153/how-to-test-ios-networking-code-the-easy-way

0 commit comments

Comments
 (0)