pub fn handle(project_path: &Path) -> Result<()> {
    let _config = shared::read_config(project_path)?;
    shared::generate_typescript_libraries(project_path)?;

    let deno_bootstrap = format!(
        r#"import * as Shuffle from "{shuffle}";
        import * as main from "{main}";
        import * as DiemHelpers from "{helpers}";"#,
        shuffle = project_path.join("repl.ts").to_string_lossy(),
        main = project_path
            .join(shared::MAIN_PKG_PATH)
            .join("mod.ts")
            .to_string_lossy(),
        helpers = project_path
            .join(shared::MAIN_PKG_PATH)
            .join("helpers.ts")
            .to_string_lossy(),
    );
    let mut filtered_envs: HashMap<String, String> = HashMap::new();
    filtered_envs.insert(
        String::from("PROJECT_PATH"),
        project_path.to_string_lossy().to_string(),
    );
    filtered_envs.insert(
        String::from("SHUFFLE_HOME"),
        get_shuffle_dir().to_string_lossy().to_string(),
    );

    Command::new("deno")
        .args(["repl", "--unstable", "--eval", deno_bootstrap.as_str()])
        .envs(&filtered_envs)
        .spawn()
        .expect("deno failed to start, is it installed? brew install deno")
        .wait()?;
    Ok(())
}
/// Launches a Deno REPL for the shuffle project, generating transaction
/// builders and loading them into the REPL namespace for easy on chain interaction.
Launches a Deno REPL for the shuffle project, generating transaction
builders and loading them into the REPL namespace for easy on chain interaction.
Launches a Deno REPL for the shuffle project generating transaction builders and loading them into the REPL namespace for easy on chain interaction .
pub fn handle(project_path: &Path) -> Result<()> {
    let _config = shared::read_config(project_path)?;
    shared::generate_typescript_libraries(project_path)?;
    let deno_bootstrap = format!(
        r#"import * as Shuffle from "{shuffle}";
        import * as main from "{main}";
        import * as DiemHelpers from "{helpers}";"#,
        shuffle = project_path.join("repl.ts").to_string_lossy(),
        main = project_path
            .join(shared::MAIN_PKG_PATH)
            .join("mod.ts")
            .to_string_lossy(),
        helpers = project_path
            .join(shared::MAIN_PKG_PATH)
            .join("helpers.ts")
            .to_string_lossy(),
    );
    let mut filtered_envs: HashMap<String, String> = HashMap::new();
    filtered_envs.insert(
        String::from("PROJECT_PATH"),
        project_path.to_string_lossy().to_string(),
    );
    filtered_envs.insert(
        String::from("SHUFFLE_HOME"),
        get_shuffle_dir().to_string_lossy().to_string(),
    );
    Command::new("deno")
        .args(["repl", "--unstable", "--eval", deno_bootstrap.as_str()])
        .envs(&filtered_envs)
        .spawn()
        .expect("deno failed to start, is it installed? brew install deno")
        .wait()?;
    Ok(())
}
pub fn handle ( project_path : & Path ) -> Result < ( ) > { let _config = shared :: read_config ( project_path ) ? ; shared :: generate_typescript_libraries ( project_path ) ? ; let deno_bootstrap = format ! ( r#"import * as Shuffle from "{shuffle}";
        import * as main from "{main}";
        import * as DiemHelpers from "{helpers}";"# shuffle project_path join ( " " ) to_string_lossy ( ) main project_path join ( shared MAIN_PKG_PATH ) join ( " " ) to_string_lossy ( ) helpers project_path join ( shared MAIN_PKG_PATH ) join ( " " ) to_string_lossy ( ) ) ; let mut filtered_envs : HashMap < String , String > = HashMap :: new ( ) ; filtered_envs . insert ( String :: from ( " " ) , project_path . to_string_lossy ( ) . to_string ( ) , ) ; filtered_envs . insert ( String :: from ( " " ) , get_shuffle_dir ( ) . to_string_lossy ( ) . to_string ( ) , ) ; Command :: new ( " " ) . args ( [ " " , " " , " " , deno_bootstrap . as_str ( ) ] ) . envs ( & filtered_envs ) . spawn ( ) . expect ( " " ) . wait ( ) ? ; Ok ( ( ) ) }
Launches a Deno REPL for the shuffle project, generating transaction
builders and loading them into the REPL namespace for easy on chain interaction.
Launches a Deno REPL for the shuffle project generating transaction builders and loading them into the REPL namespace for easy on chain interaction .
project_path
&Path