Skip to content

Commit b747e5d

Browse files
committed
Swift format
1 parent 156c7e7 commit b747e5d

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

Examples/APIGateway/Package.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
dependencies: [
2121
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
2222
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", branch: "main"),
23-
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", branch: "main")
23+
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", branch: "main"),
2424
],
2525
targets: [
2626
.executableTarget(
@@ -41,15 +41,19 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
4141
{
4242
// when we use the local runtime as deps, let's remove the dependency added above
4343
let indexToRemove = package.dependencies.firstIndex { dependency in
44-
if case .sourceControl(name: _, location: "https://github.com/swift-server/swift-aws-lambda-runtime.git", requirement: _) = dependency.kind {
44+
if case .sourceControl(
45+
name: _,
46+
location: "https://github.com/swift-server/swift-aws-lambda-runtime.git",
47+
requirement: _
48+
) = dependency.kind {
4549
return true
4650
}
4751
return false
4852
}
4953
if let indexToRemove {
5054
package.dependencies.remove(at: indexToRemove)
5155
}
52-
56+
5357
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
5458
print("[INFO] Compiling against swift-aws-lambda-runtime located at \(localDepsPath)")
5559
package.dependencies += [

Examples/HelloWorld/Package.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
],
2020
dependencies: [
2121
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
22-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", branch: "main"),
22+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", branch: "main")
2323
],
2424
targets: [
2525
.executableTarget(
@@ -39,15 +39,19 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
3939
{
4040
// when we use the local runtime as deps, let's remove the dependency added above
4141
let indexToRemove = package.dependencies.firstIndex { dependency in
42-
if case .sourceControl(name: _, location: "https://github.com/swift-server/swift-aws-lambda-runtime.git", requirement: _) = dependency.kind {
42+
if case .sourceControl(
43+
name: _,
44+
location: "https://github.com/swift-server/swift-aws-lambda-runtime.git",
45+
requirement: _
46+
) = dependency.kind {
4347
return true
4448
}
4549
return false
4650
}
4751
if let indexToRemove {
4852
package.dependencies.remove(at: indexToRemove)
4953
}
50-
54+
5155
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
5256
print("[INFO] Compiling against swift-aws-lambda-runtime located at \(localDepsPath)")
5357
package.dependencies += [

Examples/S3_AWSSDK/Package.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,22 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
4242
{
4343
// when we use the local runtime as deps, let's remove the dependency added above
4444
let indexToRemove = package.dependencies.firstIndex { dependency in
45-
if case .sourceControl(name: _, location: "https://github.com/swift-server/swift-aws-lambda-runtime.git", requirement: _) = dependency.kind {
45+
if case .sourceControl(
46+
name: _,
47+
location: "https://github.com/swift-server/swift-aws-lambda-runtime.git",
48+
requirement: _
49+
) = dependency.kind {
4650
return true
4751
}
4852
return false
4953
}
5054
if let indexToRemove {
5155
package.dependencies.remove(at: indexToRemove)
5256
}
53-
57+
5458
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
5559
print("[INFO] Compiling against swift-aws-lambda-runtime located at \(localDepsPath)")
5660
package.dependencies += [
5761
.package(name: "swift-aws-lambda-runtime", path: localDepsPath)
5862
]
59-
}
63+
}

Examples/S3_Soto/Package.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,19 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
4343
{
4444
// when we use the local runtime as deps, let's remove the dependency added above
4545
let indexToRemove = package.dependencies.firstIndex { dependency in
46-
if case .sourceControl(name: _, location: "https://github.com/swift-server/swift-aws-lambda-runtime.git", requirement: _) = dependency.kind {
46+
if case .sourceControl(
47+
name: _,
48+
location: "https://github.com/swift-server/swift-aws-lambda-runtime.git",
49+
requirement: _
50+
) = dependency.kind {
4751
return true
4852
}
4953
return false
5054
}
5155
if let indexToRemove {
5256
package.dependencies.remove(at: indexToRemove)
5357
}
54-
58+
5559
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
5660
print("[INFO] Compiling against swift-aws-lambda-runtime located at \(localDepsPath)")
5761
package.dependencies += [

0 commit comments

Comments
 (0)