packages feed

servant-aeson-generics-typescript-0.0.0.2: servant-aeson-generics-typescript.cabal

cabal-version:      3.0
name:               servant-aeson-generics-typescript
version:            0.0.0.2
synopsis:           Generates a TypeScript client for Servant APIs
description:
  This project leveratges aeson-generics-typescript to generate type safe API bindings in TypeScript for a given Servant API.
  Included here are tests that round trip by compling the TypeScript with tsc, running the client in nodejs, and checking that request response round trips with the Servant server.

category:           Web
author:             Platonic.Systems
maintainer:         info@Platonic.Systems
copyright:          2023
license:            BSD-3-Clause
license-file:       LICENSE
build-type:         Simple
extra-source-files: README.md

source-repository head
  type:     git
  location:
    https://gitlab.com/platonic/servant-aeson-generics-typescript.git

common shared
  default-language:   GHC2021
  default-extensions:
    AllowAmbiguousTypes
    ApplicativeDo
    BlockArguments
    CPP
    DataKinds
    DefaultSignatures
    DeriveAnyClass
    DerivingStrategies
    DerivingVia
    DuplicateRecordFields
    ExtendedDefaultRules
    FunctionalDependencies
    GADTs
    ImpredicativeTypes
    LambdaCase
    LinearTypes
    MultiWayIf
    OverloadedLabels
    OverloadedStrings
    PartialTypeSignatures
    PatternSynonyms
    QuantifiedConstraints
    RecordWildCards
    RoleAnnotations
    TypeFamilies
    TypeFamilyDependencies
    UndecidableInstances
    ViewPatterns

library
  import:          shared
  hs-source-dirs:  src
  exposed-modules: Servant.Client.TypeScript
  hs-source-dirs:  src
  ghc-options:
    -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude
    -Wno-missing-local-signatures -Wno-missing-import-lists
    -Wno-missing-export-lists -Wno-missing-safe-haskell-mode
    -Wno-prepositive-qualified-module -Wno-safe -Wno-unsafe

  build-depends:
    , aeson
    , aeson-generics-typescript
    , base
    , containers
    , http-types
    , jose-jwt
    , servant
    , servant-websockets
    , string-interpolate
    , text

executable tests
  import:         shared
  main-is:        Main.hs
  hs-source-dirs: test src
  ghc-options:
    -Wall -Wcompat -fwarn-redundant-constraints
    -fwarn-incomplete-uni-patterns -fwarn-tabs
    -fwarn-incomplete-record-updates -fwarn-identities -threaded
    -fno-warn-missing-home-modules -rtsopts -freduction-depth=1000
    -with-rtsopts=-N +RTS -H2G -A32M -RTS

  build-depends:
    , aeson                      >=2.1.2  && <2.2
    , aeson-generics-typescript  >=0.0.0  && <0.1
    , async                      >=2.2.4  && <2.3
    , base                       >=4.17.2 && <4.18
    , bytestring                 >=0.11.5 && <0.12
    , conduit                    >=1.3.5  && <1.4
    , containers                 >=0.6.7  && <0.7
    , directory                  >=1.3.7  && <1.4
    , filepath                   >=1.4.2  && <1.5
    , hspec                      >=2.11.7 && <2.12
    , hspec-wai                  >=0.11.1 && <0.12
    , http-types                 >=0.12.3 && <0.13
    , jose-jwt                   >=0.9.6  && <0.10
    , process                    >=1.6.17 && <1.7
    , QuickCheck                 >=2.14.3 && <2.15
    , random                     >=1.2.1  && <1.3
    , servant                    >=0.20.1 && <0.21
    , servant-auth               >=0.4.1  && <0.5
    , servant-server             >=0.20   && <0.21
    , servant-websockets         >=2.0.0  && <2.1
    , split                      >=0.2.4  && <0.3
    , string-interpolate         >=0.3.2  && <0.4
    , text                       >=2.0.2  && <2.1
    , time                       >=1.12.2 && <1.13
    , warp                       >=3.3.30 && <3.4
    , webdriver                  >=0.12.0 && <0.13

  other-modules:
    Servant.Client.TypeScript
    Servant.Client.TypeScriptSpec