Skip to content

Commit 6dbb31f

Browse files
authored
Merge branch 'main' into sebsto/fix_481
2 parents 09cbb80 + 7322a36 commit 6dbb31f

File tree

7 files changed

+70
-56
lines changed

7 files changed

+70
-56
lines changed

.github/workflows/scripts/check-archive-plugin.sh

+7
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ unzip -l "${ZIP_FILE}" | grep --silent bootstrap
4040

4141
# if EXAMPLE is ResourcesPackaging, check if the ZIP file contains hello.txt
4242
if [ "$EXAMPLE" == "ResourcesPackaging" ]; then
43+
echo "Checking if resource was added to the ZIP file"
4344
unzip -l "${ZIP_FILE}" | grep --silent hello.txt
45+
SUCCESS=$?
46+
if [ "$SUCCESS" -eq 1 ]; then
47+
log "❌ Resource not found." && exit 1
48+
else
49+
log "✅ Resource found."
50+
fi
4451
fi
4552

4653
echo "✅ The archive plugin is OK with example ${EXAMPLE}"

Examples/CDK/infra/package-lock.json

+49-43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/CDK/infra/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
},
1212
"devDependencies": {
1313
"@types/jest": "^29.5.14",
14-
"@types/node": "22.7.9",
15-
"aws-cdk": "2.173.1",
14+
"@types/node": "22.13.10",
15+
"aws-cdk": "2.1003.0",
1616
"ts-node": "^10.9.2",
17-
"typescript": "~5.6.3"
17+
"typescript": "~5.8.2"
1818
},
1919
"dependencies": {
20-
"aws-cdk-lib": "^2.173.1",
20+
"aws-cdk-lib": "^2.183.0",
2121
"constructs": "^10.4.2"
2222
}
2323
}

Plugins/AWSLambdaPackager/Plugin.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ struct AWSLambdaPackager: CommandPlugin {
250250
let relocatedResourcesDirectory = workingDirectory.appending(path: resourcesDirectoryName)
251251
if FileManager.default.fileExists(atPath: artifactURL.path()) {
252252
do {
253+
arguments.append(resourcesDirectoryName)
253254
try FileManager.default.copyItem(
254255
atPath: artifactURL.path(),
255256
toPath: relocatedResourcesDirectory.path()
256257
)
257-
arguments.append(resourcesDirectoryName)
258258
} catch let error as CocoaError {
259259

260260
// On Linux, when the build has been done with Docker,

Sources/AWSLambdaRuntime/Lambda+Codable.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ public struct LambdaCodableAdapter<
116116
}
117117

118118
/// A ``StreamingLambdaHandler/handle(_:responseWriter:context:)`` wrapper.
119-
/// - Parameters:
120-
/// - event: The received event.
121-
/// - outputWriter: The writer to write the computed response to.
119+
/// - Parameters:
120+
/// - request: The received event.
121+
/// - responseWriter: The writer to write the computed response to.
122122
/// - context: The ``LambdaContext`` containing the invocation's metadata.
123123
@inlinable
124124
public mutating func handle<Writer: LambdaResponseStreamWriter>(

Sources/AWSLambdaRuntime/LambdaHandlers.swift

+6-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public protocol LambdaResponseStreamWriter {
6767
public protocol LambdaHandler {
6868
/// Generic input type.
6969
/// The body of the request sent to Lambda will be decoded into this type for the handler to consume.
70-
associatedtype Event: Decodable
70+
associatedtype Event
7171
/// Generic output type.
7272
/// This is the return type of the ``LambdaHandler/handle(_:context:)`` function.
7373
associatedtype Output
@@ -89,7 +89,7 @@ public protocol LambdaHandler {
8989
public protocol LambdaWithBackgroundProcessingHandler {
9090
/// Generic input type.
9191
/// The body of the request sent to Lambda will be decoded into this type for the handler to consume.
92-
associatedtype Event: Decodable
92+
associatedtype Event
9393
/// Generic output type.
9494
/// This is the type that the `handle` function will send through the ``LambdaResponseWriter``.
9595
associatedtype Output
@@ -183,9 +183,10 @@ extension LambdaRuntime {
183183
}
184184

185185
/// Initialize an instance with a ``LambdaHandler`` defined in the form of a closure **with a non-`Void` return type**, an encoder, and a decoder.
186-
/// - Parameter body: The handler in the form of a closure.
187-
/// - Parameter encoder: The encoder object that will be used to encode the generic `Output` into a `ByteBuffer`.
188-
/// - Parameter decoder: The decoder object that will be used to decode the incoming `ByteBuffer` event into the generic `Event` type.
186+
/// - Parameters:
187+
/// - encoder: The encoder object that will be used to encode the generic `Output` into a `ByteBuffer`.
188+
/// - decoder: The decoder object that will be used to decode the incoming `ByteBuffer` event into the generic `Event` type.
189+
/// - body: The handler in the form of a closure.
189190
public convenience init<
190191
Event: Decodable,
191192
Output: Encodable,

0 commit comments

Comments
 (0)