packages feed

shomei-postgres-0.2.0.0: shomei-postgres.cabal

cabal-version:   3.0
name:            shomei-postgres
version:         0.2.0.0
synopsis:
  PostgreSQL adapters for Shōmei's store/publisher/signing-key ports

description:
  Production interpreters for Shōmei's effects, written against hasql: a
  PostgreSQL-backed store for users, credentials, sessions, refresh tokens,
  OAuth clients and authorization codes, MFA secrets, recovery codes,
  passkeys, service accounts, roles, and signing keys, plus the audit-event
  publisher and reader. Also provides Argon2id password hashing and SHA-256
  token hashing (crypton, ram), connection pooling, and a transactional
  unit-of-work. The schema itself lives in shomei-migrations.

homepage:        https://github.com/shinzui/shomei
bug-reports:     https://github.com/shinzui/shomei/issues
license:         MIT
license-file:    LICENSE
author:          Nadeem Bitar
maintainer:      nadeem@gmail.com
copyright:       2026 Nadeem Bitar
category:        Database, Security
build-type:      Simple
tested-with:     GHC ==9.12.4
extra-doc-files: CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/shinzui/shomei.git

common warnings
  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints

common shared
  default-language:   GHC2024
  default-extensions:
    BlockArguments
    DataKinds
    DeriveAnyClass
    DuplicateRecordFields
    GADTs
    LambdaCase
    MultilineStrings
    OverloadedLabels
    OverloadedRecordDot
    OverloadedStrings
    QualifiedDo
    RecordWildCards
    TemplateHaskell
    TypeFamilies

library
  import:          warnings, shared
  hs-source-dirs:  src
  exposed-modules:
    Shomei.Account.Credential.Postgres
    Shomei.Account.Password.Hash.Postgres
    Shomei.Account.PasswordReset.Postgres
    Shomei.Account.User.Postgres
    Shomei.Account.Verification.Postgres
    Shomei.Audit.Publisher.Postgres
    Shomei.Audit.Reader.Postgres
    Shomei.Authorization.Role.Postgres
    Shomei.Mfa.RecoveryCode.Postgres
    Shomei.Mfa.Totp.Postgres
    Shomei.OAuth.AuthorizationCode.Postgres
    Shomei.OAuth.Client.Postgres
    Shomei.Passkey.Ceremony.Postgres
    Shomei.Passkey.Postgres
    Shomei.Persistence.Codec.Postgres
    Shomei.Persistence.Database.Postgres
    Shomei.Persistence.Maintenance.Postgres
    Shomei.Persistence.Pool.Postgres
    Shomei.ServiceAccount.Postgres
    Shomei.Session.LoginAttempt.Postgres
    Shomei.Session.Postgres
    Shomei.Session.RefreshToken.Postgres
    Shomei.Session.UnitOfWork.Postgres
    Shomei.SigningKey.Postgres
    Shomei.Time.Postgres

  build-depends:
    , aeson                 >=2.1      && <2.3
    , base                  >=4.18     && <5
    , bytestring            >=0.11     && <0.13
    , containers            >=0.6      && <0.9
    , contravariant-extras  >=0.3      && <0.4
    , crypton               >=1.1.0    && <1.2
    , effectful             >=2.5      && <2.8
    , effectful-core        >=2.5      && <2.8
    , hasql                 >=1.10     && <1.11
    , hasql-pool            >=1.2      && <1.5
    , hasql-transaction     >=1.0      && <1.3
    , ram                   >=0.22     && <0.23
    , shomei-core           ^>=0.2.0.0
    , stm                   >=2.5      && <2.6
    , text                  >=2.0      && <2.2
    , time                  >=1.12     && <1.15
    , transformers          >=0.6      && <0.7
    , uuid                  >=1.3      && <1.4

test-suite shomei-postgres-test
  import:         warnings, shared
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  hs-source-dirs: test
  ghc-options:    -threaded -rtsopts -with-rtsopts=-N
  build-depends:
    , base                            >=4.18     && <5
    , bytestring                      >=0.11     && <0.13
    , containers                      >=0.6      && <0.9
    , effectful                       >=2.5      && <2.8
    , effectful-core                  >=2.5      && <2.8
    , hasql                           >=1.10     && <1.11
    , hasql-pool                      >=1.4      && <1.5
    , shomei-core                     ^>=0.2.0.0
    , shomei-migrations:test-support  ^>=0.2.0.0
    , shomei-postgres                 ^>=0.2.0.0
    , tasty                           >=1.4      && <1.6
    , tasty-hunit                     >=0.10     && <0.11
    , text                            >=2.0      && <2.2
    , time                            >=1.12     && <1.15
    , uuid                            >=1.3      && <1.4