@@ -7,20 +7,30 @@ use crate::config::OpmConfig;
77
88pub fn publish ( path : & str ) -> Result < ( ) > {
99 println ! ( "opm publish (stub) for {path}" ) ;
10- let cfg = OpmConfig :: load_from ( "opm.toml" ) . unwrap_or_else ( |_| OpmConfig :: example ( ) ) ;
11- clients:: claim_forge:: attest ( path, & cfg. claim_forge . base_url , cfg. claim_forge . token . as_deref ( ) ) ?;
12- clients:: checky_monkey:: analyze ( path, & cfg. checky_monkey . base_url , cfg. checky_monkey . token . as_deref ( ) ) ?;
13- clients:: palimpsest_license:: audit ( path, & cfg. palimpsest_license . base_url , cfg. palimpsest_license . token . as_deref ( ) ) ?;
14- clients:: cicd_hyper_a:: publish ( path, & cfg. cicd_hyper_a . base_url , cfg. cicd_hyper_a . token . as_deref ( ) ) ?;
10+ let cfg = OpmConfig :: load ( ) . unwrap_or_else ( |_| OpmConfig :: example ( ) ) ;
11+ let opts = clients:: http:: HttpOptions {
12+ timeout_ms : cfg. http . timeout_ms ,
13+ retries : cfg. http . retries ,
14+ backoff_ms : cfg. http . backoff_ms ,
15+ } ;
16+ clients:: claim_forge:: attest ( path, & cfg. claim_forge . base_url , cfg. claim_forge . token . as_deref ( ) , & opts) ?;
17+ clients:: checky_monkey:: analyze ( path, & cfg. checky_monkey . base_url , cfg. checky_monkey . token . as_deref ( ) , & opts) ?;
18+ clients:: palimpsest_license:: audit ( path, & cfg. palimpsest_license . base_url , cfg. palimpsest_license . token . as_deref ( ) , & opts) ?;
19+ clients:: cicd_hyper_a:: publish ( path, & cfg. cicd_hyper_a . base_url , cfg. cicd_hyper_a . token . as_deref ( ) , & opts) ?;
1520 Ok ( ( ) )
1621}
1722
1823pub fn audit ( package : & str ) -> Result < ( ) > {
1924 println ! ( "opm audit (stub) for {package}" ) ;
20- let cfg = OpmConfig :: load_from ( "opm.toml" ) . unwrap_or_else ( |_| OpmConfig :: example ( ) ) ;
21- clients:: claim_forge:: attest ( package, & cfg. claim_forge . base_url , cfg. claim_forge . token . as_deref ( ) ) ?;
22- clients:: checky_monkey:: analyze ( package, & cfg. checky_monkey . base_url , cfg. checky_monkey . token . as_deref ( ) ) ?;
23- clients:: oikos:: score ( package, & cfg. oikos . base_url , cfg. oikos . token . as_deref ( ) ) ?;
25+ let cfg = OpmConfig :: load ( ) . unwrap_or_else ( |_| OpmConfig :: example ( ) ) ;
26+ let opts = clients:: http:: HttpOptions {
27+ timeout_ms : cfg. http . timeout_ms ,
28+ retries : cfg. http . retries ,
29+ backoff_ms : cfg. http . backoff_ms ,
30+ } ;
31+ clients:: claim_forge:: attest ( package, & cfg. claim_forge . base_url , cfg. claim_forge . token . as_deref ( ) , & opts) ?;
32+ clients:: checky_monkey:: analyze ( package, & cfg. checky_monkey . base_url , cfg. checky_monkey . token . as_deref ( ) , & opts) ?;
33+ clients:: oikos:: score ( package, & cfg. oikos . base_url , cfg. oikos . token . as_deref ( ) , & opts) ?;
2434 Ok ( ( ) )
2535}
2636
0 commit comments