fj/Cargo.toml
Stephen Way fbf1354367
fix: pager via libc::dup2, harden pre-push hook stdin handling
* New `output::pager` module spawns `$FJ_PAGER` / `$PAGER` / `less -FRX`
  when stdout is a TTY and dup2's our stdout onto its stdin. The
  `PagerGuard` restores the original stdout and waits on the child on
  drop so all output flushes before exit.
* Wired into the top-level dispatch: list/view/diff/api/search/status
  output is now paged automatically. Short output passes through via
  `less -F`. Global `--no-pager` flag and `FJ_NO_PAGER` env opt out.
* libc 0.2 added as a small dep (needed for dup/dup2/close).
* Pre-push hook now drains and closes stdin at the top, then runs every
  step with `</dev/null`. Previously a test or build could in principle
  inherit git push's stdin (the list of refs being pushed) and block
  if it ever tried to read it. Adds CARGO_TERM_PROGRESS_WHEN=never so
  the progress bar doesn't muddle non-TTY runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:53:13 -07:00

50 lines
1.4 KiB
TOML

[package]
name = "fj"
version = "0.1.0"
edition = "2021"
rust-version = "1.82"
description = "Command-line tool for Forgejo, in the spirit of gh"
authors = ["Stephen Way <stephen@rasterstate.com>"]
license = "MIT"
repository = "https://rasterhub.com/rasterstate/fj"
readme = "README.md"
[[bin]]
name = "fj"
path = "src/main.rs"
[dependencies]
anyhow = "1"
thiserror = "2"
clap = { version = "4.5", features = ["derive", "env", "wrap_help"] }
clap_complete = "4.5"
clap_mangen = "0.2"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "process", "io-util", "io-std", "signal"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream", "gzip", "brotli", "multipart"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
directories = "5"
keyring = { version = "3", features = ["apple-native", "linux-native", "windows-native"] }
url = "2"
chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
tabled = { version = "0.16", features = ["ansi"] }
owo-colors = { version = "4", features = ["supports-colors"] }
supports-color = "3"
indicatif = "0.17"
dialoguer = { version = "0.11", default-features = false, features = ["password"] }
is-terminal = "0.4"
textwrap = "0.16"
futures-util = "0.3"
libc = "0.2"
[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"
opt-level = 3
[profile.dist]
inherits = "release"
lto = "fat"