2022-01-07 22:09:52 -05:00
|
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
2019-08-14 11:03:02 -04:00
|
|
|
|
2021-12-29 08:30:08 -05:00
|
|
|
use crate::proc_state::ProcState;
|
|
|
|
use deno_core::Extension;
|
|
|
|
|
2022-03-11 17:07:02 -05:00
|
|
|
pub mod bench;
|
2021-04-28 14:17:04 -04:00
|
|
|
pub mod testing;
|
2020-09-10 09:57:45 -04:00
|
|
|
|
2022-05-17 13:50:31 -04:00
|
|
|
pub fn cli_exts(ps: ProcState) -> Vec<Extension> {
|
|
|
|
vec![init_proc_state(ps)]
|
2021-12-29 08:30:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn init_proc_state(ps: ProcState) -> Extension {
|
|
|
|
Extension::builder()
|
|
|
|
.state(move |state| {
|
|
|
|
state.put(ps.clone());
|
|
|
|
Ok(())
|
|
|
|
})
|
|
|
|
.build()
|
|
|
|
}
|