licence_audit/update
Workflow for the update subcommand: discover licences from the locked
manifest, review the current policy interactively or apply explicit edits,
then preview or write [tools.licence_audit] in the selected TOML file.
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 proposed_policy(
existing: config.Policy,
allow: option.Option(List(String)),
deny: option.Option(List(String)),
) -> Result(config.Policy, config.Error)
Replace supplied lists, preserve omitted lists and all other policy fields. Validate the existing policy before applying edits; update cannot repair it.
pub fn run(
manifest_path: String,
project_root: String,
options: cli.UpdateOptions,
source_clients: notice.Clients,
reporter: progress.Reporter,
) -> #(UpdateResult, progress.Reporter)
pub fn run_with_picker(
manifest_path: String,
project_root: String,
options: cli.UpdateOptions,
source_clients: notice.Clients,
pick: fn(String, List(String), List(String), List(String)) -> Result(
picker.Selection,
picker.PickerError,
),
reporter: progress.Reporter,
) -> #(UpdateResult, progress.Reporter)
Run with an injected picker. Explicit edits and dry-run skip the picker.
pub fn run_with_terminal_check(
manifest_path: String,
project_root: String,
options: cli.UpdateOptions,
source_clients: notice.Clients,
reporter: progress.Reporter,
stdin_is_tty stdin_is_tty: fn() -> Bool,
stdout_is_tty stdout_is_tty: fn() -> Bool,
) -> #(UpdateResult, progress.Reporter)
Check the interactive picker path before policy or metadata discovery.
pub fn uncovered_licences(
proposed: config.Policy,
discovered: List(String),
) -> List(String)
Report declarations in neither list, not enforcement findings from check.