Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Sep 24, 2024
2 parents dcc740b + 87ad4ab commit e63944f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/dojo-world/src/config/namespace_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ use serde::Deserialize;
pub const NAMESPACE_CFG_PREFIX: &str = "nm|";
pub const DEFAULT_NAMESPACE_CFG_KEY: &str = "namespace_default";
pub const DOJO_MANIFESTS_DIR_CFG_KEY: &str = "dojo_manifests_dir";
pub const DEFAULT_NAMESPACE: &str = "DEFAULT_NAMESPACE";

/// Namespace configuration.
#[derive(Debug, Clone, Default, Deserialize)]
#[derive(Debug, Clone, Deserialize)]
pub struct NamespaceConfig {
pub default: String,
pub mappings: Option<HashMap<String, String>>,
}

impl Default for NamespaceConfig {
fn default() -> Self {
NamespaceConfig { default: DEFAULT_NAMESPACE.to_string(), mappings: None }
}
}

impl NamespaceConfig {
/// Creates a new namespace configuration with a default namespace.
pub fn new(default: &str) -> Self {
Expand Down
Binary file modified spawn-and-move-db.tar.gz
Binary file not shown.
Binary file modified types-test-db.tar.gz
Binary file not shown.

0 comments on commit e63944f

Please sign in to comment.