Skip to content

Commit

Permalink
Merge remote-tracking branch 'dojo/feat/dojo-1-rc0' into feat/dojo-1-rc0
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Oct 30, 2024
2 parents 58eed4e + a132b26 commit ebd619c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
15 changes: 13 additions & 2 deletions bin/sozo/src/commands/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use dojo_world::ResourceType;
use scarb::core::Config;
use serde::Serialize;
use tabled::settings::object::Cell;
use tabled::settings::{Color, Style};
use tabled::settings::{Color, Theme};
use tabled::{Table, Tabled};
use tracing::trace;

Expand Down Expand Up @@ -440,7 +440,7 @@ where
}

let mut table = Table::new(data);
table.with(Style::psql());
table.with(halloween());

if let Some(color) = color {
table.modify(Cell::new(0, 0), color);
Expand All @@ -453,6 +453,17 @@ where
println!("{table}\n");
}

pub fn halloween() -> Theme {
let mut style = Theme::default();
style.set_borders_vertical('💀');
style.set_borders_left('💀');
style.set_borders_right('💀');

style.set_borders_corner_top_left('🎃');

style
}

/// Pretty prints a TOML string.
fn pretty_print_toml(str: &str) {
for line in str.lines() {
Expand Down
8 changes: 4 additions & 4 deletions bin/sozo/src/commands/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ impl MigrateArgs {
);

let MigrationResult { manifest, has_changes } =
migration.migrate(&mut spinner).await.context("Migration failed.")?;
migration.migrate(&mut spinner).await.context("💀 Migration failed.")?;

spinner.update_text("Writing manifest...");
ws.write_manifest_profile(manifest).context("Failed to write manifest.")?;
ws.write_manifest_profile(manifest).context("🪦 Failed to write manifest.")?;

let colored_address = format!("{:#066x}", world_address).green();

Expand Down Expand Up @@ -104,10 +104,10 @@ async fn print_banner(ws: &Workspace<'_>, starknet: &StarknetOptions) -> Result<

let chain_id = provider.chain_id().await?;
let chain_id =
parse_cairo_short_string(&chain_id).with_context(|| "Cannot parse chain_id as string")?;
parse_cairo_short_string(&chain_id).with_context(|| "💀 Cannot parse chain_id as string")?;

let banner = Banner {
profile: ws.current_profile().expect("Scarb profile should be set.").to_string(),
profile: ws.current_profile().expect("💀 Scarb profile should be set.").to_string(),
chain_id,
rpc_url,
};
Expand Down

0 comments on commit ebd619c

Please sign in to comment.