packages feed

rds-data-0.0.0.1: rds-data.cabal

cabal-version: 3.6

name:                   rds-data
version:                0.0.0.1
synopsis:               Codecs for use with AWS rds-data
description:            Codecs for use with AWS rds-data.
category:               Data
stability:              Experimental
homepage:               http://github.com/haskell-works/rds-data#readme
bug-reports:            https://github.com/haskell-works/rds-data/issues
author:                 John Ky
maintainer:             newhoggy@gmail.com
copyright:              2024 John Ky
license:                BSD-3-Clause
license-file:           LICENSE
tested-with:            GHC == 9.6.6
build-type:             Simple
extra-source-files:     README.md

source-repository head
  type:                 git
  location:             https://github.com/haskell-works/rds-data

common base                                     { build-depends: base                                     >= 4.11       && < 5      }

common aeson                                    { build-depends: aeson                                    >= 2.2        && < 2.3    }
common aeson-pretty                             { build-depends: aeson-pretty                             >= 0.8        && < 1.0    }
common amazonka                                 { build-depends: amazonka                                 >= 2.0        && < 3      }
common amazonka-core                            { build-depends: amazonka-core                            >= 2.0        && < 3      }
common amazonka-rds                             { build-depends: amazonka-rds                             >= 2.0        && < 3      }
common amazonka-rds-data                        { build-depends: amazonka-rds-data                        >= 2.0        && < 3      }
common amazonka-secretsmanager                  { build-depends: amazonka-secretsmanager                  >= 2.0        && < 3      }
common base64-bytestring                        { build-depends: base64-bytestring                        >= 1.2.1      && < 2      }
common bytestring                               { build-depends: bytestring                               >= 0.11       && < 0.13   }
common contravariant                            { build-depends: contravariant                            >= 1.5.5      && < 2      }
common doctest                                  { build-depends: doctest                                  >= 0.22.2     && < 0.23   }
common doctest-discover                         { build-depends: doctest-discover                         >= 0.2        && < 0.3    }
common generic-lens                             { build-depends: generic-lens                             >= 2.2.2.0    && < 3      }
common hedgehog                                 { build-depends: hedgehog                                 >= 1.4        && < 2      }
common hedgehog-extras                          { build-depends: hedgehog-extras                          >= 0.6.0.2    && < 0.7    }
common http-client                              { build-depends: http-client                              >= 0.5.14     && < 0.8    }
common hw-polysemy-amazonka                     { build-depends: hw-polysemy:amazonka                     >= 0.2.14.2   && < 0.3    }
common hw-polysemy-core                         { build-depends: hw-polysemy:core                         >= 0.2.14.2   && < 0.3    }
common hw-polysemy-hedgehog                     { build-depends: hw-polysemy:hedgehog                     >= 0.2.14.2   && < 0.3    }
common hw-polysemy-testcontainers-localstack    { build-depends: hw-polysemy:testcontainers-localstack    >= 0.2.14.2   && < 0.3    }
common microlens                                { build-depends: microlens                                >= 0.4.13     && < 0.5    }
common mtl                                      { build-depends: mtl                                      >= 2          && < 3      }
common optparse-applicative                     { build-depends: optparse-applicative                     >= 0.18.1.0   && < 0.19   }
common polysemy                                 { build-depends: polysemy                                 >= 1.9.2      && < 2      }
common polysemy-log                             { build-depends: polysemy-log                             >= 0.10.0.0   && < 1      }
common polysemy-plugin                          { build-depends: polysemy-plugin                          >= 0.4.5.2    && < 1      }
common polysemy-time                            { build-depends: polysemy-time                            >= 0.7        && < 1      }
common resourcet                                { build-depends: resourcet                                >= 1.3        && < 2      }
common stm                                      { build-depends: stm                                      >= 2.5        && < 3      }
common tasty                                    { build-depends: tasty                                    >= 1.4        && < 2      }
common tasty-discover                           { build-depends: tasty-discover                           >= 5          && < 6      }
common tasty-hedgehog                           { build-depends: tasty-hedgehog                           >= 1.4        && < 2      }
common testcontainers                           { build-depends: testcontainers                           >= 0.5.0.0    && < 1      }
common text                                     { build-depends: text                                     >= 2.1        && < 3      }
common time                                     { build-depends: time                                     >= 1.12.2     && < 2      }
common transformers                             { build-depends: transformers                             >= 0.5        && < 0.7    }
common ulid                                     { build-depends: ulid                                     >= 0.3.2.0    && < 0.4    }
common uuid                                     { build-depends: uuid                                     >= 1.3.15     && < 1.4    }

common rds-data-codecs                          { build-depends: rds-data:codecs                          }
common rds-data-polysemy                        { build-depends: rds-data:polysemy                        }
common rds-data-testlib                         { build-depends: rds-data:testlib                         }

common project-config
  default-language:     Haskell2010
  default-extensions:   BlockArguments
                        ImportQualifiedPost

  ghc-options:          -Wall
                        -Wcompat
                        -Wincomplete-record-updates
                        -Wincomplete-uni-patterns
                        -Wno-unticked-promoted-constructors
                        -Wpartial-fields
                        -Wredundant-constraints
                        -Wunused-imports

library codecs
  import:               base, project-config
                      , aeson
                      , amazonka-core
                      , amazonka-rds
                      , amazonka-rds-data
                      , amazonka-secretsmanager
                      , bytestring
                      , contravariant
                      , generic-lens
                      , microlens
                      , mtl
                      , text
                      , time
                      , transformers
                      , ulid
                      , uuid
  visibility:           public
  exposed-modules:      Data.RdsData
                        Data.RdsData.Aws
                        Data.RdsData.Decode.Array
                        Data.RdsData.Decode.Row
                        Data.RdsData.Decode.Value
                        Data.RdsData.Encode.Array
                        Data.RdsData.Encode.Param
                        Data.RdsData.Encode.Params
                        Data.RdsData.Encode.Row
                        Data.RdsData.Encode.Value
                        Data.RdsData.Internal.Aeson
                        Data.RdsData.Internal.Convert
                        Data.RdsData.Internal.Maybe
                        Data.RdsData.Migration
                        Data.RdsData.Migration.Types
                        Data.RdsData.Orphans
                        Data.RdsData.Types
                        Data.RdsData.Types.Array
                        Data.RdsData.Types.Param
                        Data.RdsData.Types.Value
  other-modules:        Paths_rds_data
  autogen-modules:      Paths_rds_data
  hs-source-dirs:       src

library polysemy
  import:               base, project-config
                      , aeson
                      , amazonka
                      , amazonka-core
                      , amazonka-rds-data
                      , bytestring
                      , contravariant
                      , generic-lens
                      , hw-polysemy-amazonka
                      , hw-polysemy-core
                      , microlens
                      , mtl
                      , polysemy
                      , polysemy-log
                      , polysemy-plugin
                      , rds-data-codecs
                      , text
                      , time
                      , transformers
                      , ulid
                      , uuid
  visibility:           public
  exposed-modules:      Data.RdsData.Polysemy
                        Data.RdsData.Polysemy.Core
                        Data.RdsData.Polysemy.Error
                        Data.RdsData.Polysemy.Migration
  ghc-options:          -fplugin=Polysemy.Plugin
  hs-source-dirs:       polysemy

library testlib
  import:               base, project-config
                      , aeson
                      , amazonka
                      , amazonka-core
                      , amazonka-rds
                      , amazonka-rds-data
                      , amazonka-secretsmanager
                      , base64-bytestring
                      , bytestring
                      , contravariant
                      , generic-lens
                      , hw-polysemy-amazonka
                      , hw-polysemy-core
                      , hw-polysemy-hedgehog
                      , hw-polysemy-testcontainers-localstack
                      , microlens
                      , mtl
                      , polysemy
                      , polysemy-log
                      , polysemy-plugin
                      , rds-data-codecs
                      , rds-data-polysemy
                      , text
                      , time
                      , transformers
                      , ulid
                      , uuid
  visibility:           public
  exposed-modules:      Data.RdsData.Polysemy.Test.Cluster
                        Data.RdsData.Polysemy.Test.Env
                        Data.RdsData.Polysemy.Test.Workspace
  ghc-options:          -fplugin=Polysemy.Plugin
  hs-source-dirs:       testlib

executable rds-data
  import:               base, project-config
                      , aeson
                      , amazonka
                      , amazonka-rds-data
                      , bytestring
                      , generic-lens
                      , hedgehog
                      , http-client
                      , hw-polysemy-amazonka
                      , hw-polysemy-core
                      , hw-polysemy-hedgehog
                      , hw-polysemy-testcontainers-localstack
                      , microlens
                      , optparse-applicative
                      , polysemy
                      , polysemy-log
                      , polysemy-plugin
                      , polysemy-time
                      , resourcet
                      , rds-data-codecs
                      , rds-data-polysemy
                      , rds-data-testlib
                      , stm
                      , testcontainers
                      , text
                      , time
                      , ulid
                      , uuid
  main-is:              Main.hs
  ghc-options:          -fplugin=Polysemy.Plugin
  other-modules:        App.AWS.Env
                        App.Cli.Options
                        App.Cli.Run
                        App.Cli.Run.BatchExecuteStatement
                        App.Cli.Run.Down
                        App.Cli.Run.Example
                        App.Cli.Run.ExecuteStatement
                        App.Cli.Run.LocalStack
                        App.Cli.Run.Up
                        App.Cli.Types
                        App.Config
                        App.Console
                        App.Options
                        App.Show
  hs-source-dirs:       app
  ghc-options:          -threaded "-with-rtsopts=-I0 -A16m -N2 --disable-delayed-os-memory-return"

test-suite rds-data-test
  import:               base, project-config
                      , aeson
                      , aeson-pretty
                      , amazonka-rds-data
                      , bytestring
                      , generic-lens
                      , hedgehog
                      , hedgehog-extras
                      , microlens
                      , rds-data-codecs
                      , tasty
                      , tasty-hedgehog
                      , text
                      , time
                      , ulid
                      , uuid
  type:                 exitcode-stdio-1.0
  main-is:              Spec.hs
  other-modules:        Data.RdsData.TestTypes
                        Data.RdsDataSpec
  hs-source-dirs:       test
  ghc-options:          -threaded -rtsopts -with-rtsopts=-N
  build-tool-depends:   tasty-discover:tasty-discover

test-suite rds-data-integration
  import:               base, project-config
                      , aeson
                      , aeson-pretty
                      , amazonka
                      , amazonka-core
                      , amazonka-rds
                      , amazonka-rds-data
                      , amazonka-secretsmanager
                      , base64-bytestring
                      , bytestring
                      , generic-lens
                      , hedgehog
                      , hedgehog-extras
                      , hw-polysemy-amazonka
                      , hw-polysemy-core
                      , hw-polysemy-hedgehog
                      , hw-polysemy-testcontainers-localstack
                      , microlens
                      , polysemy
                      , polysemy-log
                      , polysemy-plugin
                      , rds-data-codecs
                      , rds-data-polysemy
                      , rds-data-testlib
                      , tasty
                      , tasty-discover
                      , tasty-hedgehog
                      , testcontainers
                      , text
                      , time
                      , ulid
                      , uuid
  type:                 exitcode-stdio-1.0
  main-is:              Spec.hs
  other-modules:        Test.Data.RdsData.Migration.ConnectionSpec
                        Test.Data.RdsData.TestTypes
  ghc-options:          -fplugin=Polysemy.Plugin
  hs-source-dirs:       integration
  ghc-options:          -threaded -rtsopts -with-rtsopts=-N
  build-tool-depends:   tasty-discover:tasty-discover