aws-lambda-haskell-runtime 4.1.1 → 4.1.2
raw patch · 4 files changed
+13/−11 lines, 4 filesdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson
API changes (from Hackage documentation)
Files
- README.md +1/−1
- aws-lambda-haskell-runtime.cabal +4/−4
- src/Aws/Lambda/Runtime/ALB/Types.hs +4/−3
- src/Aws/Lambda/Runtime/APIGateway/Types.hs +4/−3
README.md view
@@ -1,7 +1,7 @@ [](https://circleci.com/gh/theam/aws-lambda-haskell-runtime) [](http://makeapullrequest.com) [](https://hackage.haskell.org/package/aws-lambda-haskell-runtime)-[](https://github.com/ellerbrock/open-source-badges/)+[](https://github.com/ellerbrock/open-source-badges/) [](https://github.com/ndmitchell/hlint) [Proceed to site](https://theam.github.io/aws-lambda-haskell-runtime) to know how to use the AWS Lambda Haskell Runtime.
aws-lambda-haskell-runtime.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.1. -- -- see: https://github.com/sol/hpack name: aws-lambda-haskell-runtime-version: 4.1.1+version: 4.1.2 synopsis: Haskell runtime for AWS Lambda description: Please see the README on GitHub at <https://github.com/theam/aws-lambda-haskell-runtime#readme> category: AWS@@ -13,7 +13,7 @@ bug-reports: https://github.com/theam/aws-lambda-haskell-runtime/issues author: Nikita Tchayka maintainer: hackers@theagilemonkeys.com-copyright: 2021 The Agile Monkeys SL+copyright: 2023 The Agile Monkeys SL license: Apache-2.0 license-file: LICENSE build-type: Simple@@ -58,7 +58,7 @@ QuasiQuotes ghc-options: -Wall -optP-Wno-nonportable-include-path -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat -Widentities -Wredundant-constraints -Wmissing-export-lists -Wpartial-fields -fhide-source-paths -freverse-errors build-depends:- aeson+ aeson >2 , base >=4.7 && <5 , bytestring , case-insensitive
src/Aws/Lambda/Runtime/ALB/Types.hs view
@@ -27,6 +27,7 @@ ) import Data.Aeson.Types (Parser) import qualified Data.Aeson.Types as T+import qualified Data.Aeson.Key as K import qualified Data.CaseInsensitive as CI import Data.HashMap.Strict (HashMap) import Data.Text (Text)@@ -59,7 +60,7 @@ parseJSON = parseALBRequest parseObjectFromStringField -- We need this because API Gateway is going to send us the payload as a JSON string-parseObjectFromStringField :: FromJSON a => Object -> Text -> Parser (Maybe a)+parseObjectFromStringField :: FromJSON a => Object -> T.Key -> Parser (Maybe a) parseObjectFromStringField obj fieldName = do fieldContents <- obj .: fieldName case fieldContents of@@ -70,7 +71,7 @@ Null -> pure Nothing other -> T.typeMismatch "String or Null" other -parseALBRequest :: (Object -> Text -> Parser (Maybe body)) -> Value -> Parser (ALBRequest body)+parseALBRequest :: (Object -> T.Key -> Parser (Maybe body)) -> Value -> Parser (ALBRequest body) parseALBRequest bodyParser (Object v) = ALBRequest <$> v .: "path"@@ -167,5 +168,5 @@ headerToPair :: Header -> T.Pair headerToPair (cibyte, bstr) = k .= v where- k = (T.decodeUtf8 . CI.original) cibyte+ k = (K.fromText . T.decodeUtf8 . CI.original) cibyte v = T.decodeUtf8 bstr
src/Aws/Lambda/Runtime/APIGateway/Types.hs view
@@ -29,6 +29,7 @@ (.:?) ) import Data.Aeson.Types (Parser)+import qualified Data.Aeson.Key as K import qualified Data.Aeson.Types as T import qualified Data.CaseInsensitive as CI import Data.HashMap.Strict (HashMap)@@ -70,7 +71,7 @@ parseJSON = parseApiGatewayRequest parseObjectFromStringField -- We need this because API Gateway is going to send us the payload as a JSON string-parseObjectFromStringField :: FromJSON a => Object -> Text -> Parser (Maybe a)+parseObjectFromStringField :: FromJSON a => Object -> T.Key -> Parser (Maybe a) parseObjectFromStringField obj fieldName = do fieldContents <- obj .: fieldName case fieldContents of@@ -81,7 +82,7 @@ Null -> pure Nothing other -> T.typeMismatch "String or Null" other -parseApiGatewayRequest :: (Object -> Text -> Parser (Maybe body)) -> Value -> Parser (ApiGatewayRequest body)+parseApiGatewayRequest :: (Object -> T.Key -> Parser (Maybe body)) -> Value -> Parser (ApiGatewayRequest body) parseApiGatewayRequest bodyParser (Object v) = ApiGatewayRequest <$> v .: "resource"@@ -215,5 +216,5 @@ headerToPair :: Header -> T.Pair headerToPair (cibyte, bstr) = k .= v where- k = (T.decodeUtf8 . CI.original) cibyte+ k = (K.fromText . T.decodeUtf8 . CI.original) cibyte v = T.decodeUtf8 bstr