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", diff --git a/Sources/AWSLambdaRuntime/Lambda+Codable.swift b/Sources/AWSLambdaRuntime/Lambda+Codable.swift index 9193deff..5dffbdfe 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, 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..092b2368 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 +// +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors // -// Created by Fabian Fett on 06.09.24. +// SPDX-License-Identifier: Apache-2.0 // +//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===// // @@ -19,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`.