mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-10-26 07:00:35 +03:00
supporting changes for deploy
This commit is contained in:
parent
3b79e4f38d
commit
6e58d6e24d
1597
Cargo.lock
generated
1597
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -150,6 +150,9 @@ version = "1.0"
|
||||
[dependencies.serial_test]
|
||||
version = "2.0.0"
|
||||
|
||||
[dependencies.snarkos-cli]
|
||||
version = "2.2.4"
|
||||
|
||||
[dependencies.snarkvm]
|
||||
workspace = true
|
||||
features = [ "circuit", "console" ]
|
||||
|
@ -178,4 +178,11 @@ create_messages!(
|
||||
msg: format!("Failed to write file.\nIO Error: {error}"),
|
||||
help: None,
|
||||
}
|
||||
|
||||
@backtraced
|
||||
failed_to_read_environment_private_key {
|
||||
args: (error: impl Display),
|
||||
msg: format!("Failed to read private key from environment.\nIO Error: {error}"),
|
||||
help: Some("Pass in private key using `--private-key <PRIVATE-KEY>` or create a .env file with your private key information. See examples for formatting information.".to_string()),
|
||||
}
|
||||
);
|
||||
|
@ -348,4 +348,19 @@ create_messages!(
|
||||
msg: format!("Failed to update `program.json` from the provided file path {path} - {error}"),
|
||||
help: None,
|
||||
}
|
||||
|
||||
@backtraced
|
||||
failed_to_deserialize_lock_file {
|
||||
args: (error: impl ErrorArg),
|
||||
msg: format!("Failed to deserialize `leo.lock` - {error}"),
|
||||
help: None,
|
||||
}
|
||||
|
||||
@backtraced
|
||||
invalid_lock_file_formatting {
|
||||
args: (),
|
||||
msg: "Invalid `leo.lock` formatting.".to_string(),
|
||||
help: Some("Delete the lock file and rebuild the project".to_string()),
|
||||
}
|
||||
|
||||
);
|
||||
|
@ -43,11 +43,6 @@ pub struct CLI {
|
||||
///Leo compiler and package manager
|
||||
#[derive(Parser, Debug)]
|
||||
enum Commands {
|
||||
#[clap(about = "Add a new dependency to the current package. Defaults to testnet3 network")]
|
||||
Add {
|
||||
#[clap(flatten)]
|
||||
command: Add,
|
||||
},
|
||||
#[clap(about = "Create a new Aleo account")]
|
||||
Account {
|
||||
#[clap(subcommand)]
|
||||
@ -63,16 +58,6 @@ enum Commands {
|
||||
#[clap(subcommand)]
|
||||
command: Example,
|
||||
},
|
||||
#[clap(about = "Compile the current package as a program")]
|
||||
Build {
|
||||
#[clap(flatten)]
|
||||
command: Build,
|
||||
},
|
||||
#[clap(about = "Clean the output directory")]
|
||||
Clean {
|
||||
#[clap(flatten)]
|
||||
command: Clean,
|
||||
},
|
||||
#[clap(about = "Run a program with input variables")]
|
||||
Run {
|
||||
#[clap(flatten)]
|
||||
@ -83,6 +68,26 @@ enum Commands {
|
||||
#[clap(flatten)]
|
||||
command: Execute,
|
||||
},
|
||||
#[clap(about = "Deploy a program")]
|
||||
Deploy {
|
||||
#[clap(flatten)]
|
||||
command: Deploy,
|
||||
},
|
||||
#[clap(about = "Add a new dependency to the current package. Defaults to testnet3 network")]
|
||||
Add {
|
||||
#[clap(flatten)]
|
||||
command: Add,
|
||||
},
|
||||
#[clap(about = "Compile the current package as a program")]
|
||||
Build {
|
||||
#[clap(flatten)]
|
||||
command: Build,
|
||||
},
|
||||
#[clap(about = "Clean the output directory")]
|
||||
Clean {
|
||||
#[clap(flatten)]
|
||||
command: Clean,
|
||||
},
|
||||
#[clap(about = "Update the Leo CLI")]
|
||||
Update {
|
||||
#[clap(flatten)]
|
||||
@ -135,6 +140,7 @@ pub fn run_with_args(cli: CLI) -> Result<()> {
|
||||
command.try_execute(context)
|
||||
}
|
||||
Commands::Clean { command } => command.try_execute(context),
|
||||
Commands::Deploy { command } => command.try_execute(context),
|
||||
Commands::Example { command } => command.try_execute(context),
|
||||
Commands::Run { command } => command.try_execute(context),
|
||||
Commands::Execute { command } => command.try_execute(context),
|
||||
|
@ -25,6 +25,9 @@ default-features = false
|
||||
[dependencies.snarkvm]
|
||||
workspace = true
|
||||
|
||||
[dependencies.snarkos-cli]
|
||||
version = "2.2.4"
|
||||
|
||||
[dependencies.leo-errors]
|
||||
path = "../../errors"
|
||||
version = "=1.10.0"
|
||||
|
@ -28,13 +28,23 @@ pub struct LockFileEntry {
|
||||
dependencies: Vec<String>,
|
||||
}
|
||||
|
||||
impl LockFileEntry {
|
||||
pub fn path(&self) -> Option<&PathBuf> {
|
||||
self.path.as_ref()
|
||||
}
|
||||
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&ProgramContext> for LockFileEntry {
|
||||
fn from(context: &ProgramContext) -> Self {
|
||||
LockFileEntry {
|
||||
name: context.name().to_string(),
|
||||
name: context.full_name().to_string(),
|
||||
network: context.network.clone(), // Direct access as per instruction
|
||||
location: context.location().clone(),
|
||||
path: context.path.clone(), // Direct access as per instruction
|
||||
path: context.full_path.clone(), // Direct access as per instruction
|
||||
checksum: context.checksum().to_string(),
|
||||
dependencies: context.dependencies().iter().map(|dep| format!("{}.aleo", dep)).collect(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user