File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11name : aws-lambda-haskell-runtime
2- version : 1.1.0
2+ version : 1.1.1
33github : " theam/aws-lambda-haskell-runtime"
44license : Apache-2.0
55author : Nikita Tchayka
@@ -79,4 +79,3 @@ ghc-options:
7979 - -Wpartial-fields
8080 - -fhide-source-paths
8181 - -freverse-errors
82- - -O2
Original file line number Diff line number Diff line change 11{-| Discovery of AWS Lambda handlers
22A handler is basically a function that has a type definition that
3- starts with "handler :: " .
3+ starts with "handler " and two colons .
44 -}
55module Aws.Lambda.Meta.Discover
66 ( handlers
@@ -15,6 +15,13 @@ import qualified Data.Text as Text
1515import Path
1616import qualified Path.IO as PathIO
1717
18+ -- | Paths to ignore during compilation
19+ ignoredPaths :: [Text ]
20+ ignoredPaths =
21+ [ " node_modules"
22+ , " .stack-work"
23+ ]
24+
1825{-| Returns a list of handler paths that look like
1926
2027@src/Foo/Bar/Quux.handler@
@@ -35,6 +42,11 @@ modulesWithHandler files =
3542 where
3643 isHaskellModule file =
3744 fileExtension file == " .hs"
45+ && isNotIgnoredPath file
46+
47+ isNotIgnoredPath file =
48+ filter ((Text. pack $ toFilePath file) `Text.isInfixOf` ) ignoredPaths
49+ & null
3850
3951handlerNames :: [Path Rel File ] -> [Text ]
4052handlerNames modules =
You can’t perform that action at this time.
0 commit comments