packages feed

ema 0.8.0.0 → 0.8.2.0

raw patch · 3 files changed

+10/−7 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Ema: type family SiteOutput r :: Type;
- Ema.Route.Class: type family RouteModel r :: Type;
- Ema.Route.Generic: type family OptSubModelsM r opt :: Maybe [Type];
- Ema.Route.Generic.RGeneric: type family RConstructorNames r :: [ConstructorName];
- Ema.Site: type family SiteOutput r :: Type;
+ Ema: type RouteModel r :: Type;
+ Ema.Route.Class: type RouteModel r :: Type;
+ Ema.Route.Generic.RGeneric: type RCode r :: [Type];
+ Ema.Route.Generic.RGeneric: type RConstructorNames r :: [ConstructorName];
+ Ema.Route.Generic.RGeneric: type RDatatypeName r :: DatatypeName;
+ Ema.Route.Generic.SubRoute: type SubRoutes r :: [Type];

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for ema +## 0.8.2.0 (2022-08-28)++- Bug fixes+  - Fix live server redirecting static assets to wrong links [\#138](https://github.com/EmaApps/ema/issues/138)+ ## 0.8.0.0 (2022-08-19)  This releases brings a significant rewrite of Ema. If you choose to upgrade your apps from 0.6, see https://ema.srid.ca/start/upgrade for guidance.
ema.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               ema-version:            0.8.0.0+version:            0.8.2.0 license:            AGPL-3.0-only copyright:          2021 Sridhar Ratnakumar maintainer:         srid@srid.ca
src/Ema/Server.hs view
@@ -111,15 +111,13 @@                       liftIO $ WS.sendTextData conn $ emaErrorHtmlResponse decodeRouteNothingMsg                     Right (Just r) -> do                       renderCatchingErrors s r >>= \case-                        AssetStatic staticPath ->-                          -- HACK: Websocket client should check for REDIRECT prefix.-                          -- Not bothering with JSON to avoid having to JSON parse every HTML dump.-                          liftIO $ WS.sendTextData conn $ "REDIRECT " <> toText staticPath                         AssetGenerated Html html ->                           liftIO $ WS.sendTextData conn $ html <> toLazy wsClientHtml+                        -- HACK: We expect the websocket client should check for REDIRECT prefix.+                        -- Not bothering with JSON response to avoid having to JSON parse every HTML dump.+                        AssetStatic _staticPath ->+                          liftIO $ WS.sendTextData conn $ "REDIRECT " <> toText (review (fromPrism_ $ enc s) r)                         AssetGenerated Other _s ->-                          -- HACK: Websocket client should check for REDIRECT prefix.-                          -- Not bothering with JSON to avoid having to JSON parse every HTML dump.                           liftIO $ WS.sendTextData conn $ "REDIRECT " <> toText (review (fromPrism_ $ enc s) r)                       log LevelDebug $ " ~~> " <> show r                 loop = flip runLoggingT logger $ do