packages feed

sparrow 0.0.1.3 → 0.0.1.4

raw patch · 2 files changed

+11/−11 lines, 2 filesdep ~urlpathdep ~wai-middleware-content-type

Dependency ranges changed: urlpath, wai-middleware-content-type

Files

sparrow.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: d249c65e47a387870dde17936cb70776bf5b3daf937fdbaa535c9b1867e3cda2+-- hash: bea32df81697724f58b7207f35f014d440a6c6add4f2801cd29fc9eb3a852eea  name:           sparrow-version:        0.0.1.3+version:        0.0.1.4 synopsis:       Unified streaming dependency management for web apps description:    Please see the README on Github at <https://git.localcooking.com/tooling/sparrow#readme> category:       Web@@ -68,10 +68,10 @@     , tmapmvar >=0.0.4     , transformers     , unordered-containers-    , urlpath >=8.0.1+    , urlpath >=9.0.0     , uuid     , wai >=0.12.4-    , wai-middleware-content-type >=0.6.1.1+    , wai-middleware-content-type >=0.6.1.2     , wai-transformers >=0.1.0     , websockets >=0.12.4.0     , websockets-simple >=0.1.2.1
src/Web/Dependencies/Sparrow/Client.hs view
@@ -46,8 +46,8 @@ import Control.Concurrent.STM.TMapMVar (newTMapMVar) import Control.DeepSeq (NFData (rnf)) import Control.Exception (evaluate)-import Path (Abs, File, toFilePath, parseRelFile, (</>), parent, dirname, absdir)-import Path.Extended (Location, fromPath, (<&>))+import Path (toFilePath, parseRelFile, (</>), parent, dirname, absdir)+import Path.Extended (Location, fromAbsFile, (<&>), printLocation) import System.IO.Unsafe (unsafePerformIO) import Network.WebSockets (runClient) import Network.WebSockets.Trans (runClientAppT)@@ -151,7 +151,7 @@       httpURI :: Topic -> URI       httpURI (Topic topic) =         packLocation (Strict.Just (if tls then "https" else "http")) True auth $-          fromPath $ path </> unsafePerformIO (parseRelFile $ T.unpack $ T.intercalate "/" topic)+          fromAbsFile $ path </> unsafePerformIO (parseRelFile $ T.unpack $ T.intercalate "/" topic)    sessionID <- SessionID <$> nextRandom   let q = T.pack $ toFilePath $ dirname path@@ -159,12 +159,12 @@    let runWS :: WebSocketsApp m (WSOutgoing (WithTopic Value)) (WSIncoming (WithTopic Value)) -> IO ()       runWS x = do-        let loc :: Location Abs File-            loc = fromPath (parent path </> file)+        let loc :: Location+            loc = fromAbsFile (parent path </> file)                     <&> ("sessionID", Just (show sessionID)) -            f | tls = runSecureClient (T.unpack $ printURIAuthHost host) (Strict.maybe 80 fromIntegral port) (show loc)-              | otherwise = runClient (T.unpack $ printURIAuthHost host) (Strict.maybe 80 fromIntegral port) (show loc)+            f | tls = runSecureClient (T.unpack $ printURIAuthHost host) (Strict.maybe 80 fromIntegral port) $ T.unpack $ printLocation loc+              | otherwise = runClient (T.unpack $ printURIAuthHost host) (Strict.maybe 80 fromIntegral port) $ T.unpack $ printLocation loc          x' <- runM (pingPong ((10^6) * 10) x) -- every 10 seconds         x'' <- runM (runClientAppT (toClientAppT x'))