packages feed

servant-static-th 0.2.3.0 → 0.2.4.0

raw patch · 4 files changed

+20/−1 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Servant.Static.TH.Internal.Mime: data WASM
+ Servant.Static.TH.Internal.Mime: instance Servant.API.ContentTypes.Accept Servant.Static.TH.Internal.Mime.WASM
+ Servant.Static.TH.Internal.Mime: instance Servant.API.ContentTypes.MimeRender Servant.Static.TH.Internal.Mime.WASM Data.ByteString.Internal.ByteString

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## v0.2.4.0++-   Add a mime type for .wasm files+    [#17](https://github.com/cdepillabout/servant-static-th/pull/17).+    Thanks again [@spencertipping](https://github.com/spencertipping)!+ ## v0.2.3.0  -   Add a mime type for .map files
README.md view
@@ -2,6 +2,7 @@ Servant.Static.TH ================== +[![Build Status](https://github.com/cdepillabout/servant-static-th/workflows/CI/badge.svg)](https://github.com/cdepillabout/servant-static-th/actions) [![Build Status](https://secure.travis-ci.org/cdepillabout/servant-static-th.svg)](http://travis-ci.org/cdepillabout/servant-static-th) [![Hackage](https://img.shields.io/hackage/v/servant-static-th.svg)](https://hackage.haskell.org/package/servant-static-th) [![Stackage LTS](http://stackage.org/package/servant-static-th/badge/lts)](http://stackage.org/lts/package/servant-static-th)
servant-static-th.cabal view
@@ -1,5 +1,5 @@ name:                servant-static-th-version:             0.2.3.0+version:             0.2.4.0 synopsis:            Embed a directory of static files in your Servant server description:         Please see <https://github.com/cdepillabout/servant-static-th#readme README.md>. homepage:            https://github.com/cdepillabout/servant-static-th
src/Servant/Static/TH/Internal/Mime.hs view
@@ -106,6 +106,7 @@   , ("svg",  MimeTypeInfo [t|SVG|]  [t|ByteString|] byteStringToExp)   , ("ttf",  MimeTypeInfo [t|TTF|]  [t|ByteString|] byteStringToExp)   , ("txt",  MimeTypeInfo [t|TXT|]  [t|ByteString|] byteStringToExp)+  , ("wasm", MimeTypeInfo [t|WASM|] [t|ByteString|] byteStringToExp)   , ("woff", MimeTypeInfo [t|WOFF|] [t|ByteString|] byteStringToExp)   , ("woff2",MimeTypeInfo [t|WOFF2|][t|ByteString|] byteStringToExp)   , ("xml",  MimeTypeInfo [t|XML|]  [t|ByteString|] byteStringToExp)@@ -338,3 +339,14 @@   mimeRender _ = LByteString.fromStrict  +-- | WASM file (WebAssembly bytecode)+data WASM deriving Typeable++-- | @application\/wasm@+instance Accept WASM where+  contentType :: Proxy WASM -> MediaType+  contentType _ = "application" // "wasm"++instance MimeRender WASM ByteString where+  mimeRender :: Proxy WASM -> ByteString -> LByteString.ByteString+  mimeRender _ = LByteString.fromStrict