pub fn run_wasm_pack(command: Command) -> result::Result<(), Error> {
    // Run the correct command based off input and store the result of it so that we can clear
    // the progress bar then return it
    match command {
        Command::Build(build_opts) => {
            info!("Running build command...");
            Build::try_from_opts(build_opts).and_then(|mut b| b.run())
        }
        Command::Pack { path } => {
            info!("Running pack command...");
            info!("Path: {:?}", &path);
            pack(path)
        }
        Command::Generate {
            template,
            name,
            mode,
        } => {
            info!("Running generate command...");
            info!("Template: {:?}", &template);
            info!("Name: {:?}", &name);
            generate(template, name, mode.install_permitted())
        }
        Command::Publish {
            target,
            path,
            access,
            tag,
        } => {
            info!("Running publish command...");
            info!("Path: {:?}", &path);
            publish(&target, path, access, tag)
        }
        Command::Login {
            registry,
            scope,
            always_auth,
            auth_type,
        } => {
            info!("Running login command...");
            info!(
                "Registry: {:?}, Scope: {:?}, Always Auth: {}, Auth Type: {:?}",
                &registry, &scope, &always_auth, &auth_type
            );
            login(registry, &scope, always_auth, &auth_type)
        }
        Command::Test(test_opts) => {
            info!("Running test command...");
            Test::try_from_opts(test_opts).and_then(|t| t.run())
        }
    }
}
/// Run a command with the given logger!
Run a command with the given logger!
Run a command with the given logger!
pub fn run_wasm_pack(command: Command) -> result::Result<(), Error> {
    // Run the correct command based off input and store the result of it so that we can clear
    // the progress bar then return it
    match command {
        Command::Build(build_opts) => {
            info!("Running build command...");
            Build::try_from_opts(build_opts).and_then(|mut b| b.run())
        }
        Command::Pack { path } => {
            info!("Running pack command...");
            info!("Path: {:?}", &path);
            pack(path)
        }
        Command::Generate {
            template,
            name,
            mode,
        } => {
            info!("Running generate command...");
            info!("Template: {:?}", &template);
            info!("Name: {:?}", &name);
            generate(template, name, mode.install_permitted())
        }
        Command::Publish {
            target,
            path,
            access,
            tag,
        } => {
            info!("Running publish command...");
            info!("Path: {:?}", &path);
            publish(&target, path, access, tag)
        }
        Command::Login {
            registry,
            scope,
            always_auth,
            auth_type,
        } => {
            info!("Running login command...");
            info!(
                "Registry: {:?}, Scope: {:?}, Always Auth: {}, Auth Type: {:?}",
                &registry, &scope, &always_auth, &auth_type
            );
            login(registry, &scope, always_auth, &auth_type)
        }
        Command::Test(test_opts) => {
            info!("Running test command...");
            Test::try_from_opts(test_opts).and_then(|t| t.run())
        }
    }
}
pub fn run_wasm_pack ( command : Command ) -> result :: Result < ( ) , Error > { // Run the correct command based off input and store the result of it so that we can clear // the progress bar then return it match command { Command :: Build ( build_opts ) => { info ! ( " " ) ; Build :: try_from_opts ( build_opts ) . and_then ( | mut b | b . run ( ) ) } Command :: Pack { path } => { info ! ( " " ) ; info ! ( " " path ) ; pack ( path ) } Command :: Generate { template , name , mode , } => { info ! ( " " ) ; info ! ( " " template ) ; info ! ( " " name ) ; generate ( template , name , mode . install_permitted ( ) ) } Command :: Publish { target , path , access , tag , } => { info ! ( " " ) ; info ! ( " " path ) ; publish ( & target , path , access , tag ) } Command :: Login { registry , scope , always_auth , auth_type , } => { info ! ( " " ) ; info ! ( " " registry scope always_auth auth_type ) ; login ( registry , & scope , always_auth , & auth_type ) } Command :: Test ( test_opts ) => { info ! ( " " ) ; Test :: try_from_opts ( test_opts ) . and_then ( | t | t . run ( ) ) } } }
Run a command with the given logger!
Run a command with the given logger!
command
Command