Commit Graph
243 Commits
Author SHA1 Message Date
Sébastien Stormacq db17a62e38 Restructure Examples folder (#387)
* Restructure Examples folder

* add README

* remove v1 examples

* swift format
2024-10-08 11:07:47 +02:00
Jack RosenandSébastien Stormacq 426e658414 Add Support For Copying All Resources Into Final Executable (#386)
* Add Support For Copying All Resources Into Final Executable

* Run formatter

---------

Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com>
2024-10-08 10:43:17 +02:00
Sébastien Stormacq 8131a83bf2 apply swift-format (#380)
* apply swift-format

* use swift-format script from swift-nio project
2024-09-30 22:28:27 +02:00
Fabian Fett 06936fefa4 Name executable bootstrap, don't create symlink (#383) 2024-09-30 17:27:21 +02:00
Sébastien Stormacq 62274444b5 add help option on archiver plugin (#368) 2024-09-30 14:31:46 +02:00
Sébastien Stormacq 0af509b243 Fix deprecation warning for Plugin's Path (#363) 2024-09-06 14:54:42 +02:00
Fabian Fett 0dcb143557 Use Swift Testing for InvocationTests (#362) 2024-09-06 12:38:54 +02:00
Fabian Fett 757815bc6b Use Swift Testing in LambdaRequestIDTests (#360) 2024-09-06 12:30:50 +02:00
aryan-25 dd77e81ad3 Depend on NIOCore and NIOPosix instead of NIO (#359) 2024-09-06 11:53:27 +02:00
aryan-25 435033e6a4 Make v2 API functions and types public (#358) 2024-09-05 18:44:01 +02:00
aryan-25 2abd9b5d33 Remove "New" prefix from v2 additions (#357) 2024-09-05 16:00:19 +02:00
aryan-25 85b938e99e Add new LambdaRuntime (#353) 2024-09-05 15:36:30 +02:00
Fabian Fett 06763b8859 Drop docc plugin (#354) 2024-09-04 18:41:46 +02:00
Fabian Fett ddb703946c Remove old API (#355) 2024-09-04 18:28:53 +02:00
Fabian Fett 7a8c0f22c0 New async runtime client (#348) 2024-09-04 15:57:58 +02:00
Fabian Fett dd059f19ac Add new withMockServer test resource method (#352) 2024-09-04 15:20:58 +02:00
aryan-25 4b45451dc1 Add new handler protocols + Codable support (#351) 2024-09-04 13:46:00 +02:00
aryan-25andFabian Fett b2da91df46 Add runLoop function (#347)
Co-authored-by: Fabian Fett <fabianfett@apple.com>
2024-09-02 13:53:45 +02:00
Fabian Fett 223c3bab89 Don't use hardcoded port for MockServer (#350) 2024-08-30 19:35:05 +02:00
Fabian Fett e147eccd46 Add swift-testing dependency (#349) 2024-08-30 15:51:12 +02:00
aryan-25andFabian Fett d1a6fbc132 Set container image argument to "swiftlang/swift:nightly-6.0-jammy" for API breakage and documentation checks. (#346)
Co-authored-by: Fabian Fett <fabianfett@apple.com>
2024-08-30 14:47:51 +02:00
aryan-25 4121b35ff9 Update LambdaContext (#345) 2024-08-29 11:03:10 +02:00
aryan-25 0f68ed5c0c Introduce LambdaRuntimeClientProtocol (#344) 2024-08-28 14:53:02 +02:00
aryan-25 f32987422c Require Swift 6 (#341)
* Require Swift 6
* Apply formatter
* Disable 5.8, 5.9, and 5.10 checks
* Remove -warnings-as-errors for now
* Ensure plugin compiles in Swift 6 language mode
2024-08-28 11:10:15 +02:00
ab8166a39d [CI] Add GHA CI and release flow (#340)
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com>
Co-authored-by: Mahdi Bahrami <github@mahdibm.com>
2024-08-26 16:36:07 +02:00
Andrea Scuderi 5ecc24fa54 Add Breeze to projects.md (#343)
authored-by: Andrea Scuderi <andrea.scuderi@ymail.com>
1.0.0-alpha.3
2024-08-26 13:00:07 +02:00
Sébastien Stormacq 8676c8933a apply swiftformat (#342)
* apply swiftformat

* update dep on Swift Docc to v1.3.0

* force usage of swift docc plugin 1.3.0
2024-08-26 12:25:41 +02:00
Alessio BurattiandSébastien Stormacq 79fa2c2bee [Draft] Detached tasks (#334)
* First prototype

* Fix build

* Removes task cancellation

https://github.com/swift-server/swift-aws-lambda-runtime/pull/334#discussion_r1666713889

* Force user to handle errors

https://github.com/swift-server/swift-aws-lambda-runtime/pull/334#discussion_r1666712903

* Remove EventLoop API

https://github.com/swift-server/swift-aws-lambda-runtime/pull/334#discussion_r1666712244

* Make DetachedTaskContainer internal

https://github.com/swift-server/swift-aws-lambda-runtime/pull/334#discussion_r1666710596
https://github.com/swift-server/swift-aws-lambda-runtime/pull/334#discussion_r1666706576

* Removes @unchecked Sendable

https://github.com/swift-server/swift-aws-lambda-runtime/pull/334#discussion_r1666707646

* Invoke awaitAll() from async context

* Fix ambiguous expression type for swift 5.7

* Fix visibility of detachedBackgroundTask

* Add swift-doc

* Add example usage to readme

* Add tests

---------

Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com>
2024-08-23 18:50:22 +02:00
Sven A. SchmidtandSébastien Stormacq ed72bdda8d Update projects.md (#337)
Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com>
2024-08-07 10:39:53 +02:00
Tim Condon a5c144fc76 Update projects.md to add Penny (#338) 2024-08-07 10:38:21 +02:00
Adolfo d6e6819b36 Examples list documents (#336)
First version of projects.md file
2024-08-07 08:32:59 +02:00
Sébastien Stormacq f42dda3fca Update soundness.sh to support 2024 and 2025 (#335) 2024-08-05 18:01:17 +02:00
Camden FullmerandSébastien Stormacq 35e0919ed2 Add support for resources when packaging using the SwiftPM plugin (#333)
* Add support for resources when packaging using the SwiftPM plugin.

* Copy the resources directory to the working directory instead of recreating the directroy structure.

* Add resource packaging example.

* Use the bundle's url function to locate the file url.

* Fix year for soundness check.

---------

Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com>
2024-08-05 17:51:21 +02:00
Sébastien Stormacq 872183bbe9 allow compilation with the static linux sdk (musl) (#331) 2024-06-26 10:09:25 +02:00
Sven A. Schmidt 0d4716d30c Fix compile error on Windows (#328) 2024-06-19 18:29:40 +02:00
Sébastien Stormacq cb09b958ee add LOCAL_LAMBDA_SERVER_INVOCATION_ENDPOINT to the readme (#326) 2024-05-22 15:34:41 +02:00
Sébastien Stormacq 294d06bfd4 Use LAMBDA_USE_LOCAL_DEPS env var in local builds with docker (#325) 2024-05-22 14:55:42 +02:00
jsonfry 17a993e3b1 Local lambda invocation endpoint env var (#321)
add #321
2024-05-22 14:37:53 +02:00
Sébastien StormacqandMahdi Bahrami 221978224c Add tracing of request events + mention LOG_LEVEL in README (#315)
* add tracing of request events + mention LOG_LEVEL in README

* fix typo

Co-authored-by: Mahdi Bahrami <github@mahdibm.com>

* clarify the use of env variable and the swift cli

Co-authored-by: Mahdi Bahrami <github@mahdibm.com>

* clarify language about HTTP server

Co-authored-by: Mahdi Bahrami <github@mahdibm.com>

* formatting

Co-authored-by: Mahdi Bahrami <github@mahdibm.com>

* factor in additional suggestions from @mahdibm

* combine two logger statement into one and print only for Kb of payload

---------

Co-authored-by: Mahdi Bahrami <github@mahdibm.com>
2024-05-15 09:56:35 +02:00
Marwane Koutar e6a59c2cf0 fixed typo in readme (#319)
* fixed typo in readme

* fixed typo in readme (upload -> uploaded)
2024-02-28 09:34:06 -08:00
tomer doron 8d9f44b783 allow custom initialization of the HandlerType of the LambdaRuntime (#310)
Motivation:

Provide the flexibility for custom initialization of the HandlerType as this will often be required by higher level frameworks.

Modifications:
* Modify the LambdaRuntime type to accept a closure to provide the handler rather than requiring that it is provided by a static method on the Handler type
* Update downstream code to use HandlerProvider
* Update upstream code to support passing Handler Type of Handler Provider
* Add and update tests

Originally suggested and coded by @tachyonics in https://github.com/swift-server/swift-aws-lambda-runtime/pull/308
1.0.0-alpha.2
2024-01-18 13:48:10 -08:00
Sébastien Stormacq c4f380e21c Include the docc tutorial into 1.0.0 (#316)
Improved getting started documentation, with DocC
2023-12-18 12:16:44 -08:00
tomer doron 42eaaf4fb1 remove redundant pre-concurrency flag (#314)
motivation: address warnings

changes:
* remove pre-concurrency flag when not longer needed
2023-12-18 11:49:03 -08:00
tachyonics 0fbd8448af Don't log work fetching failure at error. (#313) 2023-12-08 12:49:03 -08:00
Florent Morin 2c3b2451db Add --disable-docker-image-update plugin flag (#311)
motivation: sometimes, you need to use a customized local docker image and `docker pull` don’t have to be called

changes:
* add `--disable-docker-image-update` plugin flag to disable `docker pull` call
2023-12-01 11:27:41 -08:00
tomer doron f3eac3167a add 5.10 ci setup (#309)
motivaiton: test for upcoming 5.10 release

changes: add docker setup for stable 5.9 and nightly 5.10
2023-10-10 14:36:19 -07:00
Sébastien Stormacq c85c875593 [doc] Getting Started documentation and tutorial (#300)
improved getting started documentation, with DocC
2023-09-11 10:43:06 -07:00
Sébastien Stormacq 5d300b2e1b ignore swift files part of docc (#307) 2023-09-11 09:30:19 -07:00
tomer doron e221dd8362 remove swift-backtrace in swift >= 5.9 (#305)
motivation: swift 5.9 ships with builtin backtrace support \o/

changes:
* remove the dependency on swift-backtrace when using swift 5.9 or above
* conditionalize the call to Backtrace.install to relevant versions only
2023-09-07 18:39:11 -07:00
tomer doron e7751d0afb update code of conduct (#303)
motivation: align CoC across the swift project

changes: change CoC to link to the swift.org version
2023-06-06 10:28:39 -07:00