Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to golem-examples 0.2.0 #465

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion golem-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ clap-verbosity-flag = "2.1.1"
derive_more = "0.99.17"
dirs = "5.0.1"
futures-util = { workspace = true }
golem-examples = "0.1.15"
golem-examples = "0.2.0"
golem-wasm-ast = { workspace = true }
golem-wasm-rpc = { workspace = true, features = ["text"] }
golem-wasm-rpc-stubgen = { version = "0.0.22", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions golem-cli/src/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
use std::env;

use golem_examples::model::{
ExampleName, ExampleParameters, GuestLanguage, GuestLanguageTier, PackageName, TemplateName,
ComponentName, ExampleName, ExampleParameters, GuestLanguage, GuestLanguageTier, PackageName,
};
use golem_examples::*;

use crate::model::{ExampleDescription, GolemError, GolemResult};

pub fn process_new(
example_name: ExampleName,
template_name: TemplateName,
component_name: ComponentName,
package_name: Option<PackageName>,
) -> Result<GolemResult, GolemError> {
let examples = GolemExamples::list_all_examples();
Expand All @@ -34,7 +34,7 @@ pub fn process_new(
match GolemExamples::instantiate(
example,
ExampleParameters {
template_name,
component_name,
package_name: package_name
.unwrap_or(PackageName::from_string("golem:component").unwrap()),
target_path: cwd,
Expand Down
2 changes: 1 addition & 1 deletion golem-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ enum Command {

/// The new component's name
#[arg(short, long)]
component_name: golem_examples::model::TemplateName,
component_name: golem_examples::model::ComponentName,

/// The package name of the generated component (in namespace:name format)
#[arg(short, long)]
Expand Down
Loading