Closed fcobia closed 3 years ago
Merging #11 into main will decrease coverage by
0.00%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## main #11 +/- ##
========================================
- Coverage 0.02% 0.02% -0.01%
========================================
Files 509 531 +22
Lines 36361 39630 +3269
========================================
Hits 8 8
- Misses 36353 39622 +3269
Impacted Files | Coverage Δ | |
---|---|---|
Sources/VaporAWSLambdaRuntime/APIGateway.swift | 0.00% <ø> (ø) |
|
Sources/VaporAWSLambdaRuntime/APIGatewayV2.swift | 0.00% <0.00%> (ø) |
|
Sources/VaporAWSLambdaRuntime/LambdaServer.swift | 0.00% <ø> (ø) |
|
.build/checkouts/swift-nio/Sources/NIO/Heap.swift | 0.00% <0.00%> (ø) |
|
...build/checkouts/swift-nio/Sources/NIO/Socket.swift | 0.00% <0.00%> (ø) |
|
...build/checkouts/swift-nio/Sources/NIO/System.swift | 0.00% <0.00%> (ø) |
|
...uild/checkouts/swift-nio/Sources/NIO/Channel.swift | 0.00% <0.00%> (ø) |
|
...ild/checkouts/swift-nio/Sources/NIO/PipePair.swift | 0.00% <0.00%> (ø) |
|
...ld/checkouts/swift-nio/Sources/NIO/Bootstrap.swift | 0.00% <0.00%> (ø) |
|
...ld/checkouts/swift-nio/Sources/NIO/EventLoop.swift | 0.00% <0.00%> (ø) |
|
... and 89 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7a35ef5...62acd6d. Read the comment docs.
@fcobia Oh my god! I'm so sorry for not having reviewed this yet. I thought I had but apparently, I didn't. So Sorry.
I am new to Swift NIO and Vapor, so I am just trying to find my way through it. I took your changes and I re-ran my website in AWS and it works.
@fcobia awesome. Do you want to run swiftformat .
? If that's done, this is ready to merge. Thanks so much! This looks great!
Done
This PR would replace my previous PR. While running a Leaf based app, I noticed that the CSS and JavaScript files were not being served up properly. They were returning status code 200, but contained 0 bytes. I discovered that the FileMiddleware is using streaming for the files, but the conversion from Vapor Response to Lambda response did not handle this case.
I have fixed this, but I had to change the API a little because the fix requires the use of promises and event loops.
I spent a little time looking into doing some tests, but that requires creating a Lambda.Context object and all the APIs I could find for doing are marked internal and are therefore inaccessible. If you have any pointers into how I might do that, I would be happy to look into creating some test requests.