ngx-export-tools-extra 0.5.9.0 → 0.6.0.0
raw patch · 4 files changed
+25/−23 lines, 4 filesdep ~ansi-wl-pprintdep ~edePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ansi-wl-pprint, ede
API changes (from Hackage documentation)
Files
- Changelog.md +4/−0
- NgxExport/Tools/EDE.hs +1/−1
- NgxExport/Tools/Subrequest.hs +15/−15
- ngx-export-tools-extra.cabal +5/−7
Changelog.md view
@@ -1,3 +1,7 @@+### 0.6.0.0++- Build EDE module with *prettyprinter* automatically.+ ### 0.5.9.0 - Allow Unix domain sockets in configurations of internal HTTP subrequests.
NgxExport/Tools/EDE.hs view
@@ -32,7 +32,7 @@ #if EDE_USE_PRETTYPRINTER import Data.Text.Prettyprint.Doc (unAnnotate) #else-import Text.PrettyPrint.ANSI.Leijen.Internal (plain)+import Text.PrettyPrint.ANSI.Leijen (plain) #endif import qualified Data.HashMap.Strict as HM import Data.HashMap.Strict (HashMap)
NgxExport/Tools/Subrequest.hs view
@@ -367,21 +367,6 @@ ngxExportAsyncIOYY 'makeSubrequestWithRead -newtype UDSConf = UDSConf { udsPath :: FilePath } deriving Read--configureUDS :: UDSConf -> Bool -> IO L.ByteString-configureUDS = ignitionService $ \UDSConf {..} -> do- man <- newManager defaultManagerSettings- { managerRawConnection = return $ openUDS udsPath }- writeIORef httpUDSManager $ Just man- return ""- where openUDS path _ _ _ = do- s <- S.socket S.AF_UNIX S.Stream S.defaultProtocol- S.connect s (S.SockAddrUnix path)- makeConnection (S.recv s 4096) (S.sendAll s) (S.close s)--ngxExportSimpleServiceTyped 'configureUDS ''UDSConf SingleShotService- -- $internalHTTPSubrequests -- -- Making HTTP subrequests to the own Nginx service via the loopback interface@@ -442,6 +427,21 @@ -- -- > $ curl 'http://localhost:8010/uds?a=Value' -- > In backend, Custom-Header is 'Value'++newtype UDSConf = UDSConf { udsPath :: FilePath } deriving Read++configureUDS :: UDSConf -> Bool -> IO L.ByteString+configureUDS = ignitionService $ \UDSConf {..} -> do+ man <- newManager defaultManagerSettings+ { managerRawConnection = return $ openUDS udsPath }+ writeIORef httpUDSManager $ Just man+ return ""+ where openUDS path _ _ _ = do+ s <- S.socket S.AF_UNIX S.Stream S.defaultProtocol+ S.connect s (S.SockAddrUnix path)+ makeConnection (S.recv s 4096) (S.sendAll s) (S.close s)++ngxExportSimpleServiceTyped 'configureUDS ''UDSConf SingleShotService -- $gettingFullResponse --
ngx-export-tools-extra.cabal view
@@ -1,5 +1,5 @@ name: ngx-export-tools-extra-version: 0.5.9.0+version: 0.6.0.0 synopsis: More extra tools for Nginx haskell module description: More extra tools for <https://github.com/lyokha/nginx-haskell-module Nginx haskell module>.@@ -22,11 +22,9 @@ flag EDE description: Build EDE module. -flag ExperimentalEDE+flag EDEUsePrettyprinter description: Build EDE module migrated from @ansi-wl-pprint@ to @prettyprinter@.- default: False- manual: True library default-language: Haskell2010@@ -53,14 +51,14 @@ , safe if flag(EDE)- if flag(ExperimentalEDE)- build-depends: ede+ if flag(EDEUsePrettyprinter)+ build-depends: ede >= 0.3.0.0 , prettyprinter , trifecta >= 2.1 cpp-options: -DEDE_USE_PRETTYPRINTER else build-depends: ede- , ansi-wl-pprint+ , ansi-wl-pprint >= 0.6.3 , trifecta <= 2 exposed-modules: NgxExport.Tools.Aggregate