Skip to content

Commit

Permalink
fix: rename to dev and fix args flag (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: steebchen <[email protected]>
  • Loading branch information
glihm and steebchen authored Sep 9, 2024
1 parent c0f24aa commit 6c066ea
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 28 deletions.
2 changes: 1 addition & 1 deletion cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl CreateArgs {
invoke_max_steps: config.invoke_max_steps,
validate_max_steps: config.validate_max_steps,
genesis: config.genesis.clone(),
dev_mode: config.dev_mode,
dev: config.dev.then_some(true),
}),
torii: None,
madara: None,
Expand Down
10 changes: 5 additions & 5 deletions cli/src/command/deployments/services/katana.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use clap::{ArgAction, Args};
use clap::Args;
use katana_primitives::genesis;
use katana_primitives::genesis::json::GenesisJson;

Expand Down Expand Up @@ -52,9 +52,9 @@ pub struct KatanaCreateArgs {
#[arg(value_parser = genesis_value_parser)]
pub genesis: Option<String>,

#[arg(long, action = ArgAction::Set, default_value_t = false)]
#[arg(long)]
#[arg(help = "Enable Katana dev mode for specific endpoints.")]
pub dev_mode: bool,
pub dev: bool,
}

#[derive(Debug, Args, serde::Serialize)]
Expand Down Expand Up @@ -92,9 +92,9 @@ pub struct KatanaUpdateArgs {
#[arg(help = "Gas Price.")]
pub gas_price: Option<u64>,

#[arg(long, action = ArgAction::Set, default_value_t = false)]
#[arg(long)]
#[arg(help = "Enable Katana dev mode for specific endpoints.")]
pub dev_mode: bool,
pub dev: bool,
}

#[derive(Debug, Args, serde::Serialize)]
Expand Down
1 change: 1 addition & 0 deletions cli/src/command/deployments/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl UpdateArgs {
gas_price: config.gas_price,
invoke_max_steps: config.invoke_max_steps,
validate_max_steps: config.validate_max_steps,
dev: config.dev.then_some(true),
}),
}),
},
Expand Down
7 changes: 7 additions & 0 deletions delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

for n in {1..100}; do
cargo run -- deployments delete "ls-tmp-$n" torii -f
cargo run -- deployments delete "ls-tmp-$n" katana -f
cargo run -- deployments delete "ls-tmp-$n" saya -f
done
1 change: 1 addition & 0 deletions scripts/pull_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# cargo install graphql_client_cli

graphql-client introspect-schema --output slot/schema.json https://api.cartridge.gg/query
# graphql-client introspect-schema --output slot/schema.json http://localhost:8000/query
42 changes: 20 additions & 22 deletions slot/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2845,6 +2845,12 @@
"description": null,
"isDeprecated": false,
"name": "injected"
},
{
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "starknet_account"
}
],
"fields": [],
Expand Down Expand Up @@ -11738,15 +11744,11 @@
{
"defaultValue": null,
"description": null,
"name": "devMode",
"name": "dev",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
],
Expand Down Expand Up @@ -20372,20 +20374,6 @@
"ofType": null
}
}
},
{
"defaultValue": null,
"description": null,
"name": "devMode",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
}
],
"inputFields": [],
Expand Down Expand Up @@ -39478,6 +39466,16 @@
"name": "Long",
"ofType": null
}
},
{
"defaultValue": null,
"description": null,
"name": "dev",
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
],
"interfaces": [],
Expand Down

0 comments on commit 6c066ea

Please sign in to comment.