2026-10-01 20:48:38 +08:00
|
|
|
|
cabal-version: 2.4
|
|
|
|
|
|
|
|
|
|
|
|
name: chusql-cli
|
|
|
|
|
|
version: 1.0.0
|
2026-10-05 00:15:01 +08:00
|
|
|
|
synopsis: ChuSQL command-line client for the database server
|
|
|
|
|
|
description: Provides a command-line interface for SQL and database sessions
|
|
|
|
|
|
through the chusql-server TCP endpoint. Shares accounts and
|
|
|
|
|
|
permissions with the web interface while keeping query execution
|
|
|
|
|
|
and storage in the database server process.
|
2026-10-01 20:48:38 +08:00
|
|
|
|
build-type: Simple
|
|
|
|
|
|
|
|
|
|
|
|
library
|
|
|
|
|
|
hs-source-dirs: src
|
|
|
|
|
|
exposed-modules: ChuSQL.CLI.Format
|
2026-10-11 17:32:12 +08:00
|
|
|
|
ChuSQL.CLI.Normalization
|
2026-10-05 00:15:01 +08:00
|
|
|
|
ChuSQL.CLI.History
|
|
|
|
|
|
ChuSQL.CLI.Password
|
2026-10-01 20:48:38 +08:00
|
|
|
|
ChuSQL.CLI.Script
|
|
|
|
|
|
build-depends: base >= 4.14 && < 5
|
|
|
|
|
|
, aeson
|
|
|
|
|
|
, bytestring
|
2026-10-02 14:53:02 +08:00
|
|
|
|
, chusql-core-model
|
|
|
|
|
|
, chusql-interface
|
2026-10-05 00:15:01 +08:00
|
|
|
|
, haskeline
|
2026-10-01 20:48:38 +08:00
|
|
|
|
, text
|
|
|
|
|
|
default-language: Haskell2010
|
|
|
|
|
|
ghc-options: -Wall
|
|
|
|
|
|
|
|
|
|
|
|
executable csql
|
|
|
|
|
|
main-is: Main.hs
|
|
|
|
|
|
other-modules: Repl
|
|
|
|
|
|
hs-source-dirs: app
|
|
|
|
|
|
build-depends: base
|
|
|
|
|
|
, chusql-cli
|
2026-10-02 14:53:02 +08:00
|
|
|
|
, chusql-core-model
|
|
|
|
|
|
, chusql-interface
|
2026-10-01 20:48:38 +08:00
|
|
|
|
, containers
|
|
|
|
|
|
, directory
|
|
|
|
|
|
, filepath
|
|
|
|
|
|
, haskeline
|
|
|
|
|
|
, optparse-applicative
|
|
|
|
|
|
, text
|
|
|
|
|
|
default-language: Haskell2010
|
|
|
|
|
|
ghc-options: -Wall
|
2026-10-02 14:53:02 +08:00
|
|
|
|
-- 运行期找 libchusql_core_storage.so:$ORIGIN 让二进制与动态库同目录即可
|
|
|
|
|
|
if os(linux)
|
|
|
|
|
|
ld-options: -Wl,-rpath,$ORIGIN
|
|
|
|
|
|
if os(osx)
|
|
|
|
|
|
ld-options: -Wl,-rpath,@loader_path
|
2026-10-01 20:48:38 +08:00
|
|
|
|
|
|
|
|
|
|
test-suite chusql-cli-test
|
|
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
|
|
main-is: Spec.hs
|
|
|
|
|
|
hs-source-dirs: test
|
|
|
|
|
|
build-depends: base
|
2026-10-05 00:15:01 +08:00
|
|
|
|
, directory
|
2026-10-01 20:48:38 +08:00
|
|
|
|
, aeson
|
|
|
|
|
|
, bytestring
|
2026-10-11 17:32:12 +08:00
|
|
|
|
, chusql-interface
|
2026-10-01 20:48:38 +08:00
|
|
|
|
, chusql-cli
|
2026-10-02 14:53:02 +08:00
|
|
|
|
, chusql-core-model
|
2026-10-01 20:48:38 +08:00
|
|
|
|
, hspec
|
2026-10-05 00:15:01 +08:00
|
|
|
|
, haskeline
|
2026-10-01 20:48:38 +08:00
|
|
|
|
, text
|
|
|
|
|
|
default-language: Haskell2010
|
|
|
|
|
|
ghc-options: -Wall
|