diff --git a/.license_header_template b/.license_header_template new file mode 100644 index 0000000..bc776db --- /dev/null +++ b/.license_header_template @@ -0,0 +1,14 @@ +@@===----------------------------------------------------------------------===@@ +@@ +@@ This source file is part of the SwiftAWSLambdaRuntime open source project +@@ +@@ Copyright SwiftAWSLambdaRuntime project authors +@@ Copyright (c)Amazon.com, Inc. or its affiliates. +@@ 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 +@@ +@@===----------------------------------------------------------------------===@@ diff --git a/.licenseignore b/.licenseignore index c535d3f..e1dfeb8 100644 --- a/.licenseignore +++ b/.licenseignore @@ -30,3 +30,4 @@ Package.resolved **/ResourcePackaging/hello.txt .mailmap .swiftformat +**/*.json diff --git a/.mailmap b/.mailmap index 91b1833..589f243 100644 --- a/.mailmap +++ b/.mailmap @@ -2,4 +2,5 @@ Tomer Doron Tomer Doron Tomer Doron Fabian Fett -Fabian Fett \ No newline at end of file +Fabian Fett +Natan Rolnik \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 0776b8a..5b627cf 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,4 @@ -# Code of Conduct - -The code of conduct for this project can be found at https://swift.org/code-of-conduct. +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 484b464..86f4d82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,68 +1,59 @@ -## Legal +# Contributing Guidelines -By submitting a pull request, you represent that you have the right to license -your contribution to Apple and the community, and agree by submitting the patch -that your contributions are licensed under the Apache 2.0 license (see -`LICENSE.txt`). +Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional +documentation, we greatly value feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests to ensure we have all the necessary +information to effectively respond to your bug report or contribution. -## How to submit a bug report +## Reporting Bugs/Feature Requests -Please ensure to specify the following: +We welcome you to use the GitHub issue tracker to report bugs or suggest features. -* SwiftAWSLambdaRuntime commit hash -* Contextual information (e.g. what you were trying to achieve with SwiftAWSLambdaRuntime) -* Simplest possible steps to reproduce - * More complex the steps are, lower the priority will be. - * A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description. -* Anything that might be relevant in your opinion, such as: - * Swift version or the output of `swift --version` - * OS version and the output of `uname -a` - * Network configuration +When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already +reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: + +* A reproducible test case or series of steps +* The version of our code being used +* Any modifications you've made relevant to the bug +* Anything unusual about your environment or deployment -### Example +## Contributing via Pull Requests +Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: -``` -SwiftAWSLambdaRuntime commit hash: 22ec043dc9d24bb011b47ece4f9ee97ee5be2757 +1. You are working against the latest source on the *main* branch. +2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. +3. You open an issue to discuss any significant work - we would hate for your time to be wasted. -Context: -While load testing my Lambda written with SwiftAWSLambdaRuntime, I noticed -that one file descriptor is leaked per request. +To send us a pull request, please: -Steps to reproduce: -1. ... -2. ... -3. ... -4. ... +1. Fork the repository. +2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. +3. Ensure local tests pass. +4. Commit to your fork using clear commit messages. +5. Send us a pull request, answering any default questions in the pull request interface. +6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. -$ swift --version -Swift version 4.0.2 (swift-4.0.2-RELEASE) -Target: x86_64-unknown-linux-gnu +GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). -Operating system: Ubuntu Linux 16.04 64-bit -$ uname -a -Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux +## Finding contributions to work on +Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. -My system has IPv6 disabled. -``` -## Writing a Patch +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. -A good SwiftAWSLambdaRuntime patch is: -1. Concise, and contains as few changes as needed to achieve the end result. -2. Tested, ensuring that any tests provided failed before the patch and pass after it. -3. Documented, adding API documentation as needed to cover new functions and properties. -4. Accompanied by a great commit message, using our commit message template. +## Security issue notifications +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. -### Commit Message Template -We require that your commit messages match our template. The easiest way to do that is to get git to help you by explicitly using the template. To do that, `cd` to the root of our repository and run: +## Licensing - git config commit.template dev/git.commit.template - -## How to contribute your work - -Please open a pull request at https://github.com/awslabs/swift-aws-lambda-events. Make sure the CI passes, and then wait for code review. +See the [LICENSE](LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f538259..23fa199 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -7,11 +7,14 @@ needs to be listed here. ## COPYRIGHT HOLDERS +- Amazon.com, Inc. (all contributors with '@amazon.com') - Apple Inc. (all contributors with '@apple.com') ### Contributors - Adam Fowler +- Adolfo +- Alessio Buratti <9006089+Buratti@users.noreply.github.com> - Andrea Scuderi - Brendan Kirchner - Bryan Bartow @@ -23,18 +26,34 @@ needs to be listed here. - Eneko Alonso - Fabian Fett - Filipp Fediakov +- Franz Busch - George Barnett +- Idelfonso Gutierrez +- Joannis Orlandos - Johannes Bosecker - Johannes Weiss - Josh <29730338+mr-j-tree@users.noreply.github.com> - ML <44809298+mufumade@users.noreply.github.com> +- Mahdi Bahrami - Matt Massicotte <85322+mattmassicotte@users.noreply.github.com> - Max Desiatov +- Mike Lewis +- Natan Rolnik - Norman Maurer - Ralph Küpper +- Renato Guimarães +- Richard Kendall Wolf - Ro-M +- Simon Leeb <52261246+sliemeobn@users.noreply.github.com> +- Stefan Nienhuis +- Sébastien Stormacq +- Taylor +- Tobias - Tomer Doron +- Ugo Cottin +- Yim Lee - Zhibin Cai +- jsonfry - pmarrufo - pokryfka <5090827+pokryfka@users.noreply.github.com> - pokryfka diff --git a/NOTICE.txt b/NOTICE.txt index d8bb67a..022b286 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,35 +1,12 @@ +swift-aws-lambda-runtime +Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. - The SwiftAWSLambdaRuntime Project - ================================= +--- -Please visit the SwiftAWSLambdaRuntime web site for more information: - - * https://github.com/awslabs/swift-aws-lambda-runtime - -Copyright 2017-2025 The SwiftAWSLambdaRuntime Project - -The SwiftAWSLambdaRuntime Project licenses this file to you under the Apache License, -version 2.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at: - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. - -Also, please refer to each LICENSE.txt file, which is located in -the 'license' directory of the distribution file, for the license terms of the -components that this product depends on. - -------------------------------------------------------------------------------- - - -This product contains a derivation various scripts from SwiftNIO. +This product contains a derivation various code and scripts from SwiftNIO. * LICENSE (Apache License 2.0): * https://www.apache.org/licenses/LICENSE-2.0 * HOMEPAGE: * https://github.com/apple/swift-nio + diff --git a/SECURITY.md b/SECURITY.md index 1430c66..cecb5bf 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,43 +1,7 @@ -# Security +# SECURITY.md -This document specifies the security process for the Swift AWS Lambda Runtime project. +## Reporting a Vulnerability -## Disclosures - -### Private Disclosure Process - -The Swift AWS Lambda Runtime maintainers ask that known and suspected vulnerabilities be -privately and responsibly disclosed by emailing -[sswg-security-reports@forums.swift.org](mailto:sswg-security-reports@forums.swift.org) -with the all the required detail. -**Do not file a public issue.** - -#### When to report a vulnerability - -* You think you have discovered a potential security vulnerability in Swift AWS Lambda Runtime. -* You are unsure how a vulnerability affects Swift AWS Lambda Runtime. - -#### What happens next? - -* A member of the team will acknowledge receipt of the report within 3 - working days (United States). This may include a request for additional - information about reproducing the vulnerability. -* We will privately inform the Swift Server Work Group ([SSWG][sswg]) of the - vulnerability within 10 days of the report as per their [security - guidelines][sswg-security]. -* Once we have identified a fix we may ask you to validate it. We aim to do this - within 30 days. In some cases this may not be possible, for example when the - vulnerability exists at the protocol level and the industry must coordinate on - the disclosure process. -* If a CVE number is required, one will be requested from [MITRE][mitre] - providing you with full credit for the discovery. -* We will decide on a planned release date and let you know when it is. -* Prior to release, we will inform major dependents that a security-related - patch is impending. -* Once the fix has been released we will publish a security advisory on GitHub - and in the Server → Security Updates category on the [Swift forums][swift-forums-sec]. - -[sswg]: https://github.com/swift-server/sswg -[sswg-security]: https://github.com/swift-server/sswg/blob/main/security/README.md -[swift-forums-sec]: https://forums.swift.org/c/server/security-updates/ -[mitre]: https://cveform.mitre.org/ +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via +our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email +to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. \ No newline at end of file diff --git a/Sources/AWSLambdaEvents/ALB.swift b/Sources/AWSLambdaEvents/ALB.swift index 3fcdd9f..9bb3c3c 100644 --- a/Sources/AWSLambdaEvents/ALB.swift +++ b/Sources/AWSLambdaEvents/ALB.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/APIGateway+Encodable.swift b/Sources/AWSLambdaEvents/APIGateway+Encodable.swift index b9d7893..fa1ea23 100644 --- a/Sources/AWSLambdaEvents/APIGateway+Encodable.swift +++ b/Sources/AWSLambdaEvents/APIGateway+Encodable.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/APIGateway+V2.swift b/Sources/AWSLambdaEvents/APIGateway+V2.swift index 00f9e8c..e2dc560 100644 --- a/Sources/AWSLambdaEvents/APIGateway+V2.swift +++ b/Sources/AWSLambdaEvents/APIGateway+V2.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/APIGateway+WebSockets.swift b/Sources/AWSLambdaEvents/APIGateway+WebSockets.swift index 339478e..3064a68 100644 --- a/Sources/AWSLambdaEvents/APIGateway+WebSockets.swift +++ b/Sources/AWSLambdaEvents/APIGateway+WebSockets.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) YEARS Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/APIGateway.swift b/Sources/AWSLambdaEvents/APIGateway.swift index 2ca51c3..9e9d5a4 100644 --- a/Sources/AWSLambdaEvents/APIGateway.swift +++ b/Sources/AWSLambdaEvents/APIGateway.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/APIGatewayLambdaAuthorizers.swift b/Sources/AWSLambdaEvents/APIGatewayLambdaAuthorizers.swift index bb2c4af..2cb6964 100644 --- a/Sources/AWSLambdaEvents/APIGatewayLambdaAuthorizers.swift +++ b/Sources/AWSLambdaEvents/APIGatewayLambdaAuthorizers.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/AWSRegion.swift b/Sources/AWSLambdaEvents/AWSRegion.swift index 3f622cf..a828c38 100644 --- a/Sources/AWSLambdaEvents/AWSRegion.swift +++ b/Sources/AWSLambdaEvents/AWSRegion.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/AppSync.swift b/Sources/AWSLambdaEvents/AppSync.swift index b228071..49fe423 100644 --- a/Sources/AWSLambdaEvents/AppSync.swift +++ b/Sources/AWSLambdaEvents/AppSync.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/BedrockAgent.swift b/Sources/AWSLambdaEvents/BedrockAgent.swift index 68e9559..bed7c88 100644 --- a/Sources/AWSLambdaEvents/BedrockAgent.swift +++ b/Sources/AWSLambdaEvents/BedrockAgent.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/CloudFormation.swift b/Sources/AWSLambdaEvents/CloudFormation.swift index 35c02e9..175d69f 100644 --- a/Sources/AWSLambdaEvents/CloudFormation.swift +++ b/Sources/AWSLambdaEvents/CloudFormation.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Cloudwatch.swift b/Sources/AWSLambdaEvents/Cloudwatch.swift index c9b509f..c2487fb 100644 --- a/Sources/AWSLambdaEvents/Cloudwatch.swift +++ b/Sources/AWSLambdaEvents/Cloudwatch.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Codable Helpers/DecodableRequest.swift b/Sources/AWSLambdaEvents/Codable Helpers/DecodableRequest.swift index f5a253a..b7d9fb6 100644 --- a/Sources/AWSLambdaEvents/Codable Helpers/DecodableRequest.swift +++ b/Sources/AWSLambdaEvents/Codable Helpers/DecodableRequest.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Codable Helpers/EncodableResponse.swift b/Sources/AWSLambdaEvents/Codable Helpers/EncodableResponse.swift index d2f400f..01648e1 100644 --- a/Sources/AWSLambdaEvents/Codable Helpers/EncodableResponse.swift +++ b/Sources/AWSLambdaEvents/Codable Helpers/EncodableResponse.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Codable Helpers/SQS+Decode.swift b/Sources/AWSLambdaEvents/Codable Helpers/SQS+Decode.swift index 55bb2c5..03abe67 100644 --- a/Sources/AWSLambdaEvents/Codable Helpers/SQS+Decode.swift +++ b/Sources/AWSLambdaEvents/Codable Helpers/SQS+Decode.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Cognito.swift b/Sources/AWSLambdaEvents/Cognito.swift index 3637fec..093c559 100644 --- a/Sources/AWSLambdaEvents/Cognito.swift +++ b/Sources/AWSLambdaEvents/Cognito.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/DynamoDB.swift b/Sources/AWSLambdaEvents/DynamoDB.swift index ab5fca9..2e6907f 100644 --- a/Sources/AWSLambdaEvents/DynamoDB.swift +++ b/Sources/AWSLambdaEvents/DynamoDB.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/FunctionURL.swift b/Sources/AWSLambdaEvents/FunctionURL.swift index 44d6709..b5daa92 100644 --- a/Sources/AWSLambdaEvents/FunctionURL.swift +++ b/Sources/AWSLambdaEvents/FunctionURL.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/LambdaGatewayProxyEvent.swift b/Sources/AWSLambdaEvents/LambdaGatewayProxyEvent.swift index 5cc98d5..5504c1c 100644 --- a/Sources/AWSLambdaEvents/LambdaGatewayProxyEvent.swift +++ b/Sources/AWSLambdaEvents/LambdaGatewayProxyEvent.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/S3.swift b/Sources/AWSLambdaEvents/S3.swift index 3bee167..5a60f02 100644 --- a/Sources/AWSLambdaEvents/S3.swift +++ b/Sources/AWSLambdaEvents/S3.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/SES.swift b/Sources/AWSLambdaEvents/SES.swift index caff43a..789e30b 100644 --- a/Sources/AWSLambdaEvents/SES.swift +++ b/Sources/AWSLambdaEvents/SES.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/SNS.swift b/Sources/AWSLambdaEvents/SNS.swift index a3deb0b..be4696e 100644 --- a/Sources/AWSLambdaEvents/SNS.swift +++ b/Sources/AWSLambdaEvents/SNS.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/SQS.swift b/Sources/AWSLambdaEvents/SQS.swift index 5a6f3b7..2cdaffc 100644 --- a/Sources/AWSLambdaEvents/SQS.swift +++ b/Sources/AWSLambdaEvents/SQS.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Utils/Base64.swift b/Sources/AWSLambdaEvents/Utils/Base64.swift index 5d18dc7..e5ed3cb 100644 --- a/Sources/AWSLambdaEvents/Utils/Base64.swift +++ b/Sources/AWSLambdaEvents/Utils/Base64.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Utils/DateWrappers.swift b/Sources/AWSLambdaEvents/Utils/DateWrappers.swift index 605db18..4f11cdb 100644 --- a/Sources/AWSLambdaEvents/Utils/DateWrappers.swift +++ b/Sources/AWSLambdaEvents/Utils/DateWrappers.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Utils/HTTP.swift b/Sources/AWSLambdaEvents/Utils/HTTP.swift index 9040e75..857968a 100644 --- a/Sources/AWSLambdaEvents/Utils/HTTP.swift +++ b/Sources/AWSLambdaEvents/Utils/HTTP.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Sources/AWSLambdaEvents/Utils/RFC5322DateParseStrategy.swift b/Sources/AWSLambdaEvents/Utils/RFC5322DateParseStrategy.swift index d140258..3a23550 100644 --- a/Sources/AWSLambdaEvents/Utils/RFC5322DateParseStrategy.swift +++ b/Sources/AWSLambdaEvents/Utils/RFC5322DateParseStrategy.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/ALBTests.swift b/Tests/AWSLambdaEventsTests/ALBTests.swift index fa148cf..1b9a801 100644 --- a/Tests/AWSLambdaEventsTests/ALBTests.swift +++ b/Tests/AWSLambdaEventsTests/ALBTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/APIGateway+EncodableTests.swift b/Tests/AWSLambdaEventsTests/APIGateway+EncodableTests.swift index 0f014e5..6985d37 100644 --- a/Tests/AWSLambdaEventsTests/APIGateway+EncodableTests.swift +++ b/Tests/AWSLambdaEventsTests/APIGateway+EncodableTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/APIGateway+V2IAMTests.swift b/Tests/AWSLambdaEventsTests/APIGateway+V2IAMTests.swift index 232cf1f..52eadaa 100644 --- a/Tests/AWSLambdaEventsTests/APIGateway+V2IAMTests.swift +++ b/Tests/AWSLambdaEventsTests/APIGateway+V2IAMTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/APIGateway+V2Tests.swift b/Tests/AWSLambdaEventsTests/APIGateway+V2Tests.swift index 1fb2037..070b67b 100644 --- a/Tests/AWSLambdaEventsTests/APIGateway+V2Tests.swift +++ b/Tests/AWSLambdaEventsTests/APIGateway+V2Tests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/APIGateway+WebsocketsTests.swift b/Tests/AWSLambdaEventsTests/APIGateway+WebsocketsTests.swift index c9da46f..4dfbe40 100644 --- a/Tests/AWSLambdaEventsTests/APIGateway+WebsocketsTests.swift +++ b/Tests/AWSLambdaEventsTests/APIGateway+WebsocketsTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) YEARS Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/APIGatewayLambdaAuthorizerTest.swift b/Tests/AWSLambdaEventsTests/APIGatewayLambdaAuthorizerTest.swift index e6884a9..7fd0086 100644 --- a/Tests/AWSLambdaEventsTests/APIGatewayLambdaAuthorizerTest.swift +++ b/Tests/AWSLambdaEventsTests/APIGatewayLambdaAuthorizerTest.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/APIGatewayTests.swift b/Tests/AWSLambdaEventsTests/APIGatewayTests.swift index 546d6d7..5b56931 100644 --- a/Tests/AWSLambdaEventsTests/APIGatewayTests.swift +++ b/Tests/AWSLambdaEventsTests/APIGatewayTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/AppSyncTests.swift b/Tests/AWSLambdaEventsTests/AppSyncTests.swift index e4dcf9a..a832c2b 100644 --- a/Tests/AWSLambdaEventsTests/AppSyncTests.swift +++ b/Tests/AWSLambdaEventsTests/AppSyncTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/BedrockAgentTests.swift b/Tests/AWSLambdaEventsTests/BedrockAgentTests.swift index 6692401..54dea2f 100644 --- a/Tests/AWSLambdaEventsTests/BedrockAgentTests.swift +++ b/Tests/AWSLambdaEventsTests/BedrockAgentTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/CloudFormationTests.swift b/Tests/AWSLambdaEventsTests/CloudFormationTests.swift index f9b2589..0afd1b1 100644 --- a/Tests/AWSLambdaEventsTests/CloudFormationTests.swift +++ b/Tests/AWSLambdaEventsTests/CloudFormationTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/CloudwatchTests.swift b/Tests/AWSLambdaEventsTests/CloudwatchTests.swift index ca4b0e9..70dc7f0 100644 --- a/Tests/AWSLambdaEventsTests/CloudwatchTests.swift +++ b/Tests/AWSLambdaEventsTests/CloudwatchTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/CodableHelpersTests.swift b/Tests/AWSLambdaEventsTests/CodableHelpersTests.swift index f226b70..f217df2 100644 --- a/Tests/AWSLambdaEventsTests/CodableHelpersTests.swift +++ b/Tests/AWSLambdaEventsTests/CodableHelpersTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/CognitoTests.swift b/Tests/AWSLambdaEventsTests/CognitoTests.swift index c20eb7d..ac363c5 100644 --- a/Tests/AWSLambdaEventsTests/CognitoTests.swift +++ b/Tests/AWSLambdaEventsTests/CognitoTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/DynamoDBTests.swift b/Tests/AWSLambdaEventsTests/DynamoDBTests.swift index d5e34a2..e3b1948 100644 --- a/Tests/AWSLambdaEventsTests/DynamoDBTests.swift +++ b/Tests/AWSLambdaEventsTests/DynamoDBTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/FunctionURLTests.swift b/Tests/AWSLambdaEventsTests/FunctionURLTests.swift index 8e9ee26..fb7e0ee 100644 --- a/Tests/AWSLambdaEventsTests/FunctionURLTests.swift +++ b/Tests/AWSLambdaEventsTests/FunctionURLTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/LambdaGatewayProxyEventTests.swift b/Tests/AWSLambdaEventsTests/LambdaGatewayProxyEventTests.swift index 025464b..c1282f9 100644 --- a/Tests/AWSLambdaEventsTests/LambdaGatewayProxyEventTests.swift +++ b/Tests/AWSLambdaEventsTests/LambdaGatewayProxyEventTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/S3Tests.swift b/Tests/AWSLambdaEventsTests/S3Tests.swift index 64b5de2..1686892 100644 --- a/Tests/AWSLambdaEventsTests/S3Tests.swift +++ b/Tests/AWSLambdaEventsTests/S3Tests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/SESTests.swift b/Tests/AWSLambdaEventsTests/SESTests.swift index 697fae6..5d2c935 100644 --- a/Tests/AWSLambdaEventsTests/SESTests.swift +++ b/Tests/AWSLambdaEventsTests/SESTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/SNSTests.swift b/Tests/AWSLambdaEventsTests/SNSTests.swift index 70afded..373f35c 100644 --- a/Tests/AWSLambdaEventsTests/SNSTests.swift +++ b/Tests/AWSLambdaEventsTests/SNSTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/SQSTests.swift b/Tests/AWSLambdaEventsTests/SQSTests.swift index b0bf3ae..850cae1 100644 --- a/Tests/AWSLambdaEventsTests/SQSTests.swift +++ b/Tests/AWSLambdaEventsTests/SQSTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/Utils/Base64Tests.swift b/Tests/AWSLambdaEventsTests/Utils/Base64Tests.swift index e191f4f..2a91b83 100644 --- a/Tests/AWSLambdaEventsTests/Utils/Base64Tests.swift +++ b/Tests/AWSLambdaEventsTests/Utils/Base64Tests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/Utils/DateWrapperTests.swift b/Tests/AWSLambdaEventsTests/Utils/DateWrapperTests.swift index 53943e5..3955582 100644 --- a/Tests/AWSLambdaEventsTests/Utils/DateWrapperTests.swift +++ b/Tests/AWSLambdaEventsTests/Utils/DateWrapperTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/Utils/HTTPHeadersTests.swift b/Tests/AWSLambdaEventsTests/Utils/HTTPHeadersTests.swift index 36adc9f..464a75f 100644 --- a/Tests/AWSLambdaEventsTests/Utils/HTTPHeadersTests.swift +++ b/Tests/AWSLambdaEventsTests/Utils/HTTPHeadersTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/Utils/IteratorTests.swift b/Tests/AWSLambdaEventsTests/Utils/IteratorTests.swift index 78a15d6..a1e7759 100644 --- a/Tests/AWSLambdaEventsTests/Utils/IteratorTests.swift +++ b/Tests/AWSLambdaEventsTests/Utils/IteratorTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/Tests/AWSLambdaEventsTests/Utils/RFC5322DateParseStrategyTests.swift b/Tests/AWSLambdaEventsTests/Utils/RFC5322DateParseStrategyTests.swift index c1b0b43..477125b 100644 --- a/Tests/AWSLambdaEventsTests/Utils/RFC5322DateParseStrategyTests.swift +++ b/Tests/AWSLambdaEventsTests/Utils/RFC5322DateParseStrategyTests.swift @@ -2,7 +2,8 @@ // // This source file is part of the SwiftAWSLambdaRuntime open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftAWSLambdaRuntime project authors +// Copyright SwiftAWSLambdaRuntime project authors +// Copyright (c)Amazon.com, Inc. or its affiliates. // Licensed under Apache License v2.0 // // See LICENSE.txt for license information diff --git a/scripts/format.sh b/scripts/check_format.sh similarity index 95% rename from scripts/format.sh rename to scripts/check_format.sh index 5dc533e..d4cd362 100755 --- a/scripts/format.sh +++ b/scripts/check_format.sh @@ -3,7 +3,8 @@ ## ## This source file is part of the SwiftAWSLambdaRuntime open source project ## -## Copyright (c) 2025 Apple Inc. and the SwiftAWSLambdaRuntime project authors +## Copyright SwiftAWSLambdaRuntime project authors +## Copyright (c)Amazon.com, Inc. or its affiliates. ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information diff --git a/scripts/check_license.sh b/scripts/check_license.sh new file mode 100755 index 0000000..a36d8c2 --- /dev/null +++ b/scripts/check_license.sh @@ -0,0 +1,113 @@ +#!/bin/bash +##===----------------------------------------------------------------------===## +## +## This source file is part of the SwiftAWSLambdaRuntime open source project +## +## Copyright SwiftAWSLambdaRuntime project authors +## Copyright (c)Amazon.com, Inc. or its affiliates. +## 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 Swift.org open source project +# +# Copyright (c) 2024 Apple Inc. and the Swift project authors +# Licensed under Apache License v2.0 with Runtime Library Exception +# +# See https://swift.org/LICENSE.txt for license information +# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +# +# ===----------------------------------------------------------------------===// + +set -euo pipefail + +set +x + +log() { printf -- "** %s\n" "$*" >&2; } +error() { printf -- "** ERROR: %s\n" "$*" >&2; } +fatal() { error "$@"; exit 1; } + +test -n "${PROJECT_NAME:-}" || fatal "PROJECT_NAME unset" + +if [ -f .license_header_template ]; then + log "Using custom license header template" + # allow projects to override the license header template + expected_file_header_template=$(cat .license_header_template) +else + expected_file_header_template="@@===----------------------------------------------------------------------===@@ +@@ +@@ This source file is part of the ${PROJECT_NAME} open source project +@@ +@@ Copyright ${PROJECT_NAME} project authors +@@ Copyright (c)YEARS Amazon.com, Inc. or its affiliates. +@@ +@@ See LICENSE.txt for license information +@@ See CONTRIBUTORS.txt for the list of ${PROJECT_NAME} project authors +@@ +@@ SPDX-License-Identifier: Apache-2.0 +@@ +@@===----------------------------------------------------------------------===@@" +fi + +paths_with_missing_license=( ) + +# file_excludes=".license_header_template +# .licenseignore" +# if [ -f .licenseignore ]; then +# file_excludes=$(printf '%s\n%s' "$file_excludes" "$(cat .licenseignore)") +# fi +# file_paths=$(echo "$file_excludes" | tr '\n' '\0' | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files) +file_paths=$(tr '\n' '\0' < .licenseignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files ":(exclude).licenseignore" ":(exclude).license_header_template" ) +echo "${file_paths}" + +while IFS= read -r file_path; do + file_basename=$(basename -- "${file_path}") + file_extension="${file_basename##*.}" + + # shellcheck disable=SC2001 # We prefer to use sed here instead of bash search/replace + case "${file_extension}" in + swift) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + h) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + c) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + sh) expected_file_header=$(cat <(echo '#!/bin/bash') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;; + kts) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + gradle) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + groovy) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + java) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + py) expected_file_header=$(cat <(echo '#!/usr/bin/env python3') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;; + rb) expected_file_header=$(cat <(echo '#!/usr/bin/env ruby') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;; + in) expected_file_header=$(sed -e 's|@@|##|g' <<<"${expected_file_header_template}") ;; + cmake) expected_file_header=$(sed -e 's|@@|##|g' <<<"${expected_file_header_template}") ;; + *) + error "Unsupported file extension ${file_extension} for file (exclude or update this script): ${file_path}" + paths_with_missing_license+=("${file_path} ") + ;; + esac + expected_file_header_linecount=$(wc -l <<<"${expected_file_header}") + + file_header=$(head -n "${expected_file_header_linecount}" "${file_path}") + normalized_file_header=$( + echo "${file_header}" \ + | sed -e 's/20[12][0123456789]-20[12][0123456789]/YEARS/' -e 's/20[12][0123456789]/YEARS/' \ + ) + + if ! diff -u \ + --label "Expected header" <(echo "${expected_file_header}") \ + --label "${file_path}" <(echo "${normalized_file_header}") + then + paths_with_missing_license+=("${file_path} ") + fi +done <<< "$file_paths" + +if [ "${#paths_with_missing_license[@]}" -gt 0 ]; then + fatal "❌ Found missing license header in files: ${paths_with_missing_license[*]}." +fi + +log "✅ Found no files with missing license header." diff --git a/scripts/generate_contributors_list.sh b/scripts/generate_contributors_list.sh index d745e21..f06966c 100755 --- a/scripts/generate_contributors_list.sh +++ b/scripts/generate_contributors_list.sh @@ -3,7 +3,8 @@ ## ## This source file is part of the SwiftAWSLambdaRuntime open source project ## -## Copyright (c) 2017-2018 Apple Inc. and the SwiftAWSLambdaRuntime project authors +## Copyright SwiftAWSLambdaRuntime project authors +## Copyright (c)Amazon.com, Inc. or its affiliates. ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information @@ -12,7 +13,6 @@ ## SPDX-License-Identifier: Apache-2.0 ## ##===----------------------------------------------------------------------===## - set -eu here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" contributors=$( cd "$here"/.. && git shortlog -es | cut -f2 | sed 's/^/- /' ) @@ -27,6 +27,7 @@ cat > "$here/../CONTRIBUTORS.txt" <<- EOF ## COPYRIGHT HOLDERS + - Amazon.com, Inc. (all contributors with '@amazon.com') - Apple Inc. (all contributors with '@apple.com') ### Contributors diff --git a/scripts/preview_docc.sh b/scripts/preview_docc.sh index 834a87e..9ab1386 100755 --- a/scripts/preview_docc.sh +++ b/scripts/preview_docc.sh @@ -3,7 +3,8 @@ ## ## This source file is part of the SwiftAWSLambdaRuntime open source project ## -## Copyright (c) 2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors +## Copyright SwiftAWSLambdaRuntime project authors +## Copyright (c)Amazon.com, Inc. or its affiliates. ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information