1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Edit Nix flake inputs from Rust.
//!
//! [`edit::FlakeEdit`] is the entry point: build one with
//! [`edit::FlakeEdit::from_text`], queue or apply [`change::Change`]s, and read
//! back the new source via [`edit::FlakeEdit::source_text`] or
//! [`edit::ApplyOutcome`].
//!
//! Supporting modules:
//! - [`walk`] traverses the `rnix` CST and applies edits.
//! - [`input`] models a flake input and its [`input::Follows`] declarations.
//! - [`lock`] parses `flake.lock` for revs, follows targets, and nested input
//! discovery via [`lock::FlakeLock::nested_inputs`].
//! - [`forge`] talks to GitHub / Gitea / Forgejo, normalizes versions, and
//! applies pin/unpin updates (`forge::api`, `forge::channel`,
//! `forge::version`, `forge::update`).
//! - [`config`] loads `flake-edit.toml`.
//! - [`cache`] persists URI completion state.
//! - [`validate`] runs pre-edit lint passes. [`Error`] is the crate-wide
//! error.
//!
//! Feature flags: `application` (default) enables the binary-side glue
//! ([`app`], [`cli`], [`diff`], [`tui`]) and pulls in `clap`, `ratatui`,
//! `crossterm`, `diffy`, etc. Library-only consumers can disable it with
//! `--no-default-features` to compile the pure edit / walk / forge surface.
pub use Error;