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
//! Publish-workflow orchestration for Cabin.
//!
//! Two paths share a single staging step:
//!
//! - [`dry_run()`] / [`DryRunRequest`] stage the package and write
//! The archive + canonical metadata to an output directory
//! Without touching any registry.
//! - [`publish_to_file_registry`] /
//! [`dry_run_against_file_registry`] call into
//! `cabin-registry-file` to actually mutate (or validate without
//! Mutating) a local file registry.
//!
//! Crate boundaries:
//! - this crate must not implement HTTP / sparse / OCI publish;
//! - it must not implement server-side functionality;
//! - file-registry layout, atomic-ish writes, and the lock file all
//! Live in `cabin-registry-file`;
//! - this crate is the layer where staging meets writing. Nothing
//! Higher-level (CLI flag handling, output formatting) belongs
//! Here.
// `PublishError` aggregates package, registry-file, and dry-run
// errors. The union crosses clippy's default
// `result_large_err` threshold once `cabin_package::PackageError`
// (which flows in via `?`) gains its own larger variants.
// Boxing the enum at every call site would be churny; we accept
// the larger `Result` instead.
pub use ;
pub use PublishError;
pub use ;