mirror of
https://github.com/larksuite/cli.git
synced 2026-07-03 14:02:43 +08:00
* feat: add --jq flag for filtering JSON output across all command types Add jq expression filtering (--jq / -q) to api, service, and shortcut commands using gojq. Includes early expression validation, mutual exclusion checks with --output and non-json --format, pagination+jq aggregation path, and comprehensive test coverage. * fix: correct gofmt alignment in jq_test.go struct literal * fix: downgrade gojq to v0.12.17 to keep Go 1.23 compatibility gojq v0.12.18 requires Go 1.24, which unnecessarily bumped the project minimum version. v0.12.17 requires only Go 1.21 and provides the same jq functionality needed. * refactor: consolidate jq validation and pagination logic Extract ValidateJqFlags() and PaginateWithJq() shared functions to eliminate duplicated jq logic across api, service, and shortcut commands. * fix: reject --jq for non-JSON responses and propagate shortcut jq errors - HandleResponse now returns a validation error when --jq is used with a non-JSON Content-Type instead of silently falling through to binary save. - Shortcut runtime jq errors are captured in RuntimeContext.outputErr and propagated as the command exit code, matching api/service behavior.
57 lines
2.3 KiB
Modula-2
57 lines
2.3 KiB
Modula-2
module github.com/larksuite/cli
|
|
|
|
go 1.23.0
|
|
|
|
require (
|
|
github.com/charmbracelet/huh v1.0.0
|
|
github.com/charmbracelet/lipgloss v1.1.0
|
|
github.com/gofrs/flock v0.8.1
|
|
github.com/google/uuid v1.6.0
|
|
github.com/itchyny/gojq v0.12.17
|
|
github.com/larksuite/oapi-sdk-go/v3 v3.5.3
|
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
|
github.com/smartystreets/goconvey v1.8.1
|
|
github.com/spf13/cobra v1.10.2
|
|
github.com/zalando/go-keyring v0.2.8
|
|
golang.org/x/net v0.33.0
|
|
golang.org/x/sys v0.33.0
|
|
golang.org/x/term v0.27.0
|
|
golang.org/x/text v0.23.0
|
|
)
|
|
|
|
require (
|
|
github.com/atotto/clipboard v0.1.4 // indirect
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
|
github.com/catppuccin/go v0.3.0 // indirect
|
|
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 // indirect
|
|
github.com/charmbracelet/bubbletea v1.3.6 // indirect
|
|
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
|
|
github.com/charmbracelet/x/ansi v0.9.3 // indirect
|
|
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
|
|
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect
|
|
github.com/charmbracelet/x/term v0.2.1 // indirect
|
|
github.com/danieljoos/wincred v1.2.3 // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
|
|
github.com/godbus/dbus/v5 v5.2.2 // indirect
|
|
github.com/gogo/protobuf v1.3.2 // indirect
|
|
github.com/gopherjs/gopherjs v1.17.2 // indirect
|
|
github.com/gorilla/websocket v1.5.0 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/itchyny/timefmt-go v0.1.6 // indirect
|
|
github.com/jtolds/gls v4.20.0+incompatible // indirect
|
|
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-localereader v0.0.1 // indirect
|
|
github.com/mattn/go-runewidth v0.0.16 // indirect
|
|
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
|
|
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
|
|
github.com/muesli/cancelreader v0.2.2 // indirect
|
|
github.com/muesli/termenv v0.16.0 // indirect
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
|
github.com/smarty/assertions v1.15.0 // indirect
|
|
github.com/spf13/pflag v1.0.9 // indirect
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
|
golang.org/x/sync v0.15.0 // indirect
|
|
)
|