|
@@ -6,7 +6,9 @@ mod templates;
|
|
mod workspace;
|
|
mod workspace;
|
|
|
|
|
|
use crate::component::new_component;
|
|
use crate::component::new_component;
|
|
-use crate::instructions::{approve_system, authorize, deauthorize, remove_system};
|
|
|
|
|
|
+use crate::instructions::{
|
|
|
|
+ approve_system, authorize, create_registry, create_world, deauthorize, remove_system,
|
|
|
|
+};
|
|
use crate::rust_template::{create_component, create_system};
|
|
use crate::rust_template::{create_component, create_system};
|
|
use crate::system::new_system;
|
|
use crate::system::new_system;
|
|
use anchor_cli::config;
|
|
use anchor_cli::config;
|
|
@@ -37,6 +39,10 @@ pub enum BoltCommand {
|
|
// Include all existing commands from anchor_cli::Command
|
|
// Include all existing commands from anchor_cli::Command
|
|
#[clap(flatten)]
|
|
#[clap(flatten)]
|
|
Anchor(anchor_cli::Command),
|
|
Anchor(anchor_cli::Command),
|
|
|
|
+ #[clap(about = "Add a new registry instance")]
|
|
|
|
+ Registry(RegistryCommand),
|
|
|
|
+ #[clap(about = "Add a new world instance")]
|
|
|
|
+ World(WorldCommand),
|
|
#[clap(about = "Add a new authority for a world instance")]
|
|
#[clap(about = "Add a new authority for a world instance")]
|
|
Authorize(AuthorizeCommand),
|
|
Authorize(AuthorizeCommand),
|
|
#[clap(about = "Remove an authority from a world instance")]
|
|
#[clap(about = "Remove an authority from a world instance")]
|
|
@@ -63,6 +69,12 @@ pub struct SystemCommand {
|
|
pub name: String,
|
|
pub name: String,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#[derive(Debug, Parser)]
|
|
|
|
+pub struct RegistryCommand {}
|
|
|
|
+
|
|
|
|
+#[derive(Debug, Parser)]
|
|
|
|
+pub struct WorldCommand {}
|
|
|
|
+
|
|
#[derive(Debug, Parser)]
|
|
#[derive(Debug, Parser)]
|
|
pub struct AuthorizeCommand {
|
|
pub struct AuthorizeCommand {
|
|
pub world: String,
|
|
pub world: String,
|
|
@@ -165,6 +177,8 @@ pub fn entry(opts: Opts) -> Result<()> {
|
|
},
|
|
},
|
|
BoltCommand::Component(command) => new_component(&opts.cfg_override, command.name),
|
|
BoltCommand::Component(command) => new_component(&opts.cfg_override, command.name),
|
|
BoltCommand::System(command) => new_system(&opts.cfg_override, command.name),
|
|
BoltCommand::System(command) => new_system(&opts.cfg_override, command.name),
|
|
|
|
+ BoltCommand::Registry(_command) => create_registry(&opts.cfg_override),
|
|
|
|
+ BoltCommand::World(_command) => create_world(&opts.cfg_override),
|
|
BoltCommand::Authorize(command) => {
|
|
BoltCommand::Authorize(command) => {
|
|
authorize(&opts.cfg_override, command.world, command.new_authority)
|
|
authorize(&opts.cfg_override, command.world, command.new_authority)
|
|
}
|
|
}
|