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 +6/−0
- README.md +1/−0
- servant-static-th.cabal +1/−1
- src/Servant/Static/TH/Internal/Mime.hs +12/−0
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 ================== +[](https://github.com/cdepillabout/servant-static-th/actions) [](http://travis-ci.org/cdepillabout/servant-static-th) [](https://hackage.haskell.org/package/servant-static-th) [](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