packages feed

datastar-hs-1.1.0.0: datastar-hs.cabal

cabal-version:   3.0
name:            datastar-hs
version:         1.1.0.0
synopsis:        Haskell bindings for Datastar
description:
  Server-side SDK for building real-time hypermedia applications with
  <https://data-star.dev/ Datastar>. Stream HTML fragments, reactive
  signal updates, and scripts to the browser over server-sent events
  (SSE). Built on WAI so it works with Warp, Scotty, Servant, Yesod,
  and any other WAI-compatible framework.
  .
  This core package has no system-library dependencies. @Content-Encoding@
  compressors for SSE streams live in the add-on packages
  <https://hackage.haskell.org/package/datastar-hs-zlib datastar-hs-zlib>
  (gzip, deflate),
  <https://hackage.haskell.org/package/datastar-hs-brotli datastar-hs-brotli>
  (br), and datastar-hs-zstd (zstd, not yet on Hackage).
homepage:        https://github.com/starfederation/datastar-haskell
bug-reports:     https://github.com/starfederation/datastar-haskell/issues
license:         MIT
license-file:    LICENSE
author:          Carlo Hamalainen
maintainer:      carlo@carlo-hamalainen.net
category:        Web, Hypermedia
build-type:      Simple
extra-doc-files: CHANGELOG.md README.md

source-repository head
  type:     git
  location: https://github.com/starfederation/datastar-haskell.git

common warnings
  ghc-options:
    -Wall
    -Wcompat
    -Wunused-packages
    -Wredundant-constraints
    -Wincomplete-uni-patterns
    -Wincomplete-record-updates

library
  import: warnings
  exposed-modules:
    Hypermedia.Datastar
    Hypermedia.Datastar.Attributes
    Hypermedia.Datastar.ExecuteScript
    Hypermedia.Datastar.Logger
    Hypermedia.Datastar.PatchElements
    Hypermedia.Datastar.PatchSignals
    Hypermedia.Datastar.Types
    Hypermedia.Datastar.WAI
  hs-source-dirs:  src
  default-language: Haskell2010
  default-extensions:
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
  build-depends:
    , base       >= 4.14  && < 5
    , aeson      >= 2.0   && < 3
    , bytestring >= 0.10.12 && < 1
    , http-types >= 0.12  && < 1
    , text       >= 1.2   && < 3
    , wai        >= 3.2   && < 4

executable e2e-server
  import: warnings
  hs-source-dirs:   e2e-server
  main-is:          Main.hs
  build-depends:
    , base
    , aeson
    , bytestring
    , datastar-hs
    , http-types
    , lucid2
    , text
    , warp
    , wai
  default-language: Haskell2010
  default-extensions:
    DeriveGeneric
    DeriveAnyClass
    DerivingStrategies
    ImportQualifiedPost
    OverloadedStrings
    ScopedTypeVariables
  ghc-options: -threaded


test-suite datastar-hs-test
  import: warnings
  type:             exitcode-stdio-1.0
  hs-source-dirs:   test
  main-is:          Main.hs
  other-modules:
    Hypermedia.Datastar.ExecuteScriptSpec
    Hypermedia.Datastar.NegotiationSpec
    Hypermedia.Datastar.PatchElementsSpec
    Hypermedia.Datastar.PatchSignalsSpec
    Hypermedia.Datastar.SSESpec
  build-depends:
    , base
    , bytestring
    , datastar-hs
    , hspec
    , text
    , wai
  default-language: Haskell2010
  default-extensions:
    ImportQualifiedPost
    OverloadedStrings