Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
feat: add namespace_id
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc committed Jun 10, 2019
1 parent cb5a979 commit 55042eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/build/wranglerjs/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ pub fn create_metadata(
bindings.push(metadata::Bindings {
binding_type: "kv_namespace".to_string(),
name: namespace.local_binding.clone(),
namespace_id: namespace.namespace_id.clone(),
part: None,
});
}
Expand All @@ -129,6 +130,7 @@ pub fn create_metadata(
bindings.push(metadata::Bindings {
binding_type: "wasm_module".to_string(),
name: bundle.get_wasm_binding(),
namespace_id: None,
part: Some(bundle.get_wasm_binding()),
})
}
Expand Down
1 change: 1 addition & 0 deletions src/commands/build/wranglerjs/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub struct Bindings {
#[serde(rename = "type")]
pub binding_type: String,
pub part: Option<String>,
pub namespace_id: Option<String>,
}

#[derive(Serialize, Debug)]
Expand Down
1 change: 1 addition & 0 deletions src/settings/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use serde::{Deserialize, Serialize};
pub struct KvNamespace {
pub local_binding: String,
pub name: String,
pub namespace_id: Option<String>,
}

#[derive(Clone, Debug, Deserialize, Serialize)]
Expand Down

0 comments on commit 55042eb

Please sign in to comment.