splunk-cli 0.1.2__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/.github/workflows/ci.yml +3 -0
  2. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/CHANGELOG.md +6 -0
  3. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/Cargo.lock +1 -2
  4. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/Cargo.toml +2 -2
  5. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/PKG-INFO +1 -1
  6. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/scripts/test-tui-pty.py +7 -5
  7. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/tui/mod.rs +15 -10
  8. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/.dockerignore +0 -0
  9. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/.github/actionlint.yaml +0 -0
  10. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/.github/workflows/live.yml +0 -0
  11. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/.github/workflows/release.yml +0 -0
  12. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/.gitignore +0 -0
  13. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/LICENSE +0 -0
  14. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/Makefile +0 -0
  15. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/README.md +0 -0
  16. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/docs/compatibility.md +0 -0
  17. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/docs/releases.md +0 -0
  18. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/prek.toml +0 -0
  19. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/pyproject.toml +0 -0
  20. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/rust-toolchain.toml +0 -0
  21. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/schemas/clispec-v0.3.json +0 -0
  22. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/scripts/score-clispec.py +0 -0
  23. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/scripts/test-live.sh +0 -0
  24. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/auth.rs +0 -0
  25. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/browser.rs +0 -0
  26. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/cli.rs +0 -0
  27. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/client.rs +0 -0
  28. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/config.rs +0 -0
  29. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/continuation.rs +0 -0
  30. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/error.rs +0 -0
  31. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/export.rs +0 -0
  32. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/interrupt.rs +0 -0
  33. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/lib.rs +0 -0
  34. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/main.rs +0 -0
  35. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/output.rs +0 -0
  36. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/schema.rs +0 -0
  37. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/tui/demo.rs +0 -0
  38. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/tui/view.rs +0 -0
  39. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/src/workflows.rs +0 -0
  40. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/tests/cli.rs +0 -0
  41. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/tests/conformance.rs +0 -0
  42. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/tests/live/Dockerfile +0 -0
  43. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/tests/live/README.md +0 -0
  44. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/tests/live/check.py +0 -0
  45. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/tests/live/entrypoint.sh +0 -0
  46. {splunk_cli-0.1.2 → splunk_cli-0.1.3}/vership.toml +0 -0
@@ -31,6 +31,9 @@ jobs:
31
31
  with:
32
32
  toolchain: 1.100.0
33
33
  - run: cargo test --locked
34
+ - name: Test interactive terminal handoff
35
+ if: runner.os != 'Windows'
36
+ run: make test-tui-pty
34
37
  msrv:
35
38
  env:
36
39
  RUSTUP_TOOLCHAIN: "1.90.0"
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.3](https://github.com/rvben/splunk-cli/compare/v0.1.2...v0.1.3) - 2026-11-27
10
+
11
+ ### Fixed
12
+
13
+ - hand terminal input to guided sign-in without a background reader ([96a1ce4](https://github.com/rvben/splunk-cli/commit/96a1ce487a6122762aa3c7747767dee666e471c9))
14
+
9
15
  ## [0.1.2](https://github.com/rvben/splunk-cli/compare/v0.1.1...v0.1.2) - 2026-11-27
10
16
 
11
17
  ### Fixed
@@ -634,7 +634,6 @@ dependencies = [
634
634
  "crossterm_winapi",
635
635
  "derive_more",
636
636
  "document-features",
637
- "futures-core",
638
637
  "mio",
639
638
  "parking_lot",
640
639
  "rustix",
@@ -2728,7 +2727,7 @@ dependencies = [
2728
2727
 
2729
2728
  [[package]]
2730
2729
  name = "splunk-cli"
2731
- version = "0.1.2"
2730
+ version = "0.1.3"
2732
2731
  dependencies = [
2733
2732
  "base64 0.23.1",
2734
2733
  "clap",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "splunk-cli"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  edition = "2024"
5
5
  rust-version = "1.90"
6
6
  description = "Search and manage Splunk from the terminal with structured, agent-friendly output"
@@ -29,7 +29,7 @@ serde_json = "1"
29
29
  dirs = "7"
30
30
  futures-util = "0.3"
31
31
  keyring = "4.2"
32
- crossterm = { version = "0.29.0", features = ["event-stream"] }
32
+ crossterm = "0.29.0"
33
33
  ratatui = { version = "0.30.2", default-features = false, features = ["crossterm", "unstable-rendered-line-info"] }
34
34
  sha2 = "0.10"
35
35
  reqwest = { version = "0.13", default-features = false, features = ["rustls", "json", "query", "form"] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splunk-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Environment :: Console
6
6
  Classifier: Intended Audience :: Developers
@@ -170,11 +170,13 @@ try:
170
170
  state["expired"] = True
171
171
  send(b"r")
172
172
  mark = wait(b"Sign in to Splunk", mark)
173
- # An extra Enter queued in the workspace must not choose the wizard default.
174
- send(b"\r\r")
175
- mark = wait(b"Sign-in method", mark)
176
- send(b":q\r")
177
- mark = wait(b"Login canceled", mark)
173
+ # Transfer stdin repeatedly. The prompt must accept input as soon as
174
+ # it appears, even with an extra Enter queued in the workspace.
175
+ for _ in range(30):
176
+ send(b"\r\r")
177
+ mark = wait(b"Sign-in method", mark)
178
+ send(b":q\r")
179
+ mark = wait(b"Login canceled", mark)
178
180
  send(b"\r")
179
181
  mark = wait(b"Sign-in method", mark)
180
182
  send(b"token\r")
@@ -9,13 +9,12 @@ use crate::{
9
9
  use crossterm::{
10
10
  cursor::Show,
11
11
  event::{
12
- DisableBracketedPaste, EnableBracketedPaste, Event, EventStream, KeyCode, KeyEvent,
13
- KeyEventKind, KeyModifiers,
12
+ self, DisableBracketedPaste, EnableBracketedPaste, Event, KeyCode, KeyEvent, KeyEventKind,
13
+ KeyModifiers,
14
14
  },
15
15
  execute,
16
16
  terminal::{EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode, enable_raw_mode},
17
17
  };
18
- use futures_util::StreamExt;
19
18
  use ratatui::{Terminal, backend::CrosstermBackend};
20
19
  use serde_json::Value;
21
20
  use std::{
@@ -616,9 +615,19 @@ impl Drop for Screen {
616
615
  }
617
616
  }
618
617
 
618
+ async fn terminal_event() -> io::Result<Event> {
619
+ // Keep terminal reads on this task so the wizard can take over stdin.
620
+ loop {
621
+ if event::poll(Duration::ZERO)? {
622
+ return event::read();
623
+ }
624
+ tokio::time::sleep(Duration::from_millis(16)).await;
625
+ }
626
+ }
627
+
619
628
  fn discard_pending_input() -> Result<()> {
620
- while crossterm::event::poll(Duration::from_millis(1))? {
621
- crossterm::event::read()?;
629
+ while event::poll(Duration::from_millis(1))? {
630
+ event::read()?;
622
631
  }
623
632
  Ok(())
624
633
  }
@@ -669,7 +678,6 @@ pub async fn run(cli: &Cli, options: &Tui) -> Result<()> {
669
678
  }
670
679
  let login_connection = session.connection.clone();
671
680
  let mut screen = Screen::open()?;
672
- let mut events = EventStream::new();
673
681
  let mut pending = (!options.demo).then(|| request(&session, false, Operation::Connect));
674
682
  let mut label = "Checking connection";
675
683
  let mut submitting = false;
@@ -740,8 +748,7 @@ pub async fn run(cli: &Cli, options: &Tui) -> Result<()> {
740
748
  }
741
749
  }
742
750
  }
743
- event = events.next() => {
744
- let Some(event) = event else { return Ok(()); };
751
+ event = terminal_event() => {
745
752
  match event? {
746
753
  Event::Paste(text) if usable => {
747
754
  if let Mode::Edit(field) = app.mode {
@@ -784,7 +791,6 @@ pub async fn run(cli: &Cli, options: &Tui) -> Result<()> {
784
791
  continue;
785
792
  }
786
793
  }
787
- drop(events);
788
794
  // Discard keystrokes queued for the workspace before the wizard owns stdin.
789
795
  discard_pending_input()?;
790
796
  drop(screen);
@@ -794,7 +800,6 @@ pub async fn run(cli: &Cli, options: &Tui) -> Result<()> {
794
800
  }).await;
795
801
  screen = Screen::open()?;
796
802
  discard_pending_input()?;
797
- events = EventStream::new();
798
803
  match signed_in {
799
804
  Ok(_) => {
800
805
  app.error = None;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes