Skip to main content

decdn_cli/commands/
bundle.rs

1//! `decdn bundle` — the `pull` subcommand group. Issue #391.
2//!
3//! Bundle manifests are produced by `decdn origin import --dry-run` (see
4//! [`super::manifest`] and [`super::origin`]); this module only realizes
5//! them, fetching every referenced blob over the paid `cdn/client/v1` path.
6
7use std::path::Path;
8
9use decdn_common::cli::{BundleArgs, BundleCommand};
10
11/// Top-level dispatcher for `decdn bundle ...`. `config_path` (the global
12/// `--config`) is consumed by `pull` for relays/discovery/chain coordinates.
13pub async fn bundle_dispatch(args: &BundleArgs, config_path: Option<&Path>) -> anyhow::Result<()> {
14    match &args.cmd {
15        BundleCommand::Pull(pull_args) => {
16            super::bundle_pull::bundle_pull(pull_args, config_path).await
17        }
18    }
19}