1212//
1313//===----------------------------------------------------------------------===//
1414
15- import PackagePlugin
1615import Foundation
16+ import PackagePlugin
1717
1818@main
1919@available ( macOS 15 . 0 , * )
@@ -112,7 +112,9 @@ struct AWSLambdaPackager: CommandPlugin {
112112 guard let buildPathOutput = dockerBuildOutputPath. split ( separator: " \n " ) . last else {
113113 throw Errors . failedParsingDockerOutput ( dockerBuildOutputPath)
114114 }
115- let buildOutputPath = URL ( string: buildPathOutput. replacingOccurrences ( of: " /workspace/ " , with: packageDirectory. description) ) !
115+ let buildOutputPath = URL (
116+ string: buildPathOutput. replacingOccurrences ( of: " /workspace/ " , with: packageDirectory. description)
117+ ) !
116118
117119 // build the products
118120 var builtProducts = [ LambdaProduct: URL] ( )
@@ -126,7 +128,7 @@ struct AWSLambdaPackager: CommandPlugin {
126128 // just like Package.swift's examples assume ../.., we assume we are two levels below the root project
127129 let slice = packageDirectory. pathComponents. suffix ( 2 )
128130 let beforeLastComponent = packageDirectory. pathComponents [ slice. startIndex]
129- let lastComponent = packageDirectory. pathComponents [ slice. endIndex- 1 ]
131+ let lastComponent = packageDirectory. pathComponents [ slice. endIndex - 1 ]
130132 try Utils . execute (
131133 executable: dockerToolPath,
132134 arguments: [
@@ -302,7 +304,7 @@ private struct Configuration: CustomStringConvertible {
302304 var isDirectory : Bool = false
303305 #else
304306 var isDirectory : ObjCBool = false
305- #endif
307+ #endif
306308 guard FileManager . default. fileExists ( atPath: outputPath, isDirectory: & isDirectory)
307309 else {
308310 throw Errors . invalidArgument ( " invalid output directory ' \( outputPath) ' " )
@@ -447,7 +449,9 @@ private struct LambdaProduct: Hashable {
447449extension PackageManager . BuildResult {
448450 // find the executable produced by the build
449451 func executableArtifact( for product: Product ) -> PackageManager . BuildResult . BuiltArtifact ? {
450- let executables = self . builtArtifacts. filter { $0. kind == . executable && $0. url. lastPathComponent == product. name }
452+ let executables = self . builtArtifacts. filter {
453+ $0. kind == . executable && $0. url. lastPathComponent == product. name
454+ }
451455 guard !executables. isEmpty else {
452456 return nil
453457 }
0 commit comments