licence_audit/update
Workflow for the update subcommand: discover licences from the locked
manifest, present an interactive picker preselected with the current
policy, then write the result back to gleam.toml under
[tools.licence_audit].
Types
pub type UpdateResult {
UpdateResult(exit_code: Int, output: String)
UpdateDiagnostic(exit_code: Int, output: String)
}
Constructors
-
UpdateResult(exit_code: Int, output: String) -
UpdateDiagnostic(exit_code: Int, output: String)
Values
pub fn run(
manifest_path: String,
project_root: String,
config_path: option.Option(String),
ignore_config: Bool,
no_cache: Bool,
cache_path: option.Option(String),
fetcher: fn(String) -> Result(hex.PackageMetadata, hex.Error),
reporter: progress.Reporter,
) -> #(UpdateResult, progress.Reporter)
pub fn run_with_picker(
manifest_path: String,
project_root: String,
config_path: option.Option(String),
ignore_config: Bool,
no_cache: Bool,
cache_path: option.Option(String),
fetcher: fn(String) -> Result(hex.PackageMetadata, hex.Error),
pick: fn(String, List(String), List(String), List(String)) -> Result(
picker.Selection,
picker.PickerError,
),
reporter: progress.Reporter,
) -> #(UpdateResult, progress.Reporter)
Run the update workflow with an injected picker, allowing tests to drive the interactive selection step headlessly.