From 93d0bb39f1ddb8fe86eb2c4bccb46e128c5c0d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Tue, 8 Oct 2024 19:54:26 +0200 Subject: [PATCH 1/5] fix typo --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 5a5798f3..eb78f9f9 100644 --- a/Package.swift +++ b/Package.swift @@ -32,7 +32,7 @@ let package = Package( dependencies: [ .byName(name: "AWSLambdaRuntimeCore"), .product(name: "NIOCore", package: "swift-nio"), - ], + ] ), .target( name: "AWSLambdaRuntimeCore", From 9ff9960056cf2f1546f85eff5510b9c73949c203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Tue, 8 Oct 2024 19:56:21 +0200 Subject: [PATCH 2/5] fix license header --- .../Vendored/ByteBuffer-foundation.swift | 14 ++++++++++++++ .../Vendored/JSON+ByteBuffer.swift | 13 ++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Sources/AWSLambdaRuntime/Vendored/ByteBuffer-foundation.swift b/Sources/AWSLambdaRuntime/Vendored/ByteBuffer-foundation.swift index 6c289275..e0b6cf5e 100644 --- a/Sources/AWSLambdaRuntime/Vendored/ByteBuffer-foundation.swift +++ b/Sources/AWSLambdaRuntime/Vendored/ByteBuffer-foundation.swift @@ -1,3 +1,17 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the SwiftAWSLambdaRuntime open source project +// +// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Licensed under Apache License v2.0 +// +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors +// +// SPDX-License-Identifier: Apache-2.0 +// +//===----------------------------------------------------------------------===// + //===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project diff --git a/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift b/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift index 63f05405..93daf4f8 100644 --- a/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift +++ b/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift @@ -1,9 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the SwiftAWSLambdaRuntime open source project // -// JSON+ByteBuffer.swift -// swift-aws-lambda-runtime +// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Licensed under Apache License v2.0 // -// Created by Fabian Fett on 06.09.24. +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors // +// SPDX-License-Identifier: Apache-2.0 +// +//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===// // From 0ec224f7b6898d91b1b1e1073cdf10eabdd381d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Tue, 8 Oct 2024 19:57:27 +0200 Subject: [PATCH 3/5] swift format --- Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift b/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift index 93daf4f8..092b2368 100644 --- a/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift +++ b/Sources/AWSLambdaRuntime/Vendored/JSON+ByteBuffer.swift @@ -26,12 +26,13 @@ // //===----------------------------------------------------------------------===// +import NIOCore + #if canImport(FoundationEssentials) import FoundationEssentials #else import Foundation #endif -import NIOCore extension ByteBuffer { /// Attempts to decode the `length` bytes from `index` using the `JSONDecoder` `decoder` as `T`. From 6342eeff4a2b70b5855bc37f60573fb02708140e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Tue, 8 Oct 2024 20:07:21 +0200 Subject: [PATCH 4/5] swift format --- Sources/AWSLambdaRuntime/Lambda+Codable.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/AWSLambdaRuntime/Lambda+Codable.swift b/Sources/AWSLambdaRuntime/Lambda+Codable.swift index 9193deff..9c66a74c 100644 --- a/Sources/AWSLambdaRuntime/Lambda+Codable.swift +++ b/Sources/AWSLambdaRuntime/Lambda+Codable.swift @@ -32,7 +32,8 @@ public struct LambdaJSONEventDecoder: LambdaEventDecoder { } @inlinable - public func decode(_ type: Event.Type, from buffer: NIOCore.ByteBuffer) throws -> Event where Event : Decodable { + public func decode(_ type: Event.Type, from buffer: NIOCore.ByteBuffer) throws -> Event + where Event : Decodable { try buffer.getJSONDecodable( Event.self, decoder: self.jsonDecoder, From a0c705371f884ba5e5aae503ce82afa994818101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Tue, 8 Oct 2024 20:25:46 +0200 Subject: [PATCH 5/5] Swift Format --- Sources/AWSLambdaRuntime/Lambda+Codable.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/AWSLambdaRuntime/Lambda+Codable.swift b/Sources/AWSLambdaRuntime/Lambda+Codable.swift index 9c66a74c..5dffbdfe 100644 --- a/Sources/AWSLambdaRuntime/Lambda+Codable.swift +++ b/Sources/AWSLambdaRuntime/Lambda+Codable.swift @@ -33,7 +33,7 @@ public struct LambdaJSONEventDecoder: LambdaEventDecoder { @inlinable public func decode(_ type: Event.Type, from buffer: NIOCore.ByteBuffer) throws -> Event - where Event : Decodable { + where Event: Decodable { try buffer.getJSONDecodable( Event.self, decoder: self.jsonDecoder,